@eluvio/elv-client-js 3.2.2 → 3.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ElvClient-min.js +15 -11
- package/dist/ElvClient-node-min.js +17 -13
- package/dist/ElvFrameClient-min.js +12 -8
- package/dist/ElvPermissionsClient-min.js +13 -9
- package/dist/ElvWalletClient-min.js +58 -0
- package/dist/ElvWalletClient-node-min.js +78 -0
- package/dist/src/AuthorizationClient.js +2248 -1990
- package/dist/src/ContentObjectVerification.js +164 -173
- package/dist/src/Crypto.js +376 -324
- package/dist/src/ElvClient.js +1182 -1019
- package/dist/src/ElvWallet.js +119 -95
- package/dist/src/EthClient.js +1040 -896
- package/dist/src/FrameClient.js +331 -300
- package/dist/src/HttpClient.js +153 -147
- package/dist/src/Id.js +1 -3
- package/dist/src/PermissionsClient.js +1294 -1168
- package/dist/src/RemoteSigner.js +263 -211
- package/dist/src/UserProfileClient.js +1164 -1023
- package/dist/src/Utils.js +209 -181
- package/dist/src/client/ABRPublishing.js +895 -858
- package/dist/src/client/AccessGroups.js +1102 -959
- package/dist/src/client/ContentAccess.js +3724 -3431
- package/dist/src/client/ContentManagement.js +2252 -2068
- package/dist/src/client/Contracts.js +647 -563
- package/dist/src/client/Files.js +1886 -1757
- package/dist/src/client/NFT.js +126 -112
- package/dist/src/client/NTP.js +478 -422
- package/dist/src/walletClient/ClientMethods.js +1029 -879
- package/dist/src/walletClient/Utils.js +84 -70
- package/dist/src/walletClient/index.js +1203 -1087
- package/package.json +4 -2
- package/src/Utils.js +0 -1
- package/src/walletClient/ClientMethods.js +34 -2
- package/src/walletClient/index.js +3 -3
- package/utilities/ProductionMasterCreate.js +2 -2
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=161)}([function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},function(t,e,n){
|
|
2
|
+
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
3
|
+
var r=n(2),i=r.Buffer;function a(t,e){for(var n in t)e[n]=t[n]}function s(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(a(r,e),e.Buffer=s),s.prototype=Object.create(i.prototype),a(i,s),s.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},s.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e,n){"use strict";(function(t){
|
|
4
|
+
/*!
|
|
5
|
+
* The buffer module from node.js, for the browser.
|
|
6
|
+
*
|
|
7
|
+
* @author Feross Aboukhadijeh <http://feross.org>
|
|
8
|
+
* @license MIT
|
|
9
|
+
*/
|
|
10
|
+
var r=n(82),i=n(83),a=n(51);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return d(this,t)}return c(this,t,e,n)}function c(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=p(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|l(e,n),i=(t=o(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(u.isBuffer(e)){var n=0|f(e.length);return 0===(t=o(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?o(t,0):p(t,e);if("Buffer"===e.type&&a(e.data))return p(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function A(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function d(t,e){if(A(e),t=o(t,e<0?0:0|f(e)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function p(t,e){var n=e.length<0?0:0|f(e.length);t=o(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function f(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function l(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return j(t).length;default:if(r)return F(t).length;e=(""+e).toLowerCase(),r=!0}}function h(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return _(this,e,n);case"utf8":case"utf-8":return Q(this,e,n);case"ascii":return M(this,e,n);case"latin1":case"binary":return k(this,e,n);case"base64":return B(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function y(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function g(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:m(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):m(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,n,r,i){var a,s=1,o=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,o/=2,u/=2,n/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var A=-1;for(a=n;a<o;a++)if(c(t,a)===c(e,-1===A?0:a-A)){if(-1===A&&(A=a),a-A+1===u)return A*s}else-1!==A&&(a-=a-A),A=-1}else for(n+u>o&&(n=o-u),a=n;a>=0;a--){for(var d=!0,p=0;p<u;p++)if(c(t,a+p)!==c(e,p)){d=!1;break}if(d)return a}return-1}function b(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var s=0;s<r;++s){var o=parseInt(e.substr(2*s,2),16);if(isNaN(o))return s;t[n+s]=o}return s}function I(t,e,n,r){return P(F(e,t.length-n),t,n,r)}function C(t,e,n,r){return P(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function v(t,e,n,r){return C(t,e,n,r)}function E(t,e,n,r){return P(j(e),t,n,r)}function w(t,e,n,r){return P(function(t,e){for(var n,r,i,a=[],s=0;s<t.length&&!((e-=2)<0);++s)n=t.charCodeAt(s),r=n>>8,i=n%256,a.push(i),a.push(r);return a}(e,t.length-n),t,n,r)}function B(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function Q(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var a,s,o,u,c=t[i],A=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(A=c);break;case 2:128==(192&(a=t[i+1]))&&(u=(31&c)<<6|63&a)>127&&(A=u);break;case 3:a=t[i+1],s=t[i+2],128==(192&a)&&128==(192&s)&&(u=(15&c)<<12|(63&a)<<6|63&s)>2047&&(u<55296||u>57343)&&(A=u);break;case 4:a=t[i+1],s=t[i+2],o=t[i+3],128==(192&a)&&128==(192&s)&&128==(192&o)&&(u=(15&c)<<18|(63&a)<<12|(63&s)<<6|63&o)>65535&&u<1114112&&(A=u)}null===A?(A=65533,d=1):A>65535&&(A-=65536,r.push(A>>>10&1023|55296),A=56320|1023&A),r.push(A),i+=d}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,n){return c(null,t,e,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,n){return function(t,e,n,r){return A(e),e<=0?o(t,e):void 0!==n?"string"==typeof r?o(t,e).fill(n,r):o(t,e).fill(n):o(t,e)}(null,t,e,n)},u.allocUnsafe=function(t){return d(null,t)},u.allocUnsafeSlow=function(t){return d(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,a=Math.min(n,r);i<a;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!a(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=u.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var s=t[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},u.byteLength=l,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?Q(this,0,t):h.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var a=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),o=Math.min(a,s),c=this.slice(r,i),A=t.slice(e,n),d=0;d<o;++d)if(c[d]!==A[d]){a=c[d],s=A[d];break}return a<s?-1:s<a?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return g(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return g(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return I(this,t,e,n);case"ascii":return C(this,t,e,n);case"latin1":case"binary":return v(this,t,e,n);case"base64":return E(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function M(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function k(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function _(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=e;a<n;++a)i+=U(t[a]);return i}function x(t,e,n){for(var r=t.slice(e,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function S(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function D(t,e,n,r,i,a){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function R(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,a=Math.min(t.length-n,2);i<a;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function T(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,a=Math.min(t.length-n,4);i<a;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function N(t,e,n,r,i,a){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(t,e,n,r,a){return a||N(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function H(t,e,n,r,a){return a||N(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;n=new u(i,void 0);for(var a=0;a<i;++a)n[a]=this[a+t]}return n},u.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||S(t,e,this.length);for(var r=this[t],i=1,a=0;++a<e&&(i*=256);)r+=this[t+a]*i;return r},u.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||S(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||S(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||S(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||S(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||S(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||S(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||S(t,e,this.length);for(var r=this[t],i=1,a=0;++a<e&&(i*=256);)r+=this[t+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||S(t,e,this.length);for(var r=e,i=1,a=this[t+--r];r>0&&(i*=256);)a+=this[t+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},u.prototype.readInt8=function(t,e){return e||S(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||S(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||S(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||S(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||S(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||S(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||S(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||S(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||S(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||D(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[e]=255&t;++a<n&&(i*=256);)this[e+a]=t/i&255;return e+n},u.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||D(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):T(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):T(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);D(this,t,e,n,i-1,-i)}var a=0,s=1,o=0;for(this[e]=255&t;++a<n&&(s*=256);)t<0&&0===o&&0!==this[e+a-1]&&(o=1),this[e+a]=(t/s>>0)-o&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);D(this,t,e,n,i-1,-i)}var a=n-1,s=1,o=0;for(this[e+a]=255&t;--a>=0&&(s*=256);)t<0&&0===o&&0!==this[e+a+1]&&(o=1),this[e+a]=(t/s>>0)-o&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):T(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):T(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return O(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return O(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return H(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return H(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,a=r-n;if(this===t&&n<e&&e<r)for(i=a-1;i>=0;--i)t[i+e]=this[i+n];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+a),e);return a},u.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var a;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(a=e;a<n;++a)this[a]=t;else{var s=u.isBuffer(t)?t:F(new u(t,r).toString()),o=s.length;for(a=0;a<n-e;++a)this[a+e]=s[a%o]}return this};var L=/[^+\/0-9A-Za-z-_]/g;function U(t){return t<16?"0"+t.toString(16):t.toString(16)}function F(t,e){var n;e=e||1/0;for(var r=t.length,i=null,a=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;a.push(n)}else if(n<2048){if((e-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function j(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(L,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function P(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(6))},function(t,e,n){t.exports=n(165)},function(t,e){function n(t,e,n,r,i,a,s){try{var o=t[a](s),u=o.value}catch(t){return void n(t)}o.done?e(u):Promise.resolve(u).then(r,i)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(i,a){var s=t.apply(e,r);function o(t){n(s,i,a,o,u,"next",t)}function u(t){n(s,i,a,o,u,"throw",t)}o(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){(function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t,r){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function a(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function s(t,e,n){if(s.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var o;"object"===e(t)?t.exports=s:r.BN=s,s.BN=s,s.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(311).Buffer}catch(t){}function u(t,e){var n=t.charCodeAt(e);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void i(!1,"Invalid character in "+t)}function c(t,e,n){var r=u(t,n);return n-1>=e&&(r|=u(t,n-1)<<4),r}function A(t,e,n,r){for(var a=0,s=0,o=Math.min(t.length,n),u=e;u<o;u++){var c=t.charCodeAt(u)-48;a*=r,s=c>=49?c-49+10:c>=17?c-17+10:c,i(c>=0&&s<r,"Invalid character"),a+=s}return a}function d(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(s.isBN=function(t){return t instanceof s||null!==t&&"object"===e(t)&&t.constructor.wordSize===s.wordSize&&Array.isArray(t.words)},s.max=function(t,e){return t.cmp(e)>0?t:e},s.min=function(t,e){return t.cmp(e)<0?t:e},s.prototype._init=function(t,n,r){if("number"==typeof t)return this._initNumber(t,n,r);if("object"===e(t))return this._initArray(t,n,r);"hex"===n&&(n=16),i(n===(0|n)&&n>=2&&n<=36);var a=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(a++,this.negative=1),a<t.length&&(16===n?this._parseHex(t,a,r):(this._parseBase(t,n,a),"le"===r&&this._initArray(this.toArray(),n,r)))},s.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},s.prototype._initArray=function(t,e,n){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var a,s,o=0;if("be"===n)for(r=t.length-1,a=0;r>=0;r-=3)s=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===n)for(r=0,a=0;r<t.length;r+=3)s=t[r]|t[r+1]<<8|t[r+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this._strip()},s.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,a=0,s=0;if("be"===n)for(r=t.length-1;r>=e;r-=2)i=c(t,e,r)<<a,this.words[s]|=67108863&i,a>=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)i=c(t,e,r)<<a,this.words[s]|=67108863&i,a>=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;this._strip()},s.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var a=t.length-n,s=a%r,o=Math.min(a,a-s)+n,u=0,c=n;c<o;c+=r)u=A(t,c,c+r,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var d=1;for(u=A(t,c,t.length,e),c=0;c<s;c++)d*=e;this.imuln(d),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},s.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},s.prototype._move=function(t){d(t,this)},s.prototype.clone=function(){var t=new s(null);return this.copy(t),t},s.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=p}catch(t){s.prototype.inspect=p}else s.prototype.inspect=p;function p(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}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"],l=[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],h=[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];s.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var r=0,a=0,s=0;s<this.length;s++){var o=this.words[s],u=(16777215&(o<<r|a)).toString(16);n=0!==(a=o>>>24-r&16777215)||s!==this.length-1?f[6-u.length]+u+n:u+n,(r+=2)>=26&&(r-=26,s--)}for(0!==a&&(n=a.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var c=l[t],A=h[t];n="";var d=this.clone();for(d.negative=0;!d.isZero();){var p=d.modrn(A).toString(t);n=(d=d.idivn(A)).isZero()?p+n:f[c-p.length]+p+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(t,e){return this.toArrayLike(o,t,e)}),s.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function y(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],a=0|e.words[0],s=i*a,o=67108863&s,u=s/67108864|0;n.words[0]=o;for(var c=1;c<r;c++){for(var A=u>>>26,d=67108863&u,p=Math.min(c,e.length-1),f=Math.max(0,c-t.length+1);f<=p;f++){var l=c-f|0;A+=(s=(i=0|t.words[l])*(a=0|e.words[f])+d)/67108864|0,d=67108863&s}n.words[c]=0|d,u=0|A}return 0!==u?n.words[c]=0|u:n.length--,n._strip()}s.prototype.toArrayLike=function(t,e,n){this._strip();var r=this.byteLength(),a=n||Math.max(1,r);i(r<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,a);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,r),s},s.prototype._toArrayLikeLE=function(t,e){for(var n=0,r=0,i=0,a=0;i<this.length;i++){var s=this.words[i]<<a|r;t[n++]=255&s,n<t.length&&(t[n++]=s>>8&255),n<t.length&&(t[n++]=s>>16&255),6===a?(n<t.length&&(t[n++]=s>>24&255),r=0,a=0):(r=s>>>24,a+=2)}if(n<t.length)for(t[n++]=r;n<t.length;)t[n++]=0},s.prototype._toArrayLikeBE=function(t,e){for(var n=t.length-1,r=0,i=0,a=0;i<this.length;i++){var s=this.words[i]<<a|r;t[n--]=255&s,n>=0&&(t[n--]=s>>8&255),n>=0&&(t[n--]=s>>16&255),6===a?(n>=0&&(t[n--]=s>>24&255),r=0,a=0):(r=s>>>24,a+=2)}if(n>=0)for(t[n--]=r;n>=0;)t[n--]=0},Math.clz32?s.prototype._countBits=function(t){return 32-Math.clz32(t)}:s.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},s.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},s.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var n=this._zeroBits(this.words[e]);if(t+=n,26!==n)break}return t},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},s.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return 0!==this.negative},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},s.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},s.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},s.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},s.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this._strip()},s.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},s.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},s.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},s.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this._strip()},s.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},s.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},s.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},s.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var r=0;r<e;r++)this.words[r]=67108863&~this.words[r];return n>0&&(this.words[r]=~this.words[r]&67108863>>26-n),this._strip()},s.prototype.notn=function(t){return this.clone().inotn(t)},s.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var n=t/26|0,r=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<r:this.words[n]&~(1<<r),this._strip()},s.prototype.iadd=function(t){var e,n,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(n=this,r=t):(n=t,r=this);for(var i=0,a=0;a<r.length;a++)e=(0|n.words[a])+(0|r.words[a])+i,this.words[a]=67108863&e,i=e>>>26;for(;0!==i&&a<n.length;a++)e=(0|n.words[a])+i,this.words[a]=67108863&e,i=e>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this},s.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},s.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var a=0,s=0;s<r.length;s++)a=(e=(0|n.words[s])-(0|r.words[s])+a)>>26,this.words[s]=67108863&e;for(;0!==a&&s<n.length;s++)a=(e=(0|n.words[s])+a)>>26,this.words[s]=67108863&e;if(0===a&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(t){return this.clone().isub(t)};var g=function(t,e,n){var r,i,a,s=t.words,o=e.words,u=n.words,c=0,A=0|s[0],d=8191&A,p=A>>>13,f=0|s[1],l=8191&f,h=f>>>13,y=0|s[2],g=8191&y,m=y>>>13,b=0|s[3],I=8191&b,C=b>>>13,v=0|s[4],E=8191&v,w=v>>>13,B=0|s[5],Q=8191&B,M=B>>>13,k=0|s[6],_=8191&k,x=k>>>13,S=0|s[7],D=8191&S,R=S>>>13,T=0|s[8],N=8191&T,O=T>>>13,H=0|s[9],L=8191&H,U=H>>>13,F=0|o[0],j=8191&F,P=F>>>13,G=0|o[1],q=8191&G,Y=G>>>13,K=0|o[2],z=8191&K,J=K>>>13,V=0|o[3],W=8191&V,Z=V>>>13,X=0|o[4],$=8191&X,tt=X>>>13,et=0|o[5],nt=8191&et,rt=et>>>13,it=0|o[6],at=8191&it,st=it>>>13,ot=0|o[7],ut=8191&ot,ct=ot>>>13,At=0|o[8],dt=8191&At,pt=At>>>13,ft=0|o[9],lt=8191&ft,ht=ft>>>13;n.negative=t.negative^e.negative,n.length=19;var yt=(c+(r=Math.imul(d,j))|0)+((8191&(i=(i=Math.imul(d,P))+Math.imul(p,j)|0))<<13)|0;c=((a=Math.imul(p,P))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(l,j),i=(i=Math.imul(l,P))+Math.imul(h,j)|0,a=Math.imul(h,P);var gt=(c+(r=r+Math.imul(d,q)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(p,q)|0))<<13)|0;c=((a=a+Math.imul(p,Y)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(g,j),i=(i=Math.imul(g,P))+Math.imul(m,j)|0,a=Math.imul(m,P),r=r+Math.imul(l,q)|0,i=(i=i+Math.imul(l,Y)|0)+Math.imul(h,q)|0,a=a+Math.imul(h,Y)|0;var mt=(c+(r=r+Math.imul(d,z)|0)|0)+((8191&(i=(i=i+Math.imul(d,J)|0)+Math.imul(p,z)|0))<<13)|0;c=((a=a+Math.imul(p,J)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,r=Math.imul(I,j),i=(i=Math.imul(I,P))+Math.imul(C,j)|0,a=Math.imul(C,P),r=r+Math.imul(g,q)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(m,q)|0,a=a+Math.imul(m,Y)|0,r=r+Math.imul(l,z)|0,i=(i=i+Math.imul(l,J)|0)+Math.imul(h,z)|0,a=a+Math.imul(h,J)|0;var bt=(c+(r=r+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(p,W)|0))<<13)|0;c=((a=a+Math.imul(p,Z)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(E,j),i=(i=Math.imul(E,P))+Math.imul(w,j)|0,a=Math.imul(w,P),r=r+Math.imul(I,q)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(C,q)|0,a=a+Math.imul(C,Y)|0,r=r+Math.imul(g,z)|0,i=(i=i+Math.imul(g,J)|0)+Math.imul(m,z)|0,a=a+Math.imul(m,J)|0,r=r+Math.imul(l,W)|0,i=(i=i+Math.imul(l,Z)|0)+Math.imul(h,W)|0,a=a+Math.imul(h,Z)|0;var It=(c+(r=r+Math.imul(d,$)|0)|0)+((8191&(i=(i=i+Math.imul(d,tt)|0)+Math.imul(p,$)|0))<<13)|0;c=((a=a+Math.imul(p,tt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(Q,j),i=(i=Math.imul(Q,P))+Math.imul(M,j)|0,a=Math.imul(M,P),r=r+Math.imul(E,q)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(w,q)|0,a=a+Math.imul(w,Y)|0,r=r+Math.imul(I,z)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(C,z)|0,a=a+Math.imul(C,J)|0,r=r+Math.imul(g,W)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(m,W)|0,a=a+Math.imul(m,Z)|0,r=r+Math.imul(l,$)|0,i=(i=i+Math.imul(l,tt)|0)+Math.imul(h,$)|0,a=a+Math.imul(h,tt)|0;var Ct=(c+(r=r+Math.imul(d,nt)|0)|0)+((8191&(i=(i=i+Math.imul(d,rt)|0)+Math.imul(p,nt)|0))<<13)|0;c=((a=a+Math.imul(p,rt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(_,j),i=(i=Math.imul(_,P))+Math.imul(x,j)|0,a=Math.imul(x,P),r=r+Math.imul(Q,q)|0,i=(i=i+Math.imul(Q,Y)|0)+Math.imul(M,q)|0,a=a+Math.imul(M,Y)|0,r=r+Math.imul(E,z)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(w,z)|0,a=a+Math.imul(w,J)|0,r=r+Math.imul(I,W)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(C,W)|0,a=a+Math.imul(C,Z)|0,r=r+Math.imul(g,$)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0,r=r+Math.imul(l,nt)|0,i=(i=i+Math.imul(l,rt)|0)+Math.imul(h,nt)|0,a=a+Math.imul(h,rt)|0;var vt=(c+(r=r+Math.imul(d,at)|0)|0)+((8191&(i=(i=i+Math.imul(d,st)|0)+Math.imul(p,at)|0))<<13)|0;c=((a=a+Math.imul(p,st)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(D,j),i=(i=Math.imul(D,P))+Math.imul(R,j)|0,a=Math.imul(R,P),r=r+Math.imul(_,q)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(x,q)|0,a=a+Math.imul(x,Y)|0,r=r+Math.imul(Q,z)|0,i=(i=i+Math.imul(Q,J)|0)+Math.imul(M,z)|0,a=a+Math.imul(M,J)|0,r=r+Math.imul(E,W)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(w,W)|0,a=a+Math.imul(w,Z)|0,r=r+Math.imul(I,$)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(C,$)|0,a=a+Math.imul(C,tt)|0,r=r+Math.imul(g,nt)|0,i=(i=i+Math.imul(g,rt)|0)+Math.imul(m,nt)|0,a=a+Math.imul(m,rt)|0,r=r+Math.imul(l,at)|0,i=(i=i+Math.imul(l,st)|0)+Math.imul(h,at)|0,a=a+Math.imul(h,st)|0;var Et=(c+(r=r+Math.imul(d,ut)|0)|0)+((8191&(i=(i=i+Math.imul(d,ct)|0)+Math.imul(p,ut)|0))<<13)|0;c=((a=a+Math.imul(p,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(N,j),i=(i=Math.imul(N,P))+Math.imul(O,j)|0,a=Math.imul(O,P),r=r+Math.imul(D,q)|0,i=(i=i+Math.imul(D,Y)|0)+Math.imul(R,q)|0,a=a+Math.imul(R,Y)|0,r=r+Math.imul(_,z)|0,i=(i=i+Math.imul(_,J)|0)+Math.imul(x,z)|0,a=a+Math.imul(x,J)|0,r=r+Math.imul(Q,W)|0,i=(i=i+Math.imul(Q,Z)|0)+Math.imul(M,W)|0,a=a+Math.imul(M,Z)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(w,$)|0,a=a+Math.imul(w,tt)|0,r=r+Math.imul(I,nt)|0,i=(i=i+Math.imul(I,rt)|0)+Math.imul(C,nt)|0,a=a+Math.imul(C,rt)|0,r=r+Math.imul(g,at)|0,i=(i=i+Math.imul(g,st)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,st)|0,r=r+Math.imul(l,ut)|0,i=(i=i+Math.imul(l,ct)|0)+Math.imul(h,ut)|0,a=a+Math.imul(h,ct)|0;var wt=(c+(r=r+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,pt)|0)+Math.imul(p,dt)|0))<<13)|0;c=((a=a+Math.imul(p,pt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(L,j),i=(i=Math.imul(L,P))+Math.imul(U,j)|0,a=Math.imul(U,P),r=r+Math.imul(N,q)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(O,q)|0,a=a+Math.imul(O,Y)|0,r=r+Math.imul(D,z)|0,i=(i=i+Math.imul(D,J)|0)+Math.imul(R,z)|0,a=a+Math.imul(R,J)|0,r=r+Math.imul(_,W)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(x,W)|0,a=a+Math.imul(x,Z)|0,r=r+Math.imul(Q,$)|0,i=(i=i+Math.imul(Q,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,tt)|0,r=r+Math.imul(E,nt)|0,i=(i=i+Math.imul(E,rt)|0)+Math.imul(w,nt)|0,a=a+Math.imul(w,rt)|0,r=r+Math.imul(I,at)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(C,at)|0,a=a+Math.imul(C,st)|0,r=r+Math.imul(g,ut)|0,i=(i=i+Math.imul(g,ct)|0)+Math.imul(m,ut)|0,a=a+Math.imul(m,ct)|0,r=r+Math.imul(l,dt)|0,i=(i=i+Math.imul(l,pt)|0)+Math.imul(h,dt)|0,a=a+Math.imul(h,pt)|0;var Bt=(c+(r=r+Math.imul(d,lt)|0)|0)+((8191&(i=(i=i+Math.imul(d,ht)|0)+Math.imul(p,lt)|0))<<13)|0;c=((a=a+Math.imul(p,ht)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(L,q),i=(i=Math.imul(L,Y))+Math.imul(U,q)|0,a=Math.imul(U,Y),r=r+Math.imul(N,z)|0,i=(i=i+Math.imul(N,J)|0)+Math.imul(O,z)|0,a=a+Math.imul(O,J)|0,r=r+Math.imul(D,W)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(R,W)|0,a=a+Math.imul(R,Z)|0,r=r+Math.imul(_,$)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(x,$)|0,a=a+Math.imul(x,tt)|0,r=r+Math.imul(Q,nt)|0,i=(i=i+Math.imul(Q,rt)|0)+Math.imul(M,nt)|0,a=a+Math.imul(M,rt)|0,r=r+Math.imul(E,at)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(w,at)|0,a=a+Math.imul(w,st)|0,r=r+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(C,ut)|0,a=a+Math.imul(C,ct)|0,r=r+Math.imul(g,dt)|0,i=(i=i+Math.imul(g,pt)|0)+Math.imul(m,dt)|0,a=a+Math.imul(m,pt)|0;var Qt=(c+(r=r+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(h,lt)|0))<<13)|0;c=((a=a+Math.imul(h,ht)|0)+(i>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,r=Math.imul(L,z),i=(i=Math.imul(L,J))+Math.imul(U,z)|0,a=Math.imul(U,J),r=r+Math.imul(N,W)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(O,W)|0,a=a+Math.imul(O,Z)|0,r=r+Math.imul(D,$)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,tt)|0,r=r+Math.imul(_,nt)|0,i=(i=i+Math.imul(_,rt)|0)+Math.imul(x,nt)|0,a=a+Math.imul(x,rt)|0,r=r+Math.imul(Q,at)|0,i=(i=i+Math.imul(Q,st)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,st)|0,r=r+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(w,ut)|0,a=a+Math.imul(w,ct)|0,r=r+Math.imul(I,dt)|0,i=(i=i+Math.imul(I,pt)|0)+Math.imul(C,dt)|0,a=a+Math.imul(C,pt)|0;var Mt=(c+(r=r+Math.imul(g,lt)|0)|0)+((8191&(i=(i=i+Math.imul(g,ht)|0)+Math.imul(m,lt)|0))<<13)|0;c=((a=a+Math.imul(m,ht)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(L,W),i=(i=Math.imul(L,Z))+Math.imul(U,W)|0,a=Math.imul(U,Z),r=r+Math.imul(N,$)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(O,$)|0,a=a+Math.imul(O,tt)|0,r=r+Math.imul(D,nt)|0,i=(i=i+Math.imul(D,rt)|0)+Math.imul(R,nt)|0,a=a+Math.imul(R,rt)|0,r=r+Math.imul(_,at)|0,i=(i=i+Math.imul(_,st)|0)+Math.imul(x,at)|0,a=a+Math.imul(x,st)|0,r=r+Math.imul(Q,ut)|0,i=(i=i+Math.imul(Q,ct)|0)+Math.imul(M,ut)|0,a=a+Math.imul(M,ct)|0,r=r+Math.imul(E,dt)|0,i=(i=i+Math.imul(E,pt)|0)+Math.imul(w,dt)|0,a=a+Math.imul(w,pt)|0;var kt=(c+(r=r+Math.imul(I,lt)|0)|0)+((8191&(i=(i=i+Math.imul(I,ht)|0)+Math.imul(C,lt)|0))<<13)|0;c=((a=a+Math.imul(C,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(L,$),i=(i=Math.imul(L,tt))+Math.imul(U,$)|0,a=Math.imul(U,tt),r=r+Math.imul(N,nt)|0,i=(i=i+Math.imul(N,rt)|0)+Math.imul(O,nt)|0,a=a+Math.imul(O,rt)|0,r=r+Math.imul(D,at)|0,i=(i=i+Math.imul(D,st)|0)+Math.imul(R,at)|0,a=a+Math.imul(R,st)|0,r=r+Math.imul(_,ut)|0,i=(i=i+Math.imul(_,ct)|0)+Math.imul(x,ut)|0,a=a+Math.imul(x,ct)|0,r=r+Math.imul(Q,dt)|0,i=(i=i+Math.imul(Q,pt)|0)+Math.imul(M,dt)|0,a=a+Math.imul(M,pt)|0;var _t=(c+(r=r+Math.imul(E,lt)|0)|0)+((8191&(i=(i=i+Math.imul(E,ht)|0)+Math.imul(w,lt)|0))<<13)|0;c=((a=a+Math.imul(w,ht)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(L,nt),i=(i=Math.imul(L,rt))+Math.imul(U,nt)|0,a=Math.imul(U,rt),r=r+Math.imul(N,at)|0,i=(i=i+Math.imul(N,st)|0)+Math.imul(O,at)|0,a=a+Math.imul(O,st)|0,r=r+Math.imul(D,ut)|0,i=(i=i+Math.imul(D,ct)|0)+Math.imul(R,ut)|0,a=a+Math.imul(R,ct)|0,r=r+Math.imul(_,dt)|0,i=(i=i+Math.imul(_,pt)|0)+Math.imul(x,dt)|0,a=a+Math.imul(x,pt)|0;var xt=(c+(r=r+Math.imul(Q,lt)|0)|0)+((8191&(i=(i=i+Math.imul(Q,ht)|0)+Math.imul(M,lt)|0))<<13)|0;c=((a=a+Math.imul(M,ht)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(L,at),i=(i=Math.imul(L,st))+Math.imul(U,at)|0,a=Math.imul(U,st),r=r+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(O,ut)|0,a=a+Math.imul(O,ct)|0,r=r+Math.imul(D,dt)|0,i=(i=i+Math.imul(D,pt)|0)+Math.imul(R,dt)|0,a=a+Math.imul(R,pt)|0;var St=(c+(r=r+Math.imul(_,lt)|0)|0)+((8191&(i=(i=i+Math.imul(_,ht)|0)+Math.imul(x,lt)|0))<<13)|0;c=((a=a+Math.imul(x,ht)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(L,ut),i=(i=Math.imul(L,ct))+Math.imul(U,ut)|0,a=Math.imul(U,ct),r=r+Math.imul(N,dt)|0,i=(i=i+Math.imul(N,pt)|0)+Math.imul(O,dt)|0,a=a+Math.imul(O,pt)|0;var Dt=(c+(r=r+Math.imul(D,lt)|0)|0)+((8191&(i=(i=i+Math.imul(D,ht)|0)+Math.imul(R,lt)|0))<<13)|0;c=((a=a+Math.imul(R,ht)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,r=Math.imul(L,dt),i=(i=Math.imul(L,pt))+Math.imul(U,dt)|0,a=Math.imul(U,pt);var Rt=(c+(r=r+Math.imul(N,lt)|0)|0)+((8191&(i=(i=i+Math.imul(N,ht)|0)+Math.imul(O,lt)|0))<<13)|0;c=((a=a+Math.imul(O,ht)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Tt=(c+(r=Math.imul(L,lt))|0)+((8191&(i=(i=Math.imul(L,ht))+Math.imul(U,lt)|0))<<13)|0;return c=((a=Math.imul(U,ht))+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,u[0]=yt,u[1]=gt,u[2]=mt,u[3]=bt,u[4]=It,u[5]=Ct,u[6]=vt,u[7]=Et,u[8]=wt,u[9]=Bt,u[10]=Qt,u[11]=Mt,u[12]=kt,u[13]=_t,u[14]=xt,u[15]=St,u[16]=Dt,u[17]=Rt,u[18]=Tt,0!==c&&(u[19]=c,n.length++),n};function m(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,a=0;a<n.length-1;a++){var s=i;i=0;for(var o=67108863&r,u=Math.min(a,e.length-1),c=Math.max(0,a-t.length+1);c<=u;c++){var A=a-c,d=(0|t.words[A])*(0|e.words[c]),p=67108863&d;o=67108863&(p=p+o|0),i+=(s=(s=s+(d/67108864|0)|0)+(p>>>26)|0)>>>26,s&=67108863}n.words[a]=o,r=s,s=i}return 0!==r?n.words[a]=r:n.length--,n._strip()}function b(t,e,n){return m(t,e,n)}function I(t,e){this.x=t,this.y=e}Math.imul||(g=y),s.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):n<63?y(this,t,e):n<1024?m(this,t,e):b(this,t,e)},I.prototype.makeRBT=function(t){for(var e=new Array(t),n=s.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,n,t);return e},I.prototype.revBin=function(t,e,n){if(0===t||t===n-1)return t;for(var r=0,i=0;i<e;i++)r|=(1&t)<<e-i-1,t>>=1;return r},I.prototype.permute=function(t,e,n,r,i,a){for(var s=0;s<a;s++)r[s]=e[t[s]],i[s]=n[t[s]]},I.prototype.transform=function(t,e,n,r,i,a){this.permute(a,t,e,n,r,i);for(var s=1;s<i;s<<=1)for(var o=s<<1,u=Math.cos(2*Math.PI/o),c=Math.sin(2*Math.PI/o),A=0;A<i;A+=o)for(var d=u,p=c,f=0;f<s;f++){var l=n[A+f],h=r[A+f],y=n[A+f+s],g=r[A+f+s],m=d*y-p*g;g=d*g+p*y,y=m,n[A+f]=l+y,r[A+f]=h+g,n[A+f+s]=l-y,r[A+f+s]=h-g,f!==o&&(m=u*d-c*p,p=u*p+c*d,d=m)}},I.prototype.guessLen13b=function(t,e){var n=1|Math.max(e,t),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},I.prototype.conjugate=function(t,e,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=t[r];t[r]=t[n-r-1],t[n-r-1]=i,i=e[r],e[r]=-e[n-r-1],e[n-r-1]=-i}},I.prototype.normalize13b=function(t,e){for(var n=0,r=0;r<e/2;r++){var i=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+n;t[r]=67108863&i,n=i<67108864?0:i/67108864|0}return t},I.prototype.convert13b=function(t,e,n,r){for(var a=0,s=0;s<e;s++)a+=0|t[s],n[2*s]=8191&a,a>>>=13,n[2*s+1]=8191&a,a>>>=13;for(s=2*e;s<r;++s)n[s]=0;i(0===a),i(0==(-8192&a))},I.prototype.stub=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=0;return e},I.prototype.mulp=function(t,e,n){var r=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(r),a=this.stub(r),s=new Array(r),o=new Array(r),u=new Array(r),c=new Array(r),A=new Array(r),d=new Array(r),p=n.words;p.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,c,r),this.transform(s,a,o,u,r,i),this.transform(c,a,A,d,r,i);for(var f=0;f<r;f++){var l=o[f]*A[f]-u[f]*d[f];u[f]=o[f]*d[f]+u[f]*A[f],o[f]=l}return this.conjugate(o,u,r),this.transform(o,u,p,a,r,i),this.conjugate(p,a,r),this.normalize13b(p,r),n.negative=t.negative^e.negative,n.length=t.length+e.length,n._strip()},s.prototype.mul=function(t){var e=new s(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},s.prototype.mulf=function(t){var e=new s(null);return e.words=new Array(this.length+t.length),b(this,t,e)},s.prototype.imul=function(t){return this.clone().mulTo(t,this)},s.prototype.imuln=function(t){var e=t<0;e&&(t=-t),i("number"==typeof t),i(t<67108864);for(var n=0,r=0;r<this.length;r++){var a=(0|this.words[r])*t,s=(67108863&a)+(67108863&n);n>>=26,n+=a/67108864|0,n+=s>>>26,this.words[r]=67108863&s}return 0!==n&&(this.words[r]=n,this.length++),e?this.ineg():this},s.prototype.muln=function(t){return this.clone().imuln(t)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n<e.length;n++){var r=n/26|0,i=n%26;e[n]=t.words[r]>>>i&1}return e}(t);if(0===e.length)return new s(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var i=n.sqr();r<e.length;r++,i=i.sqr())0!==e[r]&&(n=n.mul(i));return n},s.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,n=t%26,r=(t-n)/26,a=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(e=0;e<this.length;e++){var o=this.words[e]&a,u=(0|this.words[e])-o<<n;this.words[e]=u|s,s=o>>>26-n}s&&(this.words[e]=s,this.length++)}if(0!==r){for(e=this.length-1;e>=0;e--)this.words[e+r]=this.words[e];for(e=0;e<r;e++)this.words[e]=0;this.length+=r}return this._strip()},s.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},s.prototype.iushrn=function(t,e,n){var r;i("number"==typeof t&&t>=0),r=e?(e-e%26)/26:0;var a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<<a,u=n;if(r-=s,r=Math.max(0,r),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var A=0;for(c=this.length-1;c>=0&&(0!==A||c>=r);c--){var d=0|this.words[c];this.words[c]=A<<26-a|d>>>a,A=d&o}return u&&0!==A&&(u.words[u.length++]=A),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(t,e,n){return i(0===this.negative),this.iushrn(t,e,n)},s.prototype.shln=function(t){return this.clone().ishln(t)},s.prototype.ushln=function(t){return this.clone().iushln(t)},s.prototype.shrn=function(t){return this.clone().ishrn(t)},s.prototype.ushrn=function(t){return this.clone().iushrn(t)},s.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,r=1<<e;return!(this.length<=n)&&!!(this.words[n]&r)},s.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var r=67108863^67108863>>>e<<e;this.words[this.length-1]&=r}return this._strip()},s.prototype.maskn=function(t){return this.clone().imaskn(t)},s.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},s.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},s.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},s.prototype.addn=function(t){return this.clone().iaddn(t)},s.prototype.subn=function(t){return this.clone().isubn(t)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(t,e,n){var r,a,s=t.length+n;this._expand(s);var o=0;for(r=0;r<t.length;r++){a=(0|this.words[r+n])+o;var u=(0|t.words[r])*e;o=((a-=67108863&u)>>26)-(u/67108864|0),this.words[r+n]=67108863&a}for(;r<this.length-n;r++)o=(a=(0|this.words[r+n])+o)>>26,this.words[r+n]=67108863&a;if(0===o)return this._strip();for(i(-1===o),o=0,r=0;r<this.length;r++)o=(a=-(0|this.words[r])+o)>>26,this.words[r]=67108863&a;return this.negative=1,this._strip()},s.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,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 o,u=r.length-i.length;if("mod"!==e){(o=new s(null)).length=u+1,o.words=new Array(o.length);for(var c=0;c<o.length;c++)o.words[c]=0}var A=r.clone()._ishlnsubmul(i,1,u);0===A.negative&&(r=A,o&&(o.words[u]=1));for(var d=u-1;d>=0;d--){var p=67108864*(0|r.words[i.length+d])+(0|r.words[i.length+d-1]);for(p=Math.min(p/a|0,67108863),r._ishlnsubmul(i,p,d);0!==r.negative;)p--,r.negative=0,r._ishlnsubmul(i,1,d),r.isZero()||(r.negative^=1);o&&(o.words[d]=p)}return o&&o._strip(),r._strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:o||null,mod:r}},s.prototype.divmod=function(t,e,n){return i(!t.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(r=o.div.neg()),"div"!==e&&(a=o.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:r,mod:a}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(r=o.div.neg()),{div:r,mod:o.mod}):0!=(this.negative&t.negative)?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(a=o.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:o.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new s(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new s(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new s(this.modrn(t.words[0]))}:this._wordDiv(t,e);var r,a,o},s.prototype.div=function(t){return this.divmod(t,"div",!1).div},s.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},s.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},s.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),a=n.cmp(r);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},s.prototype.modrn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var n=(1<<26)%t,r=0,a=this.length-1;a>=0;a--)r=(n*r+(0|this.words[a]))%t;return e?-r:r},s.prototype.modn=function(t){return this.modrn(t)},s.prototype.idivn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var n=0,r=this.length-1;r>=0;r--){var a=(0|this.words[r])+67108864*n;this.words[r]=a/t|0,n=a%t}return this._strip(),e?this.ineg():this},s.prototype.divn=function(t){return this.clone().idivn(t)},s.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r=new s(1),a=new s(0),o=new s(0),u=new s(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var A=n.clone(),d=e.clone();!e.isZero();){for(var p=0,f=1;0==(e.words[0]&f)&&p<26;++p,f<<=1);if(p>0)for(e.iushrn(p);p-- >0;)(r.isOdd()||a.isOdd())&&(r.iadd(A),a.isub(d)),r.iushrn(1),a.iushrn(1);for(var l=0,h=1;0==(n.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(n.iushrn(l);l-- >0;)(o.isOdd()||u.isOdd())&&(o.iadd(A),u.isub(d)),o.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),r.isub(o),a.isub(u)):(n.isub(e),o.isub(r),u.isub(a))}return{a:o,b:u,gcd:n.iushln(c)}},s.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r,a=new s(1),o=new s(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,A=1;0==(e.words[0]&A)&&c<26;++c,A<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var d=0,p=1;0==(n.words[0]&p)&&d<26;++d,p<<=1);if(d>0)for(n.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(o)):(n.isub(e),o.isub(a))}return(r=0===e.cmpn(1)?a:o).cmpn(0)<0&&r.iadd(t),r},s.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var a=e;e=n,n=a}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},s.prototype.invm=function(t){return this.egcd(t).a.umod(t)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(t){return this.words[0]&t},s.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,n=(t-e)/26,r=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=r,this;for(var a=r,s=n;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)e=1;else{n&&(t=-t),i(t<=67108863,"Number is too big");var r=0|this.words[0];e=r===t?0:r<t?-1:1}return 0!==this.negative?0|-e:e},s.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},s.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){r<i?e=-1:r>i&&(e=1);break}}return e},s.prototype.gtn=function(t){return 1===this.cmpn(t)},s.prototype.gt=function(t){return 1===this.cmp(t)},s.prototype.gten=function(t){return this.cmpn(t)>=0},s.prototype.gte=function(t){return this.cmp(t)>=0},s.prototype.ltn=function(t){return-1===this.cmpn(t)},s.prototype.lt=function(t){return-1===this.cmp(t)},s.prototype.lten=function(t){return this.cmpn(t)<=0},s.prototype.lte=function(t){return this.cmp(t)<=0},s.prototype.eqn=function(t){return 0===this.cmpn(t)},s.prototype.eq=function(t){return 0===this.cmp(t)},s.red=function(t){return new M(t)},s.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},s.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(t){return this.red=t,this},s.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},s.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},s.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},s.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},s.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},s.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},s.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},s.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},s.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var C={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new s(e,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function B(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function Q(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=s._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new s(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},a(E,v),E.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r<n;r++)e.words[r]=t.words[r];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,r=10;r<t.length;r++){var a=0|t.words[r];t.words[r-10]=(4194303&a)<<4|i>>>22,i=a}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},E.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},a(w,v),a(B,v),a(Q,v),Q.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,i=67108863&r;r>>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},s._prime=function(t){if(C[t])return C[t];var e;if("k256"===t)e=new E;else if("p224"===t)e=new w;else if("p192"===t)e=new B;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new Q}return C[t]=e,e},M.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(d(t,t.umod(this.m)._forceRed(this)),t)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},M.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var n=this.m.add(new s(1)).iushrn(2);return this.pow(t,n)}for(var r=this.m.subn(1),a=0;!r.isZero()&&0===r.andln(1);)a++,r.iushrn(1);i(!r.isZero());var o=new s(1).toRed(this),u=o.redNeg(),c=this.m.subn(1).iushrn(1),A=this.m.bitLength();for(A=new s(2*A*A).toRed(this);0!==this.pow(A,c).cmp(u);)A.redIAdd(u);for(var d=this.pow(A,r),p=this.pow(t,r.addn(1).iushrn(1)),f=this.pow(t,r),l=a;0!==f.cmp(o);){for(var h=f,y=0;0!==h.cmp(o);y++)h=h.redSqr();i(y<l);var g=this.pow(d,new s(1).iushln(l-y-1));p=p.redMul(g),d=g.redSqr(),f=f.redMul(d),l=y}return p},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new s(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new s(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var i=n[0],a=0,o=0,u=e.bitLength()%26;for(0===u&&(u=26),r=e.length-1;r>=0;r--){for(var c=e.words[r],A=u-1;A>=0;A--){var d=c>>A&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++o||0===r&&0===A)&&(i=this.mul(i,n[a]),o=0,a=0)):o=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},s.mont=function(t){return new k(t)},a(k,M),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),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)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new s(0)._forceRed(this);var n=t.mul(e),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)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(13)(t))},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"===("undefined"==typeof window?"undefined":n(window))&&(r=window)}t.exports=r},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){var n,r,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(t){if(n===setTimeout)return setTimeout(t,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(t){n=a}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var u,c=[],A=!1,d=-1;function p(){A&&u&&(A=!1,u.length?c=u.concat(c):d=-1,c.length&&f())}function f(){if(!A){var t=o(p);A=!0;for(var e=c.length;e;){for(u=c,c=[];++d<e;)u&&u[d].run();d=-1,e=c.length}u=null,A=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function l(t,e){this.fun=t,this.array=e}function h(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new l(t,e)),1!==c.length||A||o(f)},l.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){(function(e,r){var i=n(24),a=n(3),s=n(4),o=n(7),u=n(50);function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function A(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}void 0===e&&(e=n(2).Buffer);var d,p,f,l=n(88),h=n(172).default,y=n(173),g=n(52),m=n(89),b=n(18).utils,I=b.keccak256,C=b.getAddress,v={name:"Utils",nullAddress:"0x0000000000000000000000000000000000000000",weiPerEther:new h("1000000000000000000"),ToBigNumber:function(t){return new h(t)},WeiToEther:function(t){return v.ToBigNumber(t).div(v.weiPerEther)},EtherToWei:function(t){return v.ToBigNumber(t).times(v.weiPerEther)},FormatAddress:function(t){return t&&"string"==typeof t?((t=t.trim()).startsWith("0x")||(t="0x"+t),t.toLowerCase()):""},FormatSignature:function(t){return t=t.replace("0x",""),"ES256K_"+l.encode(e.from(t,"hex"))},DecodeVersionHash:function(t){if(!t.startsWith("hq__")&&!t.startsWith("tq__"))throw new Error('Invalid version hash: "'.concat(t,'"'));t=t.slice(4);var n=v.FromB58(t),r=n.slice(0,32),i=r.toString("hex");n=n.slice(32);for(var a=0;n[a]>=128;)a++;a++;var s=n.slice(0,a),o=y.decode(s);return n=n.slice(a),{digest:i,size:o,objectId:"iq__"+v.B58(n),partHash:"hqp_"+v.B58(e.concat([r,s]))}},DecodeSignedToken:function(t){var n=v.FromB58(t.slice(6)),r="0x".concat(n.slice(0,65).toString("hex")),i=JSON.parse(e.from(m.inflateRaw(n.slice(65))).toString("utf-8"));return i.adr=v.FormatAddress("0x".concat(e.from(i.adr,"base64").toString("hex"))),{payload:i,signature:r}},DecodeWriteToken:function(t){if(t.length<4)throw new Error('Invalid write token: ["'.concat(t,'"] (unknown prefix)'));var e;if(t.startsWith("tqw__")?(e="tq__",t=t.slice(5)):(e=t.slice(0,4),t=t.slice(4)),0===t.length)throw new Error('Invalid write token: ["'.concat(t,'"] (too short)'));switch(e){case"tqw_":case"tq__":case"tqpw":case"tqp_":case"tlro":break;default:throw new Error('Invalid write token: ["'.concat(t,'"] (unknown prefix)'))}var n,r,i,a,s,o=v.FromB58(t);function u(t,e){var n,r,i=y.decode(o,0),a=y.decode.bytes;return r=t?0===(n=o.slice(a+1,i+a)).length?"":e+v.B58(n):"0x"+(n=o.slice(a,i+a)).toString("hex"),o=o.slice(i+a),r}switch(e){case"tqw_":case"tqpw":n="0x"+o.toString("hex");break;case"tlro":case"tq__":r=u(!0,"iq__"),i=u(!0,"inod"),n=u(!1,"");break;case"tqp_":if(o.length<3)throw new Error('Invalid write token: ["'.concat(t,'"] (token truncated)'));a=o[0],s=o[1],o=o.slice(2),n=u(!1,"");break;default:throw new Error('Invalid write token: ["'.concat(t,'"] (unknown prefix)'))}return{tokenType:e,tokenId:n,objectId:r,nodeId:i,scheme:a,flags:s}},AddressToHash:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t=t.replace(n?"0x04":"0x",""),l.encode(e.from(t,"hex"))},AddressToSpaceId:function(t){return"ispc"+v.AddressToHash(t)},AddressToLibraryId:function(t){return"ilib"+v.AddressToHash(t)},AddressToObjectId:function(t){return"iq__"+v.AddressToHash(t)},HashToAddress:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t=e?t:t.substr(4),v.FormatAddress((e?"0x04":"0x")+l.decode(t).toString("hex"))},EqualAddress:function(t,e){return!(!t||!e)&&v.FormatAddress(t)===v.FormatAddress(e)},EqualHash:function(t,e){return!(!t||!e)&&(!(t.length<=4||e.length<=4)&&v.HashToAddress(t)===v.HashToAddress(e))},ValidAddress:function(t){try{return C(t),!0}catch(t){return!1}},ValidHash:function(t){return v.ValidAddress(v.HashToAddress(t))},ToBytes32:function(t){return"0x"+t.split("").map((function(t){return t.charCodeAt(0).toString(16)})).join("").slice(0,64).padEnd(64,"0")},BufferToArrayBuffer:function(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)},B64:function(t){return e.from(t,"utf-8").toString("base64")},FromB64:function(t){return e.from(t,"base64").toString("utf-8")},FromB64URL:function(t){var e=(t=t.replace(/-/g,"+").replace(/_/g,"/")).length%4;if(e){if(1===e)throw new Error("InvalidLengthError: Input base64url string is the wrong length to determine padding");t+=new Array(5-e).join("=")}return v.FromB64(t)},B58:function(t){return l.encode(e.from(t))},FromB58:function(t){return l.decode(t)},FromB58ToStr:function(t){return(new TextDecoder).decode(v.FromB58(t))},DecodeAuthorizationToken:function(t){var e=(t=decodeURIComponent(t)).split("."),n=u(e,2),r=n[0],i=n[1];return A(A({},r=JSON.parse(v.FromB64(r))),{},{signature:i})},LimitedMap:(f=s(a.mark((function t(e,n,r){var o,u,c,A,d;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=0,u=!1,c=function(){var t=s(a.mark((function t(){var e;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!u){t.next=5;break}return t.next=3,new Promise((function(t){return setTimeout(t,10)}));case 3:t.next=0;break;case 5:return u=!0,e=o,o+=1,u=!1,t.abrupt("return",e);case 10:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),A=[],d=0,t.abrupt("return",new Promise((function(t,o){i(Array(e||1)).forEach(s(a.mark((function e(){var i;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d+=1,e.next=3,c();case 3:i=e.sent;case 4:if(!(i<n.length)){e.next=19;break}return e.prev=5,e.next=8,r(n[i],i);case 8:A[i]=e.sent,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),o(e.t0);case 14:return e.next=16,c();case 16:i=e.sent,e.next=4;break;case 19:0==(d-=1)&&t(A);case 21:case"end":return e.stop()}}),e,null,[[5,11]])}))))})));case 6:case"end":return t.stop()}}),t)}))),function(t,e,n){return f.apply(this,arguments)}),ResponseToJson:(p=s(a.mark((function t(e){return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",v.ResponseToFormat("json",e));case 1:case"end":return t.stop()}}),t)}))),function(t){return p.apply(this,arguments)}),ResponseToFormat:(d=s(a.mark((function t(e,n){return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n;case 2:n=t.sent,t.t0=e.toLowerCase(),t.next="json"===t.t0?6:"text"===t.t0?9:"blob"===t.t0?12:"arraybuffer"===t.t0?15:"formdata"===t.t0?18:"buffer"===t.t0?21:24;break;case 6:return t.next=8,n.json();case 8:return t.abrupt("return",t.sent);case 9:return t.next=11,n.text();case 11:return t.abrupt("return",t.sent);case 12:return t.next=14,n.blob();case 14:return t.abrupt("return",t.sent);case 15:return t.next=17,n.arrayBuffer();case 17:return t.abrupt("return",t.sent);case 18:return t.next=20,n.formData();case 20:return t.abrupt("return",t.sent);case 21:return t.next=23,n.buffer();case 23:return t.abrupt("return",t.sent);case 24:return t.abrupt("return",n);case 25:case"end":return t.stop()}}),t)}))),function(t,e){return d.apply(this,arguments)}),ResizeImage:function(t){var e=t.imageUrl,n=t.height;return!e||e&&!e.startsWith("http")?e:(e=g(e).removeSearch("height").removeSearch("header-x_image_height"),n&&!isNaN(parseInt(n))&&e.addSearch("height",parseInt(n)),e.toString())},SafeTraverse:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!t)return t;1===n.length&&Array.isArray(n[0])&&(n=n[0]);for(var i=t,a=0;a<n.length;a++)if(void 0===(i=i[n[a]]))return;return i},IsCloneable:function(t){if(Object(t)!==t)return!0;switch({}.toString.call(t).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(t).every((function(e){return v.IsCloneable(t[e])}));case"Map":return i(t.keys()).every(v.IsCloneable)&&i(t.values()).every(v.IsCloneable);case"Set":return i(t.keys()).every(v.IsCloneable);default:return!1}},MakeClonable:function(t){if(v.IsCloneable(t))return t;if(e.isBuffer(t))return v.BufferToArrayBuffer(t);switch({}.toString.call(t).slice(8,-1)){case"Response":case"Function":return;case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return t;case"Array":return t.map((function(t){return v.MakeClonable(t)}));case"Set":return new Set(Array.from(t.keys()).map((function(t){return v.MakeClonable(t)})));case"Map":var n=new Map;return Array.from(t.keys()).forEach((function(e){var r=v.MakeClonable(t.get(e));r&&n.set(e,r)})),n;case"Error":return t.message;case"Object":var r={};return Object.keys(t).map((function(e){var n=v.MakeClonable(t[e]);n&&(r[e]=n)})),r;default:return JSON.parse(JSON.stringify(t))}},PublicKeyToAddress:function(t){var n=new Uint8Array(e.from(t.replace("0x04",""),"hex")),r="0x"+I(n).slice(26);return v.FormatAddress(r)},PLATFORM_NODE:"node",PLATFORM_WEB:"web",PLATFORM_REACT_NATIVE:"react-native",Platform:function(){return"undefined"!=typeof navigator&&"ReactNative"===navigator.product?v.PLATFORM_REACT_NATIVE:void 0!==r&&void 0!==r.versions&&void 0!==r.versions.node?v.PLATFORM_NODE:v.PLATFORM_WEB}};t.exports=v}).call(this,n(2).Buffer,n(8))},function(t,e){function n(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=n,n.equal=function(t,e,n){if(t!=e)throw new Error(n||"Assertion failed: "+t+" != "+e)}},function(t,e,n){"use strict";var r=e,i=n(5),a=n(10),s=n(142);r.assert=a,r.toArray=s.toArray,r.zero2=s.zero2,r.toHex=s.toHex,r.encode=s.encode,r.getNAF=function(t,e,n){var r=new Array(Math.max(t.bitLength(),n)+1);r.fill(0);for(var i=1<<e+1,a=t.clone(),s=0;s<r.length;s++){var o,u=a.andln(i-1);a.isOdd()?(o=u>(i>>1)-1?(i>>1)-u:u,a.isubn(o)):o=0,r[s]=o,a.iushrn(1)}return r},r.getJSF=function(t,e){var n=[[],[]];t=t.clone(),e=e.clone();for(var r,i=0,a=0;t.cmpn(-i)>0||e.cmpn(-a)>0;){var s,o,u=t.andln(3)+i&3,c=e.andln(3)+a&3;3===u&&(u=-1),3===c&&(c=-1),s=0==(1&u)?0:3!==(r=t.andln(7)+i&7)&&5!==r||2!==c?u:-u,n[0].push(s),o=0==(1&c)?0:3!==(r=e.andln(7)+a&7)&&5!==r||2!==u?c:-c,n[1].push(o),2*i===s+1&&(i=1-i),2*a===o+1&&(a=1-a),t.iushrn(1),e.iushrn(1)}return n},r.cachedProperty=function(t,e,n){var r="_"+e;t.prototype[e]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(t){return"string"==typeof t?r.toArray(t,"hex"):t},r.intFromLE=function(t){return new i(t,"hex","le")}},function(t,e,n){var r,i,a;function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}a=function(){function t(t){var e=[];if(0===t.length)return"";if("string"!=typeof t[0])throw new TypeError("Url must be a string. Received "+t[0]);if(t[0].match(/^[^/:]+:\/*$/)&&t.length>1){var n=t.shift();t[0]=n+t[0]}t[0].match(/^file:\/\/\//)?t[0]=t[0].replace(/^([^/:]+):\/*/,"$1:///"):t[0]=t[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<t.length;r++){var i=t[r];if("string"!=typeof i)throw new TypeError("Url must be a string. Received "+i);""!==i&&(r>0&&(i=i.replace(/^[\/]+/,"")),i=r<t.length-1?i.replace(/[\/]+$/,""):i.replace(/[\/]+$/,"/"),e.push(i))}var a=e.join("/"),s=(a=a.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return a=s.shift()+(s.length>0?"?":"")+s.join("&")}return function(){return t("object"===s(arguments[0])?arguments[0]:[].slice.call(arguments))}},t.exports?t.exports=a():void 0===(i="function"==typeof(r=a)?r.call(e,n,e,t):r)||(t.exports=i)},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){"use strict";var r=n(10),i=n(0);function a(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function o(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)n.push(parseInt(t[i]+t[i+1],16))}else for(var r=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=63&s|128):a(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=63&s|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=63&s|128)}else for(i=0;i<t.length;i++)n[i]=0|t[i];return n},e.toHex=function(t){for(var e="",n=0;n<t.length;n++)e+=o(t[n].toString(16));return e},e.htonl=s,e.toHex32=function(t,e){for(var n="",r=0;r<t.length;r++){var i=t[r];"little"===e&&(i=s(i)),n+=u(i.toString(16))}return n},e.zero2=o,e.zero8=u,e.join32=function(t,e,n,i){var a=n-e;r(a%4==0);for(var s=new Array(a/4),o=0,u=e;o<s.length;o++,u+=4){var c;c="big"===i?t[u]<<24|t[u+1]<<16|t[u+2]<<8|t[u+3]:t[u+3]<<24|t[u+2]<<16|t[u+1]<<8|t[u],s[o]=c>>>0}return s},e.split32=function(t,e){for(var n=new Array(4*t.length),r=0,i=0;r<t.length;r++,i+=4){var a=t[r];"big"===e?(n[i]=a>>>24,n[i+1]=a>>>16&255,n[i+2]=a>>>8&255,n[i+3]=255&a):(n[i+3]=a>>>24,n[i+2]=a>>>16&255,n[i+1]=a>>>8&255,n[i]=255&a)}return n},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,n){return t+e+n>>>0},e.sum32_4=function(t,e,n,r){return t+e+n+r>>>0},e.sum32_5=function(t,e,n,r,i){return t+e+n+r+i>>>0},e.sum64=function(t,e,n,r){var i=t[e],a=r+t[e+1]>>>0,s=(a<r?1:0)+n+i;t[e]=s>>>0,t[e+1]=a},e.sum64_hi=function(t,e,n,r){return(e+r>>>0<e?1:0)+t+n>>>0},e.sum64_lo=function(t,e,n,r){return e+r>>>0},e.sum64_4_hi=function(t,e,n,r,i,a,s,o){var u=0,c=e;return u+=(c=c+r>>>0)<e?1:0,u+=(c=c+a>>>0)<a?1:0,t+n+i+s+(u+=(c=c+o>>>0)<o?1:0)>>>0},e.sum64_4_lo=function(t,e,n,r,i,a,s,o){return e+r+a+o>>>0},e.sum64_5_hi=function(t,e,n,r,i,a,s,o,u,c){var A=0,d=e;return A+=(d=d+r>>>0)<e?1:0,A+=(d=d+a>>>0)<a?1:0,A+=(d=d+o>>>0)<o?1:0,t+n+i+s+u+(A+=(d=d+c>>>0)<c?1:0)>>>0},e.sum64_5_lo=function(t,e,n,r,i,a,s,o,u,c){return e+r+a+o+c>>>0},e.rotr64_hi=function(t,e,n){return(e<<32-n|t>>>n)>>>0},e.rotr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0},e.shr64_hi=function(t,e,n){return t>>>n},e.shr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0}},function(t,e){function n(e){return t.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){(function(n){var r,i,a,s;function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}s=function(){return function t(e,n,r){function i(s,o){if(!n[s]){if(!e[s]){var u=!1;if(!o&&u)return(void 0)(s,!0);if(a)return a(s,!0);throw(u=new Error("Cannot find module '"+s+"'")).code="MODULE_NOT_FOUND",u}u=n[s]={exports:{}},e[s][0].call(u.exports,(function(t){return i(e[s][1][t]||t)}),u,u.exports,t,e,n,r)}return n[s].exports}for(var a=!1,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.version="4.0.49"},{}],2:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("./utils/properties");function i(){r.setType(this,"Signer")}i.isSigner=function(t){return r.isType(t,"Signer")},t=i,n.Signer=t},{"./utils/properties":74}],3:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("./utils/bignumber");n.AddressZero="0x0000000000000000000000000000000000000000",n.HashZero="0x0000000000000000000000000000000000000000000000000000000000000000",n.EtherSymbol="Ξ",t=r.bigNumberify(-1),n.NegativeOne=t,t=r.bigNumberify(0),n.Zero=t,t=r.bigNumberify(1),n.One=t,t=r.bigNumberify(2),n.Two=t,t=r.bigNumberify("1000000000000000000"),n.WeiPerEther=t,r=r.bigNumberify("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n.MaxUint256=r},{"./utils/bignumber":63}],4:[function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var s,u=t("./constants"),c=a(t("./errors")),A=t("./utils/abi-coder"),d=t("./utils/address"),p=t("./utils/bignumber"),f=t("./utils/bytes"),l=t("./utils/interface"),h=t("./utils/properties"),y=t("./providers/abstract-provider"),g=t("./abstract-signer"),m=(i(b,s=g.Signer),b.prototype.getAddress=function(){return Promise.resolve(this.address)},b.prototype._fail=function(t,e){return Promise.resolve().then((function(){c.throwError(t,c.UNSUPPORTED_OPERATION,{operation:e})}))},b.prototype.signMessage=function(t){return this._fail("VoidSigner cannot sign messages","signMessage")},b.prototype.sendTransaction=function(t){return this._fail("VoidSigner cannot sign transactions","sendTransaction")},b.prototype.connect=function(t){return new b(this.address,t)},b);function b(t,e){var n=s.call(this)||this;return h.defineReadOnly(n,"address",t),h.defineReadOnly(n,"provider",e),n}n.VoidSigner=m;var I={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0};function C(t,e,n){var r=t.interface.functions[e];return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var a={},s=null;if(e.length===r.inputs.length+1&&"object"==o(e[e.length-1]))for(var d in null!=(a=h.shallowCopy(e.pop())).blockTag&&(s=a.blockTag),delete a.blockTag,a)if(!I[d])throw new Error("unknown transaction override "+d);if(e.length!=r.inputs.length)throw new Error("incorrect number of arguments");return["data","to"].forEach((function(t){null!=a[t]&&c.throwError("cannot override "+t,c.UNSUPPORTED_OPERATION,{operation:t})})),a.to=t._deployed(s).then((function(){return t.addressPromise})),function t(e,n,r){if(Array.isArray(r)){var i=[];return r.forEach((function(r,a){var s=Array.isArray(n)?n[a]:n[r.name];i.push(t(e,s,r))})),Promise.all(i)}if("address"===r.type)return e.resolveName(n);if("tuple"===r.type)return t(e,n,r.components);var a=r.type.match(/(.*)(\[[0-9]*\]$)/);if(a){if(!Array.isArray(n))throw new Error("invalid value for array");var s=[],o={components:r.components,type:a[1]};return n.forEach((function(n){s.push(t(e,n,o))})),Promise.all(s)}return Promise.resolve(n)}(t.provider,e,r.inputs).then((function(e){if(a.data=r.encode(e),"call"===r.type)return n?Promise.resolve(u.Zero):(t.provider||c.throwError("call (constant functions) require a provider or a signer with a provider",c.UNSUPPORTED_OPERATION,{operation:"call"}),["gasLimit","gasPrice","value"].forEach((function(t){if(null!=a[t])throw new Error("call cannot override "+t)})),null==a.from&&t.signer&&(a.from=t.signer.getAddress()),t.provider.call(a,s).then((function(n){var i;f.hexDataLength(n)%32==4&&"0x08c379a0"===f.hexDataSlice(n,0,4)&&(i=A.defaultAbiCoder.decode(["string"],f.hexDataSlice(n,4)),c.throwError("call revert exception",c.CALL_EXCEPTION,{address:t.address,args:e,method:r.signature,errorSignature:"Error(string)",errorArgs:[i],reason:i,transaction:a}));try{var s=r.decode(n);return 1===r.outputs.length?s[0]:s}catch(i){throw"0x"===n&&0<r.outputs.length&&c.throwError("call exception",c.CALL_EXCEPTION,{address:t.address,method:r.signature,args:e}),i}})));if("transaction"===r.type)return n?(t.provider||c.throwError("estimate gas require a provider or a signer with a provider",c.UNSUPPORTED_OPERATION,{operation:"estimateGas"}),null==a.from&&t.signer&&(a.from=t.signer.getAddress()),t.provider.estimateGas(a)):(null==a.gasLimit&&null!=r.gas&&(a.gasLimit=p.bigNumberify(r.gas).add(21e3)),t.signer||c.throwError("sending a transaction requires a signer",c.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=a.from&&c.throwError("cannot override from in a transaction",c.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.signer.sendTransaction(a).then((function(e){var n=e.wait.bind(e);return e.wait=function(e){return n(e).then((function(e){return e.events=e.logs.map((function(n){var r=h.deepCopy(n);return(n=t.interface.parseLog(n))&&(r.args=n.values,r.decode=n.decode,r.event=n.name,r.eventSignature=n.signature),r.removeListener=function(){return t.provider},r.getBlock=function(){return t.provider.getBlock(e.blockHash)},r.getTransaction=function(){return t.provider.getTransaction(e.transactionHash)},r.getTransactionReceipt=function(){return Promise.resolve(e)},r})),e}))},e})));throw new Error("invalid type - "+r.type)}))}}function v(t){return!t.address||null!=t.topics&&0!==t.topics.length?(t.address||"*")+"@"+(t.topics?t.topics.join(":"):""):"*"}var E=(w.prototype.deployed=function(){return this._deployed()},w.prototype._deployed=function(t){var e=this;return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((function(){return e})):this._deployedPromise=this.provider.getCode(this.address,t).then((function(t){return"0x"===t&&c.throwError("contract not deployed",c.UNSUPPORTED_OPERATION,{contractAddress:e.address,operation:"getDeployed"}),e}))),this._deployedPromise},w.prototype.fallback=function(t){var e=this;this.signer||c.throwError("sending a transaction requires a signer",c.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});var n=h.shallowCopy(t||{});return["from","to"].forEach((function(t){null!=n[t]&&c.throwError("cannot override "+t,c.UNSUPPORTED_OPERATION,{operation:t})})),n.to=this.addressPromise,this.deployed().then((function(){return e.signer.sendTransaction(n)}))},w.prototype.connect=function(t){return"string"==typeof t&&(t=new m(t,this.provider)),t=new w(this.address,this.interface,t),this.deployTransaction&&h.defineReadOnly(t,"deployTransaction",this.deployTransaction),t},w.prototype.attach=function(t){return new w(t,this.interface,this.signer||this.provider)},w.isIndexed=function(t){return l.Interface.isIndexed(t)},w.prototype._getEventFilter=function(t){var e=this;if("string"==typeof t){if("*"===t)return{prepareEvent:function(t){var n=e.interface.parseLog(t);return n&&(t.args=n.values,t.decode=n.decode,t.event=n.name,t.eventSignature=n.signature),[t]},eventTag:"*",filter:{address:this.address}};-1!==t.indexOf("(")&&(t=A.formatSignature(A.parseSignature("event "+t)));var n=this.interface.events[t];n||c.throwError("unknown event - "+t,c.INVALID_ARGUMENT,{argumnet:"eventName",value:t});var r={address:this.address,topics:[n.topic]};return{prepareEvent:function(t){var e=n.decode(t.data,t.topics);return t.args=e,(e=Array.prototype.slice.call(e)).push(t),e},event:n,eventTag:v(r),filter:r}}r={address:this.address};var i=null;if(t.topics&&t.topics[0])for(var a in r.topics=t.topics,this.interface.events)if(-1!==a.indexOf("(")&&(a=this.interface.events[a]).topic===t.topics[0].toLowerCase()){i=a;break}return{prepareEvent:function(t){if(!i)return[t];var e=i.decode(t.data,t.topics);return t.args=e,(e=Array.prototype.slice.call(e)).push(t),e},event:i,eventTag:v(r),filter:r}},w.prototype._addEventListener=function(t,e,n){var r=this;function i(n){var i=h.deepCopy(n),a=t.prepareEvent(i);t.event&&(i.decode=t.event.decode,i.event=t.event.name,i.eventSignature=t.event.signature),i.removeListener=function(){r.removeListener(t.filter,e)},i.getBlock=function(){return r.provider.getBlock(n.blockHash)},i.getTransaction=function(){return r.provider.getTransaction(n.transactionHash)},i.getTransactionReceipt=function(){return r.provider.getTransactionReceipt(n.transactionHash)},r.emit.apply(r,[t.filter].concat(a))}this.provider||c.throwError("events require a provider or a signer with a provider",c.UNSUPPORTED_OPERATION,{operation:"once"}),this.provider.on(t.filter,i),this._events.push({eventFilter:t,listener:e,wrappedListener:i,once:n})},w.prototype.on=function(t,e){return this._addEventListener(this._getEventFilter(t),e,!1),this},w.prototype.once=function(t,e){return this._addEventListener(this._getEventFilter(t),e,!0),this},w.prototype.addListener=function(t,e){return this.on(t,e)},w.prototype.emit=function(t){for(var e=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(!this.provider)return!1;var i=!1,a=this._getEventFilter(t);return this._events=this._events.filter((function(t){return t.eventFilter.eventTag!==a.eventTag||(setTimeout((function(){t.listener.apply(e,n)}),0),i=!0,!t.once)})),i},w.prototype.listenerCount=function(t){if(!this.provider)return 0;var e=this._getEventFilter(t);return this._events.filter((function(t){return t.eventFilter.eventTag===e.eventTag})).length},w.prototype.listeners=function(t){if(!this.provider)return[];var e=this._getEventFilter(t);return this._events.filter((function(t){return t.eventFilter.eventTag===e.eventTag})).map((function(t){return t.listener}))},w.prototype.removeAllListeners=function(t){var e=this;if(!this.provider)return this;var n=this._getEventFilter(t);return this._events=this._events.filter((function(t){return t.eventFilter.eventTag!==n.eventTag||(e.provider.removeListener(t.eventFilter.filter,t.wrappedListener),!1)})),this},w.prototype.removeListener=function(t,e){var n=this;if(!this.provider)return this;var r=!1,i=this._getEventFilter(t);return this._events=this._events.filter((function(t){return t.eventFilter.eventTag!==i.eventTag||t.listener!==e||(n.provider.removeListener(t.eventFilter.filter,t.wrappedListener),!!r||!(r=!0))})),this},w);function w(t,e,n){var r=this;if(c.checkNew(this,w),l.Interface.isInterface(e)?h.defineReadOnly(this,"interface",e):h.defineReadOnly(this,"interface",new l.Interface(e)),g.Signer.isSigner(n)?(h.defineReadOnly(this,"provider",n.provider),h.defineReadOnly(this,"signer",n)):y.Provider.isProvider(n)?(h.defineReadOnly(this,"provider",n),h.defineReadOnly(this,"signer",null)):c.throwError("invalid signer or provider",c.INVALID_ARGUMENT,{arg:"signerOrProvider",value:n}),h.defineReadOnly(this,"estimate",{}),h.defineReadOnly(this,"functions",{}),h.defineReadOnly(this,"filters",{}),Object.keys(this.interface.events).forEach((function(t){var e=r.interface.events[t];h.defineReadOnly(r.filters,t,(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return{address:r.address,topics:e.encodeTopics(t)}}))})),this._events=[],h.defineReadOnly(this,"address",t),this.provider)h.defineReadOnly(this,"addressPromise",this.provider.resolveName(t).then((function(t){if(null==t)throw new Error("name not found");return t})).catch((function(t){throw t})));else try{h.defineReadOnly(this,"addressPromise",Promise.resolve(d.getAddress(t)))}catch(e){c.throwError("provider is required to use non-address contract address",c.INVALID_ARGUMENT,{argument:"addressOrName",value:t})}Object.keys(this.interface.functions).forEach((function(t){var e=C(r,t,!1);null==r[t]?h.defineReadOnly(r,t,e):c.warn("WARNING: Multiple definitions for "+t),null==r.functions[t]&&(h.defineReadOnly(r.functions,t,e),h.defineReadOnly(r.estimate,t,C(r,t,!0)))}))}function B(t,e,n){var r=null;"string"==typeof e?r=e:f.isArrayish(e)?r=f.hexlify(e):"string"==typeof e.object?r=e.object:c.throwError("bytecode must be a valid hex string",c.INVALID_ARGUMENT,{arg:"bytecode",value:e}),"0x"!==r.substring(0,2)&&(r="0x"+r),f.isHexString(r)||c.throwError("bytecode must be a valid hex string",c.INVALID_ARGUMENT,{arg:"bytecode",value:e}),r.length%2!=0&&c.throwError("bytecode must be valid data (even length)",c.INVALID_ARGUMENT,{arg:"bytecode",value:e}),h.defineReadOnly(this,"bytecode",r),l.Interface.isInterface(t)?h.defineReadOnly(this,"interface",t):h.defineReadOnly(this,"interface",new l.Interface(t)),n&&!g.Signer.isSigner(n)&&c.throwError("invalid signer",c.INVALID_ARGUMENT,{arg:"signer",value:null}),h.defineReadOnly(this,"signer",n||null)}n.Contract=E,B.prototype.getDeployTransaction=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n={};if(t.length===this.interface.deployFunction.inputs.length+1)for(var r in n=h.shallowCopy(t.pop()))if(!I[r])throw new Error("unknown transaction override "+r);return["data","from","to"].forEach((function(t){null!=n[t]&&c.throwError("cannot override "+t,c.UNSUPPORTED_OPERATION,{operation:t})})),c.checkArgumentCount(t.length,this.interface.deployFunction.inputs.length," in Contract constructor"),n.data=this.interface.deployFunction.encode(this.bytecode,t),n},B.prototype.deploy=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=this.getDeployTransaction.apply(this,e);return this.signer.sendTransaction(r).then((function(e){var n=new E(d.getContractAddress(e),t.interface,t.signer);return h.defineReadOnly(n,"deployTransaction",e),n}))},B.prototype.attach=function(t){return new E(t,this.interface,this.signer)},B.prototype.connect=function(t){return new B(this.interface,this.bytecode,t)},B.fromSolidity=function(t,e){null==t&&c.throwError("missing compiler output",c.MISSING_ARGUMENT,{argument:"compilerOutput"});var n=(t="string"==typeof t?JSON.parse(t):t).abi,r=null;return t.bytecode?r=t.bytecode:t.evm&&t.evm.bytecode&&(r=t.evm.bytecode),new B(n,r,e)},i=B,n.ContractFactory=i},{"./abstract-signer":2,"./constants":3,"./errors":5,"./providers/abstract-provider":50,"./utils/abi-coder":59,"./utils/address":60,"./utils/bignumber":63,"./utils/bytes":64,"./utils/interface":69,"./utils/properties":74}],5:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("./_version");n.UNKNOWN_ERROR="UNKNOWN_ERROR",n.NOT_IMPLEMENTED="NOT_IMPLEMENTED",n.MISSING_NEW="MISSING_NEW",n.CALL_EXCEPTION="CALL_EXCEPTION",n.INVALID_ARGUMENT="INVALID_ARGUMENT",n.MISSING_ARGUMENT="MISSING_ARGUMENT",n.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",n.NUMERIC_FAULT="NUMERIC_FAULT",n.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",n.NONCE_EXPIRED="NONCE_EXPIRED",n.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED";var i=!(n.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION"),a=!1;function s(t,e,i){if(a)throw new Error("unknown error");e=e||n.UNKNOWN_ERROR,i=i||{};var s=[];Object.keys(i).forEach((function(t){try{s.push(t+"="+JSON.stringify(i[t]))}catch(e){s.push(t+"="+JSON.stringify(i[t].toString()))}})),s.push("version="+r.version);var o=t;s.length&&(t+=" ("+s.join(", ")+")");var u=new Error(t);throw u.reason=o,u.code=e,Object.keys(i).forEach((function(t){u[t]=i[t]})),u}n.throwError=s,n.checkNew=function(t,e){t instanceof e||s("missing new",n.MISSING_NEW,{name:e.name})},n.checkArgumentCount=function(t,e,r){r=r||"",t<e&&s("missing argument"+r,n.MISSING_ARGUMENT,{count:t,expectedCount:e}),e<t&&s("too many arguments"+r,n.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})},n.setCensorship=function(t,e){i&&s("error censorship permanent",n.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),a=!!t,i=!!e},n.checkNormalize=function(){try{if(["NFD","NFC","NFKD","NFKC"].forEach((function(t){try{"test".normalize(t)}catch(e){throw new Error("missing "+t)}})),String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){s("platform missing String.prototype.normalize",n.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:t.message})}};var o={debug:1,default:2,info:2,warn:3,error:4,off:5},u=o.default;function c(t,e){u>o[t]||console.log.apply(console,e)}function A(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];c("warn",t)}n.setLogLevel=function(t){var e=o[t];null!=e?u=e:A("invliad log level - "+t)},n.warn=A,n.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];c("info",t)}},{"./_version":1}],6:[function(t,e,n){"use strict";var r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var i=t("./contract");n.Contract=i.Contract,n.ContractFactory=i.ContractFactory,n.VoidSigner=i.VoidSigner,i=t("./abstract-signer"),n.Signer=i.Signer,i=t("./wallet"),n.Wallet=i.Wallet,i=r(t("./constants")),n.constants=i;var a=r(t("./errors"));n.errors=a;var s=r(t("./providers"));n.providers=s;var o=r(t("./utils"));n.utils=o,r=r(t("./wordlists")),n.wordlists=r,r=t("./utils/shims"),n.platform=r.platform,t=t("./_version"),n.version=t.version,n.getDefaultProvider=function(t){var e=o.getNetwork(t=null==t?"homestead":t);return e&&e._defaultProvider||a.throwError("unsupported getDefaultProvider network",a.UNSUPPORTED_OPERATION,{operation:"getDefaultProvider",network:t}),e._defaultProvider(s)}},{"./_version":1,"./abstract-signer":2,"./constants":3,"./contract":4,"./errors":5,"./providers":54,"./utils":68,"./utils/shims":80,"./wallet":88,"./wordlists":89}],7:[function(t,e,n){"use strict";var r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0}),r=r(t("./ethers")),n.ethers=r,function(t){for(var e in t)n.hasOwnProperty(e)||(n[e]=t[e])}(t("./ethers"))},{"./ethers":6}],8:[function(t,e,n){"use strict";!function(t){function r(t){return parseInt(t)===t}function i(t){if(r(t.length)){for(var e=0;e<t.length;e++)if(!r(t[e])||t[e]<0||255<t[e])return;return 1}}function a(t,e){if(t.buffer&&ArrayBuffer.isView(t)&&"Uint8Array"===t.name)return e?t.slice?t.slice():Array.prototype.slice.call(t):t;if(Array.isArray(t)){if(!i(t))throw new Error("Array contains invalid value: "+t);return new Uint8Array(t)}if(r(t.length)&&i(t))return new Uint8Array(t);throw new Error("unsupported array-like object")}function s(t){return new Uint8Array(t)}function o(t,e,n,r,i){null==r&&null==i||(t=t.slice?t.slice(r,i):Array.prototype.slice.call(t,r,i)),e.set(t,n)}var u,c={toBytes:function(t){var e=[],n=0;for(t=encodeURI(t);n<t.length;){var r=t.charCodeAt(n++);37===r?(e.push(parseInt(t.substr(n,2),16)),n+=2):e.push(r)}return a(e)},fromBytes:function(t){for(var e=[],n=0;n<t.length;){var r=t[n];r<128?(e.push(String.fromCharCode(r)),n++):191<r&&r<224?(e.push(String.fromCharCode((31&r)<<6|63&t[n+1])),n+=2):(e.push(String.fromCharCode((15&r)<<12|(63&t[n+1])<<6|63&t[n+2])),n+=3)}return e.join("")}},A=(u="0123456789abcdef",{toBytes:function(t){for(var e=[],n=0;n<t.length;n+=2)e.push(parseInt(t.substr(n,2),16));return e},fromBytes:function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];e.push(u[(240&r)>>4]+u[15&r])}return e.join("")}}),d={16:10,24:12,32:14},p=[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],f=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],l=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],h=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],y=[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],g=[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],b=[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],I=[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],C=[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],v=[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],E=[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],w=[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],B=[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],Q=[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 M(t){for(var e=[],n=0;n<t.length;n+=4)e.push(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3]);return e}var k=function t(e){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:a(e,!0)}),this._prepare()};k.prototype._prepare=function(){var t=d[this.key.length];if(null==t)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var e=0;e<=t;e++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);var n,r=4*(t+1),i=this.key.length/4,a=M(this.key);for(e=0;e<i;e++)this._Ke[n=e>>2][e%4]=a[e],this._Kd[t-n][e%4]=a[e];for(var s,o=0,u=i;u<r;){if(s=a[i-1],a[0]^=f[s>>16&255]<<24^f[s>>8&255]<<16^f[255&s]<<8^f[s>>24&255]^p[o]<<24,o+=1,8!=i)for(e=1;e<i;e++)a[e]^=a[e-1];else{for(e=1;e<i/2;e++)a[e]^=a[e-1];for(s=a[i/2-1],a[i/2]^=f[255&s]^f[s>>8&255]<<8^f[s>>16&255]<<16^f[s>>24&255]<<24,e=i/2+1;e<i;e++)a[e]^=a[e-1]}for(e=0;e<i&&u<r;)this._Ke[c=u>>2][A=u%4]=a[e],this._Kd[t-c][A]=a[e++],u++}for(var c=1;c<t;c++)for(var A=0;A<4;A++)s=this._Kd[c][A],this._Kd[c][A]=E[s>>24&255]^w[s>>16&255]^B[s>>8&255]^Q[255&s]},k.prototype.encrypt=function(t){if(16!=t.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var e=this._Ke.length-1,n=[0,0,0,0],r=M(t),i=0;i<4;i++)r[i]^=this._Ke[0][i];for(var a=1;a<e;a++){for(i=0;i<4;i++)n[i]=h[r[i]>>24&255]^y[r[(i+1)%4]>>16&255]^g[r[(i+2)%4]>>8&255]^m[255&r[(i+3)%4]]^this._Ke[a][i];r=n.slice()}var o,u=s(16);for(i=0;i<4;i++)o=this._Ke[e][i],u[4*i]=255&(f[r[i]>>24&255]^o>>24),u[4*i+1]=255&(f[r[(i+1)%4]>>16&255]^o>>16),u[4*i+2]=255&(f[r[(i+2)%4]>>8&255]^o>>8),u[4*i+3]=255&(f[255&r[(i+3)%4]]^o);return u},k.prototype.decrypt=function(t){if(16!=t.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var e=this._Kd.length-1,n=[0,0,0,0],r=M(t),i=0;i<4;i++)r[i]^=this._Kd[0][i];for(var a=1;a<e;a++){for(i=0;i<4;i++)n[i]=b[r[i]>>24&255]^I[r[(i+3)%4]>>16&255]^C[r[(i+2)%4]>>8&255]^v[255&r[(i+1)%4]]^this._Kd[a][i];r=n.slice()}var o,u=s(16);for(i=0;i<4;i++)o=this._Kd[e][i],u[4*i]=255&(l[r[i]>>24&255]^o>>24),u[4*i+1]=255&(l[r[(i+3)%4]>>16&255]^o>>16),u[4*i+2]=255&(l[r[(i+2)%4]>>8&255]^o>>8),u[4*i+3]=255&(l[255&r[(i+1)%4]]^o);return u};var _=function t(e){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new k(e)};_.prototype.encrypt=function(t){if((t=a(t)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var e=s(t.length),n=s(16),r=0;r<t.length;r+=16)o(t,n,0,r,r+16),o(n=this._aes.encrypt(n),e,r);return e},_.prototype.decrypt=function(t){if((t=a(t)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var e=s(t.length),n=s(16),r=0;r<t.length;r+=16)o(t,n,0,r,r+16),o(n=this._aes.decrypt(n),e,r);return e};var x=function t(e,n){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",n){if(16!=n.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else n=s(16);this._lastCipherblock=a(n,!0),this._aes=new k(e)};x.prototype.encrypt=function(t){if((t=a(t)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var e=s(t.length),n=s(16),r=0;r<t.length;r+=16){o(t,n,0,r,r+16);for(var i=0;i<16;i++)n[i]^=this._lastCipherblock[i];this._lastCipherblock=this._aes.encrypt(n),o(this._lastCipherblock,e,r)}return e},x.prototype.decrypt=function(t){if((t=a(t)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var e=s(t.length),n=s(16),r=0;r<t.length;r+=16){o(t,n,0,r,r+16),n=this._aes.decrypt(n);for(var i=0;i<16;i++)e[r+i]=n[i]^this._lastCipherblock[i];o(t,this._lastCipherblock,0,r,r+16)}return e};var S=function t(e,n,r){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",n){if(16!=n.length)throw new Error("invalid initialation vector size (must be 16 size)")}else n=s(16);this.segmentSize=r=r||1,this._shiftRegister=a(n,!0),this._aes=new k(e)};S.prototype.encrypt=function(t){if(t.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var e=a(t,!0),n=0;n<e.length;n+=this.segmentSize){for(var r=this._aes.encrypt(this._shiftRegister),i=0;i<this.segmentSize;i++)e[n+i]^=r[i];o(this._shiftRegister,this._shiftRegister,0,this.segmentSize),o(e,this._shiftRegister,16-this.segmentSize,n,n+this.segmentSize)}return e},S.prototype.decrypt=function(t){if(t.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var e=a(t,!0),n=0;n<e.length;n+=this.segmentSize){for(var r=this._aes.encrypt(this._shiftRegister),i=0;i<this.segmentSize;i++)e[n+i]^=r[i];o(this._shiftRegister,this._shiftRegister,0,this.segmentSize),o(t,this._shiftRegister,16-this.segmentSize,n,n+this.segmentSize)}return e};var D=function t(e,n){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",n){if(16!=n.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else n=s(16);this._lastPrecipher=a(n,!0),this._lastPrecipherIndex=16,this._aes=new k(e)};D.prototype.encrypt=function(t){for(var e=a(t,!0),n=0;n<e.length;n++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),e[n]^=this._lastPrecipher[this._lastPrecipherIndex++];return e},D.prototype.decrypt=D.prototype.encrypt;var R=function t(e){if(!(this instanceof t))throw Error("Counter must be instanitated with `new`");"number"==typeof(e=0===e||e?e:1)?(this._counter=s(16),this.setValue(e)):this.setBytes(e)};R.prototype.setValue=function(t){if("number"!=typeof t||parseInt(t)!=t)throw new Error("invalid counter value (must be an integer)");for(var e=15;0<=e;--e)this._counter[e]=t%256,t>>=8},R.prototype.setBytes=function(t){if(16!=(t=a(t,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=t},R.prototype.increment=function(){for(var t=15;0<=t;t--){if(255!==this._counter[t]){this._counter[t]++;break}this._counter[t]=0}};var T=function t(e,n){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",n instanceof R||(n=new R(n)),this._counter=n,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new k(e)};T.prototype.encrypt=function(t){for(var e=a(t,!0),n=0;n<e.length;n++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),e[n]^=this._remainingCounter[this._remainingCounterIndex++];return e},T.prototype.decrypt=T.prototype.encrypt,c={AES:k,Counter:R,ModeOfOperation:{ecb:_,cbc:x,cfb:S,ofb:D,ctr:T},utils:{hex:A,utf8:c},padding:{pkcs7:{pad:function(t){var e=16-(t=a(t,!0)).length%16,n=s(t.length+e);o(t,n);for(var r=t.length;r<n.length;r++)n[r]=e;return n},strip:function(t){if((t=a(t,!0)).length<16)throw new Error("PKCS#7 invalid length");var e=t[t.length-1];if(16<e)throw new Error("PKCS#7 padding byte out of range");for(var n=t.length-e,r=0;r<e;r++)if(t[n+r]!==e)throw new Error("PKCS#7 invalid padding byte");var i=s(n);return o(t,i,0,0,n),i}}},_arrayTest:{coerceArray:a,createArray:s,copyArray:o}},void 0!==n?e.exports=c:(t.aesjs&&(c._aesjs=t.aesjs),t.aesjs=c)}(this)},{}],9:[function(t,e,n){!function(e,n){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){function n(){}t.super_=e,n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function a(t,e,n){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,(this.red=null)!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var s;"object"==o(e)?e.exports=a:n.BN=a,(a.BN=a).wordSize=26;try{s=("undefined"!=typeof window&&void 0!==window.Buffer?window:t("buffer")).Buffer}catch(e){}function u(t,e){return 65<=(e=t.charCodeAt(e))&&e<=70?e-55:97<=e&&e<=102?e-87:e-48&15}function c(t,e,n){var r=u(t,n);return e<=n-1&&(r|=u(t,n-1)<<4),r}function A(t,e,n,r){for(var i=0,a=Math.min(t.length,n),s=e;s<a;s++){var o=t.charCodeAt(s)-48;i*=r,i+=49<=o?o-49+10:17<=o?o-17+10:o}return i}a.isBN=function(t){return t instanceof a||null!==t&&"object"==o(t)&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return 0<t.cmp(e)?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==o(t))return this._initArray(t,e,n);r((e="hex"===e?16:e)===(0|e)&&2<=e&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,n):(this._parseBase(t,e,i),"le"===n&&this._initArray(this.toArray(),e,n)))},a.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},a.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i,a,s=0;s<this.length;s++)this.words[s]=0;var o=0;if("be"===n)for(s=t.length-1,i=0;0<=s;s-=3)a=t[s]|t[s-1]<<8|t[s-2]<<16,this.words[i]|=a<<o&67108863,this.words[i+1]=a>>>26-o&67108863,26<=(o+=24)&&(o-=26,i++);else if("le"===n)for(i=s=0;s<t.length;s+=3)a=t[s]|t[s+1]<<8|t[s+2]<<16,this.words[i]|=a<<o&67108863,this.words[i+1]=a>>>26-o&67108863,26<=(o+=24)&&(o-=26,i++);return this.strip()},a.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,a=0,s=0;if("be"===n)for(r=t.length-1;e<=r;r-=2)i=c(t,e,r)<<a,this.words[s]|=67108863&i,18<=a?(a-=18,this.words[s+=1]|=i>>>26):a+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)i=c(t,e,r)<<a,this.words[s]|=67108863&i,18<=a?(a-=18,this.words[s+=1]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,n){this.words=[0];for(var r=0,i=this.length=1;i<=67108863;i*=e)r++;i=i/e|0;for(var a=t.length-n,s=a%--r,o=Math.min(a,a-s)+n,u=0,c=n;c<o;c+=r)u=A(t,c,c+r,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!=s){var d=1;for(u=A(t,c,t.length,e),c=0;c<s;c++)d*=e;this.imuln(d),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;1<this.length&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0,i=(r=(n.length=r)-1|0,(s=(0|t.words[0])*(0|e.words[0]))/67108864|0);n.words[0]=67108863&s;for(var a=1;a<r;a++){for(var s,o=i>>>26,u=67108863&i,c=Math.min(a,e.length-1),A=Math.max(0,a-t.length+1);A<=c;A++)o+=(s=(0|t.words[a-A|0])*(0|e.words[A])+u)/67108864|0,u=67108863&s;n.words[a]=0|u,i=0|o}return 0!==i?n.words[a]=0|i:n.length--,n.strip()}a.prototype.toString=function(t,e){if(e=0|e||1,16===(t=t||10)||"hex"===t){u="";for(var n=0,i=0,a=0;a<this.length;a++){var s=this.words[a],o=(16777215&(s<<n|i)).toString(16),u=0!=(i=s>>>24-n&16777215)||a!==this.length-1?d[6-o.length]+o+u:o+u;26<=(n+=2)&&(n-=26,a--)}for(0!==i&&(u=i.toString(16)+u);u.length%e!=0;)u="0"+u;return 0!==this.negative?"-"+u:u}if(t===(0|t)&&2<=t&&t<=36){var c=p[t],A=f[t];for(u="",(l=this.clone()).negative=0;!l.isZero();){var l,h=l.modn(A).toString(t);u=(l=l.idivn(A)).isZero()?h+u:d[c-h.length]+h+u}for(this.isZero()&&(u="0"+u);u.length%e!=0;)u="0"+u;return 0!==this.negative?"-"+u:u}r(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:2<this.length&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return r(void 0!==s),this.toArrayLike(s,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),a=n||Math.max(1,i);r(i<=a,"byte array longer than desired length"),r(0<a,"Requested array length <= 0"),this.strip(),e="le"===e;var s,o,u=new t(a),c=this.clone();if(e){for(o=0;!c.isZero();o++)s=c.andln(255),c.iushrn(8),u[o]=s;for(;o<a;o++)u[o]=0}else{for(o=0;o<a-i;o++)u[o]=0;for(o=0;!c.isZero();o++)s=c.andln(255),c.iushrn(8),u[a-o-1]=s}return u},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t;return t=0,4096<=e&&(t+=13,e>>>=13),64<=e&&(t+=7,e>>>=7),8<=e&&(t+=4,e>>>=4),2<=e&&(t+=2,e>>>=2),t+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t;return t=0,0==(8191&e)&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t},a.prototype.bitLength=function(){var t=this.words[this.length-1];return t=this._countBits(t),26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var n=this._zeroBits(this.words[e]);if(t+=n,26!==n)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){for(var e=this.length>t.length?t:this,n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){for(var e,n=this.length>t.length?(e=this,t):(e=t,this),r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){r("number"==typeof t&&0<=t);var e=0|Math.ceil(t/26);t%=26,this._expand(e),0<t&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return 0<t&&(this.words[n]=~this.words[n]&67108863>>26-t),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){r("number"==typeof t&&0<=t);var n=t/26|0;return t%=26,this._expand(1+n),this.words[n]=e?this.words[n]|1<<t:this.words[n]&~(1<<t),this.strip()},a.prototype.iadd=function(t){var e,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();for(var r=this.length>t.length?(n=this,t):(n=t,this),i=0,a=0;a<r.length;a++)e=(0|n.words[a])+(0|r.words[a])+i,this.words[a]=67108863&e,i=e>>>26;for(;0!==i&&a<n.length;a++)e=(0|n.words[a])+i,this.words[a]=67108863&e,i=e>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;for(var i=0<r?(n=this,t):(n=t,this),a=0,s=0;s<i.length;s++)a=(e=(0|n.words[s])-(0|i.words[s])+a)>>26,this.words[s]=67108863&e;for(;0!==a&&s<n.length;s++)a=(e=(0|n.words[s])+a)>>26,this.words[s]=67108863&e;if(0===a&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var h=function(t,e,n){var r,i,a=t.words,s=e.words,o=n.words,u=(q=0|a[0],8191&q),c=q>>>13,A=8191&(Y=0|a[1]),d=Y>>>13,p=8191&(K=0|a[2]),f=K>>>13,l=8191&(r=0|a[3]),h=r>>>13,y=8191&(z=0|a[4]),g=z>>>13,m=8191&(J=0|a[5]),b=J>>>13,I=8191&(i=0|a[6]),C=i>>>13,v=8191&(V=0|a[7]),E=V>>>13,w=8191&(W=0|a[8]),B=W>>>13,Q=8191&(Z=0|a[9]),M=Z>>>13,k=8191&(X=0|s[0]),_=X>>>13,x=0|s[1],S=8191&x,D=x>>>13,R=0|s[2],T=8191&R,N=R>>>13,O=8191&($=0|s[3]),H=$>>>13,L=0|s[4],U=8191&L,F=L>>>13,j=0|s[5],P=8191&j,G=j>>>13,q=0|s[6],Y=8191&q,K=q>>>13,z=8191&(r=0|s[7]),J=r>>>13,V=8191&(i=0|s[8]),W=i>>>13,Z=8191&(a=0|s[9]),X=a>>>13;n.negative=t.negative^e.negative,n.length=19;var $=(0+Math.imul(u,k)|0)+((8191&(R=(R=Math.imul(u,_))+Math.imul(c,k)|0))<<13)|0,tt=((L=Math.imul(c,_))+(R>>>13)|0)+($>>>26)|0;return $&=67108863,x=Math.imul(A,k),R=(R=Math.imul(A,_))+Math.imul(d,k)|0,L=Math.imul(d,_),j=(tt+(x+Math.imul(u,S)|0)|0)+((8191&(R=(R=R+Math.imul(u,D)|0)+Math.imul(c,S)|0))<<13)|0,tt=((L=L+Math.imul(c,D)|0)+(R>>>13)|0)+(j>>>26)|0,j&=67108863,x=Math.imul(p,k),R=(R=Math.imul(p,_))+Math.imul(f,k)|0,L=Math.imul(f,_),x=x+Math.imul(A,S)|0,R=(R=R+Math.imul(A,D)|0)+Math.imul(d,S)|0,L=L+Math.imul(d,D)|0,q=(tt+(x+Math.imul(u,T)|0)|0)+((8191&(R=(R=R+Math.imul(u,N)|0)+Math.imul(c,T)|0))<<13)|0,tt=((L=L+Math.imul(c,N)|0)+(R>>>13)|0)+(q>>>26)|0,q&=67108863,x=Math.imul(l,k),R=(R=Math.imul(l,_))+Math.imul(h,k)|0,L=Math.imul(h,_),x=x+Math.imul(p,S)|0,R=(R=R+Math.imul(p,D)|0)+Math.imul(f,S)|0,L=L+Math.imul(f,D)|0,x=x+Math.imul(A,T)|0,R=(R=R+Math.imul(A,N)|0)+Math.imul(d,T)|0,L=L+Math.imul(d,N)|0,r=(tt+(x+Math.imul(u,O)|0)|0)+((8191&(R=(R=R+Math.imul(u,H)|0)+Math.imul(c,O)|0))<<13)|0,tt=((L=L+Math.imul(c,H)|0)+(R>>>13)|0)+(r>>>26)|0,r&=67108863,x=Math.imul(y,k),R=(R=Math.imul(y,_))+Math.imul(g,k)|0,L=Math.imul(g,_),x=x+Math.imul(l,S)|0,R=(R=R+Math.imul(l,D)|0)+Math.imul(h,S)|0,L=L+Math.imul(h,D)|0,x=x+Math.imul(p,T)|0,R=(R=R+Math.imul(p,N)|0)+Math.imul(f,T)|0,L=L+Math.imul(f,N)|0,x=x+Math.imul(A,O)|0,R=(R=R+Math.imul(A,H)|0)+Math.imul(d,O)|0,L=L+Math.imul(d,H)|0,i=(tt+(x+Math.imul(u,U)|0)|0)+((8191&(R=(R=R+Math.imul(u,F)|0)+Math.imul(c,U)|0))<<13)|0,tt=((L=L+Math.imul(c,F)|0)+(R>>>13)|0)+(i>>>26)|0,i&=67108863,x=Math.imul(m,k),R=(R=Math.imul(m,_))+Math.imul(b,k)|0,L=Math.imul(b,_),x=x+Math.imul(y,S)|0,R=(R=R+Math.imul(y,D)|0)+Math.imul(g,S)|0,L=L+Math.imul(g,D)|0,x=x+Math.imul(l,T)|0,R=(R=R+Math.imul(l,N)|0)+Math.imul(h,T)|0,L=L+Math.imul(h,N)|0,x=x+Math.imul(p,O)|0,R=(R=R+Math.imul(p,H)|0)+Math.imul(f,O)|0,L=L+Math.imul(f,H)|0,x=x+Math.imul(A,U)|0,R=(R=R+Math.imul(A,F)|0)+Math.imul(d,U)|0,L=L+Math.imul(d,F)|0,s=(tt+(x+Math.imul(u,P)|0)|0)+((8191&(R=(R=R+Math.imul(u,G)|0)+Math.imul(c,P)|0))<<13)|0,tt=((L=L+Math.imul(c,G)|0)+(R>>>13)|0)+(s>>>26)|0,s&=67108863,x=Math.imul(I,k),R=(R=Math.imul(I,_))+Math.imul(C,k)|0,L=Math.imul(C,_),x=x+Math.imul(m,S)|0,R=(R=R+Math.imul(m,D)|0)+Math.imul(b,S)|0,L=L+Math.imul(b,D)|0,x=x+Math.imul(y,T)|0,R=(R=R+Math.imul(y,N)|0)+Math.imul(g,T)|0,L=L+Math.imul(g,N)|0,x=x+Math.imul(l,O)|0,R=(R=R+Math.imul(l,H)|0)+Math.imul(h,O)|0,L=L+Math.imul(h,H)|0,x=x+Math.imul(p,U)|0,R=(R=R+Math.imul(p,F)|0)+Math.imul(f,U)|0,L=L+Math.imul(f,F)|0,x=x+Math.imul(A,P)|0,R=(R=R+Math.imul(A,G)|0)+Math.imul(d,P)|0,L=L+Math.imul(d,G)|0,a=(tt+(x+Math.imul(u,Y)|0)|0)+((8191&(R=(R=R+Math.imul(u,K)|0)+Math.imul(c,Y)|0))<<13)|0,tt=((L=L+Math.imul(c,K)|0)+(R>>>13)|0)+(a>>>26)|0,a&=67108863,x=Math.imul(v,k),R=(R=Math.imul(v,_))+Math.imul(E,k)|0,L=Math.imul(E,_),x=x+Math.imul(I,S)|0,R=(R=R+Math.imul(I,D)|0)+Math.imul(C,S)|0,L=L+Math.imul(C,D)|0,x=x+Math.imul(m,T)|0,R=(R=R+Math.imul(m,N)|0)+Math.imul(b,T)|0,L=L+Math.imul(b,N)|0,x=x+Math.imul(y,O)|0,R=(R=R+Math.imul(y,H)|0)+Math.imul(g,O)|0,L=L+Math.imul(g,H)|0,x=x+Math.imul(l,U)|0,R=(R=R+Math.imul(l,F)|0)+Math.imul(h,U)|0,L=L+Math.imul(h,F)|0,x=x+Math.imul(p,P)|0,R=(R=R+Math.imul(p,G)|0)+Math.imul(f,P)|0,L=L+Math.imul(f,G)|0,x=x+Math.imul(A,Y)|0,R=(R=R+Math.imul(A,K)|0)+Math.imul(d,Y)|0,L=L+Math.imul(d,K)|0,t=(tt+(x+Math.imul(u,z)|0)|0)+((8191&(R=(R=R+Math.imul(u,J)|0)+Math.imul(c,z)|0))<<13)|0,tt=((L=L+Math.imul(c,J)|0)+(R>>>13)|0)+(t>>>26)|0,t&=67108863,x=Math.imul(w,k),R=(R=Math.imul(w,_))+Math.imul(B,k)|0,L=Math.imul(B,_),x=x+Math.imul(v,S)|0,R=(R=R+Math.imul(v,D)|0)+Math.imul(E,S)|0,L=L+Math.imul(E,D)|0,x=x+Math.imul(I,T)|0,R=(R=R+Math.imul(I,N)|0)+Math.imul(C,T)|0,L=L+Math.imul(C,N)|0,x=x+Math.imul(m,O)|0,R=(R=R+Math.imul(m,H)|0)+Math.imul(b,O)|0,L=L+Math.imul(b,H)|0,x=x+Math.imul(y,U)|0,R=(R=R+Math.imul(y,F)|0)+Math.imul(g,U)|0,L=L+Math.imul(g,F)|0,x=x+Math.imul(l,P)|0,R=(R=R+Math.imul(l,G)|0)+Math.imul(h,P)|0,L=L+Math.imul(h,G)|0,x=x+Math.imul(p,Y)|0,R=(R=R+Math.imul(p,K)|0)+Math.imul(f,Y)|0,L=L+Math.imul(f,K)|0,x=x+Math.imul(A,z)|0,R=(R=R+Math.imul(A,J)|0)+Math.imul(d,z)|0,L=L+Math.imul(d,J)|0,e=(tt+(x+Math.imul(u,V)|0)|0)+((8191&(R=(R=R+Math.imul(u,W)|0)+Math.imul(c,V)|0))<<13)|0,tt=((L=L+Math.imul(c,W)|0)+(R>>>13)|0)+(e>>>26)|0,e&=67108863,x=Math.imul(Q,k),R=(R=Math.imul(Q,_))+Math.imul(M,k)|0,L=Math.imul(M,_),x=x+Math.imul(w,S)|0,R=(R=R+Math.imul(w,D)|0)+Math.imul(B,S)|0,L=L+Math.imul(B,D)|0,x=x+Math.imul(v,T)|0,R=(R=R+Math.imul(v,N)|0)+Math.imul(E,T)|0,L=L+Math.imul(E,N)|0,x=x+Math.imul(I,O)|0,R=(R=R+Math.imul(I,H)|0)+Math.imul(C,O)|0,L=L+Math.imul(C,H)|0,x=x+Math.imul(m,U)|0,R=(R=R+Math.imul(m,F)|0)+Math.imul(b,U)|0,L=L+Math.imul(b,F)|0,x=x+Math.imul(y,P)|0,R=(R=R+Math.imul(y,G)|0)+Math.imul(g,P)|0,L=L+Math.imul(g,G)|0,x=x+Math.imul(l,Y)|0,R=(R=R+Math.imul(l,K)|0)+Math.imul(h,Y)|0,L=L+Math.imul(h,K)|0,x=x+Math.imul(p,z)|0,R=(R=R+Math.imul(p,J)|0)+Math.imul(f,z)|0,L=L+Math.imul(f,J)|0,x=x+Math.imul(A,V)|0,R=(R=R+Math.imul(A,W)|0)+Math.imul(d,V)|0,L=L+Math.imul(d,W)|0,u=(tt+(x+Math.imul(u,Z)|0)|0)+((8191&(R=(R=R+Math.imul(u,X)|0)+Math.imul(c,Z)|0))<<13)|0,tt=((L=L+Math.imul(c,X)|0)+(R>>>13)|0)+(u>>>26)|0,u&=67108863,x=Math.imul(Q,S),R=(R=Math.imul(Q,D))+Math.imul(M,S)|0,L=Math.imul(M,D),x=x+Math.imul(w,T)|0,R=(R=R+Math.imul(w,N)|0)+Math.imul(B,T)|0,L=L+Math.imul(B,N)|0,x=x+Math.imul(v,O)|0,R=(R=R+Math.imul(v,H)|0)+Math.imul(E,O)|0,L=L+Math.imul(E,H)|0,x=x+Math.imul(I,U)|0,R=(R=R+Math.imul(I,F)|0)+Math.imul(C,U)|0,L=L+Math.imul(C,F)|0,x=x+Math.imul(m,P)|0,R=(R=R+Math.imul(m,G)|0)+Math.imul(b,P)|0,L=L+Math.imul(b,G)|0,x=x+Math.imul(y,Y)|0,R=(R=R+Math.imul(y,K)|0)+Math.imul(g,Y)|0,L=L+Math.imul(g,K)|0,x=x+Math.imul(l,z)|0,R=(R=R+Math.imul(l,J)|0)+Math.imul(h,z)|0,L=L+Math.imul(h,J)|0,x=x+Math.imul(p,V)|0,R=(R=R+Math.imul(p,W)|0)+Math.imul(f,V)|0,L=L+Math.imul(f,W)|0,A=(tt+(x+Math.imul(A,Z)|0)|0)+((8191&(R=(R=R+Math.imul(A,X)|0)+Math.imul(d,Z)|0))<<13)|0,tt=((L=L+Math.imul(d,X)|0)+(R>>>13)|0)+(A>>>26)|0,A&=67108863,x=Math.imul(Q,T),R=(R=Math.imul(Q,N))+Math.imul(M,T)|0,L=Math.imul(M,N),x=x+Math.imul(w,O)|0,R=(R=R+Math.imul(w,H)|0)+Math.imul(B,O)|0,L=L+Math.imul(B,H)|0,x=x+Math.imul(v,U)|0,R=(R=R+Math.imul(v,F)|0)+Math.imul(E,U)|0,L=L+Math.imul(E,F)|0,x=x+Math.imul(I,P)|0,R=(R=R+Math.imul(I,G)|0)+Math.imul(C,P)|0,L=L+Math.imul(C,G)|0,x=x+Math.imul(m,Y)|0,R=(R=R+Math.imul(m,K)|0)+Math.imul(b,Y)|0,L=L+Math.imul(b,K)|0,x=x+Math.imul(y,z)|0,R=(R=R+Math.imul(y,J)|0)+Math.imul(g,z)|0,L=L+Math.imul(g,J)|0,x=x+Math.imul(l,V)|0,R=(R=R+Math.imul(l,W)|0)+Math.imul(h,V)|0,L=L+Math.imul(h,W)|0,p=(tt+(x+Math.imul(p,Z)|0)|0)+((8191&(R=(R=R+Math.imul(p,X)|0)+Math.imul(f,Z)|0))<<13)|0,tt=((L=L+Math.imul(f,X)|0)+(R>>>13)|0)+(p>>>26)|0,p&=67108863,x=Math.imul(Q,O),R=(R=Math.imul(Q,H))+Math.imul(M,O)|0,L=Math.imul(M,H),x=x+Math.imul(w,U)|0,R=(R=R+Math.imul(w,F)|0)+Math.imul(B,U)|0,L=L+Math.imul(B,F)|0,x=x+Math.imul(v,P)|0,R=(R=R+Math.imul(v,G)|0)+Math.imul(E,P)|0,L=L+Math.imul(E,G)|0,x=x+Math.imul(I,Y)|0,R=(R=R+Math.imul(I,K)|0)+Math.imul(C,Y)|0,L=L+Math.imul(C,K)|0,x=x+Math.imul(m,z)|0,R=(R=R+Math.imul(m,J)|0)+Math.imul(b,z)|0,L=L+Math.imul(b,J)|0,x=x+Math.imul(y,V)|0,R=(R=R+Math.imul(y,W)|0)+Math.imul(g,V)|0,L=L+Math.imul(g,W)|0,l=(tt+(x+Math.imul(l,Z)|0)|0)+((8191&(R=(R=R+Math.imul(l,X)|0)+Math.imul(h,Z)|0))<<13)|0,tt=((L=L+Math.imul(h,X)|0)+(R>>>13)|0)+(l>>>26)|0,l&=67108863,x=Math.imul(Q,U),R=(R=Math.imul(Q,F))+Math.imul(M,U)|0,L=Math.imul(M,F),x=x+Math.imul(w,P)|0,R=(R=R+Math.imul(w,G)|0)+Math.imul(B,P)|0,L=L+Math.imul(B,G)|0,x=x+Math.imul(v,Y)|0,R=(R=R+Math.imul(v,K)|0)+Math.imul(E,Y)|0,L=L+Math.imul(E,K)|0,x=x+Math.imul(I,z)|0,R=(R=R+Math.imul(I,J)|0)+Math.imul(C,z)|0,L=L+Math.imul(C,J)|0,x=x+Math.imul(m,V)|0,R=(R=R+Math.imul(m,W)|0)+Math.imul(b,V)|0,L=L+Math.imul(b,W)|0,y=(tt+(x+Math.imul(y,Z)|0)|0)+((8191&(R=(R=R+Math.imul(y,X)|0)+Math.imul(g,Z)|0))<<13)|0,tt=((L=L+Math.imul(g,X)|0)+(R>>>13)|0)+(y>>>26)|0,y&=67108863,x=Math.imul(Q,P),R=(R=Math.imul(Q,G))+Math.imul(M,P)|0,L=Math.imul(M,G),x=x+Math.imul(w,Y)|0,R=(R=R+Math.imul(w,K)|0)+Math.imul(B,Y)|0,L=L+Math.imul(B,K)|0,x=x+Math.imul(v,z)|0,R=(R=R+Math.imul(v,J)|0)+Math.imul(E,z)|0,L=L+Math.imul(E,J)|0,x=x+Math.imul(I,V)|0,R=(R=R+Math.imul(I,W)|0)+Math.imul(C,V)|0,L=L+Math.imul(C,W)|0,m=(tt+(x+Math.imul(m,Z)|0)|0)+((8191&(R=(R=R+Math.imul(m,X)|0)+Math.imul(b,Z)|0))<<13)|0,tt=((L=L+Math.imul(b,X)|0)+(R>>>13)|0)+(m>>>26)|0,m&=67108863,x=Math.imul(Q,Y),R=(R=Math.imul(Q,K))+Math.imul(M,Y)|0,L=Math.imul(M,K),x=x+Math.imul(w,z)|0,R=(R=R+Math.imul(w,J)|0)+Math.imul(B,z)|0,L=L+Math.imul(B,J)|0,x=x+Math.imul(v,V)|0,R=(R=R+Math.imul(v,W)|0)+Math.imul(E,V)|0,L=L+Math.imul(E,W)|0,I=(tt+(x+Math.imul(I,Z)|0)|0)+((8191&(R=(R=R+Math.imul(I,X)|0)+Math.imul(C,Z)|0))<<13)|0,tt=((L=L+Math.imul(C,X)|0)+(R>>>13)|0)+(I>>>26)|0,I&=67108863,x=Math.imul(Q,z),R=(R=Math.imul(Q,J))+Math.imul(M,z)|0,L=Math.imul(M,J),x=x+Math.imul(w,V)|0,R=(R=R+Math.imul(w,W)|0)+Math.imul(B,V)|0,L=L+Math.imul(B,W)|0,v=(tt+(x+Math.imul(v,Z)|0)|0)+((8191&(R=(R=R+Math.imul(v,X)|0)+Math.imul(E,Z)|0))<<13)|0,tt=((L=L+Math.imul(E,X)|0)+(R>>>13)|0)+(v>>>26)|0,v&=67108863,x=Math.imul(Q,V),R=(R=Math.imul(Q,W))+Math.imul(M,V)|0,L=Math.imul(M,W),w=(tt+(x+Math.imul(w,Z)|0)|0)+((8191&(R=(R=R+Math.imul(w,X)|0)+Math.imul(B,Z)|0))<<13)|0,tt=((L=L+Math.imul(B,X)|0)+(R>>>13)|0)+(w>>>26)|0,w&=67108863,Z=(tt+Math.imul(Q,Z)|0)+((8191&(R=(R=Math.imul(Q,X))+Math.imul(M,Z)|0))<<13)|0,tt=((L=Math.imul(M,X))+(R>>>13)|0)+(Z>>>26)|0,Z&=67108863,o[0]=$,o[1]=j,o[2]=q,o[3]=r,o[4]=i,o[5]=s,o[6]=a,o[7]=t,o[8]=e,o[9]=u,o[10]=A,o[11]=p,o[12]=l,o[13]=y,o[14]=m,o[15]=I,o[16]=v,o[17]=w,o[18]=Z,0!=tt&&(o[19]=tt,n.length++),n};function y(t,e,n){return(new g).mulp(t,e,n)}function g(t,e){this.x=t,this.y=e}Math.imul||(h=l),a.prototype.mulTo=function(t,e){var n=this.length+t.length;return e=(10===this.length&&10===t.length?h:n<63?l:n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,a=0;a<n.length-1;a++){for(var s=i,o=(i=0,67108863&r),u=Math.min(a,e.length-1),c=Math.max(0,a-t.length+1);c<=u;c++){var A,d=(0|t.words[a-c])*(0|e.words[c]);o=67108863&(A=(A=67108863&d)+o|0),i+=(s=(s=s+(d/67108864|0)|0)+(A>>>26)|0)>>>26,s&=67108863}n.words[a]=o,r=s,s=i}return 0!==r?n.words[a]=r:n.length--,n.strip()}:y)(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),n=a.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,n,t);return e},g.prototype.revBin=function(t,e,n){if(0===t||t===n-1)return t;for(var r=0,i=0;i<e;i++)r|=(1&t)<<e-i-1,t>>=1;return r},g.prototype.permute=function(t,e,n,r,i,a){for(var s=0;s<a;s++)r[s]=e[t[s]],i[s]=n[t[s]]},g.prototype.transform=function(t,e,n,r,i,a){this.permute(a,t,e,n,r,i);for(var s=1;s<i;s<<=1)for(var o=s<<1,u=Math.cos(2*Math.PI/o),c=Math.sin(2*Math.PI/o),A=0;A<i;A+=o)for(var d=u,p=c,f=0;f<s;f++){var l=n[A+f],h=r[A+f],y=n[A+f+s],g=d*y-p*(m=r[A+f+s]),m=d*m+p*y;n[A+f]=l+(y=g),r[A+f]=h+m,n[A+f+s]=l-y,r[A+f+s]=h-m,f!==o&&(g=u*d-c*p,p=u*p+c*d,d=g)}},g.prototype.guessLen13b=function(t,e){t=1&(r=1|Math.max(e,t));for(var n=0,r=r/2|0;r;r>>>=1)n++;return 1<<n+1+t},g.prototype.conjugate=function(t,e,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=t[r];t[r]=t[n-r-1],t[n-r-1]=i,i=e[r],e[r]=-e[n-r-1],e[n-r-1]=-i}},g.prototype.normalize13b=function(t,e){for(var n=0,r=0;r<e/2;r++){var i=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+n;t[r]=67108863&i,n=i<67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,n,i){for(var a=0,s=0;s<e;s++)a+=0|t[s],n[2*s]=8191&a,n[2*s+1]=8191&(a>>>=13),a>>>=13;for(s=2*e;s<i;++s)n[s]=0;r(0===a),r(0==(-8192&a))},g.prototype.stub=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=0;return e},g.prototype.mulp=function(t,e,n){var r=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(r),a=this.stub(r),s=new Array(r),o=new Array(r),u=new Array(r),c=new Array(r),A=new Array(r),d=new Array(r),p=n.words;p.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,c,r),this.transform(s,a,o,u,r,i),this.transform(c,a,A,d,r,i);for(var f=0;f<r;f++){var l=o[f]*A[f]-u[f]*d[f];u[f]=o[f]*d[f]+u[f]*A[f],o[f]=l}return this.conjugate(o,u,r),this.transform(o,u,p,a,r,i),this.conjugate(p,a,r),this.normalize13b(p,r),n.negative=t.negative^e.negative,n.length=t.length+e.length,n.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),y(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){r("number"==typeof t),r(t<67108864);for(var e=0,n=0;n<this.length;n++){var i=(0|this.words[n])*t,a=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=a>>>26,this.words[n]=67108863&a}return 0!==e&&(this.words[n]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n<e.length;n++){var r=n%26;e[n]=(t.words[n/26|0]&1<<r)>>>r}return e}(t);if(0===e.length)return new a(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var i=n.sqr();r<e.length;r++,i=i.sqr())0!==e[r]&&(n=n.mul(i));return n},a.prototype.iushln=function(t){r("number"==typeof t&&0<=t);var e=t%26,n=(t-e)/26,i=67108863>>>26-e<<26-e;if(0!=e){for(var a=0,s=0;s<this.length;s++){var o=this.words[s]&i,u=(0|this.words[s])-o<<e;this.words[s]=u|a,a=o>>>26-e}a&&(this.words[s]=a,this.length++)}if(0!=n){for(s=this.length-1;0<=s;s--)this.words[s+n]=this.words[s];for(s=0;s<n;s++)this.words[s]=0;this.length+=n}return this.strip()},a.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,n){r("number"==typeof t&&0<=t);var i=e?(e-e%26)/26:0,a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<<a,u=n;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0!==s)if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var A=0;for(c=this.length-1;0<=c&&(0!==A||i<=c);c--){var d=0|this.words[c];this.words[c]=A<<26-a|d>>>a,A=d&o}return u&&0!==A&&(u.words[u.length++]=A),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){r("number"==typeof t&&0<=t);var e=t%26;return t=(t-e)/26,!(this.length<=t||!(this.words[t]&1<<e))},a.prototype.imaskn=function(t){r("number"==typeof t&&0<=t);var e=t%26;return t=(t-e)/26,r(0===this.negative,"imaskn works only with positive numbers"),this.length<=t?this:(0!=e&&t++,this.length=Math.min(t,this.length),0!=e&&(this.words[this.length-1]&=67108863^67108863>>>e<<e),this.strip())},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?(1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(t),this.negative=1),this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&67108864<=this.words[e];e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,--this.words[e+1];return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,n){var i=t.length+n;this._expand(i);for(var a=0,s=0;s<t.length;s++){var o=(0|this.words[s+n])+a,u=(0|t.words[s])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[s+n]=67108863&o}for(;s<this.length-n;s++)a=(o=(0|this.words[s+n])+a)>>26,this.words[s+n]=67108863&o;if(0===a)return this.strip();for(r(-1===a),s=a=0;s<this.length;s++)a=(o=-(0|this.words[s])+a)>>26,this.words[s]=67108863&o;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,s=0|i.words[i.length-1];0!=(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var o,u=r.length-i.length;if("mod"!==e){(o=new a(null)).length=1+u,o.words=new Array(o.length);for(var c=0;c<o.length;c++)o.words[c]=0}0===(t=r.clone()._ishlnsubmul(i,1,u)).negative&&(r=t,o&&(o.words[u]=1));for(var A=u-1;0<=A;A--){var d=67108864*(0|r.words[i.length+A])+(0|r.words[i.length+A-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(i,d,A);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,A),r.isZero()||(r.negative^=1);o&&(o.words[A]=d)}return o&&o.strip(),r.strip(),"div"!==e&&0!=n&&r.iushrn(n),{div:o||null,mod:r}},a.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(i=o.div.neg()),"div"!==e&&(s=o.mod.neg(),n&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),{div:i="mod"!==e?o.div.neg():i,mod:o.mod}):0!=(this.negative&t.negative)?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(s=o.mod.neg(),n&&0!==s.negative&&s.isub(t)),{div:o.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,o},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1);return t=t.andln(1),(r=n.cmp(r))<0||1===t&&0===r?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;0<=i;i--)n=(e*n+(0|this.words[i]))%t;return n},a.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;0<=n;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());for(var e=this,n=t.clone(),i=(e=0!==e.negative?e.umod(t):e.clone(),new a(1)),s=new a(0),o=new a(0),u=new a(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var A=n.clone(),d=e.clone();!e.isZero();){for(var p=0,f=1;0==(e.words[0]&f)&&p<26;++p,f<<=1);if(0<p)for(e.iushrn(p);0<p--;)(i.isOdd()||s.isOdd())&&(i.iadd(A),s.isub(d)),i.iushrn(1),s.iushrn(1);for(var l=0,h=1;0==(n.words[0]&h)&&l<26;++l,h<<=1);if(0<l)for(n.iushrn(l);0<l--;)(o.isOdd()||u.isOdd())&&(o.iadd(A),u.isub(d)),o.iushrn(1),u.iushrn(1);0<=e.cmp(n)?(e.isub(n),i.isub(o),s.isub(u)):(n.isub(e),o.isub(i),u.isub(s))}return{a:o,b:u,gcd:n.iushln(c)}},a.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());for(var e,n=this,i=t.clone(),s=(n=0!==n.negative?n.umod(t):n.clone(),new a(1)),o=new a(0),u=i.clone();0<n.cmpn(1)&&0<i.cmpn(1);){for(var c=0,A=1;0==(n.words[0]&A)&&c<26;++c,A<<=1);if(0<c)for(n.iushrn(c);0<c--;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var d=0,p=1;0==(i.words[0]&p)&&d<26;++d,p<<=1);if(0<d)for(i.iushrn(d);0<d--;)o.isOdd()&&o.iadd(u),o.iushrn(1);0<=n.cmp(i)?(n.isub(i),s.isub(o)):(i.isub(n),o.isub(s))}return(e=0===n.cmpn(1)?s:o).cmpn(0)<0&&e.iadd(t),e},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0;for(var r=n.negative=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var a=e;e=n,n=a}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){r("number"==typeof t),t=(t-(e=t%26))/26;var e=1<<e;if(this.length<=t)return this._expand(1+t),this.words[t]|=e,this;for(var n=e,i=t;0!==n&&i<this.length;i++){var a=0|this.words[i];n=(a+=n)>>>26,a&=67108863,this.words[i]=a}return 0!==n&&(this.words[i]=n,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e=t<0;return 0===this.negative||e?0===this.negative&&e?1:(this.strip(),t=1<this.length?1:(r((t=e?-t:t)<=67108863,"Number is too big"),(e=0|this.words[0])===t?0:e<t?-1:1),0!==this.negative?0|-t:t):-1},a.prototype.cmp=function(t){return 0!==this.negative&&0===t.negative?-1:0===this.negative&&0!==t.negative?1:(t=this.ucmp(t),0!==this.negative?0|-t:t)},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,n=this.length-1;0<=n;n--){var r=0|this.words[n],i=0|t.words[n];if(r!=i){r<i?e=-1:i<r&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return 0<=this.cmpn(t)},a.prototype.gte=function(t){return 0<=this.cmp(t)},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new w(t)},a.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var m={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function I(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function C(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function w(t){var e;"string"==typeof t?(e=a._prime(t),this.m=e.p,this.prime=e):(r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null)}function B(t){w.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}b.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){for(var e,n=t;this.split(n,this.tmp),(e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength())>this.n;);return 0===(t=e<this.n?-1:n.ucmp(this.p))?(n.words[0]=0,n.length=1):0<t?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(I,b),I.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r<n;r++)e.words[r]=t.words[r];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,r=10;r<t.length;r++){var a=0|t.words[r];t.words[r-10]=(4194303&a)<<4|i>>>22,i=a}0==(t.words[r-10]=i>>>=22)&&10<t.length?t.length-=10:t.length-=9},I.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(C,b),i(v,b),i(E,b),E.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,i=67108863&r;r>>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(m[t])return m[t];var e;if("k256"===t)e=new I;else if("p224"===t)e=new C;else if("p192"===t)e=new v;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new E}return m[t]=e},w.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},w.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},w.prototype.imod=function(t){return(this.prime?this.prime.ireduce(t):t.umod(this.m))._forceRed(this)},w.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},w.prototype.add=function(t,e){return this._verify2(t,e),0<=(e=t.add(e)).cmp(this.m)&&e.isub(this.m),e._forceRed(this)},w.prototype.iadd=function(t,e){return this._verify2(t,e),0<=(e=t.iadd(e)).cmp(this.m)&&e.isub(this.m),e},w.prototype.sub=function(t,e){return this._verify2(t,e),(e=t.sub(e)).cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},w.prototype.isub=function(t,e){return this._verify2(t,e),(e=t.isub(e)).cmpn(0)<0&&e.iadd(this.m),e},w.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},w.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},w.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},w.prototype.isqr=function(t){return this.imul(t,t.clone())},w.prototype.sqr=function(t){return this.mul(t,t)},w.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e)return e=this.m.add(new a(1)).iushrn(2),this.pow(t,e);for(var n=this.m.subn(1),i=0;!n.isZero()&&0===n.andln(1);)i++,n.iushrn(1);r(!n.isZero());for(var s=new a(1).toRed(this),o=s.redNeg(),u=this.m.subn(1).iushrn(1),c=new a(2*(c=this.m.bitLength())*c).toRed(this);0!==this.pow(c,u).cmp(o);)c.redIAdd(o);for(var A=this.pow(c,n),d=this.pow(t,n.addn(1).iushrn(1)),p=this.pow(t,n),f=i;0!==p.cmp(s);){for(var l=p,h=0;0!==l.cmp(s);h++)l=l.redSqr();r(h<f);var y=this.pow(A,new a(1).iushln(f-h-1));d=d.redMul(y),A=y.redSqr(),p=p.redMul(A),f=h}return d},w.prototype.invm=function(t){return 0!==(t=t._invmp(this.m)).negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},w.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new a(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var i=n[0],s=0,o=0,u=e.bitLength()%26;for(0===u&&(u=26),r=e.length-1;0<=r;r--){for(var c=e.words[r],A=u-1;0<=A;A--){var d=c>>A&1;i!==n[0]&&(i=this.sqr(i)),0!=d||0!==s?(s<<=1,s|=d,(4==++o||0===r&&0===A)&&(i=this.mul(i,n[s]),s=o=0)):o=0}u=26}return i},w.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},w.prototype.convertFrom=function(t){return(t=t.clone()).red=null,t},a.mont=function(t){return new B(t)},i(B,w),B.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},B.prototype.convertFrom=function(t){return(t=this.imod(t.mul(this.rinv))).red=null,t},B.prototype.imul=function(t,e){return t.isZero()||e.isZero()?(t.words[0]=0,t.length=1,t):(e=(t=t.imul(e)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=t=t.isub(e).iushrn(this.shift),0<=t.cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this))},B.prototype.mul=function(t,e){return t.isZero()||e.isZero()?new a(0)._forceRed(this):(e=(t=t.mul(e)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=t=t.isub(e).iushrn(this.shift),0<=t.cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this))},B.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{buffer:11}],10:[function(t,e,r){(function(t){(function(){e.exports=function(e){return e=new Uint8Array(e),(t.crypto||t.msCrypto).getRandomValues(e),e}}).call(this)}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],11:[function(t,e,n){},{}],12:[function(t,e,n){"use strict";n.version=t("../package.json").version,n.utils=t("./elliptic/utils"),n.rand=t("brorand"),n.curve=t("./elliptic/curve"),n.curves=t("./elliptic/curves"),n.ec=t("./elliptic/ec"),n.eddsa=t("./elliptic/eddsa")},{"../package.json":25,"./elliptic/curve":15,"./elliptic/curves":18,"./elliptic/ec":19,"./elliptic/eddsa":22,"./elliptic/utils":24,brorand:10}],13:[function(t,e,n){"use strict";var r=t("bn.js"),i=t("../utils"),a=i.getNAF,s=i.getJSF,o=i.assert;function u(t,e){this.type=t,this.p=new r(e.p,16),this.red=e.prime?r.red(e.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=e.n&&new r(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.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,!(e=this.n&&this.p.div(this.n))||0<e.cmpn(100)?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(t,e){this.curve=t,this.type=e,this.precomputed=null}(e.exports=u).prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(t,e){o(t.precomputed);var n=t._getDoubles(),r=a(e,1,this._bitLength);e=(1<<n.step+1)-(n.step%2==0?2:1),e/=3;for(var i=[],s=0;s<r.length;s+=n.step){for(var u=0,c=s+n.step-1;s<=c;c--)u=(u<<1)+r[c];i.push(u)}for(var A=this.jpoint(null,null,null),d=this.jpoint(null,null,null),p=e;0<p;p--){for(s=0;s<i.length;s++)(u=i[s])===p?d=d.mixedAdd(n.points[s]):u===-p&&(d=d.mixedAdd(n.points[s].neg()));A=A.add(d)}return A.toP()},u.prototype._wnafMul=function(t,e){for(var n=t._getNAFPoints(4),r=n.wnd,i=n.points,s=a(e,r,this._bitLength),u=this.jpoint(null,null,null),c=s.length-1;0<=c;c--){for(var A=0;0<=c&&0===s[c];c--)A++;if(0<=c&&A++,u=u.dblp(A),c<0)break;var d=s[c];o(0!==d),u="affine"===t.type?0<d?u.mixedAdd(i[d-1>>1]):u.mixedAdd(i[-d-1>>1].neg()):0<d?u.add(i[d-1>>1]):u.add(i[-d-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,n,r,i){for(var o=this._wnafT1,u=this._wnafT2,c=this._wnafT3,A=0,d=0;d<r;d++){var p,f=(p=e[d])._getNAFPoints(t);o[d]=f.wnd,u[d]=f.points}for(d=r-1;1<=d;d-=2){var l=d-1,h=d;if(1===o[l]&&1===o[h]){var y=[e[l],null,null,e[h]];0===e[l].y.cmp(e[h].y)?(y[1]=e[l].add(e[h]),y[2]=e[l].toJ().mixedAdd(e[h].neg())):0===e[l].y.cmp(e[h].y.redNeg())?(y[1]=e[l].toJ().mixedAdd(e[h]),y[2]=e[l].add(e[h].neg())):(y[1]=e[l].toJ().mixedAdd(e[h]),y[2]=e[l].toJ().mixedAdd(e[h].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],m=s(n[l],n[h]);for(A=Math.max(m[0].length,A),c[l]=new Array(A),c[h]=new Array(A),B=0;B<A;B++){var b=0|m[0][B],I=0|m[1][B];c[l][B]=g[3*(1+b)+(1+I)],c[h][B]=0,u[l]=y}}else c[l]=a(n[l],o[l],this._bitLength),c[h]=a(n[h],o[h],this._bitLength),A=Math.max(c[l].length,A),A=Math.max(c[h].length,A)}var C=this.jpoint(null,null,null),v=this._wnafT4;for(d=A;0<=d;d--){for(var E=0;0<=d;){for(var w=!0,B=0;B<r;B++)v[B]=0|c[B][d],0!==v[B]&&(w=!1);if(!w)break;E++,d--}if(0<=d&&E++,C=C.dblp(E),d<0)break;for(B=0;B<r;B++){var Q=v[B];0!==Q&&(0<Q?p=u[B][Q-1>>1]:Q<0&&(p=u[B][-Q-1>>1].neg()),C="affine"===p.type?C.mixedAdd(p):C.add(p))}}for(d=0;d<r;d++)u[d]=null;return i?C:C.toP()},(u.BasePoint=c).prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(t,e){if(t=i.toArray(t,e),e=this.p.byteLength(),(4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*e)return 6===t[0]?o(t[t.length-1]%2==0):7===t[0]&&o(t[t.length-1]%2==1),this.point(t.slice(1,1+e),t.slice(1+e,1+2*e));if((2===t[0]||3===t[0])&&t.length-1===e)return this.pointFromX(t.slice(1,1+e),3===t[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(t){return this.encode(t,!0)},c.prototype._encode=function(t){var e=this.curve.p.byteLength(),n=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",e))},c.prototype.encode=function(t,e){return i.encode(this._encode(e),t)},c.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},c.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},c.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<e;i+=t){for(var a=0;a<t;a++)r=r.dbl();n.push(r)}return{step:t,points:n}},c.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],n=(1<<t)-1,r=1==n?null:this.dbl(),i=1;i<n;i++)e[i]=e[i-1].add(r);return{wnd:t,points:e}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(t){for(var e=this,n=0;n<t;n++)e=e.dbl();return e}},{"../utils":24,"bn.js":9}],14:[function(t,e,n){e.exports={}},{}],15:[function(t,e,n){"use strict";n.base=t("./base"),n.short=t("./short"),n.mont=t("./mont"),n.edwards=t("./edwards")},{"./base":13,"./edwards":14,"./mont":16,"./short":17}],16:[function(t,e,n){arguments[4][14][0].apply(n,arguments)},{dup:14}],17:[function(t,e,n){"use strict";var r=t("../utils"),i=t("bn.js"),a=t("inherits"),s=t("./base"),o=r.assert;function u(t){s.call(this,"short",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(t,e,n,r){s.BasePoint.call(this,t,"affine"),null===e&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function A(t,e,n,r){s.BasePoint.call(this,t,"jacobian"),null===e&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(n,16),this.z=new i(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}a(u,s),(e.exports=u).prototype._getEndomorphism=function(t){var e,n,r;if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3))return n=(t.beta?new i(t.beta,16):n=(r=this._getEndoRoots(this.p))[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red),t.lambda?e=new i(t.lambda,16):(r=this._getEndoRoots(this.n),0===this.g.mul(r[0]).x.cmp(this.g.x.redMul(n))?e=r[0]:(e=r[1],o(0===this.g.mul(e).x.cmp(this.g.x.redMul(n))))),{beta:n,lambda:e,basis:t.basis?t.basis.map((function(t){return{a:new i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(e)}},u.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),n=(t=(n=new i(2).toRed(e).redInvm()).redNeg(),new i(3).toRed(e).redNeg().redSqrt().redMul(n));return[t.redAdd(n).fromRed(),t.redSub(n).fromRed()]},u.prototype._getEndoBasis=function(t){for(var e,n,r,a,s,o=this.n.ushrn(Math.floor(this.n.bitLength()/2)),u=t,c=this.n.clone(),A=new i(1),d=new i(0),p=new i(0),f=new i(1),l=0;0!==u.cmpn(0);){var h=c.div(u),y=c.sub(h.mul(u)),g=p.sub(h.mul(A));if(h=f.sub(h.mul(d)),!r&&y.cmp(o)<0)e=s.neg(),n=A,r=y.neg(),a=g;else if(r&&2==++l)break;c=u,u=s=y,p=A,A=g,f=d,d=h}var m=y.neg(),b=g;return t=r.sqr().add(a.sqr()),0<=m.sqr().add(b.sqr()).cmp(t)&&(m=e,b=n),r.negative&&(r=r.neg(),a=a.neg()),m.negative&&(m=m.neg(),b=b.neg()),[{a:r,b:a},{a:m,b:b}]},u.prototype._endoSplit=function(t){var e=(a=this.endo.basis)[0],n=(s=a[1]).b.mul(t).divRound(this.n),r=e.b.neg().mul(t).divRound(this.n),i=n.mul(e.a),a=r.mul(s.a),s=(e=n.mul(e.b),r.mul(s.b));return{k1:t.sub(i).sub(a),k2:e.add(s).neg()}},u.prototype.pointFromX=function(t,e){var n=(t=(t=new i(t,16)).red?t:t.toRed(this.red)).redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");return n=r.fromRed().isOdd(),(e&&!n||!e&&n)&&(r=r.redNeg()),this.point(t,r)},u.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,n=t.y;return t=this.a.redMul(e),t=e.redSqr().redMul(e).redIAdd(t).redIAdd(this.b),0===n.redSqr().redISub(t).cmpn(0)},u.prototype._endoWnafMulAdd=function(t,e,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,a=0;a<t.length;a++){var s=this._endoSplit(e[a]),o=t[a],u=o._getBeta();s.k1.negative&&(s.k1.ineg(),o=o.neg(!0)),s.k2.negative&&(s.k2.ineg(),u=u.neg(!0)),r[2*a]=o,r[2*a+1]=u,i[2*a]=s.k1,i[2*a+1]=s.k2}n=this._wnafMulAdd(1,r,i,2*a,n);for(var c=0;c<2*a;c++)r[c]=null,i[c]=null;return n},a(c,s.BasePoint),u.prototype.point=function(t,e,n){return new c(this,t,e,n)},u.prototype.pointFromJSON=function(t,e){return c.fromJSON(this,t,e)},c.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e,n,r=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);return t&&(e=this.curve,n=function(t){return e.point(t.x.redMul(e.endo.beta),t.y)},(t.beta=r).precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}),r}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(t,e,n){"string"==typeof e&&(e=JSON.parse(e));var r=t.point(e[0],e[1],n);if(!e[2])return r;function i(e){return t.point(e[0],e[1],n)}return e=e[2],r.precomputed={beta:null,doubles:e.doubles&&{step:e.doubles.step,points:[r].concat(e.doubles.points.map(i))},naf:e.naf&&{wnd:e.naf.wnd,points:[r].concat(e.naf.points.map(i))}},r},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);t=(e=0!==(e=this.y.redSub(t.y)).cmpn(0)?e.redMul(this.x.redSub(t.x).redInvm()):e).redSqr().redISub(this.x).redISub(t.x);var e=e.redMul(this.x.redSub(t)).redISub(this.y);return this.curve.point(t,e)},c.prototype.dbl=function(){if(this.inf)return this;if(0===(n=this.y.redAdd(this.y)).cmpn(0))return this.curve.point(null,null);var t=this.curve.a,e=this.x.redSqr(),n=n.redInvm();return n=(t=e.redAdd(e).redIAdd(e).redIAdd(t).redMul(n)).redSqr().redISub(this.x.redAdd(this.x)),t=t.redMul(this.x.redSub(n)).redISub(this.y),this.curve.point(n,t)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,n){return e=[this,e],n=[t,n],this.curve.endo?this.curve._endoWnafMulAdd(e,n):this.curve._wnafMulAdd(1,e,n,2)},c.prototype.jmulAdd=function(t,e,n){return e=[this,e],n=[t,n],this.curve.endo?this.curve._endoWnafMulAdd(e,n,!0):this.curve._wnafMulAdd(1,e,n,2,!0)},c.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},c.prototype.neg=function(t){if(this.inf)return this;var e,n=this.curve.point(this.x,this.y.redNeg());return t&&this.precomputed&&(e=this.precomputed,t=function(t){return t.neg()},n.precomputed={naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(t)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(t)}}),n},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(A,s.BasePoint),u.prototype.jpoint=function(t,e,n){return new A(this,t,e,n)},A.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=(n=this.z.redInvm()).redSqr(),e=this.x.redMul(t),n=this.y.redMul(t).redMul(n);return this.curve.point(e,n)},A.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},A.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(e),i=t.x.redMul(n),a=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(n.redMul(this.z));return e=r.redSub(i),n=a.redSub(s),0===e.cmpn(0)?0!==n.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl():(s=(i=e.redSqr()).redMul(e),r=r.redMul(i),i=n.redSqr().redIAdd(s).redISub(r).redISub(r),s=n.redMul(r.redISub(i)).redISub(a.redMul(s)),e=this.z.redMul(t.z).redMul(e),this.curve.jpoint(i,s,e))},A.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),n=this.x,r=t.x.redMul(e),i=this.y,a=t.y.redMul(e).redMul(this.z);return t=n.redSub(r),e=i.redSub(a),0===t.cmpn(0)?0!==e.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl():(a=(r=t.redSqr()).redMul(t),n=n.redMul(r),r=e.redSqr().redIAdd(a).redISub(n).redISub(n),a=e.redMul(n.redISub(r)).redISub(i.redMul(a)),t=this.z.redMul(t),this.curve.jpoint(r,a,t))},A.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,n=0;n<t;n++)e=e.dbl();return e}var r=this.curve.a,i=this.curve.tinv,a=this.x,s=this.y,o=this.z,u=o.redSqr().redSqr(),c=s.redAdd(s);for(n=0;n<t;n++){var A=a.redSqr(),d=(f=c.redSqr()).redSqr(),p=A.redAdd(A).redIAdd(A).redIAdd(r.redMul(u)),f=(A=a.redMul(f),p.redSqr().redISub(A.redAdd(A)));A=A.redISub(f),p=(p=p.redMul(A)).redIAdd(p).redISub(d),A=c.redMul(o),n+1<t&&(u=u.redMul(d)),a=f,o=A,c=p}return this.curve.jpoint(a,c.redMul(i),o)},A.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},A.prototype._zeroDbl=function(){var t,e,n,r,i,a=this.zOne?(n=this.x.redSqr(),t=(r=this.y.redSqr()).redSqr(),i=(i=this.x.redAdd(r).redSqr().redISub(n).redISub(t)).redIAdd(i),r=(e=n.redAdd(n).redIAdd(n)).redSqr().redISub(i).redISub(i),n=(n=(n=t.redIAdd(t)).redIAdd(n)).redIAdd(n),e=e.redMul(i.redISub(t=r)).redISub(n),this.y.redAdd(this.y)):(i=this.x.redSqr(),a=(r=this.y.redSqr()).redSqr(),n=(n=this.x.redAdd(r).redSqr().redISub(i).redISub(a)).redIAdd(n),i=(r=i.redAdd(i).redIAdd(i)).redSqr(),a=(a=(a=a.redIAdd(a)).redIAdd(a)).redIAdd(a),t=i.redISub(n).redISub(n),e=r.redMul(n.redISub(t)).redISub(a),(a=this.y.redMul(this.z)).redIAdd(a));return this.curve.jpoint(t,e,a)},A.prototype._threeDbl=function(){var t,e,n,r,i,a,s,o;return this.zOne?(s=this.x.redSqr(),n=(t=this.y.redSqr()).redSqr(),a=(a=this.x.redAdd(t).redSqr().redISub(s).redISub(n)).redIAdd(a),e=r=(o=s.redAdd(s).redIAdd(s).redIAdd(this.curve.a)).redSqr().redISub(a).redISub(a),i=(i=(i=n.redIAdd(n)).redIAdd(i)).redIAdd(i),t=o.redMul(a.redISub(r)).redISub(i),s=this.y.redAdd(this.y)):(n=this.z.redSqr(),o=this.y.redSqr(),a=this.x.redMul(o),r=(r=this.x.redSub(n).redMul(this.x.redAdd(n))).redAdd(r).redIAdd(r),a=(i=(i=a.redIAdd(a)).redIAdd(i)).redAdd(i),e=r.redSqr().redISub(a),s=this.y.redAdd(this.z).redSqr().redISub(o).redISub(n),o=(o=(o=(o=o.redSqr()).redIAdd(o)).redIAdd(o)).redIAdd(o),t=r.redMul(i.redISub(e)).redISub(o)),this.curve.jpoint(e,t,s)},A.prototype._dbl=function(){var t=this.curve.a,e=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),a=e.redSqr(),s=n.redSqr();return t=a.redAdd(a).redIAdd(a).redIAdd(t.redMul(i)),e=(i=(i=e.redAdd(e)).redIAdd(i)).redMul(s),i=t.redSqr().redISub(e.redAdd(e)),e=e.redISub(i),s=(s=(s=(s=s.redSqr()).redIAdd(s)).redIAdd(s)).redIAdd(s),s=t.redMul(e).redISub(s),r=n.redAdd(n).redMul(r),this.curve.jpoint(i,s,r)},A.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),n=this.z.redSqr(),r=e.redSqr(),i=t.redAdd(t).redIAdd(t),a=i.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(r);return t=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(a)).redSqr(),r=(r=(r=(r=r.redIAdd(r)).redIAdd(r)).redIAdd(r)).redIAdd(r),a=i.redIAdd(s).redSqr().redISub(a).redISub(t).redISub(r),e=(e=(e=e.redMul(a)).redIAdd(e)).redIAdd(e),e=(e=(e=this.x.redMul(t).redISub(e)).redIAdd(e)).redIAdd(e),a=(a=(a=(a=this.y.redMul(a.redMul(r.redISub(a)).redISub(s.redMul(t)))).redIAdd(a)).redIAdd(a)).redIAdd(a),t=this.z.redAdd(s).redSqr().redISub(n).redISub(t),this.curve.jpoint(e,a,t)},A.prototype.mul=function(t,e){return t=new i(t,e),this.curve._wnafMul(this,t)},A.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),n=t.z.redSqr();return 0===this.x.redMul(n).redISub(t.x.redMul(e)).cmpn(0)&&(e=e.redMul(this.z),n=n.redMul(t.z),0===this.y.redMul(n).redISub(t.y.redMul(e)).cmpn(0))},A.prototype.eqXToP=function(t){var e=this.z.redSqr(),n=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(n))return!0;for(var r=t.clone(),i=this.curve.redN.redMul(e);;){if(r.iadd(this.curve.n),0<=r.cmp(this.curve.p))return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},A.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},A.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../utils":24,"./base":13,"bn.js":9,inherits:39}],18:[function(t,e,n){"use strict";var r,i=n,a=(n=t("hash.js"),t("./curve")),s=t("./utils").assert;function o(t){"short"===t.type?this.curve=new a.short(t):"edwards"===t.type?this.curve=new a.edwards(t):this.curve=new a.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var n=new o(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:n}),n}})}i.PresetCurve=o,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:n.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:n.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:n.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:n.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:n.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:n.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:n.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=t("./precomputed/secp256k1")}catch(t){r=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:n.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},{"./curve":15,"./precomputed/secp256k1":23,"./utils":24,"hash.js":26}],19:[function(t,e,n){"use strict";var r=t("bn.js"),i=t("hmac-drbg"),a=t("../utils"),s=t("../curves"),u=t("brorand"),c=a.assert,A=t("./key"),d=t("./signature");function p(t){if(!(this instanceof p))return new p(t);"string"==typeof t&&(c(Object.prototype.hasOwnProperty.call(s,t),"Unknown curve "+t),t=s[t]),t instanceof s.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}(e.exports=p).prototype.keyPair=function(t){return new A(this,t)},p.prototype.keyFromPrivate=function(t,e){return A.fromPrivate(this,t,e)},p.prototype.keyFromPublic=function(t,e){return A.fromPublic(this,t,e)},p.prototype.genKeyPair=function(t){for(var e=new i({hash:this.hash,pers:(t=t||{}).pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||u(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),a=this.n.sub(new r(2));;){var s=new r(e.generate(n));if(!(0<s.cmp(a)))return s.iaddn(1),this.keyFromPrivate(s)}},p.prototype._truncateToN=function(t,e){var n=8*t.byteLength()-this.n.bitLength();return 0<n&&(t=t.ushrn(n)),!e&&0<=t.cmp(this.n)?t.sub(this.n):t},p.prototype.sign=function(t,e,n,a){"object"==o(n)&&(a=n,n=null),a=a||{},e=this.keyFromPrivate(e,n),t=this._truncateToN(new r(t,16));for(var s=this.n.byteLength(),u=(n=e.getPrivate().toArray("be",s),s=t.toArray("be",s),new i({hash:this.hash,entropy:n,nonce:s,pers:a.pers,persEnc:a.persEnc||"utf8"})),c=this.n.sub(new r(1)),A=0;;A++){var p=a.k?a.k(A):new r(u.generate(this.n.byteLength()));if(!((p=this._truncateToN(p,!0)).cmpn(1)<=0||0<=p.cmp(c))){var f=this.g.mul(p);if(!f.isInfinity()){var l=f.getX(),h=l.umod(this.n);if(0!==h.cmpn(0)&&0!==(p=(p=p.invm(this.n).mul(h.mul(e.getPrivate()).iadd(t))).umod(this.n)).cmpn(0))return l=(f.getY().isOdd()?1:0)|(0!==l.cmp(h)?2:0),a.canonical&&0<p.cmp(this.nh)&&(p=this.n.sub(p),l^=1),new d({r:h,s:p,recoveryParam:l})}}}},p.prototype.verify=function(t,e,n,i){return t=this._truncateToN(new r(t,16)),n=this.keyFromPublic(n,i),i=(e=new d(e,"hex")).r,e=e.s,!(i.cmpn(1)<0||0<=i.cmp(this.n))&&(!(e.cmpn(1)<0||0<=e.cmp(this.n))&&(t=(e=e.invm(this.n)).mul(t).umod(this.n),e=e.mul(i).umod(this.n),this.curve._maxwellTrick?!(a=this.g.jmulAdd(t,n.getPublic(),e)).isInfinity()&&a.eqXToP(i):!(a=this.g.mulAdd(t,n.getPublic(),e)).isInfinity()&&0===a.getX().umod(this.n).cmp(i)));var a},p.prototype.recoverPubKey=function(t,e,n,i){c((3&n)===n,"The recovery param is more than two bits"),e=new d(e,i);var a=this.n,s=new r(t),o=e.r;if(i=e.s,t=1&n,n>>=1,0<=o.cmp(this.curve.p.umod(this.curve.n))&&n)throw new Error("Unable to find sencond key candinate");return o=n?this.curve.pointFromX(o.add(this.curve.n),t):this.curve.pointFromX(o,t),e=e.r.invm(a),s=a.sub(s).mul(e).umod(a),a=i.mul(e).umod(a),this.g.mulAdd(s,o,a)},p.prototype.getKeyRecoveryParam=function(t,e,n,r){if(null!==(e=new d(e,r)).recoveryParam)return e.recoveryParam;for(var i,a=0;a<4;a++){try{i=this.recoverPubKey(t,e,a)}catch(t){continue}if(i.eq(n))return a}throw new Error("Unable to find valid recovery factor")}},{"../curves":18,"../utils":24,"./key":20,"./signature":21,"bn.js":9,brorand:10,"hmac-drbg":38}],20:[function(t,e,n){"use strict";var r=t("bn.js"),i=t("../utils").assert;function a(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}(e.exports=a).fromPublic=function(t,e,n){return e instanceof a?e:new a(t,{pub:e,pubEnc:n})},a.fromPrivate=function(t,e,n){return e instanceof a?e:new a(t,{priv:e,privEnc:n})},a.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},a.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},a.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(t,e){this.priv=new r(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?i(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},a.prototype.derive=function(t){return t.validate()||i(t.validate(),"public point not validated"),t.mul(this.priv).getX()},a.prototype.sign=function(t,e,n){return this.ec.sign(t,this,e,n)},a.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},a.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../utils":24,"bn.js":9}],21:[function(t,e,n){"use strict";var r=t("bn.js"),i=t("../utils"),a=i.assert;function s(t,e){if(t instanceof s)return t;this._importDER(t,e)||(a(t.r&&t.s,"Signature without r or s"),this.r=new r(t.r,16),this.s=new r(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function o(){this.place=0}function u(t,e){var n=t[e.place++];if(!(128&n))return n;var r=15&n;if(0==r||4<r)return!1;for(var i=0,a=0,s=e.place;a<r;a++,s++)i<<=8,i|=t[s],i>>>=0;return!(i<=127)&&(e.place=s,i)}function c(t){for(var e=0,n=t.length-1;!t[e]&&!(128&t[e+1])&&e<n;)e++;return 0===e?t:t.slice(e)}function A(t,e){if(e<128)t.push(e);else{var n=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|n);--n;)t.push(e>>>(n<<3)&255);t.push(e)}}(e.exports=s).prototype._importDER=function(t,e){t=i.toArray(t,e);var n=new o;if(48!==t[n.place++])return!1;var a=u(t,n);if(!1===a)return!1;if(a+n.place!==t.length)return!1;if(2!==t[n.place++])return!1;if(!1===(e=u(t,n)))return!1;if(a=t.slice(n.place,e+n.place),n.place+=e,2!==t[n.place++])return!1;if(!1===(e=u(t,n)))return!1;if(t.length!==e+n.place)return!1;if(n=t.slice(n.place,e+n.place),0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}if(0===n[0]){if(!(128&n[1]))return!1;n=n.slice(1)}return this.r=new r(a),this.s=new r(n),!(this.recoveryParam=null)},s.prototype.toDER=function(t){var e=this.r.toArray(),n=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&n[0]&&(n=[0].concat(n)),e=c(e),n=c(n);!(n[0]||128&n[1]);)n=n.slice(1);var r=[2];return A(r,e.length),(r=r.concat(e)).push(2),A(r,n.length),e=r.concat(n),A(r=[48],e.length),r=r.concat(e),i.encode(r,t)}},{"../utils":24,"bn.js":9}],22:[function(t,e,n){arguments[4][14][0].apply(n,arguments)},{dup:14}],23:[function(t,e,n){e.exports=void 0},{}],24:[function(t,e,n){"use strict";var r=n,i=t("bn.js");n=t("minimalistic-assert"),t=t("minimalistic-crypto-utils"),r.assert=n,r.toArray=t.toArray,r.zero2=t.zero2,r.toHex=t.toHex,r.encode=t.encode,r.getNAF=function(t,e,n){var r=new Array(Math.max(t.bitLength(),n)+1);r.fill(0);for(var i=1<<e+1,a=t.clone(),s=0;s<r.length;s++){var o,u=a.andln(i-1);a.isOdd()?a.isubn(o=(i>>1)-1<u?(i>>1)-u:u):o=0,r[s]=o,a.iushrn(1)}return r},r.getJSF=function(t,e){var n=[[],[]];t=t.clone(),e=e.clone();for(var r,i=0,a=0;0<t.cmpn(-i)||0<e.cmpn(-a);){var s,o=t.andln(3)+i&3,u=e.andln(3)+a&3;3===u&&(u=-1),s=0==(1&(o=3===o?-1:o))?0:3!=(r=t.andln(7)+i&7)&&5!==r||2!==u?o:-o,n[0].push(s),u=0==(1&u)?0:3!=(r=e.andln(7)+a&7)&&5!==r||2!==o?u:-u,n[1].push(u),2*i===s+1&&(i=1-i),2*a===u+1&&(a=1-a),t.iushrn(1),e.iushrn(1)}return n},r.cachedProperty=function(t,e,n){var r="_"+e;t.prototype[e]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(t){return"string"==typeof t?r.toArray(t,"hex"):t},r.intFromLE=function(t){return new i(t,"hex","le")}},{"bn.js":9,"minimalistic-assert":41,"minimalistic-crypto-utils":42}],25:[function(t,e,n){e.exports={version:"6.5.4"}},{}],26:[function(t,e,n){n.utils=t("./hash/utils"),n.common=t("./hash/common"),n.sha=t("./hash/sha"),n.ripemd=t("./hash/ripemd"),n.hmac=t("./hash/hmac"),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},{"./hash/common":27,"./hash/hmac":28,"./hash/ripemd":29,"./hash/sha":30,"./hash/utils":37}],27:[function(t,e,n){"use strict";var r=t("./utils"),i=t("minimalistic-assert");function a(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}(n.BlockHash=a).prototype.update=function(t,e){if(t=r.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){e=(t=this.pending).length%this._delta8,this.pending=t.slice(t.length-e,t.length),0===this.pending.length&&(this.pending=null),t=r.join32(t,0,t.length-e,this.endian);for(var n=0;n<t.length;n+=this._delta32)this._update(t,n,n+this._delta32)}return this},a.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},a.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,n=e-(t+this.padLength)%e,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(t<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=t>>>24&255,r[i++]=t>>>16&255,r[i++]=t>>>8&255,r[i++]=255&t}else for(r[i++]=255&t,r[i++]=t>>>8&255,r[i++]=t>>>16&255,r[i++]=t>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,a=8;a<this.padLength;a++)r[i++]=0;return r}},{"./utils":37,"minimalistic-assert":41}],28:[function(t,e,n){"use strict";var r=t("./utils"),i=t("minimalistic-assert");function a(t,e,n){if(!(this instanceof a))return new a(t,e,n);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(e,n))}(e.exports=a).prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},a.prototype.update=function(t,e){return this.inner.update(t,e),this},a.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},{"./utils":37,"minimalistic-assert":41}],29:[function(t,e,n){"use strict";var r=t("./utils"),i=(t=t("./common"),r.rotl32),a=r.sum32,s=r.sum32_3,o=r.sum32_4,u=t.BlockHash;function c(){if(!(this instanceof c))return new c;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function A(t,e,n,r){return t<=15?e^n^r:t<=31?e&n|~e&r:t<=47?(e|~n)^r:t<=63?e&r|n&~r:e^(n|~r)}r.inherits(c,u),(n.ripemd160=c).blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(t,e){for(var n,r=b=this.h[0],u=E=this.h[1],c=v=this.h[2],h=C=this.h[3],y=I=this.h[4],g=0;g<80;g++){var m=a(i(o(b,A(g,E,v,C),t[d[g]+e],(n=g)<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838),f[g]),I),b=I,I=C,C=i(v,10),v=E,E=m;m=a(i(o(r,A(79-g,u,c,h),t[p[g]+e],(n=g)<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0),l[g]),y),r=y,y=h,h=i(c,10),c=u,u=m}m=s(this.h[1],v,h),this.h[1]=s(this.h[2],C,y),this.h[2]=s(this.h[3],I,r),this.h[3]=s(this.h[4],b,u),this.h[4]=s(this.h[0],E,c),this.h[0]=m},c.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var d=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],p=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],f=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],l=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},{"./common":27,"./utils":37}],30:[function(t,e,n){"use strict";n.sha1=t("./sha/1"),n.sha224=t("./sha/224"),n.sha256=t("./sha/256"),n.sha384=t("./sha/384"),n.sha512=t("./sha/512")},{"./sha/1":31,"./sha/224":32,"./sha/256":33,"./sha/384":34,"./sha/512":35}],31:[function(t,e,n){arguments[4][14][0].apply(n,arguments)},{dup:14}],32:[function(t,e,n){arguments[4][14][0].apply(n,arguments)},{dup:14}],33:[function(t,e,n){"use strict";var r=t("../utils"),i=t("../common"),a=t("./common"),s=t("minimalistic-assert"),o=r.sum32,u=r.sum32_4,c=r.sum32_5,A=a.ch32,d=a.maj32,p=a.s0_256,f=a.s1_256,l=a.g0_256,h=a.g1_256,y=i.BlockHash,g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function m(){if(!(this instanceof m))return new m;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}r.inherits(m,y),(e.exports=m).blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r<n.length;r++)n[r]=u(h(n[r-2]),n[r-7],l(n[r-15]),n[r-16]);var i=this.h[0],a=this.h[1],y=this.h[2],g=this.h[3],m=this.h[4],b=this.h[5],I=this.h[6],C=this.h[7];for(s(this.k.length===n.length),r=0;r<n.length;r++){var v=c(C,f(m),A(m,b,I),this.k[r],n[r]),E=o(p(i),d(i,a,y));C=I,I=b,b=m,m=o(g,v),g=y,y=a,a=i,i=o(v,E)}this.h[0]=o(this.h[0],i),this.h[1]=o(this.h[1],a),this.h[2]=o(this.h[2],y),this.h[3]=o(this.h[3],g),this.h[4]=o(this.h[4],m),this.h[5]=o(this.h[5],b),this.h[6]=o(this.h[6],I),this.h[7]=o(this.h[7],C)},m.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},{"../common":27,"../utils":37,"./common":36,"minimalistic-assert":41}],34:[function(t,e,n){arguments[4][14][0].apply(n,arguments)},{dup:14}],35:[function(t,e,n){"use strict";var r=t("../utils"),i=t("../common"),a=t("minimalistic-assert"),s=r.rotr64_hi,o=r.rotr64_lo,u=r.shr64_hi,c=r.shr64_lo,A=r.sum64,d=r.sum64_hi,p=r.sum64_lo,f=r.sum64_4_hi,l=r.sum64_4_lo,h=r.sum64_5_hi,y=r.sum64_5_lo,g=i.BlockHash,m=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=m,this.W=new Array(160)}r.inherits(b,g),(e.exports=b).blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(t,e){for(var n=this.W,r=0;r<32;r++)n[r]=t[e+r];for(;r<n.length;r+=2){var i=function(t,e){return(e=s(t,e,19)^s(e,t,29)^(e=u(t,e,6)))<0&&(e+=4294967296),e}(n[r-4],n[r-3]),a=function(t,e){return(e=o(t,e,19)^o(e,t,29)^(e=c(t,e,6)))<0&&(e+=4294967296),e}(n[r-4],n[r-3]),A=n[r-14],d=n[r-13],p=function(t,e){return(e=s(t,e,1)^s(t,e,8)^(e=u(t,e,7)))<0&&(e+=4294967296),e}(n[r-30],n[r-29]),h=function(t,e){return(e=o(t,e,1)^o(t,e,8)^(e=c(t,e,7)))<0&&(e+=4294967296),e}(n[r-30],n[r-29]),y=n[r-32],g=n[r-31];n[r]=f(i,a,A,d,p,h,y,g),n[r+1]=l(i,a,A,d,p,h,y,g)}},b.prototype._update=function(t,e){this._prepareBlock(t,e);var n=this.W,r=this.h[0],i=this.h[1],u=this.h[2],c=this.h[3],f=this.h[4],l=this.h[5],g=this.h[6],m=this.h[7],b=this.h[8],I=this.h[9],C=this.h[10],v=this.h[11],E=this.h[12],w=this.h[13],B=this.h[14],Q=this.h[15];a(this.k.length===n.length);for(var M=0;M<n.length;M+=2){var k=B,_=Q,x=function(t,e){return(t=s(t,e,14)^s(t,e,18)^(t=s(e,t,9)))<0&&(t+=4294967296),t}(b,I),S=function(t,e){return(t=o(t,e,14)^o(t,e,18)^(t=o(e,t,9)))<0&&(t+=4294967296),t}(b,I),D=function(t,e,n){return(n=t&e^~t&n)<0&&(n+=4294967296),n}(b,C,E),R=function(t,e,n){return(n=t&e^~t&n)<0&&(n+=4294967296),n}(I,v,w),T=this.k[M],N=this.k[M+1],O=n[M],H=n[M+1],L=h(k,_,x,S,D,R,T,N,O,H);O=y(k,_,x,S,D,R,T,N,O,H),k=function(t,e){return(t=s(t,e,28)^s(e,t,2)^(t=s(e,t,7)))<0&&(t+=4294967296),t}(r,i),_=function(t,e){return(t=o(t,e,28)^o(e,t,2)^(t=o(e,t,7)))<0&&(t+=4294967296),t}(r,i),x=function(t,e,n){return(n=t&e^t&n^e&n)<0&&(n+=4294967296),n}(r,u,f),S=function(t,e,n){return(n=t&e^t&n^e&n)<0&&(n+=4294967296),n}(i,c,l),H=d(k,_,x,S),S=p(k,_,x,S),B=E,Q=w,E=C,w=v,C=b,v=I,b=d(g,m,L,O),I=p(m,m,L,O),g=f,m=l,f=u,l=c,u=r,c=i,r=d(L,O,H,S),i=p(L,O,H,S)}A(this.h,0,r,i),A(this.h,2,u,c),A(this.h,4,f,l),A(this.h,6,g,m),A(this.h,8,b,I),A(this.h,10,C,v),A(this.h,12,E,w),A(this.h,14,B,Q)},b.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},{"../common":27,"../utils":37,"minimalistic-assert":41}],36:[function(t,e,n){"use strict";var r=t("../utils").rotr32;function i(t,e,n){return t&e^~t&n}function a(t,e,n){return t&e^t&n^e&n}n.ft_1=function(t,e,n,r){return 0===t?i(e,n,r):1===t||3===t?e^n^r:2===t?a(e,n,r):void 0},n.ch32=i,n.maj32=a,n.p32=function(t,e,n){return t^e^n},n.s0_256=function(t){return r(t,2)^r(t,13)^r(t,22)},n.s1_256=function(t){return r(t,6)^r(t,11)^r(t,25)},n.g0_256=function(t){return r(t,7)^r(t,18)^t>>>3},n.g1_256=function(t){return r(t,17)^r(t,19)^t>>>10}},{"../utils":37}],37:[function(t,e,n){"use strict";var r=t("minimalistic-assert");function i(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function a(t){return 1===t.length?"0"+t:t}function s(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}t=t("inherits"),n.inherits=t,n.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),r=0;r<t.length;r+=2)n.push(parseInt(t[r]+t[r+1],16))}else for(var r=0;r<t.length;r++){var i=(a=t.charCodeAt(r))>>8,a=255&a;i?n.push(i,a):n.push(a)}else for(r=0;r<t.length;r++)n[r]=0|t[r];return n},n.toHex=function(t){for(var e="",n=0;n<t.length;n++)e+=a(t[n].toString(16));return e},n.htonl=i,n.toHex32=function(t,e){for(var n="",r=0;r<t.length;r++){var a=t[r];n+=s((a="little"===e?i(a):a).toString(16))}return n},n.zero2=a,n.zero8=s,n.join32=function(t,e,n,i){r((n-=e)%4==0);for(var a=new Array(n/4),s=0,o=e;s<a.length;s++,o+=4){var u="big"===i?t[o]<<24|t[o+1]<<16|t[o+2]<<8|t[o+3]:t[o+3]<<24|t[o+2]<<16|t[o+1]<<8|t[o];a[s]=u>>>0}return a},n.split32=function(t,e){for(var n=new Array(4*t.length),r=0,i=0;r<t.length;r++,i+=4){var a=t[r];"big"===e?(n[i]=a>>>24,n[i+1]=a>>>16&255,n[i+2]=a>>>8&255,n[i+3]=255&a):(n[i+3]=a>>>24,n[i+2]=a>>>16&255,n[i+1]=a>>>8&255,n[i]=255&a)}return n},n.rotr32=function(t,e){return t>>>e|t<<32-e},n.rotl32=function(t,e){return t<<e|t>>>32-e},n.sum32=function(t,e){return t+e>>>0},n.sum32_3=function(t,e,n){return t+e+n>>>0},n.sum32_4=function(t,e,n,r){return t+e+n+r>>>0},n.sum32_5=function(t,e,n,r,i){return t+e+n+r+i>>>0},n.sum64=function(t,e,n,r){var i=t[e],a=r+t[e+1]>>>0;t[e]=(a<r?1:0)+n+i>>>0,t[e+1]=a},n.sum64_hi=function(t,e,n,r){return(e+r>>>0<e?1:0)+t+n>>>0},n.sum64_lo=function(t,e,n,r){return e+r>>>0},n.sum64_4_hi=function(t,e,n,r,i,a,s,o){var u=0,c=e;return u+=(c=e+r>>>0)<e?1:0,u+=(c=c+a>>>0)<a?1:0,t+n+i+s+(u+=(c=c+o>>>0)<o?1:0)>>>0},n.sum64_4_lo=function(t,e,n,r,i,a,s,o){return e+r+a+o>>>0},n.sum64_5_hi=function(t,e,n,r,i,a,s,o,u,c){var A=0,d=e;return A+=(d=e+r>>>0)<e?1:0,A+=(d=d+a>>>0)<a?1:0,A+=(d=d+o>>>0)<o?1:0,t+n+i+s+u+(A+=(d=d+c>>>0)<c?1:0)>>>0},n.sum64_5_lo=function(t,e,n,r,i,a,s,o,u,c){return e+r+a+o+c>>>0},n.rotr64_hi=function(t,e,n){return(e<<32-n|t>>>n)>>>0},n.rotr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0},n.shr64_hi=function(t,e,n){return t>>>n},n.shr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0}},{inherits:39,"minimalistic-assert":41}],38:[function(t,e,n){"use strict";var r=t("hash.js"),i=t("minimalistic-crypto-utils"),a=t("minimalistic-assert");function s(t){if(!(this instanceof s))return new s(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),n=i.toArray(t.nonce,t.nonceEnc||"hex");t=i.toArray(t.pers,t.persEnc||"hex"),a(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,n,t)}(e.exports=s).prototype._init=function(t,e,n){n=t.concat(e).concat(n),this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r<this.V.length;r++)this.K[r]=0,this.V[r]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new r.hmac(this.hash,this.K)},s.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(t,e,n,r){"string"!=typeof e&&(r=n,n=e,e=null),t=i.toArray(t,e),n=i.toArray(n,r),a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(n||[])),this._reseed=1},s.prototype.generate=function(t,e,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(r=n,n=e,e=null),n&&(n=i.toArray(n,r||"hex"),this._update(n));for(var a=[];a.length<t;)this.V=this._hmac().update(this.V).digest(),a=a.concat(this.V);return r=a.slice(0,t),this._update(n),this._reseed++,i.encode(r,e)}},{"hash.js":26,"minimalistic-assert":41,"minimalistic-crypto-utils":42}],39:[function(t,e,n){"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){var n;e&&(t.super_=e,(n=function(){}).prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t)}},{}],40:[function(t,e,r){(function(t,n){(function(){!function(){"use strict";for(var r="object"==("undefined"==typeof window?"undefined":o(window))?window:{},i=!(r=!r.JS_SHA3_NO_NODE_JS&&"object"==o(t)&&t.versions&&t.versions.node?n:r).JS_SHA3_NO_COMMON_JS&&"object"==o(e)&&e.exports,a="0123456789abcdef".split(""),s=[0,8,16,24],u=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],c=[224,256,384,512],A=["hex","buffer","arrayBuffer","array"],d=function(t,e,n){return function(r){return new v(t,e,t).update(r)[n]()}},p=function(t,e,n){return function(r,i){return new v(t,e,i).update(r)[n]()}},f=function(t,e){var n=d(t,e,"hex");n.create=function(){return new v(t,e,t)},n.update=function(t){return n.create().update(t)};for(var r=0;r<A.length;++r){var i=A[r];n[i]=d(t,e,i)}return n},l=[{name:"keccak",padding:[1,256,65536,16777216],bits:c,createMethod:f},{name:"sha3",padding:[6,1536,393216,100663296],bits:c,createMethod:f},{name:"shake",padding:[31,7936,2031616,520093696],bits:[128,256],createMethod:function(t,e){var n=p(t,e,"hex");n.create=function(n){return new v(t,e,n)},n.update=function(t,e){return n.create(e).update(t)};for(var r=0;r<A.length;++r){var i=A[r];n[i]=p(t,e,i)}return n}}],h={},y=[],g=0;g<l.length;++g)for(var m=l[g],b=m.bits,I=0;I<b.length;++I){var C=m.name+"_"+b[I];y.push(C),h[C]=m.createMethod(b[I],m.padding)}function v(t,e,n){this.blocks=[],this.s=[],this.padding=e,this.outputBits=n,this.reset=!0,this.block=0,this.start=0,this.blockCount=1600-(t<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(31&n)>>3;for(var r=0;r<50;++r)this.s[r]=0}v.prototype.update=function(t){for(var e,n,r="string"!=typeof t,i=(t=r&&t.constructor===ArrayBuffer?new Uint8Array(t):t).length,a=this.blocks,o=this.byteCount,u=this.blockCount,c=0,A=this.s;c<i;){if(this.reset)for(this.reset=!1,a[0]=this.block,e=1;e<u+1;++e)a[e]=0;if(r)for(e=this.start;c<i&&e<o;++c)a[e>>2]|=t[c]<<s[3&e++];else for(e=this.start;c<i&&e<o;++c)(n=t.charCodeAt(c))<128?a[e>>2]|=n<<s[3&e++]:(n<2048?a[e>>2]|=(192|n>>6)<<s[3&e++]:(n<55296||57344<=n?a[e>>2]|=(224|n>>12)<<s[3&e++]:(n=65536+((1023&n)<<10|1023&t.charCodeAt(++c)),a[e>>2]|=(240|n>>18)<<s[3&e++],a[e>>2]|=(128|n>>12&63)<<s[3&e++]),a[e>>2]|=(128|n>>6&63)<<s[3&e++]),a[e>>2]|=(128|63&n)<<s[3&e++]);if(o<=(this.lastByteIndex=e)){for(this.start=e-o,this.block=a[u],e=0;e<u;++e)A[e]^=a[e];E(A),this.reset=!0}else this.start=e}return this},v.prototype.finalize=function(){var t=this.blocks,e=this.lastByteIndex,n=this.blockCount,r=this.s;if(t[e>>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(t[0]=t[n],e=1;e<n+1;++e)t[e]=0;for(t[n-1]|=2147483648,e=0;e<n;++e)r[e]^=t[e];E(r)},v.prototype.toString=v.prototype.hex=function(){this.finalize();for(var t,e=this.blockCount,n=this.s,r=this.outputBlocks,i=this.extraBytes,s=0,o=0,u="";o<r;){for(s=0;s<e&&o<r;++s,++o)t=n[s],u+=a[t>>4&15]+a[15&t]+a[t>>12&15]+a[t>>8&15]+a[t>>20&15]+a[t>>16&15]+a[t>>28&15]+a[t>>24&15];o%e==0&&(E(n),s=0)}return i&&(t=n[s],0<i&&(u+=a[t>>4&15]+a[15&t]),1<i&&(u+=a[t>>12&15]+a[t>>8&15]),2<i&&(u+=a[t>>20&15]+a[t>>16&15])),u},v.prototype.arrayBuffer=function(){this.finalize();for(var t=this.blockCount,e=this.s,n=this.outputBlocks,r=this.extraBytes,i=0,a=0,s=this.outputBits>>3,o=r?new ArrayBuffer(n+1<<2):new ArrayBuffer(s),u=new Uint32Array(o);a<n;){for(i=0;i<t&&a<n;++i,++a)u[a]=e[i];a%t==0&&E(e)}return r&&(u[i]=e[i],o=o.slice(0,s)),o},v.prototype.buffer=v.prototype.arrayBuffer,v.prototype.digest=v.prototype.array=function(){this.finalize();for(var t,e,n=this.blockCount,r=this.s,i=this.outputBlocks,a=this.extraBytes,s=0,o=0,u=[];o<i;){for(s=0;s<n&&o<i;++s,++o)e=r[s],u[t=o<<2]=255&e,u[t+1]=e>>8&255,u[t+2]=e>>16&255,u[t+3]=e>>24&255;o%n==0&&E(r)}return a&&(t=o<<2,e=r[s],0<a&&(u[t]=255&e),1<a&&(u[t+1]=e>>8&255),2<a&&(u[t+2]=e>>16&255)),u};var E=function(t){for(var e,n,r,i,a,s,o,c,A,d,p,f,l,h,y,g,m,b,I,C,v,E,w,B,Q,M,k,_,x,S,D,R,T,N,O,H,L,U,F,j,P,G,q,Y,K,z,J,V,W,Z,X=0;X<48;X+=2)k=t[0]^t[10]^t[20]^t[30]^t[40],_=t[1]^t[11]^t[21]^t[31]^t[41],j=t[2]^t[12]^t[22]^t[32]^t[42],F=t[3]^t[13]^t[23]^t[33]^t[43],R=t[4]^t[14]^t[24]^t[34]^t[44],D=t[5]^t[15]^t[25]^t[35]^t[45],z=t[6]^t[16]^t[26]^t[36]^t[46],K=t[7]^t[17]^t[27]^t[37]^t[47],l=t[8]^t[18]^t[28]^t[38]^t[48],d=(h=t[9]^t[19]^t[29]^t[39]^t[49])^(F<<1|j>>>31),t[0]^=A=l^(j<<1|F>>>31),t[1]^=d,t[10]^=A,t[11]^=d,t[20]^=A,t[21]^=d,t[30]^=A,t[31]^=d,t[40]^=A,t[41]^=d,d=_^(D<<1|R>>>31),t[2]^=A=k^(R<<1|D>>>31),t[3]^=d,t[12]^=A,t[13]^=d,t[22]^=A,t[23]^=d,t[32]^=A,t[33]^=d,t[42]^=A,t[43]^=d,d=F^(K<<1|z>>>31),t[4]^=A=j^(z<<1|K>>>31),t[5]^=d,t[14]^=A,t[15]^=d,t[24]^=A,t[25]^=d,t[34]^=A,t[35]^=d,t[44]^=A,t[45]^=d,d=D^(h<<1|l>>>31),t[6]^=A=R^(l<<1|h>>>31),t[7]^=d,t[16]^=A,t[17]^=d,t[26]^=A,t[27]^=d,t[36]^=A,t[37]^=d,t[46]^=A,t[47]^=d,d=K^(_<<1|k>>>31),t[8]^=A=z^(k<<1|_>>>31),t[9]^=d,t[18]^=A,t[19]^=d,t[28]^=A,t[29]^=d,t[38]^=A,t[39]^=d,t[48]^=A,t[49]^=d,e=t[0],n=t[1],T=t[11]<<4|t[10]>>>28,N=t[10]<<4|t[11]>>>28,y=t[20]<<3|t[21]>>>29,g=t[21]<<3|t[20]>>>29,J=t[31]<<9|t[30]>>>23,V=t[30]<<9|t[31]>>>23,x=t[40]<<18|t[41]>>>14,S=t[41]<<18|t[40]>>>14,v=t[2]<<1|t[3]>>>31,E=t[3]<<1|t[2]>>>31,r=t[13]<<12|t[12]>>>20,i=t[12]<<12|t[13]>>>20,O=t[22]<<10|t[23]>>>22,H=t[23]<<10|t[22]>>>22,m=t[33]<<13|t[32]>>>19,b=t[32]<<13|t[33]>>>19,W=t[42]<<2|t[43]>>>30,Z=t[43]<<2|t[42]>>>30,P=t[5]<<30|t[4]>>>2,G=t[4]<<30|t[5]>>>2,w=t[14]<<6|t[15]>>>26,B=t[15]<<6|t[14]>>>26,a=t[25]<<11|t[24]>>>21,s=t[24]<<11|t[25]>>>21,L=t[34]<<15|t[35]>>>17,U=t[35]<<15|t[34]>>>17,I=t[45]<<29|t[44]>>>3,C=t[44]<<29|t[45]>>>3,p=t[6]<<28|t[7]>>>4,f=t[7]<<28|t[6]>>>4,q=t[17]<<23|t[16]>>>9,Y=t[16]<<23|t[17]>>>9,Q=t[26]<<25|t[27]>>>7,M=t[27]<<25|t[26]>>>7,o=t[36]<<21|t[37]>>>11,c=t[37]<<21|t[36]>>>11,F=t[47]<<24|t[46]>>>8,j=t[46]<<24|t[47]>>>8,D=t[8]<<27|t[9]>>>5,R=t[9]<<27|t[8]>>>5,l=t[18]<<20|t[19]>>>12,h=t[19]<<20|t[18]>>>12,K=t[29]<<7|t[28]>>>25,z=t[28]<<7|t[29]>>>25,k=t[38]<<8|t[39]>>>24,_=t[39]<<8|t[38]>>>24,A=t[48]<<14|t[49]>>>18,d=t[49]<<14|t[48]>>>18,t[0]=e^~r&a,t[1]=n^~i&s,t[10]=p^~l&y,t[11]=f^~h&g,t[20]=v^~w&Q,t[21]=E^~B&M,t[30]=D^~T&O,t[31]=R^~N&H,t[40]=P^~q&K,t[41]=G^~Y&z,t[2]=r^~a&o,t[3]=i^~s&c,t[12]=l^~y&m,t[13]=h^~g&b,t[22]=w^~Q&k,t[23]=B^~M&_,t[32]=T^~O&L,t[33]=N^~H&U,t[42]=q^~K&J,t[43]=Y^~z&V,t[4]=a^~o&A,t[5]=s^~c&d,t[14]=y^~m&I,t[15]=g^~b&C,t[24]=Q^~k&x,t[25]=M^~_&S,t[34]=O^~L&F,t[35]=H^~U&j,t[44]=K^~J&W,t[45]=z^~V&Z,t[6]=o^~A&e,t[7]=c^~d&n,t[16]=m^~I&p,t[17]=b^~C&f,t[26]=k^~x&v,t[27]=_^~S&E,t[36]=L^~F&D,t[37]=U^~j&R,t[46]=J^~W&P,t[47]=V^~Z&G,t[8]=A^~e&r,t[9]=d^~n&i,t[18]=I^~p&l,t[19]=C^~f&h,t[28]=x^~v&w,t[29]=S^~E&B,t[38]=F^~D&T,t[39]=j^~R&N,t[48]=W^~P&q,t[49]=Z^~G&Y,t[0]^=u[X],t[1]^=u[X+1]};if(i)e.exports=h;else for(g=0;g<y.length;++g)r[y[g]]=h[y[g]]}()}).call(this)}).call(this,t("_process"),void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:43}],41:[function(t,e,n){(e.exports=function(t,e){if(!t)throw new Error(e||"Assertion failed")}).equal=function(t,e,n){if(t!=e)throw new Error(n||"Assertion failed: "+t+" != "+e)}},{}],42:[function(t,e,n){"use strict";function r(t){return 1===t.length?"0"+t:t}function i(t){for(var e="",n=0;n<t.length;n++)e+=r(t[n].toString(16));return e}n.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"!=typeof t){for(var r=0;r<t.length;r++)n[r]=0|t[r];return n}if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),r=0;r<t.length;r+=2)n.push(parseInt(t[r]+t[r+1],16));else for(r=0;r<t.length;r++){var i=(a=t.charCodeAt(r))>>8,a=255&a;i?n.push(i,a):n.push(a)}return n},n.zero2=r,n.toHex=i,n.encode=function(t,e){return"hex"===e?i(t):t}},{}],43:[function(t,e,n){e.exports={browser:!0}},{}],44:[function(t,e,n){(function(t){(function(){"use strict";function r(t){var e=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],n=1779033703,r=3144134277,i=1013904242,a=2773480762,s=1359893119,o=2600822924,u=528734635,c=1541459225,A=new Array(64);function d(t){for(var d=0,p=t.length;64<=p;){for(var f,l,h,y,g=n,m=r,b=i,I=a,C=s,v=o,E=u,w=c,B=0;B<16;B++)A[B]=(255&t[l=d+4*B])<<24|(255&t[l+1])<<16|(255&t[l+2])<<8|255&t[l+3];for(B=16;B<64;B++)h=((f=A[B-2])>>>17|f<<15)^(f>>>19|f<<13)^f>>>10,f=A[B-15],A[B]=(h+A[B-7]|0)+((y=(f>>>7|f<<25)^(f>>>18|f<<14)^f>>>3)+A[B-16]|0)|0;for(B=0;B<64;B++)h=(((C>>>6|C<<26)^(C>>>11|C<<21)^(C>>>25|C<<7))+(C&v^~C&E)|0)+(w+(e[B]+A[B]|0)|0)|0,y=((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+(g&m^g&b^m&b)|0,w=E,E=v,v=C,C=I+h|0,I=b,b=m,m=g,g=h+y|0;n=n+g|0,r=r+m|0,i=i+b|0,a=a+I|0,s=s+C|0,o=o+v|0,u=u+E|0,c=c+w|0,d+=64,p-=64}}d(t);var p,f=t.length%64,l=t.length/536870912|0,h=t.length<<3,y=f<56?56:120,g=t.slice(t.length-f,t.length);for(g.push(128),p=1+f;p<y;p++)g.push(0);return g.push(l>>>24&255),g.push(l>>>16&255),g.push(l>>>8&255),g.push(l>>>0&255),g.push(h>>>24&255),g.push(h>>>16&255),g.push(h>>>8&255),g.push(h>>>0&255),d(g),[n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255]}function i(t,e,n){t=t.length<=64?t:r(t);for(var i=64+e.length+4,a=new Array(i),s=new Array(64),o=[],u=0;u<64;u++)a[u]=54;for(u=0;u<t.length;u++)a[u]^=t[u];for(u=0;u<e.length;u++)a[64+u]=e[u];for(u=i-4;u<i;u++)a[u]=0;for(u=0;u<64;u++)s[u]=92;for(u=0;u<t.length;u++)s[u]^=t[u];function c(){for(var t=i-1;i-4<=t;t--){if(a[t]++,a[t]<=255)return;a[t]=0}}for(;32<=n;)c(),o=o.concat(r(s.concat(r(a)))),n-=32;return 0<n&&(c(),o=o.concat(r(s.concat(r(a))).slice(0,n))),o}function a(t,e,n,r,i){var a;for(u(t,16*(2*n-1),i,0,16),a=0;a<2*n;a++)o(t,16*a,i,16),function(t,e){u(t,0,e,0,16);for(var n=8;0<n;n-=2)e[4]^=s(e[0]+e[12],7),e[8]^=s(e[4]+e[0],9),e[12]^=s(e[8]+e[4],13),e[0]^=s(e[12]+e[8],18),e[9]^=s(e[5]+e[1],7),e[13]^=s(e[9]+e[5],9),e[1]^=s(e[13]+e[9],13),e[5]^=s(e[1]+e[13],18),e[14]^=s(e[10]+e[6],7),e[2]^=s(e[14]+e[10],9),e[6]^=s(e[2]+e[14],13),e[10]^=s(e[6]+e[2],18),e[3]^=s(e[15]+e[11],7),e[7]^=s(e[3]+e[15],9),e[11]^=s(e[7]+e[3],13),e[15]^=s(e[11]+e[7],18),e[1]^=s(e[0]+e[3],7),e[2]^=s(e[1]+e[0],9),e[3]^=s(e[2]+e[1],13),e[0]^=s(e[3]+e[2],18),e[6]^=s(e[5]+e[4],7),e[7]^=s(e[6]+e[5],9),e[4]^=s(e[7]+e[6],13),e[5]^=s(e[4]+e[7],18),e[11]^=s(e[10]+e[9],7),e[8]^=s(e[11]+e[10],9),e[9]^=s(e[8]+e[11],13),e[10]^=s(e[9]+e[8],18),e[12]^=s(e[15]+e[14],7),e[13]^=s(e[12]+e[15],9),e[14]^=s(e[13]+e[12],13),e[15]^=s(e[14]+e[13],18);for(n=0;n<16;++n)t[n]+=e[n]}(i,r),u(i,0,t,e+16*a,16);for(a=0;a<n;a++)u(t,e+2*a*16,t,16*a,16);for(a=0;a<n;a++)u(t,e+16*(2*a+1),t,16*(a+n),16)}function s(t,e){return t<<e|t>>>32-e}function o(t,e,n,r){for(var i=0;i<r;i++)n[i]^=t[e+i]}function u(t,e,n,r,i){for(;i--;)n[r++]=t[e++]}function c(t){if(t&&"number"==typeof t.length){for(var e=0;e<t.length;e++){if("number"!=typeof t[e])return;var n=parseInt(t[e]);if(n!=t[e]||n<0||256<=n)return}return 1}}function A(t,e){var n=parseInt(t);if(t!=n)throw new Error("invalid "+e);return n}function d(e,n,r,s,d,p,l){if(!l)throw new Error("missing callback");if(r=A(r,"N"),s=A(s,"r"),d=A(d,"p"),p=A(p,"dkLen"),0===r||0!=(r&r-1))throw new Error("N must be power of 2");if(f/128/s<r)throw new Error("N too large");if(f/128/d<s)throw new Error("r too large");if(!c(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!c(n))throw new Error("salt must be an array or buffer");n=Array.prototype.slice.call(n);for(var h=i(e,n,128*d*s),y=new Uint32Array(32*d*s),g=0;g<y.length;g++){var m=4*g;y[g]=(255&h[3+m])<<24|(255&h[2+m])<<16|(255&h[1+m])<<8|(255&h[0+m])<<0}var b,I,C=new Uint32Array(64*s),v=new Uint32Array(32*s*r),E=32*s,w=new Uint32Array(16),B=new Uint32Array(16),Q=d*r*2,M=0,k=null,_=!1,x=0,S=0,D=parseInt(1e3/s),R=void 0!==t?t:setTimeout;!function t(){if(_)return l(new Error("cancelled"),M/Q);switch(x){case 0:u(y,I=32*S*s,C,0,E),x=1,b=0;case 1:D<(c=r-b)&&(c=D);for(var n=0;n<c;n++)u(C,0,v,(b+n)*E,E),a(C,E,s,w,B);if(b+=c,M+=c,(f=parseInt(1e3*M/Q))!==k){if(_=l(null,M/Q))break;k=f}if(b<r)break;b=0,x=2;case 2:var c;for(D<(c=r-b)&&(c=D),n=0;n<c;n++){var A=C[16*(2*s-1)]&r-1;o(v,A*E,C,E),a(C,E,s,w,B)}if(b+=c,M+=c,(f=parseInt(1e3*M/Q))!==k){if(_=l(null,M/Q))break;k=f}if(b<r)break;if(u(C,0,y,I,E),++S<d){x=0;break}for(h=[],n=0;n<y.length;n++)h.push(y[n]>>0&255),h.push(y[n]>>8&255),h.push(y[n]>>16&255),h.push(y[n]>>24&255);var f=i(e,h,p);return l(null,1,f)}R(t)}()}var p,f;p=this,f=2147483647,void 0!==n?e.exports=d:p&&(p.scrypt&&(p._scrypt=p.scrypt),p.scrypt=d)}).call(this)}).call(this,t("timers").setImmediate)},{timers:46}],45:[function(t,e,r){(function(t,e,n){(function(){!function(e,n){"use strict";var r,i,a,s,o,u,c,A;function d(t){return i[r]=p.apply(n,t),r++}function p(t){var e=[].slice.call(arguments,1);return function(){"function"==typeof t?t.apply(n,e):new Function(""+t)()}}function f(t){if(a)setTimeout(p(f,t),0);else{var e=i[t];if(e){a=!0;try{e()}finally{l(t),a=!1}}}}function l(t){delete i[t]}e.setImmediate||(r=1,a=!(i={}),s=e.document,A=(A=Object.getPrototypeOf&&Object.getPrototypeOf(e))&&A.setTimeout?A:e,"[object process]"==={}.toString.call(e.process)?o=function(){var e=d(arguments);return t.nextTick(p(f,e)),e}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){function t(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(n)&&f(+t.data.slice(n.length))}var n="setImmediate$"+Math.random()+"$";e.addEventListener?e.addEventListener("message",t,!1):e.attachEvent("onmessage",t),o=function(){var t=d(arguments);return e.postMessage(n+t,"*"),t}}():o=e.MessageChannel?((c=new MessageChannel).port1.onmessage=function(t){f(t.data)},function(){var t=d(arguments);return c.port2.postMessage(t),t}):s&&"onreadystatechange"in s.createElement("script")?(u=s.documentElement,function(){var t=d(arguments),e=s.createElement("script");return e.onreadystatechange=function(){f(t),e.onreadystatechange=null,u.removeChild(e),e=null},u.appendChild(e),t}):function(){var t=d(arguments);return setTimeout(p(f,t),0),t},A.setImmediate=o,A.clearImmediate=l)}("undefined"==typeof self?void 0===e?this:e:self)}).call(this)}).call(this,t("_process"),void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("timers").clearImmediate)},{_process:43,timers:46}],46:[function(t,e,r){(function(t){(function(){e.exports={setImmediate:t.setImmediate}}).call(this)}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],47:[function(t,e,r){(function(t){(function(){var n,r,i;t.crypto&&crypto.getRandomValues&&(n=new Uint8Array(16),r=function(){return crypto.getRandomValues(n),n}),r||(i=new Array(16),r=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),i[e]=t>>>((3&e)<<3)&255;return i}),e.exports=r}).call(this)}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],48:[function(t,e,n){for(var r=t("./rng"),i=[],a={},s=0;s<256;s++)i[s]=(s+256).toString(16).substr(1),a[i[s]]=s;function o(t,e){return e=e||0,i[t[e++]]+i[t[e++]]+i[t[e++]]+i[t[e++]]+"-"+i[t[e++]]+i[t[e++]]+"-"+i[t[e++]]+i[t[e++]]+"-"+i[t[e++]]+i[t[e++]]+"-"+i[t[e++]]+i[t[e++]]+i[t[e++]]+i[t[e++]]+i[t[e++]]+i[t[e++]]}var u=[1|(t=r())[0],t[1],t[2],t[3],t[4],t[5]],c=16383&(t[6]<<8|t[7]),A=0,d=0;function p(t,e,n){var i=e&&n||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null);var a=(t=t||{}).random||(t.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,e)for(var s=0;s<16;s++)e[i+s]=a[s];return e||o(a)}(t=p).v1=function(t,e,n){var r=e&&n||0,i=e||[],a=void 0!==(t=t||{}).clockseq?t.clockseq:c,s=void 0!==t.msecs?t.msecs:(new Date).getTime(),p=void 0!==t.nsecs?t.nsecs:d+1;if((n=s-A+(p-d)/1e4)<0&&void 0===t.clockseq&&(a=a+1&16383),1e4<=(p=(n<0||A<s)&&void 0===t.nsecs?0:p))throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");A=s,c=a,p=(1e4*(268435455&(s+=122192928e5))+(d=p))%4294967296,i[r++]=p>>>24&255,i[r++]=p>>>16&255,i[r++]=p>>>8&255,i[r++]=255&p,s=s/4294967296*1e4&268435455,i[r++]=s>>>8&255,i[r++]=255&s,i[r++]=s>>>24&15|16,i[r++]=s>>>16&255,i[r++]=a>>>8|128,i[r++]=255&a;for(var f=t.node||u,l=0;l<6;l++)i[r+l]=f[l];return e||o(i)},t.v4=p,t.parse=function(t,e,n){var r=e&&n||0,i=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,(function(t){i<16&&(e[r+i++]=a[t])}));i<16;)e[r+i++]=0;return e},t.unparse=o,e.exports=t},{"./rng":47}],49:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});try{e.exports.XMLHttpRequest=XMLHttpRequest}catch(t){console.log("Warning: XMLHttpRequest is not defined"),e.exports.XMLHttpRequest=null}},{}],50:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("../utils/properties");function i(){r.setType(this,"Provider")}i.isProvider=function(t){return r.isType(t,"Provider")},t=i,n.Provider=t},{"../utils/properties":74}],51:[function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var s=t("../utils/address"),u=t("../utils/bignumber"),c=t("../utils/bytes"),A=t("../constants"),d=t("../utils/hash"),p=t("../utils/networks"),f=t("../utils/properties"),l=t("../utils/rlp"),h=t("../utils/transaction"),y=t("../utils/utf8"),g=t("../utils/web"),m=a(t("../errors")),b=t("./abstract-provider");function I(t,e){var n,r={};for(n in t)try{var i=t[n](e[n]);void 0!==i&&(r[n]=i)}catch(t){throw t.checkKey=n,t.checkValue=e[n],t}return r}function C(t,e){return function(n){return null==n?e:t(n)}}function v(t){return function(e){if(!Array.isArray(e))throw new Error("not an array");var n=[];return e.forEach((function(e){n.push(t(e))})),n}}function E(t,e){return"string"==typeof t&&(e||"0x"===t.substring(0,2)||(t="0x"+t),32===c.hexDataLength(t))?t.toLowerCase():(m.throwError("invalid hash",m.INVALID_ARGUMENT,{arg:"hash",value:t}),null)}function w(t){return u.bigNumberify(t).toNumber()}function B(t){if(!c.isHexString(t))throw new Error("invalid uint256");for(;t.length<66;)t="0x0"+t.substring(2);return t}function Q(t){if(null==t)return"latest";if("earliest"===t)return"0x0";if("latest"===t||"pending"===t)return t;if("number"==typeof t)return c.hexStripZeros(c.hexlify(t));if(c.isHexString(t))return c.hexStripZeros(t);throw new Error("invalid blockTag")}var M={hash:E,blockHash:C(E,null),blockNumber:C(w,null),transactionIndex:C(w,null),confirmations:C(w,null),from:s.getAddress,gasPrice:u.bigNumberify,gasLimit:u.bigNumberify,to:C(s.getAddress,null),value:u.bigNumberify,nonce:w,data:c.hexlify,r:C(B),s:C(B),v:C(w),creates:C(s.getAddress,null),raw:C(c.hexlify)};function k(t){null!=t.gas&&null==t.gasLimit&&(t.gasLimit=t.gas),t.to&&u.bigNumberify(t.to).isZero()&&(t.to="0x0000000000000000000000000000000000000000"),null!=t.input&&null==t.data&&(t.data=t.input),null==t.to&&null==t.creates&&(t.creates=s.getContractAddress(t)),t.raw||t.v&&t.r&&t.s&&(n=[c.stripZeros(c.hexlify(t.nonce)),c.stripZeros(c.hexlify(t.gasPrice)),c.stripZeros(c.hexlify(t.gasLimit)),t.to||"0x",c.stripZeros(c.hexlify(t.value||"0x")),c.hexlify(t.data||"0x"),c.stripZeros(c.hexlify(t.v||"0x")),c.stripZeros(c.hexlify(t.r)),c.stripZeros(c.hexlify(t.s))],t.raw=l.encode(n));var e=I(M,t),n=t.networkId;return null!=t.chainId&&null==n&&null==e.v&&(n=t.chainId),"number"!=typeof(n=c.isHexString(n)?u.bigNumberify(n).toNumber():n)&&null!=e.v&&((n=(e.v-35)/2)<0&&(n=0),n=parseInt(n)),e.networkId=n="number"!=typeof n?0:n,null==e.chainId&&null!=n&&(e.chainId=n),e.blockHash&&"x"===e.blockHash.replace(/0/g,"")&&(e.blockHash=null),e}var _={hash:E,parentHash:E,number:w,timestamp:w,nonce:C(c.hexlify),difficulty:function(t){t=u.bigNumberify(t);try{return t.toNumber()}catch(t){}return null},gasLimit:u.bigNumberify,gasUsed:u.bigNumberify,miner:s.getAddress,extraData:c.hexlify,transactions:C(v(E))},x=f.shallowCopy(_);function S(t,e){return null!=t.author&&null==t.miner&&(t.miner=t.author),I(e?x:_,t)}x.transactions=C(v(k));var D={from:C(s.getAddress),nonce:C(w),gasLimit:C(u.bigNumberify),gasPrice:C(u.bigNumberify),to:C(s.getAddress),value:C(u.bigNumberify),data:C(c.hexlify)};function R(t){return I(D,t)}var T={transactionLogIndex:C(w),transactionIndex:w,blockNumber:w,transactionHash:E,address:s.getAddress,topics:v(E),data:c.hexlify,logIndex:w,blockHash:E},N={to:C(s.getAddress,null),from:C(s.getAddress,null),contractAddress:C(s.getAddress,null),transactionIndex:w,root:C(E),gasUsed:u.bigNumberify,logsBloom:C(c.hexlify),blockHash:E,transactionHash:E,logs:v((function(t){return I(T,t)})),blockNumber:w,confirmations:C(w,null),cumulativeGasUsed:u.bigNumberify,status:C(w)};function O(t){return Array.isArray(t)?t.forEach((function(t){O(t)})):null!=t&&E(t),t}var H,L,U={fromBlock:C(Q,void 0),toBlock:C(Q,void 0),address:C(s.getAddress,void 0),topics:C(O,void 0)},F={blockHash:C(E,void 0),address:C(s.getAddress,void 0),topics:C(O,void 0)},j={blockNumber:C(w),blockHash:C(E),transactionIndex:w,removed:C((function(t){if("boolean"==typeof t)return t;if("string"==typeof t){if("true"===t)return!0;if("false"===t)return!1}throw new Error("invaid boolean - "+t)})),address:s.getAddress,data:(H=c.hexlify,function(t){return t?H(t):"0x"}),topics:v(E),transactionHash:E,logIndex:w};function P(t){return I(j,t)}function G(t){return t.map((function(t){return"string"==typeof t?t:Array.isArray(t)?(t.forEach((function(t){null!==t&&32!==c.hexDataLength(t)&&m.throwError("invalid topic",m.INVALID_ARGUMENT,{argument:"topic",value:t})})),t.join(",")):null===t?"":m.throwError("invalid topic value",m.INVALID_ARGUMENT,{argument:"topic",value:t})})).join("&")}function q(t){if("string"==typeof t){if(20===c.hexDataLength(t))return"address:"+s.getAddress(t);if(t=t.toLowerCase(),32===c.hexDataLength(t))return"tx:"+t;if(-1===t.indexOf(":"))return t}else{if(Array.isArray(t))return"filter::"+G(t);if(t&&"object"==o(t))return"filter:"+(t.address||"")+":"+G(t.topics||[])}throw new Error("invalid event - "+t)}function Y(){return(new Date).getTime()}function K(t){var e,n=L.call(this)||this;return m.checkNew(n,b.Provider),t instanceof Promise?(f.defineReadOnly(n,"ready",t.then((function(t){return f.defineReadOnly(n,"_network",t),t}))),n.ready.catch((function(t){}))):(e=p.getNetwork(null==t?"homestead":t))?(f.defineReadOnly(n,"_network",e),f.defineReadOnly(n,"ready",Promise.resolve(n._network))):m.throwError("invalid network",m.INVALID_ARGUMENT,{arg:"network",value:t}),n._lastBlockNumber=-2,n._balances={},n._events=[],n._pollingInterval=4e3,n._emitted={block:-2},n._fastQueryDate=0,n}i(K,L=b.Provider),K.prototype._doPoll=function(){var t=this;this.getBlockNumber().then((function(e){if(t.polling&&(t._setFastBlockNumber(e),e!==t._lastBlockNumber)){-2===t._emitted.block&&(t._emitted.block=e-1);for(var n=t._emitted.block+1;n<=e;n++)t.emit("block",n);t._emitted.block!==e&&(t._emitted.block=e,Object.keys(t._emitted).forEach((function(n){var r;"block"===n||"pending"!==(r=t._emitted[n])&&12<e-r&&delete t._emitted[n]}))),-2===t._lastBlockNumber&&(t._lastBlockNumber=e-1);var r={},i={};return t._events.forEach((function(t){i[t.tag]=!0})),Object.keys(i).forEach((function(n){var i=n.split(":");switch(i[0]){case"tx":var a=i[1];t.getTransactionReceipt(a).then((function(e){return e&&null!=e.blockNumber&&(t._emitted["t:"+a]=e.blockNumber,t.emit(a,e)),null})).catch((function(e){t.emit("error",e)}));break;case"address":var s=i[1];t._balances[s]&&(r[s]=t._balances[s]),t.getBalance(s,"latest").then((function(e){var n=t._balances[s];if(!n||!e.eq(n))return t._balances[s]=e,t.emit(s,e),null})).catch((function(e){t.emit("error",e)}));break;case"filter":var o=i[2].split(/&/g).map((function(t){var e=t.split(",");return 1===e.length?""===e[0]?null:t:e.map((function(t){return""===t?null:t}))})),u={address:i[1],fromBlock:t._lastBlockNumber+1,toBlock:e,topics:o};u.address||delete u.address,t.getLogs(u).then((function(e){if(0!==e.length)return e.forEach((function(e){t._emitted["b:"+e.blockHash]=e.blockNumber,t._emitted["t:"+e.transactionHash]=e.blockNumber,t.emit(u,e)})),null})).catch((function(e){t.emit("error",e)}))}})),t._lastBlockNumber=e,t._balances=r,null}})).catch((function(t){})),this.doPoll()},K.prototype.resetEventsBlock=function(t){this._lastBlockNumber=t-1,this.polling&&this._doPoll()},Object.defineProperty(K.prototype,"network",{get:function(){return this._network},enumerable:!0,configurable:!0}),K.prototype.getNetwork=function(){return this.ready},Object.defineProperty(K.prototype,"blockNumber",{get:function(){return this._fastBlockNumber},enumerable:!0,configurable:!0}),Object.defineProperty(K.prototype,"polling",{get:function(){return null!=this._poller},set:function(t){var e=this;setTimeout((function(){t&&!e._poller?(e._poller=setInterval(e._doPoll.bind(e),e.pollingInterval),e._doPoll()):!t&&e._poller&&(clearInterval(e._poller),e._poller=null)}),0)},enumerable:!0,configurable:!0}),Object.defineProperty(K.prototype,"pollingInterval",{get:function(){return this._pollingInterval},set:function(t){var e=this;if("number"!=typeof t||t<=0||parseInt(String(t))!=t)throw new Error("invalid polling interval");this._pollingInterval=t,this._poller&&(clearInterval(this._poller),this._poller=setInterval((function(){e._doPoll()}),this._pollingInterval))},enumerable:!0,configurable:!0}),K.prototype._getFastBlockNumber=function(){var t=this,e=Y();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then((function(e){return(null==t._fastBlockNumber||e>t._fastBlockNumber)&&(t._fastBlockNumber=e),t._fastBlockNumber}))),this._fastBlockNumberPromise},K.prototype._setFastBlockNumber=function(t){null!=this._fastBlockNumber&&t<this._fastBlockNumber||(this._fastQueryDate=Y(),(null==this._fastBlockNumber||t>this._fastBlockNumber)&&(this._fastBlockNumber=t,this._fastBlockNumberPromise=Promise.resolve(t)))},K.prototype.waitForTransaction=function(t,e){var n=this;return null==e&&(e=1),this.getTransactionReceipt(t).then((function(r){return 0===e||r&&r.confirmations>=e?r:new Promise((function(r){n.on(t,(function i(a){a.confirmations<e||(n.removeListener(t,i),r(a))}))}))}))},K.prototype.getBlockNumber=function(){var t=this;return this.ready.then((function(){return t.perform("getBlockNumber",{}).then((function(e){var n=parseInt(e);if(n!=e)throw new Error("invalid response - getBlockNumber");return t._setFastBlockNumber(n),n}))}))},K.prototype.getGasPrice=function(){var t=this;return this.ready.then((function(){return t.perform("getGasPrice",{}).then((function(t){return u.bigNumberify(t)}))}))},K.prototype.getBalance=function(t,e){var n=this;return this.ready.then((function(){return f.resolveProperties({addressOrName:t,blockTag:e}).then((function(t){var e=t.addressOrName,r=t.blockTag;return n._getAddress(e).then((function(t){return t={address:t,blockTag:Q(r)},n.perform("getBalance",t).then((function(t){return u.bigNumberify(t)}))}))}))}))},K.prototype.getTransactionCount=function(t,e){var n=this;return this.ready.then((function(){return f.resolveProperties({addressOrName:t,blockTag:e}).then((function(t){var e=t.addressOrName,r=t.blockTag;return n._getAddress(e).then((function(t){return t={address:t,blockTag:Q(r)},n.perform("getTransactionCount",t).then((function(t){return u.bigNumberify(t).toNumber()}))}))}))}))},K.prototype.getCode=function(t,e){var n=this;return this.ready.then((function(){return f.resolveProperties({addressOrName:t,blockTag:e}).then((function(t){var e=t.addressOrName,r=t.blockTag;return n._getAddress(e).then((function(t){return t={address:t,blockTag:Q(r)},n.perform("getCode",t).then((function(t){return c.hexlify(t)}))}))}))}))},K.prototype.getStorageAt=function(t,e,n){var r=this;return this.ready.then((function(){return f.resolveProperties({addressOrName:t,position:e,blockTag:n}).then((function(t){var e=t.addressOrName,n=t.position,i=t.blockTag;return r._getAddress(e).then((function(t){return t={address:t,blockTag:Q(i),position:c.hexStripZeros(c.hexlify(n))},r.perform("getStorageAt",t).then((function(t){return c.hexlify(t)}))}))}))}))},K.prototype.sendTransaction=function(t){var e=this;return this.ready.then((function(){return f.resolveProperties({signedTransaction:t}).then((function(t){var n=t.signedTransaction;return t={signedTransaction:c.hexlify(n)},e.perform("sendTransaction",t).then((function(t){return e._wrapTransaction(h.parse(n),t)}),(function(t){throw t.transaction=h.parse(n),t.transaction.hash&&(t.transactionHash=t.transaction.hash),t}))}))}))},K.prototype._wrapTransaction=function(t,e){var n=this;if(null!=e&&32!==c.hexDataLength(e))throw new Error("invalid response - sendTransaction");var r=t;return null!=e&&t.hash!==e&&m.throwError("Transaction hash mismatch from Provider.sendTransaction.",m.UNKNOWN_ERROR,{expectedHash:t.hash,returnedHash:e}),r.wait=function(e){return 0!==e&&(n._emitted["t:"+t.hash]="pending"),n.waitForTransaction(t.hash,e).then((function(r){return null==r&&0===e?null:(n._emitted["t:"+t.hash]=r.blockNumber,0===r.status&&m.throwError("transaction failed",m.CALL_EXCEPTION,{transactionHash:t.hash,transaction:t}),r)}))},r},K.prototype.call=function(t,e){var n=this,r=f.shallowCopy(t);return this.ready.then((function(){return f.resolveProperties({blockTag:e,tx:r}).then((function(t){var e=t.blockTag;return t=t.tx,n._resolveNames(t,["to","from"]).then((function(t){return t={blockTag:Q(e),transaction:R(t)},n.perform("call",t).then((function(t){return c.hexlify(t)}))}))}))}))},K.prototype.estimateGas=function(t){var e=this,n={to:t.to,from:t.from,data:t.data,gasPrice:t.gasPrice,value:t.value};return this.ready.then((function(){return f.resolveProperties(n).then((function(t){return e._resolveNames(t,["to","from"]).then((function(t){return t={transaction:R(t)},e.perform("estimateGas",t).then((function(t){return u.bigNumberify(t)}))}))}))}))},K.prototype.getBlock=function(t,e){var n=this;return this.ready.then((function(){return f.resolveProperties({blockHashOrBlockTag:t}).then((function(t){t=t.blockHashOrBlockTag;try{var r=c.hexlify(t);if(32===c.hexDataLength(r))return g.poll((function(){return n.perform("getBlock",{blockHash:r,includeTransactions:!!e}).then((function(t){return null==t?null==n._emitted["b:"+r]?null:void 0:S(t,e)}))}),{onceBlock:n})}catch(t){}try{var i=-128,a=Q(t);return c.isHexString(a)&&(i=parseInt(a.substring(2),16)),g.poll((function(){return n.perform("getBlock",{blockTag:a,includeTransactions:!!e}).then((function(t){return null==t?i<=n._emitted.block?void 0:null:S(t,e)}))}),{onceBlock:n})}catch(t){}throw new Error("invalid block hash or block tag")}))}))},K.prototype.getTransaction=function(t){var e=this;return this.ready.then((function(){return f.resolveProperties({transactionHash:t}).then((function(t){var n=t.transactionHash,r={transactionHash:E(n,!0)};return g.poll((function(){return e.perform("getTransaction",r).then((function(t){if(null==t)return null==e._emitted["t:"+n]?null:void 0;var r=K.checkTransactionResponse(t);if(null==r.blockNumber)r.confirmations=0;else if(null==r.confirmations)return e._getFastBlockNumber().then((function(t){return t=t-r.blockNumber+1,r.confirmations=t=t<=0?1:t,e._wrapTransaction(r)}));return e._wrapTransaction(r)}))}),{onceBlock:e})}))}))},K.prototype.getTransactionReceipt=function(t){var e=this;return this.ready.then((function(){return f.resolveProperties({transactionHash:t}).then((function(t){var n=t.transactionHash,r={transactionHash:E(n,!0)};return g.poll((function(){return e.perform("getTransactionReceipt",r).then((function(t){if(null==t)return null==e._emitted["t:"+n]?null:void 0;if(null!=t.blockHash){var r,i=((t=I(N,r=t)).logs.forEach((function(t,e){null==t.transactionLogIndex&&(t.transactionLogIndex=e)})),null!=r.status&&(t.byzantium=!0),t);if(null==i.blockNumber)i.confirmations=0;else if(null==i.confirmations)return e._getFastBlockNumber().then((function(t){return t=t-i.blockNumber+1,i.confirmations=t=t<=0?1:t,i}));return i}}))}),{onceBlock:e})}))}))},K.prototype.getLogs=function(t){var e=this;return this.ready.then((function(){return f.resolveProperties(t).then((function(t){return e._resolveNames(t,["address"]).then((function(t){return t={filter:(t=t)&&t.blockHash?I(F,t):I(U,t)},e.perform("getLogs",t).then((function(t){return v(P)(t)}))}))}))}))},K.prototype.getEtherPrice=function(){var t=this;return this.ready.then((function(){return t.perform("getEtherPrice",{}).then((function(t){return t}))}))},K.prototype._getAddress=function(t){return this.resolveName(t).then((function(e){return null==e&&m.throwError("ENS name not configured",m.UNSUPPORTED_OPERATION,{operation:"resolveName("+JSON.stringify(t)+")"}),e}))},K.prototype._resolveNames=function(t,e){var n=[],r=f.shallowCopy(t);return e.forEach((function(t){null!=r[t]&&n.push(this._getAddress(r[t]).then((function(e){r[t]=e})))}),this),Promise.all(n).then((function(){return r}))},K.prototype._getResolver=function(t){var e=this;return this.getNetwork().then((function(n){n.ensAddress||m.throwError("network does not support ENS",m.UNSUPPORTED_OPERATION,{operation:"ENS",network:n.name});var r="0x0178b8bf"+d.namehash(t).substring(2);return r={to:n.ensAddress,data:r},e.call(r).then((function(t){return 32!==c.hexDataLength(t)||(t=s.getAddress(c.hexDataSlice(t,12)))===A.AddressZero?null:t}))}))},K.prototype.resolveName=function(t){var e=this;if(t instanceof Promise)return t.then((function(t){return e.resolveName(t)}));try{return Promise.resolve(s.getAddress(t))}catch(e){if(c.isHexString(t))throw e}var n=this,r=d.namehash(t);return this._getResolver(t).then((function(t){if(null==t)return null;var e="0x3b3b57de"+r.substring(2);return n.call({to:t,data:e})})).then((function(t){return 32!==c.hexDataLength(t)||(t=s.getAddress(c.hexDataSlice(t,12)))===A.AddressZero?null:t}))},K.prototype.lookupAddress=function(t){var e=this;if(t instanceof Promise)return t.then((function(t){return e.lookupAddress(t)}));var n=(t=s.getAddress(t)).substring(2)+".addr.reverse",r=d.namehash(n),i=this;return this._getResolver(n).then((function(t){if(!t)return null;var e="0x691f3431"+r.substring(2);return i.call({to:t,data:e})})).then((function(e){if(null==e)return null;if((e=e.substring(2)).length<64)return null;if((e=e.substring(64)).length<64)return null;var n=u.bigNumberify("0x"+e.substring(0,64)).toNumber();if(2*n>(e=e.substring(64)).length)return null;var r=y.toUtf8String("0x"+e.substring(0,2*n));return i.resolveName(r).then((function(e){return e!=t?null:r}))}))},K.checkTransactionResponse=k,K.prototype.doPoll=function(){},K.prototype.perform=function(t,e){return m.throwError(t+" not implemented",m.NOT_IMPLEMENTED,{operation:t}),null},K.prototype._startPending=function(){m.warn("WARNING: this provider does not support pending events")},K.prototype._stopPending=function(){},K.prototype._addEventListener=function(t,e,n){this._events.push({tag:q(t),listener:e,once:n}),"pending"===t&&this._startPending(),this.polling=!0},K.prototype.on=function(t,e){return this._addEventListener(t,e,!1),this},K.prototype.once=function(t,e){return this._addEventListener(t,e,!0),this},K.prototype.addEventListener=function(t,e){return this.on(t,e)},K.prototype.emit=function(t){for(var e=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=!1,a=q(t);return this._events=this._events.filter((function(t){return t.tag!==a||(setTimeout((function(){t.listener.apply(e,n)}),0),i=!0,!t.once)})),0===this.listenerCount()&&(this.polling=!1),i},K.prototype.listenerCount=function(t){if(!t)return this._events.length;var e=q(t);return this._events.filter((function(t){return t.tag===e})).length},K.prototype.listeners=function(t){var e=q(t);return this._events.filter((function(t){return t.tag===e})).map((function(t){return t.listener}))},K.prototype.removeAllListeners=function(t){var e;return null==t?(this._events=[],this._stopPending()):(e=q(t),this._events=this._events.filter((function(t){return t.tag!==e})),"pending"===t&&this._stopPending()),0===this._events.length&&(this.polling=!1),this},K.prototype.removeListener=function(t,e){var n=!1,r=q(t);return this._events=this._events.filter((function(t){return t.tag!==r||t.listener!=e||!!n||!(n=!0)})),"pending"===t&&0===this.listenerCount("pending")&&this._stopPending(),0===this.listenerCount()&&(this.polling=!1),this},i=K,n.BaseProvider=i,f.defineReadOnly(b.Provider,"inherits",f.inheritable(b.Provider))},{"../constants":3,"../errors":5,"../utils/address":60,"../utils/bignumber":63,"../utils/bytes":64,"../utils/hash":65,"../utils/networks":72,"../utils/properties":74,"../utils/rlp":76,"../utils/transaction":83,"../utils/utf8":85,"../utils/web":86,"./abstract-provider":50}],52:[function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var s,o=t("./base-provider"),u=t("../utils/bytes"),c=t("../utils/properties"),A=t("../utils/web"),d=a(t("../errors"));function p(t){var e,n,r=[];for(e in t)null!=t[e]&&(n=u.hexlify(t[e]),{gasLimit:!0,gasPrice:!0,nonce:!0,value:!0}[e]&&(n=u.hexStripZeros(n)),r.push(e+"="+n));return r.join("&")}function f(t){if(0==t.status&&("No records found"===t.message||"No transactions found"===t.message))return t.result;if(1==t.status&&"OK"==t.message)return t.result;var e=new Error("invalid response");throw e.result=JSON.stringify(t),e}function l(t){if("2.0"!=t.jsonrpc)throw(e=new Error("invalid response")).result=JSON.stringify(t),e;if(t.error){var e=new Error(t.error.message||"unknown error");throw t.error.code&&(e.code=t.error.code),t.error.data&&(e.data=t.error.data),e}return t.result}function h(t){if("pending"===t)throw new Error("pending not supported");return"latest"===t?t:parseInt(t.substring(2),16)}function y(t,e){var n=s.call(this,t)||this;d.checkNew(n,y),t="invalid";var r=null;switch(t=n.network?n.network.name:t){case"homestead":r="https://api.etherscan.io";break;case"ropsten":r="https://api-ropsten.etherscan.io";break;case"rinkeby":r="https://api-rinkeby.etherscan.io";break;case"kovan":r="https://api-kovan.etherscan.io";break;case"goerli":r="https://api-goerli.etherscan.io";break;default:throw new Error("unsupported network")}return c.defineReadOnly(n,"baseUrl",r),c.defineReadOnly(n,"apiKey",e||"8FG3JMZ9USS4NTA6YKEKHINU56SEPPVBJR"),n}i(y,s=o.BaseProvider),y.prototype.perform=function(t,e){var n,r=this,i=this.baseUrl,a="";function o(t,e){return A.fetchJson(t,null,e||l).then((function(e){return r.emit("debug",{action:"perform",request:t,response:e,provider:r}),e}))}switch(this.apiKey&&(a+="&apikey="+this.apiKey),t){case"getBlockNumber":return o(i+="/api?module=proxy&action=eth_blockNumber"+a);case"getGasPrice":return o(i+="/api?module=proxy&action=eth_gasPrice"+a);case"getBalance":return i+="/api?module=account&action=balance&address="+e.address,o(i+="&tag="+e.blockTag+a,f);case"getTransactionCount":return i+="/api?module=proxy&action=eth_getTransactionCount&address="+e.address,o(i+="&tag="+e.blockTag+a);case"getCode":return i+="/api?module=proxy&action=eth_getCode&address="+e.address,o(i+="&tag="+e.blockTag+a,l);case"getStorageAt":return i+="/api?module=proxy&action=eth_getStorageAt&address="+e.address,i+="&position="+e.position,o(i+="&tag="+e.blockTag+a,l);case"sendTransaction":return i+="/api?module=proxy&action=eth_sendRawTransaction&hex="+e.signedTransaction,o(i+=a).catch((function(t){throw t.responseText&&(0<=t.responseText.toLowerCase().indexOf("insufficient funds")&&d.throwError("insufficient funds",d.INSUFFICIENT_FUNDS,{}),0<=t.responseText.indexOf("same hash was already imported")&&d.throwError("nonce has already been used",d.NONCE_EXPIRED,{}),0<=t.responseText.indexOf("another transaction with same nonce")&&d.throwError("replacement fee too low",d.REPLACEMENT_UNDERPRICED,{})),t}));case"getBlock":return e.blockTag?(i+="/api?module=proxy&action=eth_getBlockByNumber&tag="+e.blockTag,e.includeTransactions?i+="&boolean=true":i+="&boolean=false",o(i+=a)):Promise.reject(new Error("getBlock by blockHash not implemeneted"));case"getTransaction":return i+="/api?module=proxy&action=eth_getTransactionByHash&txhash="+e.transactionHash,o(i+=a);case"getTransactionReceipt":return i+="/api?module=proxy&action=eth_getTransactionReceipt&txhash="+e.transactionHash,o(i+=a);case"call":return i+="/api?module=proxy&action=eth_call"+(n=(n=p(e.transaction))&&"&"+n),"latest"!==e.blockTag?Promise.reject(new Error("EtherscanProvider does not support blockTag for call")):o(i+=a);case"estimateGas":return i+="/api?module=proxy&action=eth_estimateGas&"+(n=(n=p(e.transaction))&&"&"+n),o(i+=a);case"getLogs":i+="/api?module=logs&action=getLogs";try{if(e.filter.fromBlock&&(i+="&fromBlock="+h(e.filter.fromBlock)),e.filter.toBlock&&(i+="&toBlock="+h(e.filter.toBlock)),e.filter.blockHash)try{d.throwError("Etherscan does not support blockHash filters",d.UNSUPPORTED_OPERATION,{operation:"getLogs(blockHash)"})}catch(t){return Promise.reject(t)}if(e.filter.address&&(i+="&address="+e.filter.address),e.filter.topics&&0<e.filter.topics.length){if(1<e.filter.topics.length)throw new Error("unsupported topic format");var u=e.filter.topics[0];if("string"!=typeof u||66!==u.length)throw new Error("unsupported topic0 format");i+="&topic0="+u}}catch(t){return Promise.reject(t)}var c=this;return o(i+=a,f).then((function(t){var e={},n=Promise.resolve();return t.forEach((function(t){n=n.then((function(){return null!=t.blockHash?null:(t.blockHash=e[t.transactionHash],null==t.blockHash?c.getTransaction(t.transactionHash).then((function(n){return e[t.transactionHash]=n.blockHash,t.blockHash=n.blockHash,null})):null)}))})),n.then((function(){return t}))}));case"getEtherPrice":return"homestead"!==this.network.name?Promise.resolve(0):(i+="/api?module=stats&action=ethprice",o(i+=a,f).then((function(t){return parseFloat(t.ethusd)})))}return s.prototype.perform.call(this,t,e)},y.prototype.getHistory=function(t,e,n){var r=this,i=this.baseUrl,a="";return this.apiKey&&(a+="&apikey="+this.apiKey),null==e&&(e=0),null==n&&(n=99999999),this.resolveName(t).then((function(t){return i+="/api?module=account&action=txlist&address="+t,i+="&startblock="+e,i+="&endblock="+n,i+="&sort=asc"+a,A.fetchJson(i,null,f).then((function(t){r.emit("debug",{action:"getHistory",request:i,response:t,provider:r});var e=[];return t.forEach((function(t){["contractAddress","to"].forEach((function(e){""==t[e]&&delete t[e]})),null==t.creates&&null!=t.contractAddress&&(t.creates=t.contractAddress);var n=o.BaseProvider.checkTransactionResponse(t);t.timeStamp&&(n.timestamp=parseInt(t.timeStamp)),e.push(n)})),e}))}))},i=y,n.EtherscanProvider=i},{"../errors":5,"../utils/bytes":64,"../utils/properties":74,"../utils/web":86,"./base-provider":51}],53:[function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var s,o=t("./base-provider"),u=a(t("../errors"));function c(t){var e=!0,n=null;return t.forEach((function(r){null!=r?null!=n?n.name===r.name&&n.chainId===r.chainId&&(n.ensAddress===r.ensAddress||null==n.ensAddress&&null==r.ensAddress)||u.throwError("provider mismatch",u.INVALID_ARGUMENT,{arg:"networks",value:t}):n=r:e=!1})),e}function A(t){var e,n=this;if(0===t.length)throw new Error("no providers");return n=c(t.map((function(t){return t.network})))?s.call(this,t[0].network)||this:(e=Promise.all(t.map((function(t){return t.getNetwork()}))).then((function(t){return c(t)||u.throwError("getNetwork returned null",u.UNKNOWN_ERROR,{}),t[0]})),s.call(this,e)||this),u.checkNew(n,A),n._providers=t.slice(0),n}i(A,s=o.BaseProvider),Object.defineProperty(A.prototype,"providers",{get:function(){return this._providers.slice(0)},enumerable:!0,configurable:!0}),A.prototype.perform=function(t,e){var n=this.providers;return new Promise((function(r,i){var a=null;!function s(){n.length?n.shift().perform(t,e).then((function(t){return r(t)})).catch((function(t){a=a||t,setTimeout(s,0)})):i(a)}()}))},i=A,n.FallbackProvider=i},{"../errors":5,"./base-provider":51}],54:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("./abstract-provider");n.Provider=r.Provider,r=t("./base-provider"),n.BaseProvider=r.BaseProvider,r=t("./etherscan-provider"),n.EtherscanProvider=r.EtherscanProvider,r=t("./fallback-provider"),n.FallbackProvider=r.FallbackProvider,r=t("./ipc-provider"),n.IpcProvider=r.IpcProvider,r=t("./infura-provider"),n.InfuraProvider=r.InfuraProvider,r=t("./json-rpc-provider"),n.JsonRpcProvider=r.JsonRpcProvider,n.JsonRpcSigner=r.JsonRpcSigner,t=t("./web3-provider"),n.Web3Provider=t.Web3Provider},{"./abstract-provider":50,"./base-provider":51,"./etherscan-provider":52,"./fallback-provider":53,"./infura-provider":55,"./ipc-provider":56,"./json-rpc-provider":57,"./web3-provider":58}],55:[function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var s,o=t("./json-rpc-provider"),u=t("../utils/bytes"),c=t("../utils/networks"),A=t("../utils/properties"),d=a(t("../errors"));function p(t,e){var n=this,r=c.getNetwork(null==t?"homestead":t);null==e&&(e="7d0d81d0919f4f05b9ab6634be01ee73");var i=null;switch(r.name){case"homestead":i="mainnet.infura.io";break;case"ropsten":i="ropsten.infura.io";break;case"rinkeby":i="rinkeby.infura.io";break;case"goerli":i="goerli.infura.io";break;case"kovan":i="kovan.infura.io";break;default:d.throwError("unsupported network",d.INVALID_ARGUMENT,{argument:"network",value:t})}return u.isHexString("0x"+e,16)?(n=s.call(this,"https://"+i+"/v3/"+e,r)||this,A.defineReadOnly(n,"apiAccessToken",null),A.defineReadOnly(n,"projectId",e)):(d.warn("The legacy INFURA apiAccesToken API is deprecated; please upgrade to a Project ID instead (see INFURA dshboard; https://infura.io)"),n=s.call(this,"https://"+i+"/"+e,r)||this,A.defineReadOnly(n,"apiAccessToken",e),A.defineReadOnly(n,"projectId",null)),d.checkNew(n,p),n}i(p,s=o.JsonRpcProvider),p.prototype._startPending=function(){d.warn("WARNING: INFURA does not support pending filters")},p.prototype.getSigner=function(t){return d.throwError("INFURA does not support signing",d.UNSUPPORTED_OPERATION,{operation:"getSigner"})},p.prototype.listAccounts=function(){return Promise.resolve([])},i=p,n.InfuraProvider=i},{"../errors":5,"../utils/bytes":64,"../utils/networks":72,"../utils/properties":74,"./json-rpc-provider":57}],56:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],57:[function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var s=t("./base-provider"),o=t("../abstract-signer"),u=a(t("../errors")),c=t("../utils/address"),A=t("../utils/bytes"),d=t("../utils/networks"),p=t("../utils/properties"),f=t("../utils/utf8"),l=t("../utils/web");function h(t){if(t.error){var e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function y(t){return t&&t.toLowerCase()}var g,m={},b=42,I=(i(C,g=o.Signer),C.prototype.getAddress=function(){var t=this;return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((function(e){return e.length<=t._index&&u.throwError("unknown account #"+t._index,u.UNSUPPORTED_OPERATION,{operation:"getAddress"}),t._address=c.getAddress(e[t._index]),t._address}))},C.prototype.getBalance=function(t){return this.provider.getBalance(this.getAddress(),t)},C.prototype.getTransactionCount=function(t){return this.provider.getTransactionCount(this.getAddress(),t)},C.prototype.sendUncheckedTransaction=function(t){var e=this;t=p.shallowCopy(t);var n,r=this.getAddress().then((function(t){return t&&t.toLowerCase()}));return null==t.gasLimit&&((n=p.shallowCopy(t)).from=r,t.gasLimit=this.provider.estimateGas(n)),Promise.all([p.resolveProperties(t),r]).then((function(t){var n=t[0],r=w.hexlifyTransaction(n);return r.from=t[1],e.provider.send("eth_sendTransaction",[r]).then((function(t){return t}),(function(t){throw t.responseText&&(0<=t.responseText.indexOf("insufficient funds")&&u.throwError("insufficient funds",u.INSUFFICIENT_FUNDS,{transaction:n}),0<=t.responseText.indexOf("nonce too low")&&u.throwError("nonce has already been used",u.NONCE_EXPIRED,{transaction:n}),0<=t.responseText.indexOf("replacement transaction underpriced")&&u.throwError("replacement fee too low",u.REPLACEMENT_UNDERPRICED,{transaction:n})),t}))}))},C.prototype.sendTransaction=function(t){var e=this;return this.sendUncheckedTransaction(t).then((function(t){return l.poll((function(){return e.provider.getTransaction(t).then((function(n){if(null!==n)return e.provider._wrapTransaction(n,t)}))}),{fastRetry:250,onceBlock:e.provider}).catch((function(e){throw e.transactionHash=t,e}))}))},C.prototype.signMessage=function(t){var e=this,n="string"==typeof t?f.toUtf8Bytes(t):t;return this.getAddress().then((function(t){return e.provider.send("eth_sign",[t.toLowerCase(),A.hexlify(n)])}))},C.prototype.unlock=function(t){var e=this.provider;return this.getAddress().then((function(n){return e.send("personal_unlockAccount",[n.toLowerCase(),t,null])}))},C);function C(t,e,n){var r=g.call(this)||this;if(u.checkNew(r,C),t!==m)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");return p.defineReadOnly(r,"provider",e),n?"string"==typeof n?p.defineReadOnly(r,"_address",c.getAddress(n)):"number"==typeof n?p.defineReadOnly(r,"_index",n):u.throwError("invalid address or index",u.INVALID_ARGUMENT,{argument:"addressOrIndex",value:n}):p.defineReadOnly(r,"_index",0),r}n.JsonRpcSigner=I;var v,E={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0},w=(i(B,v=s.BaseProvider),B.prototype.getSigner=function(t){return new I(m,this,t)},B.prototype.listAccounts=function(){return this.send("eth_accounts",[]).then((function(t){return t.map((function(t){return c.getAddress(t)}))}))},B.prototype.send=function(t,e){var n=this,r={method:t,params:e,id:b++,jsonrpc:"2.0"};return l.fetchJson(this.connection,JSON.stringify(r),h).then((function(t){return n.emit("debug",{action:"send",request:r,response:t,provider:n}),t}))},B.prototype.perform=function(t,e){switch(t){case"getBlockNumber":return this.send("eth_blockNumber",[]);case"getGasPrice":return this.send("eth_gasPrice",[]);case"getBalance":return this.send("eth_getBalance",[y(e.address),e.blockTag]);case"getTransactionCount":return this.send("eth_getTransactionCount",[y(e.address),e.blockTag]);case"getCode":return this.send("eth_getCode",[y(e.address),e.blockTag]);case"getStorageAt":return this.send("eth_getStorageAt",[y(e.address),e.position,e.blockTag]);case"sendTransaction":return this.send("eth_sendRawTransaction",[e.signedTransaction]).catch((function(t){throw t.responseText&&(0<t.responseText.indexOf("insufficient funds")&&u.throwError("insufficient funds",u.INSUFFICIENT_FUNDS,{}),0<t.responseText.indexOf("nonce too low")&&u.throwError("nonce has already been used",u.NONCE_EXPIRED,{}),0<t.responseText.indexOf("replacement transaction underpriced")&&u.throwError("replacement fee too low",u.REPLACEMENT_UNDERPRICED,{})),t}));case"getBlock":return e.blockTag?this.send("eth_getBlockByNumber",[e.blockTag,!!e.includeTransactions]):e.blockHash?this.send("eth_getBlockByHash",[e.blockHash,!!e.includeTransactions]):Promise.reject(new Error("invalid block tag or block hash"));case"getTransaction":return this.send("eth_getTransactionByHash",[e.transactionHash]);case"getTransactionReceipt":return this.send("eth_getTransactionReceipt",[e.transactionHash]);case"call":return this.send("eth_call",[B.hexlifyTransaction(e.transaction,{from:!0}),e.blockTag]);case"estimateGas":return this.send("eth_estimateGas",[B.hexlifyTransaction(e.transaction,{from:!0})]);case"getLogs":return e.filter&&null!=e.filter.address&&(e.filter.address=y(e.filter.address)),this.send("eth_getLogs",[e.filter])}return u.throwError(t+" not implemented",u.NOT_IMPLEMENTED,{operation:t}),null},B.prototype._startPending=function(){var t,e;null==this._pendingFilter&&(e=(t=this).send("eth_newPendingTransactionFilter",[]),(this._pendingFilter=e).then((function(n){return function r(){t.send("eth_getFilterChanges",[n]).then((function(n){if(t._pendingFilter!=e)return null;var r=Promise.resolve();return n.forEach((function(e){t._emitted["t:"+e.toLowerCase()]="pending",r=r.then((function(){return t.getTransaction(e).then((function(e){return t.emit("pending",e),null}))}))})),r.then((function(){return new Promise((function(t){setTimeout((function(){t()}),1e3)}))}))})).then((function(){return t._pendingFilter==e?(setTimeout((function(){r()}),0),null):void t.send("eth_uninstallFilter",[n])})).catch((function(t){}))}(),n})).catch((function(t){})))},B.prototype._stopPending=function(){this._pendingFilter=null},B.hexlifyTransaction=function(t,e){var n=p.shallowCopy(E);if(e)for(var r in e)e[r]&&(n[r]=!0);p.checkProperties(t,n);var i={};return["gasLimit","gasPrice","nonce","value"].forEach((function(e){var n;null!=t[e]&&(n=A.hexStripZeros(A.hexlify(t[e])),i[e="gasLimit"===e?"gas":e]=n)})),["from","to","data"].forEach((function(e){null!=t[e]&&(i[e]=A.hexlify(t[e]))})),i},B);function B(t,e){var n=this;return"string"==typeof t&&null===e&&d.getNetwork(t)&&(e=t,t=null),e||(e=new Promise((function(t,e){setTimeout((function(){n.send("net_version",[]).then((function(e){return t(d.getNetwork(parseInt(e)))})).catch((function(t){e(t)}))}))}))),n=v.call(this,e)||this,u.checkNew(n,B),n.connection="string"==typeof(t=t||"http://localhost:8545")?{url:t}:t,n}n.JsonRpcProvider=w},{"../abstract-signer":2,"../errors":5,"../utils/address":60,"../utils/bytes":64,"../utils/networks":72,"../utils/properties":74,"../utils/utf8":85,"../utils/web":86,"./base-provider":51}],58:[function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var s,o=t("./json-rpc-provider"),u=t("../utils/properties"),c=a(t("../errors")),A=42;function d(t,e){return e=s.call(this,t.host||t.path||"",e)||this,c.checkNew(e,d),t&&(t.sendAsync?e._sendAsync=t.sendAsync.bind(t):t.send&&(e._sendAsync=t.send.bind(t))),t&&e._sendAsync||c.throwError("invalid web3Provider",c.INVALID_ARGUMENT,{arg:"web3Provider",value:t}),u.defineReadOnly(e,"_web3Provider",t),u.defineReadOnly(e,"provider",t),e}i(d,s=o.JsonRpcProvider),d.prototype.send=function(t,e){var n=this;return"eth_sign"==t&&this._web3Provider.isMetaMask&&(t="personal_sign",e=[e[1],e[0]]),new Promise((function(r,i){var a={method:t,params:e,id:A++,jsonrpc:"2.0"};n._sendAsync(a,(function(t,e){if(t)i(t);else{if(e.error)return(t=new Error(e.error.message)).code=e.error.code,t.data=e.error.data,void i(t);r(e.result)}}))}))},i=d,n.Web3Provider=i},{"../errors":5,"../utils/properties":74,"./json-rpc-provider":57}],59:[function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var s=t("../constants"),u=a(t("../errors")),c=t("./address"),A=t("./bignumber"),d=t("./bytes"),p=t("./utf8"),f=t("./properties"),l=new RegExp(/^bytes([0-9]*)$/),h=new RegExp(/^(u?int)([0-9]*)$/),y=new RegExp(/^(.*)\[([0-9]*)\]$/);n.defaultCoerceFunc=function(t,e){return(t=t.match(h))&&parseInt(t[2])<=48?e.toNumber():e};var g=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$"),m=new RegExp("^[A-Za-z_][A-Za-z0-9_]*$");function b(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}function I(t,e){var n=t;function r(t){throw new Error('unexpected character "'+n[t]+'" at position '+t+' in "'+n+'"')}t=t.replace(/\s/g," ");for(var i={type:"",name:"",state:{allowType:!0}},a=i,s=0;s<t.length;s++){var o=t[s];switch(o){case"(":a.state.allowParams||r(s),a.state.allowType=!1,a.type=b(a.type),a.components=[{type:"",name:"",parent:a,state:{allowType:!0}}],a=a.components[0];break;case")":delete a.state,e&&"indexed"===a.name&&(a.indexed=!0,a.name=""),a.type=b(a.type);var u=a;(a=a.parent)||r(s),delete u.parent,a.state.allowParams=!1,a.state.allowName=!0,a.state.allowArray=!0;break;case",":delete a.state,e&&"indexed"===a.name&&(a.indexed=!0,a.name=""),a.type=b(a.type),u={type:"",name:"",parent:a.parent,state:{allowType:!0}},a.parent.components.push(u),delete a.parent,a=u;break;case" ":a.state.allowType&&""!==a.type&&(a.type=b(a.type),delete a.state.allowType,a.state.allowName=!0,a.state.allowParams=!0),a.state.allowName&&""!==a.name&&(e&&"indexed"===a.name?(a.indexed=!0,a.name=""):a.state.allowName=!1);break;case"[":a.state.allowArray||r(s),a.type+=o,a.state.allowArray=!1,a.state.allowName=!1,a.state.readArray=!0;break;case"]":a.state.readArray||r(s),a.type+=o,a.state.readArray=!1,a.state.allowArray=!0,a.state.allowName=!0;break;default:a.state.allowType?(a.type+=o,a.state.allowParams=!0,a.state.allowArray=!0):a.state.allowName?(a.name+=o,delete a.state.allowArray):a.state.readArray?a.type+=o:r(s)}}if(a.parent)throw new Error("unexpected eof");return delete i.state,e&&"indexed"===a.name&&(a.indexed=!0,a.name=""),i.type=b(i.type),i}function C(t){return at(n.defaultCoerceFunc,t).type}function v(t,e,n,r,i){this.coerceFunc=t,this.name=e,this.type=n,this.localName=r,this.dynamic=i}n.parseParamType=function(t){return I(t,!0)},n.formatParamType=C,n.formatSignature=function(t){return t.name+"("+t.inputs.map(C).join(",")+")"},n.parseSignature=function(t){if("string"==typeof t)return"event "===(t=(t=(t=t.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).substring(0,6)?function(t){var e={anonymous:!1,inputs:[],name:"",type:"event"},n=t.match(g);if(!n)throw new Error("invalid event: "+t);if(e.name=n[1].trim(),rt(n[2]).forEach((function(t){(t=I(t,!0)).indexed=!!t.indexed,e.inputs.push(t)})),n[3].split(" ").forEach((function(t){switch(t){case"anonymous":e.anonymous=!0;break;case"":break;default:u.info("unknown modifier: "+t)}})),e.name&&!e.name.match(m))throw new Error('invalid identifier: "'+e.name+'"');return e}(t.substring(6).trim()):function(t){var e={constant:!1,gas:null,inputs:[],name:"",outputs:[],payable:!1,stateMutability:null,type:"function"},n=t.split("@");if(1!==n.length){if(2<n.length)throw new Error("invalid signature");if(!n[1].match(/^[0-9]+$/))throw new Error("invalid signature gas");e.gas=A.bigNumberify(n[1]),t=n[0]}if(!(t=(n=t.split(" returns "))[0].match(g)))throw new Error("invalid signature");if(e.name=t[1].trim(),!e.name.match(m))throw new Error('invalid identifier: "'+t[1]+'"');if(rt(t[2]).forEach((function(t){e.inputs.push(I(t))})),t[3].split(" ").forEach((function(t){switch(t){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:u.info("unknown modifier: "+t)}})),1<n.length){if(""!=(n=n[1].match(g))[1].trim()||""!=n[3].trim())throw new Error("unexpected tokens");rt(n[2]).forEach((function(t){e.outputs.push(I(t))}))}if("constructor"===e.name){if(e.type="constructor",e.outputs.length)throw new Error("constructor may not have outputs");delete e.name,delete e.outputs}return e}((t="function "===t.substring(0,9)?t.substring(9):t).trim());throw new Error("unknown signature")};var E,w=(i(B,E=v),B.prototype.encode=function(t){return this.coder.encode(t)},B.prototype.decode=function(t,e){return this.coder.decode(t,e)},B);function B(t){var e=E.call(this,t.coerceFunc,t.name,t.type,void 0,t.dynamic)||this;return f.defineReadOnly(e,"coder",t),e}var Q,M=(i(k,Q=v),k.prototype.encode=function(t){return d.arrayify([])},k.prototype.decode=function(t,e){if(e>t.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}},k);function k(t,e){return Q.call(this,t,"null","",e,!1)||this}var _,x=(i(S,_=v),S.prototype.encode=function(t){try{var e=A.bigNumberify(t);if(this.signed){var n=s.MaxUint256.maskn(8*this.size-1);if(e.gt(n))throw new Error("out-of-bounds");if(n=n.add(s.One).mul(s.NegativeOne),e.lt(n))throw new Error("out-of-bounds")}else if(e.lt(s.Zero)||e.gt(s.MaxUint256.maskn(8*this.size)))throw new Error("out-of-bounds");return e=e.toTwos(8*this.size).maskn(8*this.size),this.signed&&(e=e.fromTwos(8*this.size).toTwos(256)),d.padZeros(d.arrayify(e),32)}catch(e){u.throwError("invalid number value",u.INVALID_ARGUMENT,{arg:this.localName,coderType:this.name,value:t})}return null},S.prototype.decode=function(t,e){t.length<e+32&&u.throwError("insufficient data for "+this.name+" type",u.INVALID_ARGUMENT,{arg:this.localName,coderType:this.name,value:d.hexlify(t.slice(e,e+32))});var n=32-this.size;return e=A.bigNumberify(t.slice(e+n,e+32)),e=this.signed?e.fromTwos(8*this.size):e.maskn(8*this.size),{consumed:32,value:this.coerceFunc(this.name,e)}},S);function S(t,e,n,r){var i=this,a=(n?"int":"uint")+8*e;return(i=_.call(this,t,a,a,r,!1)||this).size=e,i.signed=n,i}var D,R=new x((function(t,e){return e}),32,!1,"none"),T=(i(N,D=v),N.prototype.encode=function(t){return R.encode(t?1:0)},N.prototype.decode=function(t,e){try{var n=R.decode(t,e)}catch(t){throw"insufficient data for uint256 type"===t.reason&&u.throwError("insufficient data for boolean type",u.INVALID_ARGUMENT,{arg:this.localName,coderType:"boolean",value:t.value}),t}return{consumed:n.consumed,value:this.coerceFunc("bool",!n.value.isZero())}},N);function N(t,e){return D.call(this,t,"bool","bool",e,!1)||this}var O,H=(i(L,O=v),L.prototype.encode=function(t){var e=new Uint8Array(32);try{var n=d.arrayify(t);if(n.length!==this.length)throw new Error("incorrect data length");e.set(n)}catch(e){u.throwError("invalid "+this.name+" value",u.INVALID_ARGUMENT,{arg:this.localName,coderType:this.name,value:e.value||t})}return e},L.prototype.decode=function(t,e){return t.length<e+32&&u.throwError("insufficient data for "+this.name+" type",u.INVALID_ARGUMENT,{arg:this.localName,coderType:this.name,value:d.hexlify(t.slice(e,e+32))}),{consumed:32,value:this.coerceFunc(this.name,d.hexlify(t.slice(e,e+this.length)))}},L);function L(t,e,n){var r=this,i="bytes"+e;return(r=O.call(this,t,i,i,n,!1)||this).length=e,r}var U,F,j,P=(i(G,U=v),G.prototype.encode=function(t){var e=new Uint8Array(32);try{e.set(d.arrayify(c.getAddress(t)),12)}catch(e){u.throwError("invalid address",u.INVALID_ARGUMENT,{arg:this.localName,coderType:"address",value:t})}return e},G.prototype.decode=function(t,e){return t.length<e+32&&u.throwError("insufficient data for address type",u.INVALID_ARGUMENT,{arg:this.localName,coderType:"address",value:d.hexlify(t.slice(e,e+32))}),{consumed:32,value:this.coerceFunc("address",c.getAddress(d.hexlify(t.slice(e+12,e+32))))}},G);function G(t,e){return U.call(this,t,"address","address",e,!1)||this}function q(t){var e=32*Math.ceil(t.length/32);return e=new Uint8Array(e-t.length),d.concat([R.encode(t.length),t,e])}function Y(t,e,n){t.length<e+32&&u.throwError("insufficient data for dynamicBytes length",u.INVALID_ARGUMENT,{arg:n,coderType:"dynamicBytes",value:d.hexlify(t.slice(e,e+32))});var r=R.decode(t,e).value;try{r=r.toNumber()}catch(t){u.throwError("dynamic bytes count too large",u.INVALID_ARGUMENT,{arg:n,coderType:"dynamicBytes",value:r.toString()})}return t.length<e+32+r&&u.throwError("insufficient data for dynamicBytes type",u.INVALID_ARGUMENT,{arg:n,coderType:"dynamicBytes",value:d.hexlify(t.slice(e,e+32+r))}),{consumed:32+32*Math.ceil(r/32),value:t.slice(e+32,e+32+r)}}function K(t,e){return F.call(this,t,"bytes","bytes",e,!0)||this}function z(t,e){return j.call(this,t,"string","string",e,!0)||this}function J(t){return 32*Math.ceil(t/32)}function V(t,e){var n;Array.isArray(e)||(e&&"object"==o(e)?(n=[],t.forEach((function(t){n.push(e[t.localName])})),e=n):u.throwError("invalid tuple value",u.INVALID_ARGUMENT,{coderType:"tuple",value:e})),t.length!==e.length&&u.throwError("types/value length mismatch",u.INVALID_ARGUMENT,{coderType:"tuple",value:e});var r=[];t.forEach((function(t,n){r.push({dynamic:t.dynamic,value:t.encode(e[n])})}));var i=0,a=0;r.forEach((function(t){t.dynamic?(i+=32,a+=J(t.value.length)):i+=J(t.value.length)}));var s=0,c=i,A=new Uint8Array(i+a);return r.forEach((function(t){t.dynamic?(A.set(R.encode(c),s),s+=32,A.set(t.value,c),c+=J(t.value.length)):(A.set(t.value,s),s+=J(t.value.length))})),A}function W(t,e,n){var r=n,i=0,a=[];return t.forEach((function(t){var s,o;t.dynamic?(s=R.decode(e,n),(o=t.decode(e,r+s.value.toNumber())).consumed=s.consumed):o=t.decode(e,n),null!=o.value&&a.push(o.value),n+=o.consumed,i+=o.consumed})),t.forEach((function(t,e){(t=t.localName)&&null==a[t="length"===t?"_length":t]&&(a[t]=a[e])})),{value:a,consumed:i}}i(K,F=v),K.prototype.encode=function(t){try{return q(d.arrayify(t))}catch(t){u.throwError("invalid bytes value",u.INVALID_ARGUMENT,{arg:this.localName,coderType:"bytes",value:t.value})}return null},K.prototype.decode=function(t,e){return(e=Y(t,e,this.localName)).value=this.coerceFunc("bytes",d.hexlify(e.value)),e},a=K,i(z,j=v),z.prototype.encode=function(t){return"string"!=typeof t&&u.throwError("invalid string value",u.INVALID_ARGUMENT,{arg:this.localName,coderType:"string",value:t}),q(p.toUtf8Bytes(t))},z.prototype.decode=function(t,e){return(e=Y(t,e,this.localName)).value=this.coerceFunc("string",p.toUtf8String(e.value)),e},t=z;var Z,X=(i($,Z=v),$.prototype.encode=function(t){Array.isArray(t)||u.throwError("expected array value",u.INVALID_ARGUMENT,{arg:this.localName,coderType:"array",value:t});var e=this.length,n=new Uint8Array(0);-1===e&&(e=t.length,n=R.encode(e)),u.checkArgumentCount(e,t.length," in coder array"+(this.localName?" "+this.localName:""));for(var r=[],i=0;i<t.length;i++)r.push(this.coder);return d.concat([n,V(r,t)])},$.prototype.decode=function(t,e){var n=0,r=this.length;if(-1===r){try{var i=R.decode(t,e)}catch(t){u.throwError("insufficient data for dynamic array length",u.INVALID_ARGUMENT,{arg:this.localName,coderType:"array",value:t.value})}try{r=i.value.toNumber()}catch(t){u.throwError("array count too large",u.INVALID_ARGUMENT,{arg:this.localName,coderType:"array",value:i.value.toString()})}n+=i.consumed,e+=i.consumed}for(var a=[],s=0;s<r;s++)a.push(new w(this.coder));return(e=W(a,t,e)).consumed+=n,e.value=this.coerceFunc(this.type,e.value),e},$);function $(t,e,n,r){var i=this,a=e.type+"["+(0<=n?n:"")+"]",s=-1===n||e.dynamic;return(i=Z.call(this,t,"array",a,r,s)||this).coder=e,i.length=n,i}var tt,et=(i(nt,tt=v),nt.prototype.encode=function(t){return V(this.coders,t)},nt.prototype.decode=function(t,e){return(e=W(this.coders,t,e)).value=this.coerceFunc(this.type,e.value),e},nt);function nt(t,e,n){var r=this,i=!1,a=[];e.forEach((function(t){t.dynamic&&(i=!0),a.push(t.type)}));var s="tuple("+a.join(",")+")";return(r=tt.call(this,t,"tuple",s,n,i)||this).coders=e,r}function rt(t){t=t.trim();for(var e=[],n="",r=0,i=0;i<t.length;i++){var a=t[i];if(","===a&&0===r)e.push(n),n="";else if(n+=a,"("===a)r++;else if(")"===a&&-1==--r)throw new Error("unbalanced parenthsis")}return n&&e.push(n),e}var it={address:P,bool:T,string:t,bytes:a};function at(t,e){var n,r,i;if(i=it[e.type])return new i(t,e.name);if(i=e.type.match(h))return(0===(a=parseInt(i[2]||"256"))||256<a||a%8!=0)&&u.throwError("invalid "+i[1]+" bit length",u.INVALID_ARGUMENT,{arg:"param",value:e}),new x(t,a/8,"int"===i[1],e.name);if(i=e.type.match(l))return(0===(a=parseInt(i[1]))||32<a)&&u.throwError("invalid bytes length",u.INVALID_ARGUMENT,{arg:"param",value:e}),new H(t,a,e.name);if(i=e.type.match(y)){var a=parseInt(i[2]||"-1");return(e=f.shallowCopy(e)).type=i[1],e=f.deepCopy(e),new X(t,at(t,e),a,e.name)}return"tuple"===e.type.substring(0,5)?(n=t,i=e.components,a=e.name,r=[],(i=i||[]).forEach((function(t){r.push(at(n,t))})),new et(n,r,a)):""===e.type?new M(t,e.name):(u.throwError("invalid type",u.INVALID_ARGUMENT,{arg:"type",value:e.type}),null)}function st(t){u.checkNew(this,st),t=t||n.defaultCoerceFunc,f.defineReadOnly(this,"coerceFunc",t)}st.prototype.encode=function(t,e){t.length!==e.length&&u.throwError("types/values length mismatch",u.INVALID_ARGUMENT,{count:{types:t.length,values:e.length},value:{types:t,values:e}});var n=[];return t.forEach((function(t){var e="string"==typeof t?I(t):t;n.push(at(this.coerceFunc,e))}),this),d.hexlify(new et(this.coerceFunc,n,"_").encode(e))},st.prototype.decode=function(t,e){var n=[];return t.forEach((function(t){var e="string"==typeof t?I(t):f.deepCopy(t);n.push(at(this.coerceFunc,e))}),this),new et(this.coerceFunc,n,"_").decode(d.arrayify(e),0).value},a=st,n.AbiCoder=a,n.defaultAbiCoder=new a},{"../constants":3,"../errors":5,"./address":60,"./bignumber":63,"./bytes":64,"./properties":74,"./utf8":85}],60:[function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0});var i=r(t("bn.js")),a=t("./bytes"),s=t("./keccak256"),o=t("./rlp"),u=t("../errors");function c(t){"string"==typeof t&&t.match(/^0x[0-9A-Fa-f]{40}$/)||u.throwError("invalid address",u.INVALID_ARGUMENT,{arg:"address",value:t});for(var e=(t=t.toLowerCase()).substring(2).split(""),n=new Uint8Array(40),r=0;r<40;r++)n[r]=e[r].charCodeAt(0);n=a.arrayify(s.keccak256(n));for(var i=0;i<40;i+=2)8<=n[i>>1]>>4&&(e[i]=e[i].toUpperCase()),8<=(15&n[i>>1])&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}for(var A={},d=0;d<10;d++)A[String(d)]=String(d);for(d=0;d<26;d++)A[String.fromCharCode(65+d)]=String(10+d);var p,f=Math.floor((p=9007199254740991,Math.log10?Math.log10(p):Math.log(p)/Math.LN10));function l(t){t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00";var e="";for(t.split("").forEach((function(t){e+=A[t]}));e.length>=f;){var n=e.substring(0,f);e=parseInt(n,10)%97+e.substring(n.length)}for(var r=String(98-parseInt(e,10)%97);r.length<2;)r="0"+r;return r}function h(t){var e=null;if("string"!=typeof t&&u.throwError("invalid address",u.INVALID_ARGUMENT,{arg:"address",value:t}),t.match(/^(0x)?[0-9a-fA-F]{40}$/))e=c(t="0x"!==t.substring(0,2)?"0x"+t:t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&u.throwError("bad address checksum",u.INVALID_ARGUMENT,{arg:"address",value:t});else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==l(t)&&u.throwError("bad icap checksum",u.INVALID_ARGUMENT,{arg:"address",value:t}),e=new i.default.BN(t.substring(4),36).toString(16);e.length<40;)e="0"+e;e=c("0x"+e)}else u.throwError("invalid address",u.INVALID_ARGUMENT,{arg:"address",value:t});return e}n.getAddress=h,n.getIcapAddress=function(t){for(var e=new i.default.BN(h(t).substring(2),16).toString(36).toUpperCase();e.length<30;)e="0"+e;return"XE"+l("XE00"+e)+e},n.getContractAddress=function(t){if(!t.from)throw new Error("missing from address");var e=t.nonce;return h("0x"+s.keccak256(o.encode([h(t.from),a.stripZeros(a.hexlify(e))])).substring(26))},n.getCreate2Address=function(t){var e=t.initCodeHash;t.initCode&&(e?s.keccak256(t.initCode)!==e&&u.throwError("initCode/initCodeHash mismatch",u.INVALID_ARGUMENT,{arg:"options",value:t}):e=s.keccak256(t.initCode)),e||u.throwError("missing initCode or initCodeHash",u.INVALID_ARGUMENT,{arg:"options",value:t});var n=h(t.from),r=a.arrayify(t.salt);return 32!==r.length&&u.throwError("invalid salt",u.INVALID_ARGUMENT,{arg:"options",value:t}),h("0x"+s.keccak256(a.concat(["0xff",n,r,e])).substring(26))}},{"../errors":5,"./bytes":64,"./keccak256":71,"./rlp":76,"bn.js":9}],61:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("../utils/bytes");e.exports={decode:function(t){t=atob(t);for(var e=[],n=0;n<t.length;n++)e.push(t.charCodeAt(n));return r.arrayify(e)},encode:function(t){t=r.arrayify(t);for(var e="",n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return btoa(e)}}},{"../utils/bytes":64}],62:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("./bytes"),i=t("./properties"),a=(s.prototype.encode=function(t){var e=r.arrayify(t);if(0===e.length)return"";for(var n=[0],i=0;i<e.length;++i){for(var a=e[i],s=0;s<n.length;++s)a+=n[s]<<8,n[s]=a%this.base,a=a/this.base|0;for(;0<a;)n.push(a%this.base),a=a/this.base|0}for(var o="",u=0;0===e[u]&&u<e.length-1;++u)o+=this._leader;for(var c=n.length-1;0<=c;--c)o+=this.alphabet[n[c]];return o},s.prototype.decode=function(t){if("string"!=typeof t)throw new TypeError("Expected String");var e=[];if(0===t.length)return new Uint8Array(e);e.push(0);for(var n=0;n<t.length;n++){var i=this._alphabetMap[t[n]];if(void 0===i)throw new Error("Non-base"+this.base+" character");for(var a=i,s=0;s<e.length;++s)a+=e[s]*this.base,e[s]=255&a,a>>=8;for(;0<a;)e.push(255&a),a>>=8}for(var o=0;t[o]===this._leader&&o<t.length-1;++o)e.push(0);return r.arrayify(new Uint8Array(e.reverse()))},s);function s(t){i.defineReadOnly(this,"alphabet",t),i.defineReadOnly(this,"base",t.length),i.defineReadOnly(this,"_alphabetMap",{}),i.defineReadOnly(this,"_leader",t.charAt(0));for(var e=0;e<t.length;e++)this._alphabetMap[t.charAt(e)]=e}t=new(n.BaseX=a)("abcdefghijklmnopqrstuvwxyz234567"),n.Base32=t,a=new a("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),n.Base58=a},{"./bytes":64,"./properties":74}],63:[function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var a=r(t("bn.js")),s=t("./bytes"),o=t("./properties"),u=i(t("../errors")),c=new a.default.BN(-1);function A(t){return"-"===(t=t.toString(16))[0]?t.length%2==0?"-0x0"+t.substring(1):"-0x"+t.substring(1):t.length%2==1?"0x0"+t:"0x"+t}function d(t){return f(y(t))}function p(t){return new l(A(t))}function f(t){return"-"===(t=t._hex)[0]?new a.default.BN(t.substring(3),16).mul(c):new a.default.BN(t.substring(2),16)}var l=(h.prototype.fromTwos=function(t){return p(f(this).fromTwos(t))},h.prototype.toTwos=function(t){return p(f(this).toTwos(t))},h.prototype.abs=function(){return"-"===this._hex[0]?p(f(this).mul(c)):this},h.prototype.add=function(t){return p(f(this).add(d(t)))},h.prototype.sub=function(t){return p(f(this).sub(d(t)))},h.prototype.div=function(t){return y(t).isZero()&&u.throwError("division by zero",u.NUMERIC_FAULT,{operation:"divide",fault:"division by zero"}),p(f(this).div(d(t)))},h.prototype.mul=function(t){return p(f(this).mul(d(t)))},h.prototype.mod=function(t){return p(f(this).mod(d(t)))},h.prototype.pow=function(t){return p(f(this).pow(d(t)))},h.prototype.maskn=function(t){return p(f(this).maskn(t))},h.prototype.eq=function(t){return f(this).eq(d(t))},h.prototype.lt=function(t){return f(this).lt(d(t))},h.prototype.lte=function(t){return f(this).lte(d(t))},h.prototype.gt=function(t){return f(this).gt(d(t))},h.prototype.gte=function(t){return f(this).gte(d(t))},h.prototype.isZero=function(){return f(this).isZero()},h.prototype.toNumber=function(){try{return f(this).toNumber()}catch(t){u.throwError("overflow",u.NUMERIC_FAULT,{operation:"setValue",fault:"overflow",details:t.message})}return null},h.prototype.toString=function(){return f(this).toString(10)},h.prototype.toHexString=function(){return this._hex},h.isBigNumber=function(t){return o.isType(t,"BigNumber")},h);function h(t){if(u.checkNew(this,h),o.setType(this,"BigNumber"),"string"==typeof t)s.isHexString(t)?o.defineReadOnly(this,"_hex",t="0x"==t?"0x0":t):"-"===t[0]&&s.isHexString(t.substring(1))?o.defineReadOnly(this,"_hex",t):t.match(/^-?[0-9]*$/)?o.defineReadOnly(this,"_hex",A(new a.default.BN(t=""==t?"0":t))):u.throwError("invalid BigNumber string value",u.INVALID_ARGUMENT,{arg:"value",value:t});else if("number"==typeof t){parseInt(String(t))!==t&&u.throwError("underflow",u.NUMERIC_FAULT,{operation:"setValue",fault:"underflow",value:t,outputValue:parseInt(String(t))});try{o.defineReadOnly(this,"_hex",A(new a.default.BN(t)))}catch(t){u.throwError("overflow",u.NUMERIC_FAULT,{operation:"setValue",fault:"overflow",details:t.message})}}else t instanceof h?o.defineReadOnly(this,"_hex",t._hex):t.toHexString?o.defineReadOnly(this,"_hex",A(d(t.toHexString()))):t._hex&&s.isHexString(t._hex)?o.defineReadOnly(this,"_hex",t._hex):s.isArrayish(t)?o.defineReadOnly(this,"_hex",A(new a.default.BN(s.hexlify(t).substring(2),16))):u.throwError("invalid BigNumber value",u.INVALID_ARGUMENT,{arg:"value",value:t})}function y(t){return l.isBigNumber(t)?t:new l(t)}n.BigNumber=l,n.bigNumberify=y},{"../errors":5,"./bytes":64,"./properties":74,"bn.js":9}],64:[function(t,e,n){"use strict";var r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var i=r(t("../errors"));function a(t){return!!t.toHexString}function s(t){return t.slice||(t.slice=function(){var e=Array.prototype.slice.call(arguments);return s(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function u(t){if(!t||parseInt(String(t.length))!=t.length||"string"==typeof t)return!1;for(var e=0;e<t.length;e++){var n=t[e];if(n<0||256<=n||parseInt(String(n))!=n)return!1}return!0}function c(t){if(null==t&&i.throwError("cannot convert null value to array",i.INVALID_ARGUMENT,{arg:"value",value:t}),"string"!=typeof(t=a(t)?t.toHexString():t))return u(t)?s(new Uint8Array(t)):(i.throwError("invalid arrayify value",null,{arg:"value",value:t,type:o(t)}),null);var e=t.match(/^(0x)?[0-9a-fA-F]*$/);e||i.throwError("invalid hexidecimal string",i.INVALID_ARGUMENT,{arg:"value",value:t}),"0x"!==e[1]&&i.throwError("hex string must have 0x prefix",i.INVALID_ARGUMENT,{arg:"value",value:t}),(t=t.substring(2)).length%2&&(t="0"+t);for(var n=[],r=0;r<t.length;r+=2)n.push(parseInt(t.substr(r,2),16));return s(new Uint8Array(n))}function A(t){for(var e=[],n=0,r=0;r<t.length;r++){var i=c(t[r]);e.push(i),n+=i.length}var a=new Uint8Array(n),o=0;for(r=0;r<e.length;r++)a.set(e[r],o),o+=e[r].length;return s(a)}function d(t,e){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}n.isHexable=a,n.isArrayish=u,n.arrayify=c,n.concat=A,n.stripZeros=function(t){var e=c(t);if(0===e.length)return e;for(var n=0;0===e[n];)n++;return n?e.slice(n):e},n.padZeros=function(t,e){if(e<(t=c(t)).length)throw new Error("cannot pad");var n=new Uint8Array(e);return n.set(t,e-t.length),s(n)},n.isHexString=d;var p="0123456789abcdef";function f(t){if(a(t))return t.toHexString();if("number"==typeof t){t<0&&i.throwError("cannot hexlify negative value",i.INVALID_ARGUMENT,{arg:"value",value:t}),9007199254740991<=t&&i.throwError("out-of-range",i.NUMERIC_FAULT,{operartion:"hexlify",fault:"out-of-safe-range"});for(var e="";t;)e=p[15&t]+e,t=Math.floor(t/16);return e.length?"0x"+(e=e.length%2?"0"+e:e):"0x00"}if("string"==typeof t){var n=t.match(/^(0x)?[0-9a-fA-F]*$/);return n||i.throwError("invalid hexidecimal string",i.INVALID_ARGUMENT,{arg:"value",value:t}),"0x"!==n[1]&&i.throwError("hex string must have 0x prefix",i.INVALID_ARGUMENT,{arg:"value",value:t}),t.length%2?"0x0"+t.substring(2):t}if(u(t)){for(var r=[],s=0;s<t.length;s++){var o=t[s];r.push(p[(240&o)>>4]+p[15&o])}return"0x"+r.join("")}return i.throwError("invalid hexlify value",null,{arg:"value",value:t}),"never"}function l(t,e){for(d(t)||i.throwError("invalid hex string",i.INVALID_ARGUMENT,{arg:"value",value:t});t.length<2*e+2;)t="0x0"+t.substring(2);return t}function h(t){var e=0,n="0x",r="0x";if((a=t)&&null!=a.r&&null!=a.s){null==t.v&&null==t.recoveryParam&&i.throwError("at least on of recoveryParam or v must be specified",i.INVALID_ARGUMENT,{argument:"signature",value:t}),n=l(t.r,32),r=l(t.s,32),"string"==typeof(e=t.v)&&(e=parseInt(e,16));var a=t.recoveryParam;e=27+(a=null==a&&null!=t.v?1-e%2:a)}else{if(65!==(t=c(t)).length)throw new Error("invalid signature");n=f(t.slice(0,32)),r=f(t.slice(32,64)),27!==(e=t[64])&&28!==e&&(e=27+e%2)}return{r:n,s:r,recoveryParam:e-27,v:e}}n.hexlify=f,n.hexDataLength=function(t){return d(t)&&t.length%2==0?(t.length-2)/2:null},n.hexDataSlice=function(t,e,n){return d(t)||i.throwError("invalid hex data",i.INVALID_ARGUMENT,{arg:"value",value:t}),t.length%2!=0&&i.throwError("hex data length must be even",i.INVALID_ARGUMENT,{arg:"value",value:t}),e=2+2*e,null!=n?"0x"+t.substring(e,2+2*n):"0x"+t.substring(e)},n.hexStripZeros=function(t){for(d(t)||i.throwError("invalid hex string",i.INVALID_ARGUMENT,{arg:"value",value:t});3<t.length&&"0x0"===t.substring(0,3);)t="0x"+t.substring(3);return t},n.hexZeroPad=l,n.splitSignature=h,n.joinSignature=function(t){return f(A([(t=h(t)).r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}},{"../errors":5}],65:[function(t,e,n){"use strict";var r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var i=r(t("../errors")),a=t("./bytes"),s=t("./utf8"),o=t("./keccak256"),u=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),c=new RegExp("^((.*)\\.)?([^.]+)$"),A=new RegExp("^[a-z0-9.-]*$");n.namehash=function(t){"string"!=typeof t&&i.throwError("invalid address - "+String(t),i.INVALID_ARGUMENT,{argument:"name",value:t}),(t=t.toLowerCase()).match(A)||i.throwError("contains invalid UseSTD3ASCIIRules characters",i.INVALID_ARGUMENT,{argument:"name",value:t});for(var e=u;t.length;){var n=t.match(c),r=s.toUtf8Bytes(n[3]);e=o.keccak256(a.concat([e,o.keccak256(r)])),t=n[2]||""}return a.hexlify(e)},n.id=function(t){return o.keccak256(s.toUtf8Bytes(t))},n.hashMessage=function(t){return o.keccak256(a.concat([s.toUtf8Bytes("Ethereum Signed Message:\n"),s.toUtf8Bytes(String(t.length)),"string"==typeof t?s.toUtf8Bytes(t):t]))}},{"../errors":5,"./bytes":64,"./keccak256":71,"./utf8":85}],66:[function(t,e,n){"use strict";var r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var i=r(t("../errors")),a=t("../wordlists/lang-en"),s=t("./basex"),o=t("./bytes"),u=t("./bignumber"),c=t("./utf8"),A=t("./pbkdf2"),d=t("./hmac"),p=t("./properties"),f=t("./secp256k1"),l=t("./sha2"),h=u.bigNumberify("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),y=c.toUtf8Bytes("Bitcoin seed"),g=2147483648;function m(t){return(1<<t)-1<<8-t}function b(t){return o.hexZeroPad(o.hexlify(t),32)}function I(t){var e=o.hexDataSlice(l.sha256(l.sha256(t)),0,4);return s.Base58.encode(o.concat([t,e]))}var C={};n.defaultPath="m/44'/60'/0'/0/0";var v=(Object.defineProperty(E.prototype,"extendedKey",{get:function(){if(256<=this.depth)throw new Error("Depth too large!");return I(o.concat([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",o.hexlify(this.depth),this.parentFingerprint,o.hexZeroPad(o.hexlify(this.index),4),this.chainCode,null!=this.privateKey?o.concat(["0x00",this.privateKey]):this.publicKey]))},enumerable:!0,configurable:!0}),E.prototype.neuter=function(){return new E(C,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,null,this.path)},E.prototype._derive=function(t){if(4294967295<t)throw new Error("invalid index - "+String(t));var e=this.path;e&&(e+="/"+(t&~g));var n=new Uint8Array(37);if(t&g){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(o.arrayify(this.privateKey),1),e&&(e+="'")}else n.set(o.arrayify(this.publicKey));for(var r=24;0<=r;r-=8)n[33+(r>>3)]=t>>24-r&255;var i=(c=d.computeHmac(d.SupportedAlgorithms.sha512,this.chainCode,n)).slice(0,32),a=c.slice(32),s=null,c=null;return this.privateKey?s=b(u.bigNumberify(i).add(this.privateKey).mod(h)):c=new f.KeyPair(o.hexlify(i))._addPoint(this.publicKey),new E(C,s,c,this.fingerprint,b(a),t,this.depth+1,this.mnemonic,e)},E.prototype.derivePath=function(t){var e=t.split("/");if(0===e.length||"m"===e[0]&&0!==this.depth)throw new Error("invalid path - "+t);"m"===e[0]&&e.shift();for(var n=this,r=0;r<e.length;r++){var i=e[r];if(i.match(/^[0-9]+'$/)){var a=parseInt(i.substring(0,i.length-1));if(g<=a)throw new Error("invalid path index - "+i);n=n._derive(g+a)}else{if(!i.match(/^[0-9]+$/))throw new Error("invalid path component - "+i);if(a=parseInt(i),g<=a)throw new Error("invalid path index - "+i);n=n._derive(a)}}return n},E.isHDNode=function(t){return p.isType(t,"HDNode")},E);function E(t,e,n,r,a,s,u,c,A){if(i.checkNew(this,E),t!==C)throw new Error("HDNode constructor cannot be called directly");e?(e=new f.KeyPair(e),p.defineReadOnly(this,"privateKey",e.privateKey),p.defineReadOnly(this,"publicKey",e.compressedPublicKey)):(p.defineReadOnly(this,"privateKey",null),p.defineReadOnly(this,"publicKey",o.hexlify(n))),p.defineReadOnly(this,"parentFingerprint",r),p.defineReadOnly(this,"fingerprint",o.hexDataSlice(l.ripemd160(l.sha256(this.publicKey)),0,4)),p.defineReadOnly(this,"address",f.computeAddress(this.publicKey)),p.defineReadOnly(this,"chainCode",a),p.defineReadOnly(this,"index",s),p.defineReadOnly(this,"depth",u),p.defineReadOnly(this,"mnemonic",c),p.defineReadOnly(this,"path",A),p.setType(this,"HDNode")}function w(t,e){if((t=o.arrayify(t)).length<16||64<t.length)throw new Error("invalid seed");return t=o.arrayify(d.computeHmac(d.SupportedAlgorithms.sha512,y,t)),new v(C,b(t.slice(0,32)),null,"0x00000000",b(t.slice(32)),0,0,e,"m")}function B(t,e){return e=c.toUtf8Bytes("mnemonic"+(e=e||""),c.UnicodeNormalizationForm.NFKD),o.hexlify(A.pbkdf2(c.toUtf8Bytes(t,c.UnicodeNormalizationForm.NFKD),e,2048,64,"sha512"))}function Q(t,e){e=e||a.langEn,i.checkNormalize();var n=e.split(t);if(n.length%3!=0)throw new Error("invalid mnemonic");for(var r=o.arrayify(new Uint8Array(Math.ceil(11*n.length/8))),s=0,u=0;u<n.length;u++){var c=e.getWordIndex(n[u].normalize("NFKD"));if(-1===c)throw new Error("invalid mnemonic");for(var A=0;A<11;A++)c&1<<10-A&&(r[s>>3]|=1<<7-s%8),s++}var d=32*n.length/3,p=m(n.length/3);if(t=o.arrayify(l.sha256(r.slice(0,d/8)))[0],(t&=p)!=(r[r.length-1]&p))throw new Error("invalid checksum");return o.hexlify(r.slice(0,d/8))}function M(t,e){if((t=o.arrayify(t)).length%4!=0||t.length<16||32<t.length)throw new Error("invalid entropy");for(var n=[0],r=11,i=0;i<t.length;i++)8<r?(n[n.length-1]<<=8,n[n.length-1]|=t[i],r-=8):(n[n.length-1]<<=r,n[n.length-1]|=t[i]>>8-r,n.push(t[i]&(1<<8-r)-1),r+=3);var s=o.arrayify(l.sha256(t))[0],u=t.length/4;return s&=m(u),n[n.length-1]<<=u,n[n.length-1]|=s>>8-u,(e=e||a.langEn).join(n.map((function(t){return e.getWord(t)})))}n.HDNode=v,n.fromExtendedKey=function(t){var e=s.Base58.decode(t);82===e.length&&I(e.slice(0,78))===t||i.throwError("invalid extended key",i.INVALID_ARGUMENT,{argument:"extendedKey",value:"[REDACTED]"});var n=e[4],r=o.hexlify(e.slice(5,9)),a=parseInt(o.hexlify(e.slice(9,13)).substring(2),16),u=o.hexlify(e.slice(13,45)),c=e.slice(45,78);switch(o.hexlify(e.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new v(C,null,o.hexlify(c),r,u,a,n,null,null);case"0x0488ade4":case"0x04358394":if(0!==c[0])break;return new v(C,o.hexlify(c.slice(1)),null,r,u,a,n,null,null)}return i.throwError("invalid extended key",i.INVALID_ARGUMENT,{argument:"extendedKey",value:"[REDACTED]"})},n.fromMnemonic=function(t,e,n){return w(B(t=M(Q(t,e),e),n),t)},n.fromSeed=function(t){return w(t,null)},n.mnemonicToSeed=B,n.mnemonicToEntropy=Q,n.entropyToMnemonic=M,n.isValidMnemonic=function(t,e){try{return Q(t,e),!0}catch(t){}return!1}},{"../errors":5,"../wordlists/lang-en":90,"./basex":62,"./bignumber":63,"./bytes":64,"./hmac":67,"./pbkdf2":73,"./properties":74,"./secp256k1":77,"./sha2":79,"./utf8":85}],67:[function(t,e,n){"use strict";var r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var i,a=r(t("hash.js")),s=t("../utils/bytes"),o=r(t("../errors"));(t=i=n.SupportedAlgorithms||(n.SupportedAlgorithms={})).sha256="sha256",t.sha512="sha512",n.computeHmac=function(t,e,n){return i[t]||o.throwError("unsupported algorithm "+t,o.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:t}),s.arrayify(a.hmac(a[t],s.arrayify(e)).update(s.arrayify(n)).digest())}},{"../errors":5,"../utils/bytes":64,"hash.js":26}],68:[function(t,e,n){"use strict";var r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var i=t("./abi-coder");n.AbiCoder=i.AbiCoder,n.defaultAbiCoder=i.defaultAbiCoder,n.formatSignature=i.formatSignature,n.formatParamType=i.formatParamType,n.parseSignature=i.parseSignature,n.parseParamType=i.parseParamType,i=t("./address"),n.getAddress=i.getAddress,n.getContractAddress=i.getContractAddress,n.getCreate2Address=i.getCreate2Address,n.getIcapAddress=i.getIcapAddress,i=r(t("./base64")),n.base64=i,i=t("./bignumber"),n.BigNumber=i.BigNumber,n.bigNumberify=i.bigNumberify,i=t("./bytes"),n.arrayify=i.arrayify,n.concat=i.concat,n.hexDataSlice=i.hexDataSlice,n.hexDataLength=i.hexDataLength,n.hexlify=i.hexlify,n.hexStripZeros=i.hexStripZeros,n.hexZeroPad=i.hexZeroPad,n.isHexString=i.isHexString,n.joinSignature=i.joinSignature,n.padZeros=i.padZeros,n.splitSignature=i.splitSignature,n.stripZeros=i.stripZeros,i=t("./hash"),n.hashMessage=i.hashMessage,n.id=i.id,n.namehash=i.namehash,i=r(t("./hdnode")),n.HDNode=i,i=t("./interface"),n.Interface=i.Interface,i=t("./json-wallet"),n.getJsonWalletAddress=i.getJsonWalletAddress,i=t("./keccak256"),n.keccak256=i.keccak256,i=t("./sha2"),n.sha256=i.sha256,i=t("./solidity"),n.solidityKeccak256=i.keccak256,n.solidityPack=i.pack,n.soliditySha256=i.sha256,i=t("./random-bytes"),n.randomBytes=i.randomBytes,i=t("./networks"),n.getNetwork=i.getNetwork,i=t("./properties"),n.checkProperties=i.checkProperties,n.deepCopy=i.deepCopy,n.defineReadOnly=i.defineReadOnly,n.resolveProperties=i.resolveProperties,n.shallowCopy=i.shallowCopy,r=r(t("./rlp")),n.RLP=r,r=t("./secp256k1"),n.computeAddress=r.computeAddress,n.computePublicKey=r.computePublicKey,n.recoverAddress=r.recoverAddress,n.recoverPublicKey=r.recoverPublicKey,n.verifyMessage=r.verifyMessage,r=t("./signing-key"),n.SigningKey=r.SigningKey,r=t("./transaction"),n.populateTransaction=r.populateTransaction,r=t("./transaction"),n.parseTransaction=r.parse,n.serializeTransaction=r.serialize,r=t("./utf8"),n.formatBytes32String=r.formatBytes32String,n.parseBytes32String=r.parseBytes32String,n.toUtf8Bytes=r.toUtf8Bytes,n.toUtf8String=r.toUtf8String,r=t("./units"),n.commify=r.commify,n.formatEther=r.formatEther,n.parseEther=r.parseEther,n.formatUnits=r.formatUnits,n.parseUnits=r.parseUnits,r=t("./web"),n.fetchJson=r.fetchJson,n.poll=r.poll,r=t("./hmac"),n.SupportedAlgorithms=r.SupportedAlgorithms,r=t("./utf8"),n.UnicodeNormalizationForm=r.UnicodeNormalizationForm,t=t("./wordlist"),n.Wordlist=t.Wordlist},{"./abi-coder":59,"./address":60,"./base64":61,"./bignumber":63,"./bytes":64,"./hash":65,"./hdnode":66,"./hmac":67,"./interface":69,"./json-wallet":70,"./keccak256":71,"./networks":72,"./properties":74,"./random-bytes":75,"./rlp":76,"./secp256k1":77,"./sha2":79,"./signing-key":81,"./solidity":82,"./transaction":83,"./units":84,"./utf8":85,"./web":86,"./wordlist":87}],69:[function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var s,o=t("./address"),u=t("./abi-coder"),c=t("./bignumber"),A=t("./bytes"),d=t("./hash"),p=t("./keccak256"),f=t("./properties"),l=a(t("../errors")),h=function(t){f.setType(this,"Indexed"),f.defineReadOnly(this,"hash",t)},y=(i(g,s=t=function(t){for(var e in f.setType(this,"Description"),t)f.defineReadOnly(this,e,f.deepCopy(t[e],!0));Object.freeze(this)}),g.prototype.encode=function(t,e){A.isHexString(t)||l.throwError("invalid contract bytecode",l.INVALID_ARGUMENT,{arg:"bytecode",value:t}),l.checkArgumentCount(e.length,this.inputs.length," in Interface constructor");try{return t+u.defaultAbiCoder.encode(this.inputs,e).substring(2)}catch(t){l.throwError("invalid constructor argument",l.INVALID_ARGUMENT,{arg:t.arg,reason:t.reason,value:t.value})}return null},g);function g(){return null!==s&&s.apply(this,arguments)||this}var m,b=(i(I,m=t),I.prototype.encode=function(t){l.checkArgumentCount(t.length,this.inputs.length," in interface function "+this.name);try{return this.sighash+u.defaultAbiCoder.encode(this.inputs,t).substring(2)}catch(t){l.throwError("invalid input argument",l.INVALID_ARGUMENT,{arg:t.arg,reason:t.reason,value:t.value})}return null},I.prototype.decode=function(t){try{return u.defaultAbiCoder.decode(this.outputs,A.arrayify(t))}catch(e){l.throwError("invalid data for function output",l.INVALID_ARGUMENT,{arg:"data",errorArg:e.arg,errorValue:e.value,value:t,reason:e.reason})}},I);function I(){return null!==m&&m.apply(this,arguments)||this}var C,v=(i(E,C=t),E);function E(){return null!==C&&C.apply(this,arguments)||this}var w,B=(i(Q,w=t),Q.prototype.encodeTopics=function(t){var e=this;t.length>this.inputs.length&&l.throwError("too many arguments for "+this.name,l.UNEXPECTED_ARGUMENT,{maxCount:t.length,expectedCount:this.inputs.length});var n=[];for(this.anonymous||n.push(this.topic),t.forEach((function(t,r){var i=e.inputs[r];i.indexed?null==t?n.push(null):"string"===i.type?n.push(d.id(t)):"bytes"===i.type?n.push(p.keccak256(t)):-1!==i.type.indexOf("[")||"tuple"===i.type.substring(0,5)?l.throwError("filtering with tuples or arrays not implemented yet; bug us on GitHub",l.NOT_IMPLEMENTED,{operation:"filter(array|tuple)"}):("address"===i.type&&o.getAddress(t),n.push(A.hexZeroPad(A.hexlify(t),32).toLowerCase())):null!=t&&l.throwError("cannot filter non-indexed parameters; must be null",l.INVALID_ARGUMENT,{argument:i.name||r,value:t})}));n.length&&null===n[n.length-1];)n.pop();return n},Q.prototype.decode=function(t,e){null==e||this.anonymous||(e=e.slice(1));var n,r=[],i=[],a=[];this.inputs.forEach((function(t,e){t.indexed?"string"===t.type||"bytes"===t.type||0<=t.type.indexOf("[")||"tuple"===t.type.substring(0,5)?(r.push({type:"bytes32",name:t.name||""}),a.push(!0)):(r.push(t),a.push(!1)):(i.push(t),a.push(!1))})),null!=e&&(n=u.defaultAbiCoder.decode(r,A.concat(e)));var s=u.defaultAbiCoder.decode(i,A.arrayify(t)),o={},c=0,d=0;return this.inputs.forEach((function(t,r){t.indexed?null==e?o[r]=new h(null):a[r]?o[r]=new h(n[d++]):o[r]=n[d++]:o[r]=s[c++],t.name&&(o[t.name]=o[r])})),o.length=this.inputs.length,new v(o)},Q);function Q(){return null!==w&&w.apply(this,arguments)||this}var M,k=(i(_,M=t),_);function _(){return null!==M&&M.apply(this,arguments)||this}var x,S=(i(D,x=t),D);function D(){return null!==x&&x.apply(this,arguments)||this}function R(t){switch(t.type){case"constructor":var e=new y({inputs:t.inputs,payable:null==t.payable||!!t.payable});this.deployFunction||(this.deployFunction=e);break;case"function":var n=u.formatSignature(t).replace(/tuple/g,""),r=d.id(n).substring(0,10),i=!1;null!=t.constant?i=t.constant:null!=t.stateMutability&&(i="view"==t.stateMutability||"pure"==t.stateMutability),e=new b({inputs:t.inputs,outputs:t.outputs,gas:t.gas,payable:null==t.payable||!!t.payable,type:i?"call":"transaction",name:t.name,signature:n,sighash:r}),t.name&&(null==this.functions[t.name]?f.defineReadOnly(this.functions,t.name,e):l.warn("WARNING: Multiple definitions for "+t.name)),null==this.functions[e.signature]&&f.defineReadOnly(this.functions,e.signature,e);break;case"event":n=u.formatSignature(t).replace(/tuple/g,""),e=new B({name:t.name,signature:n,inputs:t.inputs,topic:d.id(n),anonymous:!!t.anonymous}),t.name&&null==this.events[t.name]&&f.defineReadOnly(this.events,t.name,e),null==this.events[e.signature]&&f.defineReadOnly(this.events,e.signature,e);break;case"receive":case"fallback":break;default:l.warn("WARNING: unsupported ABI type - "+t.type)}}function T(t){if(l.checkNew(this,T),"string"==typeof t){try{t=JSON.parse(t)}catch(e){l.throwError("could not parse ABI JSON",l.INVALID_ARGUMENT,{arg:"abi",errorMessage:e.message,value:t})}if(!Array.isArray(t))return l.throwError("invalid abi",l.INVALID_ARGUMENT,{arg:"abi",value:t}),null}f.defineReadOnly(this,"functions",{}),f.defineReadOnly(this,"events",{});var e=[];t.forEach((function(t){"string"==typeof t&&(t=u.parseSignature(t)),e.push(t)})),f.defineReadOnly(this,"abi",f.deepCopy(e,!0)),e.forEach(R,this),this.deployFunction||R.call(this,{type:"constructor",inputs:[]}),f.setType(this,"Interface")}T.prototype.parseTransaction=function(t){var e,n=t.data.substring(0,10).toLowerCase();for(e in this.functions)if(-1!==e.indexOf("(")){var r=this.functions[e];if(r.sighash===n){var i=u.defaultAbiCoder.decode(r.inputs,"0x"+t.data.substring(10));return new k({args:i,decode:r.decode,name:r.name,signature:r.signature,sighash:r.sighash,value:c.bigNumberify(t.value||"0")})}}return null},T.prototype.parseLog=function(t){for(var e in this.events)if(-1!==e.indexOf("(")&&!(e=this.events[e]).anonymous&&e.topic===t.topics[0])return new S({decode:e.decode,name:e.name,signature:e.signature,topic:e.topic,values:e.decode(t.data,t.topics)});return null},T.isInterface=function(t){return f.isType(t,"Interface")},T.isIndexed=function(t){return f.isType(t,"Indexed")},t=T,n.Interface=t},{"../errors":5,"./abi-coder":59,"./address":60,"./bignumber":63,"./bytes":64,"./hash":65,"./keccak256":71,"./properties":74}],70:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("./address");function i(t){try{var e=JSON.parse(t)}catch(t){return!1}return e.encseed&&e.ethaddr}function a(t){try{var e=JSON.parse(t)}catch(t){return!1}return!(!e.version||parseInt(e.version)!==e.version||3!==parseInt(e.version))}n.isCrowdsaleWallet=i,n.isSecretStorageWallet=a,n.getJsonWalletAddress=function(t){if(i(t))try{return r.getAddress(JSON.parse(t).ethaddr)}catch(t){return null}if(a(t))try{return r.getAddress(JSON.parse(t).address)}catch(t){return null}return null}},{"./address":60}],71:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("js-sha3"),i=t("./bytes");n.keccak256=function(t){return"0x"+r.keccak_256(i.arrayify(t))}},{"./bytes":64,"js-sha3":40}],72:[function(t,e,n){"use strict";var r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var i=r(t("../errors"));function a(t){return function(e){var n=[];return e.InfuraProvider&&n.push(new e.InfuraProvider(t)),e.EtherscanProvider&&n.push(new e.EtherscanProvider(t)),0===n.length?null:e.FallbackProvider?new e.FallbackProvider(n):n[0]}}function s(t,e){return function(n){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null}}var o={unspecified:{chainId:0,name:"unspecified"},homestead:r={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:a("homestead")},mainnet:r,morden:{chainId:2,name:"morden"},ropsten:t={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:a("ropsten")},testnet:t,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:a("rinkeby")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:a("goerli")},kovan:{chainId:42,name:"kovan",_defaultProvider:a("kovan")},classic:{chainId:61,name:"classic",_defaultProvider:s("https://web3.gastracker.io","classic")},classicTestnet:{chainId:62,name:"classicTestnet",_defaultProvider:s("https://web3.gastracker.io/morden","classicTestnet")}};n.getNetwork=function(t){if(null==t)return null;if("number"==typeof t){for(var e in o)if((e=o[e]).chainId===t)return{name:e.name,chainId:e.chainId,ensAddress:e.ensAddress||null,_defaultProvider:e._defaultProvider||null};return{chainId:t,name:"unknown"}}if("string"!=typeof t)return(n=o[t.name])?(0!==t.chainId&&t.chainId!==n.chainId&&i.throwError("network chainId mismatch",i.INVALID_ARGUMENT,{arg:"network",value:t}),{name:t.name,chainId:n.chainId,ensAddress:t.ensAddress||n.ensAddress||null,_defaultProvider:t._defaultProvider||n._defaultProvider||null}):("number"!=typeof t.chainId&&i.throwError("invalid network chainId",i.INVALID_ARGUMENT,{arg:"network",value:t}),t);var n=o[t];return null==n?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}},{"../errors":5}],73:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("../utils/bytes"),i=t("./hmac");n.pbkdf2=function(t,e,n,a,s){var o;t=r.arrayify(t),e=r.arrayify(e);var u,c,A=1,d=new Uint8Array(a),p=new Uint8Array(e.length+4);p.set(e);for(var f=1;f<=A;f++){p[e.length]=f>>24&255,p[e.length+1]=f>>16&255,p[e.length+2]=f>>8&255,p[e.length+3]=255&f;var l=i.computeHmac(s,t,p);o||(o=l.length,c=new Uint8Array(o),u=a-((A=Math.ceil(a/o))-1)*o),c.set(l);for(var h=1;h<n;h++){l=i.computeHmac(s,t,l);for(var y=0;y<o;y++)c[y]^=l[y]}var g=(f-1)*o,m=f===A?u:o;d.set(r.arrayify(c).slice(0,m),g)}return r.arrayify(d)}},{"../utils/bytes":64,"./hmac":67}],74:[function(t,e,n){"use strict";var r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var i=r(t("../errors"));function a(t,e,n){Object.defineProperty(t,e,{enumerable:!0,value:n,writable:!1})}function s(t,e){return t&&t._ethersType===e}n.defineReadOnly=a,n.setType=function(t,e){Object.defineProperty(t,"_ethersType",{configurable:!1,value:e,writable:!1})},n.isType=s,n.resolveProperties=function(t){var e={},n=[];return Object.keys(t).forEach((function(r){var i=t[r];i instanceof Promise?n.push(i.then((function(t){return e[r]=t,null}))):e[r]=i})),Promise.all(n).then((function(){return e}))},n.checkProperties=function(t,e){t&&"object"==o(t)||i.throwError("invalid object",i.INVALID_ARGUMENT,{argument:"object",value:t}),Object.keys(t).forEach((function(n){e[n]||i.throwError("invalid object key - "+n,i.INVALID_ARGUMENT,{argument:"transaction",value:t,key:n})}))},n.shallowCopy=function(t){var e,n={};for(e in t)n[e]=t[e];return n};var u={boolean:!0,number:!0,string:!0};n.deepCopy=function t(e,n){if(null==e||u[o(e)])return e;if(Array.isArray(e)){var r=e.map((function(e){return t(e,n)}));return n&&Object.freeze(r),r}if("object"==o(e)){if(s(e,"BigNumber"))return e;if(s(e,"Description"))return e;if(s(e,"Indexed"))return e;var i;for(i in r={},e){var c=e[i];void 0!==c&&a(r,i,t(c,n))}return n&&Object.freeze(r),r}if("function"==typeof e)return e;throw new Error("Cannot deepCopy "+o(e))},n.inheritable=function t(e){return function(n){var r,i;i=e,(r=n).super_=i,r.prototype=Object.create(i.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a(n,"inherits",t(n))}}},{"../errors":5}],75:[function(t,e,r){(function(e){(function(){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../utils/bytes"),i=t("../utils/properties"),a=e.crypto||e.msCrypto;function s(t){if(t<=0||1024<t||parseInt(String(t))!=t)throw new Error("invalid length");return t=new Uint8Array(t),a.getRandomValues(t),n.arrayify(t)}a&&a.getRandomValues||(console.log("WARNING: Missing strong random number source; using weak randomBytes"),a={getRandomValues:function(t){for(var e=0;e<20;e++)for(var n=0;n<t.length;n++)e?t[n]^=Math.trunc(256*Math.random()):t[n]=Math.trunc(256*Math.random());return t},_weakCrypto:!0}),r.randomBytes=s,!0===a._weakCrypto&&i.defineReadOnly(s,"_weakCrypto",!0)}).call(this)}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/bytes":64,"../utils/properties":74}],76:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("./bytes");function i(t){for(var e=[];t;)e.unshift(255&t),t>>=8;return e}function a(t,e,n){for(var r=0,i=0;i<n;i++)r=256*r+t[e+i];return r}function s(t,e,n,r){for(var i=[];n<e+1+r;){var a=o(t,n);if(i.push(a.result),e+1+r<(n+=a.consumed))throw new Error("invalid rlp")}return{consumed:1+r,result:i}}function o(t,e){if(0===t.length)throw new Error("invalid rlp data");if(248<=t[e]){if(e+1+(n=t[e]-247)>t.length)throw new Error("too short");if(e+1+n+(i=a(t,e+1,n))>t.length)throw new Error("to short");return s(t,e,e+1+n,n+i)}if(192<=t[e]){if(e+1+(i=t[e]-192)>t.length)throw new Error("invalid rlp data");return s(t,e,e+1,i)}if(184<=t[e]){var n;if(e+1+(n=t[e]-183)>t.length)throw new Error("invalid rlp data");if(e+1+n+(i=a(t,e+1,n))>t.length)throw new Error("invalid rlp data");return{consumed:1+n+i,result:r.hexlify(t.slice(e+1+n,e+1+n+i))}}if(128<=t[e]){var i;if(e+1+(i=t[e]-128)>t.length)throw new Error("invalid rlp data");return{consumed:1+i,result:r.hexlify(t.slice(e+1,e+1+i))}}return{consumed:1,result:r.hexlify(t[e])}}n.encode=function(t){return r.hexlify(function t(e){if(Array.isArray(e)){var n=[];return e.forEach((function(e){n=n.concat(t(e))})),n.length<=55?(n.unshift(192+n.length),n):((a=i(n.length)).unshift(247+a.length),a.concat(n))}var a;return 1===(e=Array.prototype.slice.call(r.arrayify(e))).length&&e[0]<=127?e:e.length<=55?(e.unshift(128+e.length),e):((a=i(e.length)).unshift(183+a.length),a.concat(e))}(t))},n.decode=function(t){var e=r.arrayify(t);if((t=o(e,0)).consumed!==e.length)throw new Error("invalid rlp data");return t.result}},{"./bytes":64}],77:[function(t,e,n){"use strict";var r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var i=t("elliptic"),a=t("./address"),s=t("./bytes"),o=t("./hash"),u=t("./keccak256"),c=t("./properties"),A=r(t("../errors")),d=null;function p(){return d=d||new i.ec("secp256k1")}var f=(l.prototype.sign=function(t){return{recoveryParam:(t=p().keyFromPrivate(s.arrayify(this.privateKey)).sign(s.arrayify(t),{canonical:!0})).recoveryParam,r:s.hexZeroPad("0x"+t.r.toString(16),32),s:s.hexZeroPad("0x"+t.s.toString(16),32),v:27+t.recoveryParam}},l.prototype.computeSharedSecret=function(t){var e=p().keyFromPrivate(s.arrayify(this.privateKey));return t=p().keyFromPublic(s.arrayify(h(t))),s.hexZeroPad("0x"+e.derive(t.getPublic()).toString(16),32)},l.prototype._addPoint=function(t){var e=p().keyFromPublic(s.arrayify(this.publicKey));return t=p().keyFromPublic(s.arrayify(t)),"0x"+e.pub.add(t.pub).encodeCompressed("hex")},l);function l(t){t=p().keyFromPrivate(s.arrayify(t)),c.defineReadOnly(this,"privateKey",s.hexlify(t.priv.toArray("be",32))),c.defineReadOnly(this,"publicKey","0x"+t.getPublic(!1,"hex")),c.defineReadOnly(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),c.defineReadOnly(this,"publicKeyBytes",t.getPublic().encode(null,!0))}function h(t,e){return 32!==(t=s.arrayify(t)).length?33===t.length?e?s.hexlify(t):"0x"+p().keyFromPublic(t).getPublic(!1,"hex"):65===t.length?e?"0x"+p().keyFromPublic(t).getPublic(!0,"hex"):s.hexlify(t):(A.throwError("invalid public or private key",A.INVALID_ARGUMENT,{arg:"key",value:"[REDACTED]"}),null):(t=new f(t),e?t.compressedPublicKey:t.publicKey)}function y(t){return t="0x"+h(t).slice(4),a.getAddress("0x"+u.keccak256(t).substring(26))}function g(t,e){var n=s.splitSignature(e);return e={r:s.arrayify(n.r),s:s.arrayify(n.s)},"0x"+p().recoverPubKey(s.arrayify(t),e,n.recoveryParam).encode("hex",!1)}function m(t,e){return y(g(s.arrayify(t),e))}n.KeyPair=f,n.computePublicKey=h,n.computeAddress=y,n.recoverPublicKey=g,n.recoverAddress=m,n.verifyMessage=function(t,e){return m(o.hashMessage(t),e)}},{"../errors":5,"./address":60,"./bytes":64,"./hash":65,"./keccak256":71,"./properties":74,elliptic:12}],78:[function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var a=r(t("aes-js")),s=r(t("scrypt-js")),o=r(t("uuid")),u=t("./signing-key"),c=i(t("./hdnode")),A=t("./address"),d=t("./bytes"),p=t("./pbkdf2"),f=t("./keccak256"),l=t("./utf8"),h=t("./random-bytes");function y(t){return"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),d.arrayify(t)}function g(t,e){for(t=String(t);t.length<e;)t="0"+t;return t}function m(t){return"string"==typeof t?l.toUtf8Bytes(t,l.UnicodeNormalizationForm.NFKC):d.arrayify(t)}function b(t,e){for(var n=t,r=e.toLowerCase().split("/"),i=0;i<r.length;i++){var a,s=null;for(a in n)if(a.toLowerCase()===r[i]){s=n[a];break}if(null===s)return null;n=s}return n}n.decryptCrowdsale=function(t,e){var n=JSON.parse(t);e=m(e);var r=A.getAddress(b(n,"ethaddr"));if(!(t=y(b(n,"encseed")))||t.length%16!=0)throw new Error("invalid encseed");n=p.pbkdf2(e,e,2e3,32,"sha256").slice(0,16),e=t.slice(0,16),t=t.slice(16),e=new a.default.ModeOfOperation.cbc(n,e);for(var i=d.arrayify(e.decrypt(t)),s=(i=a.default.padding.pkcs7.strip(i),""),o=0;o<i.length;o++)s+=String.fromCharCode(i[o]);if(t=l.toUtf8Bytes(s),(t=new u.SigningKey(f.keccak256(t))).address!==r)throw new Error("corrupt crowdsale wallet");return t},n.decrypt=function(t,e,n){function r(t,e){var n=y(b(i,"crypto/ciphertext"));if(d.hexlify((o=t.slice(16,32),f.keccak256(d.concat([o,n])))).substring(2)!==b(i,"crypto/mac").toLowerCase())return e(new Error("invalid password")),null;var r=function(t,e){if("aes-128-ctr"!==b(i,"crypto/cipher"))return null;var n=y(b(i,"crypto/cipherparams/iv"));return n=new a.default.Counter(n),n=new a.default.ModeOfOperation.ctr(t,n),d.arrayify(n.decrypt(e))}(t.slice(0,16),n),s=t.slice(32,64);if(!r)return e(new Error("unsupported cipher")),null;var o=new u.SigningKey(r);if(i.address&&o.address!==A.getAddress(i.address))return e(new Error("address mismatch")),null;if(n=b(i,"x-ethers/locale"),"0.1"===b(i,"x-ethers/version")&&(null==n||"en"===n)){if(t=y(b(i,"x-ethers/mnemonicCiphertext")),n=y(b(i,"x-ethers/mnemonicCounter")),n=new a.default.Counter(n),s=new a.default.ModeOfOperation.ctr(s,n),n=b(i,"x-ethers/path")||c.defaultPath,t=d.arrayify(s.decrypt(t)),t=c.entropyToMnemonic(t),(n=c.fromMnemonic(t).derivePath(n)).privateKey!=d.hexlify(r))return e(new Error("mnemonic mismatch")),null;o=new u.SigningKey(n)}return o}var i=JSON.parse(t),o=m(e);return new Promise((function(t,e){if((l=b(i,"crypto/kdf"))&&"string"==typeof l)if("scrypt"===l.toLowerCase()){var a=y(b(i,"crypto/kdfparams/salt")),u=parseInt(b(i,"crypto/kdfparams/n")),c=parseInt(b(i,"crypto/kdfparams/r")),A=parseInt(b(i,"crypto/kdfparams/p"));u&&c&&A?0==(u&u-1)?32===(f=parseInt(b(i,"crypto/kdfparams/dklen")))?(n&&n(0),s.default(o,a,u,c,A,64,(function(i,a,s){if(i)i.progress=a,e(i);else if(s)(s=r(s=d.arrayify(s),e))&&(n&&n(1),t(s));else if(n)return n(a)}))):e(new Error("unsupported key-derivation derived-key length")):e(new Error("unsupported key-derivation function parameter value for N")):e(new Error("unsupported key-derivation function parameters"))}else if("pbkdf2"===l.toLowerCase()){if(a=y(b(i,"crypto/kdfparams/salt")),A=null,"hmac-sha256"===(l=b(i,"crypto/kdfparams/prf")))A="sha256";else{if("hmac-sha512"!==l)return void e(new Error("unsupported prf"));A="sha512"}var f,l=parseInt(b(i,"crypto/kdfparams/c"));32===(f=parseInt(b(i,"crypto/kdfparams/dklen")))?(A=r(A=p.pbkdf2(o,a,l,f,A),e))&&t(A):e(new Error("unsupported key-derivation derived-key length"))}else e(new Error("unsupported key-derivation function"));else e(new Error("unsupported key-derivation function"))}))},n.encrypt=function(t,e,n,r){var i;if("function"!=typeof n||r||(r=n,n={}),n=n||{},32!==(i=u.SigningKey.isSigningKey(t)?d.arrayify(t.privateKey):d.arrayify(t)).length)throw new Error("invalid private key");var A=m(e),p=null;if(n.entropy&&(p=d.arrayify(n.entropy)),n.mnemonic)if(p){if(c.entropyToMnemonic(p)!==n.mnemonic)throw new Error("entropy and mnemonic mismatch")}else p=d.arrayify(c.mnemonicToEntropy(n.mnemonic,n.wordlist));var l=n.path;p&&!l&&(l=c.defaultPath);var y=(y=n.client)||"ethers.js",b=n.salt?d.arrayify(n.salt):h.randomBytes(32),I=null;if(n.iv){if(16!==(I=d.arrayify(n.iv)).length)throw new Error("invalid iv")}else I=h.randomBytes(16);var C=null;if(n.uuid){if(16!==(C=d.arrayify(n.uuid)).length)throw new Error("invalid uuid")}else C=h.randomBytes(16);var v=1<<17,E=8,w=1;return n.scrypt&&(n.scrypt.N&&(v=n.scrypt.N),n.scrypt.r&&(E=n.scrypt.r),n.scrypt.p&&(w=n.scrypt.p)),new Promise((function(t,e){r&&r(0),s.default(A,b,v,E,w,64,(function(s,c,A){if(s)s.progress=c,e(s);else if(A){var m=(A=d.arrayify(A)).slice(0,16),B=A.slice(16,32),Q=A.slice(32,64);s=new u.SigningKey(i).address,A=new a.default.Counter(I),A=new a.default.ModeOfOperation.ctr(m,A),A=d.arrayify(A.encrypt(i)),B=f.keccak256(d.concat([B,A])),s={address:s.substring(2).toLowerCase(),id:o.default.v4({random:C}),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:d.hexlify(I).substring(2)},ciphertext:d.hexlify(A).substring(2),kdf:"scrypt",kdfparams:{salt:d.hexlify(b).substring(2),n:v,dklen:32,p:w,r:E},mac:B.substring(2)}},p&&(A=h.randomBytes(16),B=new a.default.Counter(A),Q=new a.default.ModeOfOperation.ctr(Q,B),B=d.arrayify(Q.encrypt(p)),Q=(Q=new Date).getUTCFullYear()+"-"+g(Q.getUTCMonth()+1,2)+"-"+g(Q.getUTCDate(),2)+"T"+g(Q.getUTCHours(),2)+"-"+g(Q.getUTCMinutes(),2)+"-"+g(Q.getUTCSeconds(),2)+".0Z",s["x-ethers"]={client:y,gethFilename:"UTC--"+Q+"--"+s.address,mnemonicCounter:d.hexlify(A).substring(2),mnemonicCiphertext:d.hexlify(B).substring(2),path:l,version:"0.1"},n.wordlist&&"string"==typeof n.wordlist.locale&&(s["x-ethers"].locale=n.wordlist.locale)),r&&r(1),t(JSON.stringify(s))}else if(r)return r(c)}))}))}},{"./address":60,"./bytes":64,"./hdnode":66,"./keccak256":71,"./pbkdf2":73,"./random-bytes":75,"./signing-key":81,"./utf8":85,"aes-js":8,"scrypt-js":44,uuid:48}],79:[function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0});var i=r(t("hash.js")),a=t("./bytes");n.ripemd160=function(t){return"0x"+i.default.ripemd160().update(a.arrayify(t)).digest("hex")},n.sha256=function(t){return"0x"+i.default.sha256().update(a.arrayify(t)).digest("hex")},n.sha512=function(t){return"0x"+i.default.sha512().update(a.arrayify(t)).digest("hex")}},{"./bytes":64,"hash.js":26}],80:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),t("setimmediate"),n.platform="browser"},{setimmediate:45}],81:[function(t,e,n){"use strict";var r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var i=t("./hdnode"),a=t("./bytes"),s=t("./properties"),u=t("./secp256k1"),c=r(t("../errors"));function A(t){c.checkNew(this,A);var e=i.HDNode.isHDNode(t)?(s.defineReadOnly(this,"mnemonic",t.mnemonic),s.defineReadOnly(this,"path",t.path),a.arrayify(t.privateKey)):("string"==typeof t&&t.match(/^[0-9a-f]*$/i)&&64===t.length&&(t="0x"+t),a.arrayify(t));try{32!==e.length&&c.throwError("exactly 32 bytes required",c.INVALID_ARGUMENT,{arg:"privateKey",value:"[REDACTED]"})}catch(e){t={arg:"privateKey",reason:e.reason,value:"[REDACTED]"},e.value&&("number"==typeof e.value.length&&(t.length=e.value.length),t.type=o(e.value)),c.throwError("invalid private key",e.code,t)}s.defineReadOnly(this,"privateKey",a.hexlify(e)),s.defineReadOnly(this,"keyPair",new u.KeyPair(e)),s.defineReadOnly(this,"publicKey",this.keyPair.publicKey),s.defineReadOnly(this,"address",u.computeAddress(this.keyPair.publicKey)),s.setType(this,"SigningKey")}A.prototype.signDigest=function(t){return this.keyPair.sign(t)},A.prototype.computeSharedSecret=function(t){return this.keyPair.computeSharedSecret(a.arrayify(t))},A.isSigningKey=function(t){return s.isType(t,"SigningKey")},t=A,n.SigningKey=t},{"../errors":5,"./bytes":64,"./hdnode":66,"./properties":74,"./secp256k1":77}],82:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("./bignumber"),i=t("./bytes"),a=t("./utf8"),s=t("./keccak256"),o=t("./sha2"),u=new RegExp("^bytes([0-9]+)$"),c=new RegExp("^(u?int)([0-9]*)$"),A=new RegExp("^(.*)\\[([0-9]*)\\]$");function d(t,e){if(t.length!=e.length)throw new Error("type/value count mismatch");var n=[];return t.forEach((function(t,s){n.push(function t(e,n,s){switch(e){case"address":return s?i.padZeros(n,32):i.arrayify(n);case"string":return a.toUtf8Bytes(n);case"bytes":return i.arrayify(n);case"bool":return n=n?"0x01":"0x00",s?i.padZeros(n,32):i.arrayify(n)}var o=e.match(c);if(o){if((d=parseInt(o[2]||"256"))%8!=0||0===d||256<d)throw new Error("invalid number type - "+e);return s&&(d=256),n=r.bigNumberify(n).toTwos(d),i.padZeros(n,d/8)}if(o=e.match(u)){var d=parseInt(o[1]);if(String(d)!=o[1]||0===d||32<d)throw new Error("invalid number type - "+e);if(i.arrayify(n).byteLength!==d)throw new Error("invalid value for "+e);return s?i.arrayify((n+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):n}if((o=e.match(A))&&Array.isArray(n)){var p=o[1];if(parseInt(o[2]||String(n.length))!=n.length)throw new Error("invalid value for "+e);var f=[];return n.forEach((function(e){f.push(t(p,e,!0))})),i.concat(f)}throw new Error("unknown type - "+e)}(t,e[s]))})),i.hexlify(i.concat(n))}n.pack=d,n.keccak256=function(t,e){return s.keccak256(d(t,e))},n.sha256=function(t,e){return o.sha256(d(t,e))}},{"./bignumber":63,"./bytes":64,"./keccak256":71,"./sha2":79,"./utf8":85}],83:[function(t,e,n){"use strict";var r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var i=t("../constants"),a=r(t("../errors")),s=t("./secp256k1"),o=t("./address"),u=t("./bignumber"),c=t("./bytes"),A=t("./keccak256"),d=t("./properties"),p=r(t("./rlp")),f=t("../providers/abstract-provider");function l(t){return"0x"===t?i.Zero:u.bigNumberify(t)}var h=[{name:"nonce",maxLength:32},{name:"gasPrice",maxLength:32},{name:"gasLimit",maxLength:32},{name:"to",length:20},{name:"value",maxLength:32},{name:"data"}],y={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0};n.serialize=function(t,e){d.checkProperties(t,y);var n=[];h.forEach((function(e){var r=t[e.name]||[];r=c.arrayify(c.hexlify(r)),e.length&&r.length!==e.length&&0<r.length&&a.throwError("invalid length for "+e.name,a.INVALID_ARGUMENT,{arg:"transaction"+e.name,value:r}),e.maxLength&&(r=c.stripZeros(r)).length>e.maxLength&&a.throwError("invalid length for "+e.name,a.INVALID_ARGUMENT,{arg:"transaction"+e.name,value:r}),n.push(c.hexlify(r))})),null!=t.chainId&&0!==t.chainId&&(n.push(c.hexlify(t.chainId)),n.push("0x"),n.push("0x"));var r=p.encode(n);return e?(e=27+(r=c.splitSignature(e)).recoveryParam,9===n.length&&(n.pop(),n.pop(),n.pop(),e+=2*t.chainId+8),n.push(c.hexlify(e)),n.push(c.stripZeros(c.arrayify(r.r))),n.push(c.stripZeros(c.arrayify(r.s))),p.encode(n)):r},n.parse=function(t){9!==(r=p.decode(t)).length&&6!==r.length&&a.throwError("invalid raw transaction",a.INVALID_ARGUMENT,{arg:"rawTransactin",value:t});var e={nonce:l(r[0]).toNumber(),gasPrice:l(r[1]),gasLimit:l(r[2]),to:"0x"===(n=r[3])?null:o.getAddress(n),value:l(r[4]),data:r[5],chainId:0};if(6===r.length)return e;try{e.v=u.bigNumberify(r[6]).toNumber()}catch(t){return a.info(t),e}if(e.r=c.hexZeroPad(r[7],32),e.s=c.hexZeroPad(r[8],32),u.bigNumberify(e.r).isZero()&&u.bigNumberify(e.s).isZero())e.chainId=e.v,e.v=0;else{e.chainId=Math.floor((e.v-35)/2),e.chainId<0&&(e.chainId=0);var n=e.v-27,r=r.slice(0,6);0!==e.chainId&&(r.push(c.hexlify(e.chainId)),r.push("0x"),r.push("0x"),n-=2*e.chainId+8),r=A.keccak256(p.encode(r));try{e.from=s.recoverAddress(r,{r:c.hexlify(e.r),s:c.hexlify(e.s),recoveryParam:n})}catch(t){a.info(t)}e.hash=A.keccak256(t)}return e},n.populateTransaction=function(t,e,n){f.Provider.isProvider(e)||a.throwError("missing provider",a.INVALID_ARGUMENT,{argument:"provider",value:e}),d.checkProperties(t,y);var r=d.shallowCopy(t);return null!=r.to&&(r.to=e.resolveName(r.to)),null==r.gasPrice&&(r.gasPrice=e.getGasPrice()),null==r.nonce&&(r.nonce=e.getTransactionCount(n)),null==r.gasLimit&&((t=d.shallowCopy(r)).from=n,r.gasLimit=e.estimateGas(t)),null==r.chainId&&(r.chainId=e.getNetwork().then((function(t){return t.chainId}))),d.resolveProperties(r)}},{"../constants":3,"../errors":5,"../providers/abstract-provider":50,"./address":60,"./bignumber":63,"./bytes":64,"./keccak256":71,"./properties":74,"./rlp":76,"./secp256k1":77}],84:[function(t,e,n){"use strict";var r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var i,a=t("../constants"),s=r(t("../errors")),o=t("./bignumber"),u={};function c(t){return{decimals:t.length-1,tenPower:o.bigNumberify(t)}}function A(t){var e=u[String(t).toLowerCase()];if(!e&&"number"==typeof t&&parseInt(String(t))==t&&0<=t&&t<=256){for(var n="1",r=0;r<t;r++)n+="0";e=c(n)}return e||s.throwError("invalid unitType",s.INVALID_ARGUMENT,{argument:"name",value:t}),e}function d(t,e){for(var n=A(e),r=(e=(t=o.bigNumberify(t)).lt(a.Zero),(t=e?t.mul(a.NegativeOne):t).mod(n.tenPower).toString());r.length<n.decimals;)r="0"+r;return r=r.match(/^([0-9]*[1-9]|0)(0*)/)[1],t=t.div(n.tenPower).toString()+"."+r,e?"-"+t:t}function p(t,e){var n=A(e=null==e?18:e);if("string"==typeof t&&t.match(/^-?[0-9.,]+$/)||s.throwError("invalid decimal value",s.INVALID_ARGUMENT,{arg:"value",value:t}),0===n.decimals)return o.bigNumberify(t);var r="-"===t.substring(0,1);"."===(t=r?t.substring(1):t)&&s.throwError("missing value",s.INVALID_ARGUMENT,{arg:"value",value:t}),2<(e=t.split(".")).length&&s.throwError("too many decimal points",s.INVALID_ARGUMENT,{arg:"value",value:t}),t=e[0];var i=e[1];for(t=t||"0",(i=i||"0").length>n.decimals&&s.throwError("underflow occurred",s.NUMERIC_FAULT,{operation:"division",fault:"underflow"});i.length<n.decimals;)i+="0";return e=o.bigNumberify(t),t=o.bigNumberify(i),t=e.mul(n.tenPower).add(t),r?t.mul(a.NegativeOne):t}i="1",["wei","kwei","Mwei","Gwei","szabo","finney","ether"].forEach((function(t){var e=c(i);u[t.toLowerCase()]=e,u[String(e.decimals)]=e,i+="000"})),n.commify=function(t){var e=String(t).split(".");(2<e.length||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||"."===t||"-."===t)&&s.throwError("invalid value",s.INVALID_ARGUMENT,{argument:"value",value:t});var n=e[0],r="";for("-"===n.substring(0,1)&&(r="-",n=n.substring(1));"0"===n.substring(0,1);)n=n.substring(1);""===n&&(n="0"),t="",2===e.length&&(t="."+(e[1]||"0"));for(var i=[];n.length;){if(n.length<=3){i.unshift(n);break}var a=n.length-3;i.unshift(n.substring(a)),n=n.substring(0,a)}return r+i.join(",")+t},n.formatUnits=d,n.parseUnits=p,n.formatEther=function(t){return d(t,18)},n.parseEther=function(t){return p(t,18)}},{"../constants":3,"../errors":5,"./bignumber":63}],85:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=t("../constants"),a=t("../errors"),s=t("./bytes");function o(t,e){(e=void 0===e?r.current:e)!=r.current&&(a.checkNormalize(),t=t.normalize(e));for(var n=[],i=0;i<t.length;i++){var o=t.charCodeAt(i);if(o<128)n.push(o);else if(o<2048)n.push(o>>6|192),n.push(63&o|128);else if(55296==(64512&o)){i++;var u=t.charCodeAt(i);if(i>=t.length||56320!=(64512&u))throw new Error("invalid utf-8 string");n.push((o=65536+((1023&o)<<10)+(1023&u))>>18|240),n.push(o>>12&63|128),n.push(o>>6&63|128),n.push(63&o|128)}else n.push(o>>12|224),n.push(o>>6&63|128),n.push(63&o|128)}return s.arrayify(n)}function u(t,e){t=s.arrayify(t);for(var n="",r=0;r<t.length;){var i=t[r++];if(i>>7!=0){var a=null,o=null;if(192==(224&i))a=1,o=127;else if(224==(240&i))a=2,o=2047;else{if(240!=(248&i)){if(e)continue;if(128==(192&i))throw new Error("invalid utf8 byte sequence; unexpected continuation byte");throw new Error("invalid utf8 byte sequence; invalid prefix")}a=3,o=65535}if(r+a>t.length){if(!e)throw new Error("invalid utf8 byte sequence; too short");for(;r<t.length&&t[r]>>6==2;r++);}else{for(var u=i&(1<<8-a-1)-1,c=0;c<a;c++){var A=t[r];if(128!=(192&A)){u=null;break}u=u<<6|63&A,r++}if(null!==u)if(u<=o){if(!e)throw new Error("invalid utf8 byte sequence; overlong")}else if(1114111<u){if(!e)throw new Error("invalid utf8 byte sequence; out-of-range")}else if(55296<=u&&u<=57343){if(!e)throw new Error("invalid utf8 byte sequence; utf-16 surrogate")}else u<=65535?n+=String.fromCharCode(u):(u-=65536,n+=String.fromCharCode(55296+(u>>10&1023),56320+(1023&u)));else if(!e)throw new Error("invalid utf8 byte sequence; invalid continuation byte")}}else n+=String.fromCharCode(i)}return n}(t=r=n.UnicodeNormalizationForm||(n.UnicodeNormalizationForm={})).current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD",n.toUtf8Bytes=o,n.toUtf8String=u,n.formatBytes32String=function(t){if(31<(t=o(t)).length)throw new Error("bytes32 string must be less than 32 bytes");return s.hexlify(s.concat([t,i.HashZero]).slice(0,32))},n.parseBytes32String=function(t){var e=s.arrayify(t);if(32!==e.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==e[31])throw new Error("invalid bytes32 string - no null terminator");for(var n=31;0===e[n-1];)n--;return u(e.slice(0,n))}},{"../constants":3,"../errors":5,"./bytes":64}],86:[function(t,e,n){"use strict";var r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var i=t("xmlhttprequest"),a=t("./base64"),s=t("./properties"),u=t("./utf8"),c=r(t("../errors"));n.fetchJson=function(t,e,n){var r,s={},A=null,d=12e4;if("string"==typeof t)A=t;else if("object"==o(t)){if(null==t.url&&c.throwError("missing URL",c.MISSING_ARGUMENT,{arg:"url"}),A=t.url,"number"==typeof t.timeout&&0<t.timeout&&(d=t.timeout),t.headers)for(var p in t.headers)s[p.toLowerCase()]={key:p,value:String(t.headers[p])};null!=t.user&&null!=t.password&&("https:"!==A.substring(0,6)&&!0!==t.allowInsecure&&c.throwError("basic authentication requires a secure https url",c.INVALID_ARGUMENT,{arg:"url",url:A,user:t.user,password:"[REDACTED]"}),r=t.user+":"+t.password,s.authorization={key:"Authorization",value:"Basic "+a.encode(u.toUtf8Bytes(r))})}return new Promise((function(t,r){function a(){null!=u&&(clearTimeout(u),u=null)}var o=new i.XMLHttpRequest,u=null;u=setTimeout((function(){null!=u&&(u=null,r(new Error("timeout")),setTimeout((function(){o.abort()}),0))}),d),e?(o.open("POST",A,!0),s["content-type"]={key:"Content-Type",value:"application/json"}):o.open("GET",A,!0),Object.keys(s).forEach((function(t){t=s[t],o.setRequestHeader(t.key,t.value)})),o.onreadystatechange=function(){if(4===o.readyState){if(200!=o.status){a();var i=new Error("invalid response - "+o.status);return i.statusCode=o.status,o.responseText&&(i.responseText=o.responseText),void r(i)}var s=null;try{s=JSON.parse(o.responseText)}catch(i){a();var u=new Error("invalid json response");return u.orginialError=i,u.responseText=o.responseText,null!=e&&(u.requestBody=e),u.url=A,void r(u)}if(n)try{s=n(s)}catch(i){return a(),i.url=A,i.body=e,i.responseText=o.responseText,void r(i)}a(),t(s)}},o.onerror=function(t){a(),r(t)};try{null!=e?o.send(e):o.send()}catch(u){a();var c=new Error("connection error");c.error=u,r(c)}}))},n.poll=function(t,e){return e=e||{},null==(e=s.shallowCopy(e)).floor&&(e.floor=0),null==e.ceiling&&(e.ceiling=1e4),null==e.interval&&(e.interval=250),new Promise((function(n,r){var i=null,a=!1,s=function(){return!a&&(a=!0,i&&clearTimeout(i),!0)};e.timeout&&(i=setTimeout((function(){s()&&r(new Error("timeout"))}),e.timeout));var o=e.fastRetry||null,u=0;!function i(){return t().then((function(t){return void 0!==t?s()&&n(t):e.onceBlock?e.onceBlock.once("block",i):a||(u++,(t=(t=e.interval*parseInt(String(Math.random()*Math.pow(2,u))))<e.floor?e.floor:t)>e.ceiling&&(t=e.ceiling),o&&(u--,t=o,o=null),setTimeout(i,t)),null}),(function(t){s()&&r(t)}))}()}))}},{"../errors":5,"./base64":61,"./properties":74,"./utf8":85,xmlhttprequest:49}],87:[function(t,e,r){(function(e){(function(){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var e=t("../utils/hash"),n=t("../utils/properties");r.check=function(t){for(var n=[],r=0;r<2048;r++){var i=t.getWord(r);if(r!==t.getWordIndex(i))return"0x";n.push(i)}return e.id(n.join("\n")+"\n")};var i=(a.prototype.split=function(t){return t.toLowerCase().split(/ +/g)},a.prototype.join=function(t){return t.join(" ")},a);function a(t){n.defineReadOnly(this,"locale",t)}r.Wordlist=i,r.register=function(t,e){e=e||t.locale}}).call(this)}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/hash":65,"../utils/properties":74}],88:[function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(n,"__esModule",{value:!0});var s,o=t("./utils/bytes"),u=t("./utils/hash"),c=t("./utils/hdnode"),A=t("./utils/json-wallet"),d=t("./utils/keccak256"),p=t("./utils/properties"),f=t("./utils/random-bytes"),l=a(t("./utils/secret-storage")),h=t("./utils/signing-key"),y=t("./utils/transaction"),g=t("./abstract-signer"),m=t("./providers/abstract-provider"),b=a(t("./errors"));function I(t,e){var n=s.call(this)||this;return b.checkNew(n,I),h.SigningKey.isSigningKey(t)?p.defineReadOnly(n,"signingKey",t):p.defineReadOnly(n,"signingKey",new h.SigningKey(t)),p.defineReadOnly(n,"provider",e),n}i(I,s=g.Signer),Object.defineProperty(I.prototype,"address",{get:function(){return this.signingKey.address},enumerable:!0,configurable:!0}),Object.defineProperty(I.prototype,"mnemonic",{get:function(){return this.signingKey.mnemonic},enumerable:!0,configurable:!0}),Object.defineProperty(I.prototype,"path",{get:function(){return this.signingKey.path},enumerable:!0,configurable:!0}),Object.defineProperty(I.prototype,"privateKey",{get:function(){return this.signingKey.privateKey},enumerable:!0,configurable:!0}),I.prototype.connect=function(t){return m.Provider.isProvider(t)||b.throwError("invalid provider",b.INVALID_ARGUMENT,{argument:"provider",value:t}),new I(this.signingKey,t)},I.prototype.getAddress=function(){return Promise.resolve(this.address)},I.prototype.sign=function(t){var e=this;return p.resolveProperties(t).then((function(t){var n=y.serialize(t);return n=e.signingKey.signDigest(d.keccak256(n)),y.serialize(t,n)}))},I.prototype.signMessage=function(t){return Promise.resolve(o.joinSignature(this.signingKey.signDigest(u.hashMessage(t))))},I.prototype.getBalance=function(t){if(!this.provider)throw new Error("missing provider");return this.provider.getBalance(this.address,t)},I.prototype.getTransactionCount=function(t){if(!this.provider)throw new Error("missing provider");return this.provider.getTransactionCount(this.address,t)},I.prototype.sendTransaction=function(t){var e=this;if(!this.provider)throw new Error("missing provider");return null==t.nonce&&((t=p.shallowCopy(t)).nonce=this.getTransactionCount("pending")),y.populateTransaction(t,this.provider,this.address).then((function(t){return e.sign(t).then((function(t){return e.provider.sendTransaction(t)}))}))},I.prototype.encrypt=function(t,e,n){if("function"!=typeof e||n||(n=e,e={}),n&&"function"!=typeof n)throw new Error("invalid callback");return e=e||{},this.mnemonic&&((e=p.shallowCopy(e)).mnemonic=this.mnemonic,e.path=this.path),l.encrypt(this.privateKey,t,e,n)},I.createRandom=function(t){var e=f.randomBytes(16);return(t=t||{}).extraEntropy&&(e=o.arrayify(d.keccak256(o.concat([e,t.extraEntropy])).substring(0,34))),e=c.entropyToMnemonic(e,t.locale),I.fromMnemonic(e,t.path,t.locale)},I.fromEncryptedJson=function(t,e,n){if(A.isCrowdsaleWallet(t))try{n&&n(0);var r=l.decryptCrowdsale(t,e);return n&&n(1),Promise.resolve(new I(r))}catch(t){return Promise.reject(t)}else if(A.isSecretStorageWallet(t))return l.decrypt(t,e,n).then((function(t){return new I(t)}));return Promise.reject("invalid wallet JSON")},I.fromMnemonic=function(t,e,n){return e=e||c.defaultPath,new I(c.fromMnemonic(t,n).derivePath(e))},i=I,n.Wallet=i},{"./abstract-signer":2,"./errors":5,"./providers/abstract-provider":50,"./utils/bytes":64,"./utils/hash":65,"./utils/hdnode":66,"./utils/json-wallet":70,"./utils/keccak256":71,"./utils/properties":74,"./utils/random-bytes":75,"./utils/secret-storage":78,"./utils/signing-key":81,"./utils/transaction":83}],89:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),t=t("../wordlists/lang-en").langEn,n.en=t},{"../wordlists/lang-en":90}],90:[function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0});var a,s=t("../utils/wordlist"),o=null;function u(t){if(null==o&&(o="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==s.check(t)))throw o=null,new Error("BIP39 Wordlist for en (English) FAILED")}function c(){return a.call(this,"en")||this}i=new(i(c,a=s.Wordlist),c.prototype.getWord=function(t){return u(this),o[t]},c.prototype.getWordIndex=function(t){return u(this),o.indexOf(t)},c),n.langEn=i,s.register(i)},{"../utils/wordlist":87}]},{},[7])(7)},"object"==o(e)&&void 0!==t?t.exports=s():(i=[],void 0===(a="function"==typeof(r=s)?r.apply(e,i):r)||(t.exports=a))}).call(this,n(6))},function(t,e,n){var r=n(9);e.ValidatePresence=function(t,e){if(!e)throw Error("".concat(t," not specified"))},e.ValidateLibrary=function(t){if(!t)throw Error("Library ID not specified");if(!t.toString().startsWith("i"))throw Error("Invalid library ID: ".concat(t))},e.ValidateObject=function(t){if(!t)throw Error("Object ID not specified");if(!t.toString().startsWith("i"))throw Error("Invalid object ID: ".concat(t))},e.ValidateVersion=function(t){if(!t)throw Error("Version hash not specified");if(!t.toString().startsWith("h"))throw Error("Invalid version hash: ".concat(t))},e.ValidateWriteToken=function(t){if(!t)throw Error("Write token not specified");if(!t.toString().startsWith("t"))throw Error("Invalid write token: ".concat(t))},e.ValidatePartHash=function(t){if(!t)throw Error("Part hash not specified");if(!t.toString().startsWith("hqp_")&&!t.toString().startsWith("hqpe"))throw Error("Invalid part hash: ".concat(t))},e.ValidateParameters=function(t){var n=t.libraryId,r=t.objectId,i=t.versionHash;i?e.ValidateVersion(i):(e.ValidateLibrary(n),e.ValidateObject(r))},e.ValidateAddress=function(t){if(!t)throw Error("Address not specified");if(!/^(0x)?[0-9a-f]{40}$/i.test(t.toLowerCase()))throw Error("Invalid address: ".concat(t));return r.FormatAddress(t)},e.ValidatePermission=function(t){if(t&&"full-access"!==t&&"no-access"!==t)throw Error("Invalid profile permission: ".concat(t));return t},e.ValidateDate=function(t){if(t){if(isNaN(new Date(t)))throw Error("Invalid date: ".concat(t));return new Date(t).getTime()}}},function(t,e,n){var r=n(1).Buffer,i=n(108).Transform,a=n(35).StringDecoder;function s(t){i.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(0)(s,i),s.prototype.update=function(t,e,n){"string"==typeof t&&(t=r.from(t,e));var i=this._update(t);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(t,e,n){var r;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){r=t}finally{n(r)}},s.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},s.prototype._finalOrDigest=function(t){var e=this.__final()||r.alloc(0);return t&&(e=this._toString(e,t,!0)),e},s.prototype._toString=function(t,e,n){if(this._decoder||(this._decoder=new a(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var r=this._decoder.write(t);return n&&(r+=this._decoder.end()),r},t.exports=s},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){var e=n(t);return null!=t&&("object"==e||"function"==e)}},function(t,e,n){"use strict";var r=n(45),i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=d;var a=Object.create(n(34));a.inherits=n(0);var s=n(109),o=n(60);a.inherits(d,s);for(var u=i(o.prototype),c=0;c<u.length;c++){var A=u[c];d.prototype[A]||(d.prototype[A]=o.prototype[A])}function d(t){if(!(this instanceof d))return new d(t);s.call(this,t),o.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",p)}function p(){this.allowHalfOpen||this._writableState.ended||r.nextTick(f,this)}function f(t){t.end()}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),d.prototype._destroy=function(t,e){this.push(null),this.end(),r.nextTick(e,t)}},function(t,e,n){"use strict";(function(e,r){var i=n(1).Buffer,a=e.crypto||e.msCrypto;a&&a.getRandomValues?t.exports=function(t,e){if(t>4294967295)throw new RangeError("requested too many random bytes");var n=i.allocUnsafe(t);if(t>0)if(t>65536)for(var s=0;s<t;s+=65536)a.getRandomValues(n.slice(s,s+65536));else a.getRandomValues(n);if("function"==typeof e)return r.nextTick((function(){e(null,n)}));return n}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,n(6),n(8))},function(t,e,n){var r=n(167),i=n(168),a=n(80),s=n(169);t.exports=function(t){return r(t)||i(t)||a(t)||s()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var r=n(3),i=n(4),a=n(14),s=n(15),o=n(52),u="undefined"!=typeof fetch?fetch:n(53).default,c=n(31).LogMessage,A=function(){"use strict";function t(e){var n=e.uris,r=e.debug;a(this,t),this.uris=n,this.uriIndex=0,this.debug=r,this.draftURIs={}}var e;return s(t,[{key:"Log",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];c(this,t,e)}},{key:"BaseURI",value:function(){return new o(this.uris[this.uriIndex])}},{key:"RecordWriteToken",value:function(t){this.draftURIs[t]=this.BaseURI()}},{key:"RequestHeaders",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.Accept||(e.Accept="application/json"),"JSON"===t?e["Content-type"]="application/json":"BINARY"===t&&(e["Content-type"]="application/octet-stream"),e}},{key:"Request",value:(e=i(r.mark((function e(n){var i,a,s,o,u,c,A,d,p,f,l,h,y,g,m,b,I,C,v,E,w,B,Q,M;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=n.method,a=n.path,s=n.queryParams,o=void 0===s?{}:s,u=n.body,c=n.bodyType,A=void 0===c?"JSON":c,d=n.headers,p=void 0===d?{}:d,f=n.attempts,l=void 0===f?0:f,h=n.failover,y=void 0===h||h,g=n.forceFailover,m=void 0!==g&&g,b=this.BaseURI(),I=a.replace(/^\//,"").match(/(qlibs\/ilib[a-zA-Z0-9]+|q|qid)\/(tqw_[a-zA-Z0-9]+)/),(C=I?I[2]:void 0)&&(this.draftURIs[C]?b=this.draftURIs[C]:this.draftURIs[C]=b),v=b.path(a).query(o).hash(""),E={method:i,headers:this.RequestHeaders(A,p)},"POST"!==i&&"PUT"!==i&&"DELETE"!==i||(u&&"JSON"===A?E.body=JSON.stringify(u):u&&(E.body=u)),e.prev=8,e.next=11,t.Fetch(v.toString(),E);case 11:w=e.sent,e.next=17;break;case 14:e.prev=14,e.t0=e.catch(8),w={ok:!1,status:500,statusText:"ElvClient Error: "+e.t0.message,url:v.toString(),stack:e.t0.stack};case 17:if(w.ok){e.next=40;break}if(!(!C&&(y&&parseInt(w.status)>=500||m)&&l<this.uris.length)){e.next=24;break}return this.Log("HttpClient failing over from ".concat(this.BaseURI(),": ").concat(l+1," attempts"),!0),this.uriIndex=(this.uriIndex+1)%this.uris.length,e.next=23,this.Request({method:i,path:a,queryParams:o,body:u,bodyType:A,headers:p,attempts:l+1,forceFailover:m});case 23:return e.abrupt("return",e.sent);case 24:if(B=w.headers&&w.headers.get("content-type")||"",Q="",!w.text||!w.json){e.next=37;break}if(!B.includes("application/json")){e.next=33;break}return e.next=30,w.json();case 30:e.t1=e.sent,e.next=36;break;case 33:return e.next=35,w.text();case 35:e.t1=e.sent;case 36:Q=e.t1;case 37:throw M={name:"ElvHttpClientError",status:w.status,statusText:w.statusText,message:w.statusText,url:v.toString(),body:Q,requestParams:E},this.Log(JSON.stringify(M,null,2),!0),M;case 40:return this.Log("".concat(w.status," - ").concat(i," ").concat(v.toString())),e.abrupt("return",w);case 42:case"end":return e.stop()}}),e,this,[[8,14]])}))),function(t){return e.apply(this,arguments)})},{key:"URL",value:function(t){var e=t.path,n=t.queryParams,r=void 0===n?{}:n;return this.BaseURI().path(e).query(r).hash("").toString()}}],[{key:"Fetch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u(t,e)}}]),t}();t.exports=A},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(94),a="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,s=i||a||Function("return this")();t.exports=s},function(t,e,n){"use strict";var r=n(0),i=n(61),a=n(64),s=n(65),o=n(20);function u(t){o.call(this,"digest"),this._hash=t}r(u,o),u.prototype._update=function(t){this._hash.update(t)},u.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new i:"rmd160"===t||"ripemd160"===t?new a:new u(s(t))}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i={};function a(t,e,n){n||(n=Error);var r=function(t){var n,r;function i(n,r,i){return t.call(this,function(t,n,r){return"string"==typeof e?e:e(t,n,r)}(n,r,i))||this}return r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);r.prototype.name=n.name,r.prototype.code=t,i[t]=r}function s(t,e){if(Array.isArray(t)){var n=t.length;return t=t.map((function(t){return String(t)})),n>2?"one of ".concat(e," ").concat(t.slice(0,n-1).join(", "),", or ")+t[n-1]:2===n?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}a("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),a("ERR_INVALID_ARG_TYPE",(function(t,e,n){var i,a,o,u;if("string"==typeof e&&(a="not ",e.substr(!o||o<0?0:+o,a.length)===a)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,n){return(void 0===n||n>t.length)&&(n=t.length),t.substring(n-e.length,n)===e}(t," argument"))u="The ".concat(t," ").concat(i," ").concat(s(e,"type"));else{var c=function(t,e,n){return"number"!=typeof n&&(n=0),!(n+e.length>t.length)&&-1!==t.indexOf(e,n)}(t,".")?"property":"argument";u='The "'.concat(t,'" ').concat(c," ").concat(i," ").concat(s(e,"type"))}return u+=". Received type ".concat(r(n))}),TypeError),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=i},function(t,e,n){"use strict";(function(e){var r=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=c;var i=n(115),a=n(119);n(0)(c,i);for(var s=r(a.prototype),o=0;o<s.length;o++){var u=s[o];c.prototype[u]||(c.prototype[u]=a.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),a.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",A)))}function A(){this._writableState.ended||e.nextTick(d,this)}function d(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,n(8))},function(t,e,n){var r=n(1).Buffer;function i(t,e){this._block=r.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=r.from(t,e));for(var n=this._block,i=this._blockSize,a=t.length,s=this._len,o=0;o<a;){for(var u=s%i,c=Math.min(a-o,i-u),A=0;A<c;A++)n[u+A]=t[o+A];o+=c,(s+=c)%i==0&&this._update(n)}return this._len+=a,this},i.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var a=this._hash();return t?a.toString(t):a},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},function(t,e,n){var r=n(17),i=function(t,e){return"object"===r(e)&&"function"==typeof e[t]?e[t]:null},a=function(t){return"object"===r(t)?JSON.stringify(t):t};t.exports={LogMessage:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t.debug){var r=i("log",t.debugOptions),s=i("error",t.debugOptions),o="(elv-client-js#".concat(t.constructor.name,")"),u="\n".concat(o," ").concat(a(e),"\n");n?s?s(o,e):console.error(u):r?r(o,e):console.log(u)}}}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){return null!=t&&"object"==n(t)}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i,a="object"===("undefined"==typeof Reflect?"undefined":r(Reflect))?Reflect:null,s=a&&"function"==typeof a.apply?a.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};i=a&&"function"==typeof a.ownKeys?a.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!=t};function u(){u.init.call(this)}t.exports=u,t.exports.once=function(t,e){return new Promise((function(n,r){function i(n){t.removeListener(e,a),r(n)}function a(){"function"==typeof t.removeListener&&t.removeListener("error",i),n([].slice.call(arguments))}m(t,e,a,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&m(t,"error",e,n)}(t,i,{once:!0})}))},u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var c=10;function A(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+r(t))}function d(t){return void 0===t._maxListeners?u.defaultMaxListeners:t._maxListeners}function p(t,e,n,r){var i,a,s,o;if(A(n),void 0===(a=t._events)?(a=t._events=Object.create(null),t._eventsCount=0):(void 0!==a.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),a=t._events),s=a[e]),void 0===s)s=a[e]=n,++t._eventsCount;else if("function"==typeof s?s=a[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=d(t))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,o=u,console&&console.warn&&console.warn(o)}return t}function f(){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 l(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function h(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):g(i,i.length)}function y(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function m(t,e,n,i){if("function"==typeof t.on)i.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+r(t));t.addEventListener(e,(function r(a){i.once&&t.removeEventListener(e,r),n(a)}))}}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(t){if("number"!=typeof t||t<0||o(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");c=t}}),u.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},u.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||o(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},u.prototype.getMaxListeners=function(){return d(this)},u.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)s(u,this,e);else{var c=u.length,A=g(u,c);for(n=0;n<c;++n)s(A[n],this,e)}return!0},u.prototype.addListener=function(t,e){return p(this,t,e,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function(t,e){return p(this,t,e,!0)},u.prototype.once=function(t,e){return A(e),this.on(t,l(this,t,e)),this},u.prototype.prependOnceListener=function(t,e){return A(e),this.prependListener(t,l(this,t,e)),this},u.prototype.removeListener=function(t,e){var n,r,i,a,s;if(A(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===e||n[a].listener===e){s=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,s||e)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},u.prototype.listeners=function(t){return h(this,t,!0)},u.prototype.rawListeners=function(t){return h(this,t,!1)},u.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):y.call(t,e)},u.prototype.listenerCount=y,u.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(t,e,n){(function(t){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===r(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"===n(t)},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===r(t)},e.isObject=function(t){return"object"===n(t)&&null!==t},e.isDate=function(t){return"[object Date]"===r(t)},e.isError=function(t){return"[object Error]"===r(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"===n(t)||void 0===t},e.isBuffer=t.isBuffer}).call(this,n(2).Buffer)},function(t,e,n){"use strict";var r=n(1).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=o,e=4;break;case"base64":this.text=A,this.end=d,e=3;break;default:return this.write=p,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function o(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function A(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function d(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function p(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}e.StringDecoder=a,a.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},a.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},a.prototype.text=function(t,e){var n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var i=s(e[r]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if((i=s(e[r]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=s(e[r]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,n){(function(e){t.exports=function(t,n){for(var r=Math.min(t.length,n.length),i=new e(r),a=0;a<r;++a)i[a]=t[a]^n[a];return i}}).call(this,n(2).Buffer)},function(t,e,n){"use strict";var r=n(16),i=n(10);function a(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=a,a.prototype.update=function(t,e){if(t=r.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var n=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-n,t.length),0===this.pending.length&&(this.pending=null),t=r.join32(t,0,t.length-n,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},a.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},a.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,n=e-(t+this.padLength)%e,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(t<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=t>>>24&255,r[i++]=t>>>16&255,r[i++]=t>>>8&255,r[i++]=255&t}else for(r[i++]=255&t,r[i++]=t>>>8&255,r[i++]=t>>>16&255,r[i++]=t>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,a=8;a<this.padLength;a++)r[i++]=0;return r}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(0),a=n(78).Reporter,s=n(76).Buffer;function o(t,e){a.call(this,e),s.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function u(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return u.isEncoderBuffer(t)||(t=new u(t,e)),this.length+=t.length,t}),this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=s.byteLength(t);else{if(!s.isBuffer(t))return e.error("Unsupported type: "+r(t));this.value=t,this.length=t.length}}i(o,a),e.DecoderBuffer=o,o.isDecoderBuffer=function(t){return t instanceof o||"object"===r(t)&&s.isBuffer(t.base)&&"DecoderBuffer"===t.constructor.name&&"number"==typeof t.offset&&"number"==typeof t.length&&"function"==typeof t.save&&"function"==typeof t.restore&&"function"==typeof t.isEmpty&&"function"==typeof t.readUInt8&&"function"==typeof t.skip&&"function"==typeof t.raw},o.prototype.save=function(){return{offset:this.offset,reporter:a.prototype.save.call(this)}},o.prototype.restore=function(t){var e=new o(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,a.prototype.restore.call(this,t.reporter),e},o.prototype.isEmpty=function(){return this.offset===this.length},o.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},o.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");var n=new o(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+t,this.offset+=t,n},o.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.EncoderBuffer=u,u.isEncoderBuffer=function(t){return t instanceof u||"object"===r(t)&&"EncoderBuffer"===t.constructor.name&&"number"==typeof t.length&&"function"==typeof t.join},u.prototype.join=function(t,e){return t||(t=s.alloc(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(n){n.join(t,e),e+=n.length})):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):s.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t}},function(t,e,n){var r=n(202),i=n(203),a=n(204),s=n(205),o=n(206);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=s,u.prototype.set=o,t.exports=u},function(t,e,n){var r=n(41);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(93),i=n(213),a=n(214),s=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?i(t):a(t)}},function(t,e,n){var r=n(54)(Object,"create");t.exports=r},function(t,e,n){var r=n(228);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){"use strict";(function(e){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,n,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var a,s,o=arguments.length;switch(o){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,n)}));case 3:return e.nextTick((function(){t.call(null,n,r)}));case 4:return e.nextTick((function(){t.call(null,n,r,i)}));default:for(a=new Array(o-1),s=0;s<a.length;)a[s++]=arguments[s];return e.nextTick((function(){t.apply(null,a)}))}}}:t.exports=e}).call(this,n(8))},function(t,e,n){var r=n(1).Buffer;function i(t){r.isBuffer(t)||(t=r.from(t));for(var e=t.length/4|0,n=new Array(e),i=0;i<e;i++)n[i]=t.readUInt32BE(4*i);return n}function a(t){for(;0<t.length;t++)t[0]=0}function s(t,e,n,r,i){for(var a,s,o,u,c=n[0],A=n[1],d=n[2],p=n[3],f=t[0]^e[0],l=t[1]^e[1],h=t[2]^e[2],y=t[3]^e[3],g=4,m=1;m<i;m++)a=c[f>>>24]^A[l>>>16&255]^d[h>>>8&255]^p[255&y]^e[g++],s=c[l>>>24]^A[h>>>16&255]^d[y>>>8&255]^p[255&f]^e[g++],o=c[h>>>24]^A[y>>>16&255]^d[f>>>8&255]^p[255&l]^e[g++],u=c[y>>>24]^A[f>>>16&255]^d[l>>>8&255]^p[255&h]^e[g++],f=a,l=s,h=o,y=u;return a=(r[f>>>24]<<24|r[l>>>16&255]<<16|r[h>>>8&255]<<8|r[255&y])^e[g++],s=(r[l>>>24]<<24|r[h>>>16&255]<<16|r[y>>>8&255]<<8|r[255&f])^e[g++],o=(r[h>>>24]<<24|r[y>>>16&255]<<16|r[f>>>8&255]<<8|r[255&l])^e[g++],u=(r[y>>>24]<<24|r[f>>>16&255]<<16|r[l>>>8&255]<<8|r[255&h])^e[g++],[a>>>=0,s>>>=0,o>>>=0,u>>>=0]}var o=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var n=[],r=[],i=[[],[],[],[]],a=[[],[],[],[]],s=0,o=0,u=0;u<256;++u){var c=o^o<<1^o<<2^o<<3^o<<4;c=c>>>8^255&c^99,n[s]=c,r[c]=s;var A=t[s],d=t[A],p=t[d],f=257*t[c]^16843008*c;i[0][s]=f<<24|f>>>8,i[1][s]=f<<16|f>>>16,i[2][s]=f<<8|f>>>24,i[3][s]=f,f=16843009*p^65537*d^257*A^16843008*s,a[0][c]=f<<24|f>>>8,a[1][c]=f<<16|f>>>16,a[2][c]=f<<8|f>>>24,a[3][c]=f,0===s?s=o=1:(s=A^t[t[t[p^A]]],o^=t[t[o]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:a}}();function c(t){this._key=i(t),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var t=this._key,e=t.length,n=e+6,r=4*(n+1),i=[],a=0;a<e;a++)i[a]=t[a];for(a=e;a<r;a++){var s=i[a-1];a%e==0?(s=s<<8|s>>>24,s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s],s^=o[a/e|0]<<24):e>6&&a%e==4&&(s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s]),i[a]=i[a-e]^s}for(var c=[],A=0;A<r;A++){var d=r-A,p=i[d-(A%4?0:4)];c[A]=A<4||d<=4?p:u.INV_SUB_MIX[0][u.SBOX[p>>>24]]^u.INV_SUB_MIX[1][u.SBOX[p>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[p>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&p]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(t){return s(t=i(t),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),n=r.allocUnsafe(16);return n.writeUInt32BE(e[0],0),n.writeUInt32BE(e[1],4),n.writeUInt32BE(e[2],8),n.writeUInt32BE(e[3],12),n},c.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var n=s(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),a=r.allocUnsafe(16);return a.writeUInt32BE(n[0],0),a.writeUInt32BE(n[3],4),a.writeUInt32BE(n[2],8),a.writeUInt32BE(n[1],12),a},c.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key)},t.exports.AES=c},function(t,e,n){var r=n(1).Buffer,i=n(61);t.exports=function(t,e,n,a){if(r.isBuffer(t)||(t=r.from(t,"binary")),e&&(r.isBuffer(e)||(e=r.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=n/8,o=r.alloc(s),u=r.alloc(a||0),c=r.alloc(0);s>0||a>0;){var A=new i;A.update(c),A.update(t),e&&A.update(e),c=A.digest();var d=0;if(s>0){var p=o.length-s;d=Math.min(s,c.length),c.copy(o,p,0,d),s-=d}if(d<c.length&&a>0){var f=u.length-a,l=Math.min(a,c.length-d);c.copy(u,f,d,d+l),a-=l}}return c.fill(0),{key:o,iv:u}}},function(t,e,n){"use strict";var r=n(5),i=n(11),a=i.getNAF,s=i.getJSF,o=i.assert;function u(t,e){this.type=t,this.p=new r(e.p,16),this.red=e.prime?r.red(e.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=e.n&&new r(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.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))}function c(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(t,e){o(t.precomputed);var n=t._getDoubles(),r=a(e,1,this._bitLength),i=(1<<n.step+1)-(n.step%2==0?2:1);i/=3;var s,u,c=[];for(s=0;s<r.length;s+=n.step){u=0;for(var A=s+n.step-1;A>=s;A--)u=(u<<1)+r[A];c.push(u)}for(var d=this.jpoint(null,null,null),p=this.jpoint(null,null,null),f=i;f>0;f--){for(s=0;s<c.length;s++)(u=c[s])===f?p=p.mixedAdd(n.points[s]):u===-f&&(p=p.mixedAdd(n.points[s].neg()));d=d.add(p)}return d.toP()},u.prototype._wnafMul=function(t,e){var n=4,r=t._getNAFPoints(n);n=r.wnd;for(var i=r.points,s=a(e,n,this._bitLength),u=this.jpoint(null,null,null),c=s.length-1;c>=0;c--){for(var A=0;c>=0&&0===s[c];c--)A++;if(c>=0&&A++,u=u.dblp(A),c<0)break;var d=s[c];o(0!==d),u="affine"===t.type?d>0?u.mixedAdd(i[d-1>>1]):u.mixedAdd(i[-d-1>>1].neg()):d>0?u.add(i[d-1>>1]):u.add(i[-d-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,n,r,i){var o,u,c,A=this._wnafT1,d=this._wnafT2,p=this._wnafT3,f=0;for(o=0;o<r;o++){var l=(c=e[o])._getNAFPoints(t);A[o]=l.wnd,d[o]=l.points}for(o=r-1;o>=1;o-=2){var h=o-1,y=o;if(1===A[h]&&1===A[y]){var g=[e[h],null,null,e[y]];0===e[h].y.cmp(e[y].y)?(g[1]=e[h].add(e[y]),g[2]=e[h].toJ().mixedAdd(e[y].neg())):0===e[h].y.cmp(e[y].y.redNeg())?(g[1]=e[h].toJ().mixedAdd(e[y]),g[2]=e[h].add(e[y].neg())):(g[1]=e[h].toJ().mixedAdd(e[y]),g[2]=e[h].toJ().mixedAdd(e[y].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],b=s(n[h],n[y]);for(f=Math.max(b[0].length,f),p[h]=new Array(f),p[y]=new Array(f),u=0;u<f;u++){var I=0|b[0][u],C=0|b[1][u];p[h][u]=m[3*(I+1)+(C+1)],p[y][u]=0,d[h]=g}}else p[h]=a(n[h],A[h],this._bitLength),p[y]=a(n[y],A[y],this._bitLength),f=Math.max(p[h].length,f),f=Math.max(p[y].length,f)}var v=this.jpoint(null,null,null),E=this._wnafT4;for(o=f;o>=0;o--){for(var w=0;o>=0;){var B=!0;for(u=0;u<r;u++)E[u]=0|p[u][o],0!==E[u]&&(B=!1);if(!B)break;w++,o--}if(o>=0&&w++,v=v.dblp(w),o<0)break;for(u=0;u<r;u++){var Q=E[u];0!==Q&&(Q>0?c=d[u][Q-1>>1]:Q<0&&(c=d[u][-Q-1>>1].neg()),v="affine"===c.type?v.mixedAdd(c):v.add(c))}}for(o=0;o<r;o++)d[o]=null;return i?v:v.toP()},u.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(t,e){t=i.toArray(t,e);var n=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*n)return 6===t[0]?o(t[t.length-1]%2==0):7===t[0]&&o(t[t.length-1]%2==1),this.point(t.slice(1,1+n),t.slice(1+n,1+2*n));if((2===t[0]||3===t[0])&&t.length-1===n)return this.pointFromX(t.slice(1,1+n),3===t[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(t){return this.encode(t,!0)},c.prototype._encode=function(t){var e=this.curve.p.byteLength(),n=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",e))},c.prototype.encode=function(t,e){return i.encode(this._encode(e),t)},c.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},c.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},c.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<e;i+=t){for(var a=0;a<t;a++)r=r.dbl();n.push(r)}return{step:t,points:n}},c.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],n=(1<<t)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)e[i]=e[i-1].add(r);return{wnd:t,points:e}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(t){for(var e=this,n=0;n<t;n++)e=e.dbl();return e}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(334),a=n(341),s=n(342),o=n(69),u=n(67),c=n(1).Buffer;function A(t){var e;"object"!==r(t)||c.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=c.from(t));var n,A,d=s(t,e),p=d.tag,f=d.data;switch(p){case"CERTIFICATE":A=i.certificate.decode(f,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(A||(A=i.PublicKey.decode(f,"der")),n=A.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPublicKey.decode(A.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return A.subjectPrivateKey=A.subjectPublicKey,{type:"ec",data:A};case"1.2.840.10040.4.1":return A.algorithm.params.pub_key=i.DSAparam.decode(A.subjectPublicKey.data,"der"),{type:"dsa",data:A.algorithm.params};default:throw new Error("unknown key id "+n)}case"ENCRYPTED PRIVATE KEY":f=function(t,e){var n=t.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),i=a[t.algorithm.decrypt.cipher.algo.join(".")],s=t.algorithm.decrypt.cipher.iv,A=t.subjectPrivateKey,d=parseInt(i.split("-")[1],10)/8,p=u.pbkdf2Sync(e,n,r,d,"sha1"),f=o.createDecipheriv(i,p,s),l=[];return l.push(f.update(A)),l.push(f.final()),c.concat(l)}(f=i.EncryptedPrivateKey.decode(f,"der"),e);case"PRIVATE KEY":switch(n=(A=i.PrivateKey.decode(f,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPrivateKey.decode(A.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:A.algorithm.curve,privateKey:i.ECPrivateKey.decode(A.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return A.algorithm.params.priv_key=i.DSAparam.decode(A.subjectPrivateKey,"der"),{type:"dsa",params:A.algorithm.params};default:throw new Error("unknown key id "+n)}case"RSA PUBLIC KEY":return i.RSAPublicKey.decode(f,"der");case"RSA PRIVATE KEY":return i.RSAPrivateKey.decode(f,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:i.DSAPrivateKey.decode(f,"der")};case"EC PRIVATE KEY":return{curve:(f=i.ECPrivateKey.decode(f,"der")).parameters.value,privateKey:f.privateKey};default:throw new Error("unknown key type "+p)}}t.exports=A,A.signature=i.signature},function(t,e,n){var r=n(162),i=n(163),a=n(80),s=n(164);t.exports=function(t,e){return r(t)||i(t,e)||a(t,e)||s()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){(function(t){var r,i,a;function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}
|
|
11
|
+
/*!
|
|
12
|
+
* URI.js - Mutating URLs
|
|
13
|
+
*
|
|
14
|
+
* Version: 1.19.11
|
|
15
|
+
*
|
|
16
|
+
* Author: Rodney Rehm
|
|
17
|
+
* Web: http://medialize.github.io/URI.js/
|
|
18
|
+
*
|
|
19
|
+
* Licensed under
|
|
20
|
+
* MIT License http://www.opensource.org/licenses/mit-license
|
|
21
|
+
*
|
|
22
|
+
*/!function(o,u){"use strict";"object"===s(t)&&t.exports?t.exports=u(n(84),n(86),n(87)):(i=[n(84),n(86),n(87)],void 0===(a="function"==typeof(r=u)?r.apply(e,i):r)||(t.exports=a))}(0,(function(t,e,n,r){"use strict";var i=r&&r.URI;function a(t,e){var n=arguments.length>=1,r=arguments.length>=2;if(!(this instanceof a))return n?r?new a(t,e):new a(t):new a;if(void 0===t){if(n)throw new TypeError("undefined is not a valid argument for URI");t="undefined"!=typeof location?location.href+"":""}if(null===t&&n)throw new TypeError("null is not a valid argument for URI");return this.href(t),void 0!==e?this.absoluteTo(e):this}a.version="1.19.11";var o=a.prototype,u=Object.prototype.hasOwnProperty;function c(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function A(t){return void 0===t?"Undefined":String(Object.prototype.toString.call(t)).slice(8,-1)}function d(t){return"Array"===A(t)}function p(t,e){var n,r,i={};if("RegExp"===A(e))i=null;else if(d(e))for(n=0,r=e.length;n<r;n++)i[e[n]]=!0;else i[e]=!0;for(n=0,r=t.length;n<r;n++){(i&&void 0!==i[t[n]]||!i&&e.test(t[n]))&&(t.splice(n,1),r--,n--)}return t}function f(t,e){var n,r;if(d(e)){for(n=0,r=e.length;n<r;n++)if(!f(t,e[n]))return!1;return!0}var i=A(e);for(n=0,r=t.length;n<r;n++)if("RegExp"===i){if("string"==typeof t[n]&&t[n].match(e))return!0}else if(t[n]===e)return!0;return!1}function l(t,e){if(!d(t)||!d(e))return!1;if(t.length!==e.length)return!1;t.sort(),e.sort();for(var n=0,r=t.length;n<r;n++)if(t[n]!==e[n])return!1;return!0}function h(t){return t.replace(/^\/+|\/+$/g,"")}function y(t){return escape(t)}function g(t){return encodeURIComponent(t).replace(/[!'()*]/g,y).replace(/\*/g,"%2A")}a._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:a.preventInvalidHostname,duplicateQueryParameters:a.duplicateQueryParameters,escapeQuerySpace:a.escapeQuerySpace}},a.preventInvalidHostname=!1,a.duplicateQueryParameters=!1,a.escapeQuerySpace=!0,a.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,a.idn_expression=/[^a-z0-9\._-]/i,a.punycode_expression=/(xn--)/i,a.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,a.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,a.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,a.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},a.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,a.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},a.hostProtocols=["http","https"],a.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,a.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},a.getDomAttribute=function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("input"!==e||"image"===t.type)return a.domAttributes[e]}},a.encode=g,a.decode=decodeURIComponent,a.iso8859=function(){a.encode=escape,a.decode=unescape},a.unicode=function(){a.encode=g,a.decode=decodeURIComponent},a.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},a.encodeQuery=function(t,e){var n=a.encode(t+"");return void 0===e&&(e=a.escapeQuerySpace),e?n.replace(/%20/g,"+"):n},a.decodeQuery=function(t,e){t+="",void 0===e&&(e=a.escapeQuerySpace);try{return a.decode(e?t.replace(/\+/g,"%20"):t)}catch(e){return t}};var m,b={encode:"encode",decode:"decode"},I=function(t,e){return function(n){try{return a[e](n+"").replace(a.characters[t][e].expression,(function(n){return a.characters[t][e].map[n]}))}catch(t){return n}}};for(m in b)a[m+"PathSegment"]=I("pathname",b[m]),a[m+"UrnPathSegment"]=I("urnpath",b[m]);var C=function(t,e,n){return function(r){var i;i=n?function(t){return a[e](a[n](t))}:a[e];for(var s=(r+"").split(t),o=0,u=s.length;o<u;o++)s[o]=i(s[o]);return s.join(t)}};function v(t){return function(e,n){return void 0===e?this._parts[t]||"":(this._parts[t]=e||null,this.build(!n),this)}}function E(t,e){return function(n,r){return void 0===n?this._parts[t]||"":(null!==n&&(n+="").charAt(0)===e&&(n=n.substring(1)),this._parts[t]=n,this.build(!r),this)}}a.decodePath=C("/","decodePathSegment"),a.decodeUrnPath=C(":","decodeUrnPathSegment"),a.recodePath=C("/","encodePathSegment","decode"),a.recodeUrnPath=C(":","encodeUrnPathSegment","decode"),a.encodeReserved=I("reserved","encode"),a.parse=function(t,e){var n;return e||(e={preventInvalidHostname:a.preventInvalidHostname}),(n=(t=(t=t.replace(a.leading_whitespace_expression,"")).replace(a.ascii_tab_whitespace,"")).indexOf("#"))>-1&&(e.fragment=t.substring(n+1)||null,t=t.substring(0,n)),(n=t.indexOf("?"))>-1&&(e.query=t.substring(n+1)||null,t=t.substring(0,n)),"//"===(t=(t=t.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(e.protocol=null,t=t.substring(2),t=a.parseAuthority(t,e)):(n=t.indexOf(":"))>-1&&(e.protocol=t.substring(0,n)||null,e.protocol&&!e.protocol.match(a.protocol_expression)?e.protocol=void 0:"//"===t.substring(n+1,n+3).replace(/\\/g,"/")?(t=t.substring(n+3),t=a.parseAuthority(t,e)):(t=t.substring(n+1),e.urn=!0)),e.path=t,e},a.parseHost=function(t,e){t||(t="");var n,r,i=(t=t.replace(/\\/g,"/")).indexOf("/");if(-1===i&&(i=t.length),"["===t.charAt(0))n=t.indexOf("]"),e.hostname=t.substring(1,n)||null,e.port=t.substring(n+2,i)||null,"/"===e.port&&(e.port=null);else{var s=t.indexOf(":"),o=t.indexOf("/"),u=t.indexOf(":",s+1);-1!==u&&(-1===o||u<o)?(e.hostname=t.substring(0,i)||null,e.port=null):(r=t.substring(0,i).split(":"),e.hostname=r[0]||null,e.port=r[1]||null)}return e.hostname&&"/"!==t.substring(i).charAt(0)&&(i++,t="/"+t),e.preventInvalidHostname&&a.ensureValidHostname(e.hostname,e.protocol),e.port&&a.ensureValidPort(e.port),t.substring(i)||"/"},a.parseAuthority=function(t,e){return t=a.parseUserinfo(t,e),a.parseHost(t,e)},a.parseUserinfo=function(t,e){var n=t;-1!==t.indexOf("\\")&&(t=t.replace(/\\/g,"/"));var r,i=t.indexOf("/"),s=t.lastIndexOf("@",i>-1?i:t.length-1);return s>-1&&(-1===i||s<i)?(r=t.substring(0,s).split(":"),e.username=r[0]?a.decode(r[0]):null,r.shift(),e.password=r[0]?a.decode(r.join(":")):null,t=n.substring(s+1)):(e.username=null,e.password=null),t},a.parseQuery=function(t,e){if(!t)return{};if(!(t=t.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var n,r,i,s={},o=t.split("&"),c=o.length,A=0;A<c;A++)n=o[A].split("="),r=a.decodeQuery(n.shift(),e),i=n.length?a.decodeQuery(n.join("="),e):null,"__proto__"!==r&&(u.call(s,r)?("string"!=typeof s[r]&&null!==s[r]||(s[r]=[s[r]]),s[r].push(i)):s[r]=i);return s},a.build=function(t){var e="",n=!1;return t.protocol&&(e+=t.protocol+":"),t.urn||!e&&!t.hostname||(e+="//",n=!0),e+=a.buildAuthority(t)||"","string"==typeof t.path&&("/"!==t.path.charAt(0)&&n&&(e+="/"),e+=t.path),"string"==typeof t.query&&t.query&&(e+="?"+t.query),"string"==typeof t.fragment&&t.fragment&&(e+="#"+t.fragment),e},a.buildHost=function(t){var e="";return t.hostname?(a.ip6_expression.test(t.hostname)?e+="["+t.hostname+"]":e+=t.hostname,t.port&&(e+=":"+t.port),e):""},a.buildAuthority=function(t){return a.buildUserinfo(t)+a.buildHost(t)},a.buildUserinfo=function(t){var e="";return t.username&&(e+=a.encode(t.username)),t.password&&(e+=":"+a.encode(t.password)),e&&(e+="@"),e},a.buildQuery=function(t,e,n){var r,i,s,o,c="";for(i in t)if("__proto__"!==i&&u.call(t,i))if(d(t[i]))for(r={},s=0,o=t[i].length;s<o;s++)void 0!==t[i][s]&&void 0===r[t[i][s]+""]&&(c+="&"+a.buildQueryParameter(i,t[i][s],n),!0!==e&&(r[t[i][s]+""]=!0));else void 0!==t[i]&&(c+="&"+a.buildQueryParameter(i,t[i],n));return c.substring(1)},a.buildQueryParameter=function(t,e,n){return a.encodeQuery(t,n)+(null!==e?"="+a.encodeQuery(e,n):"")},a.addQuery=function(t,e,n){if("object"===s(e))for(var r in e)u.call(e,r)&&a.addQuery(t,r,e[r]);else{if("string"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===t[e])return void(t[e]=n);"string"==typeof t[e]&&(t[e]=[t[e]]),d(n)||(n=[n]),t[e]=(t[e]||[]).concat(n)}},a.setQuery=function(t,e,n){if("object"===s(e))for(var r in e)u.call(e,r)&&a.setQuery(t,r,e[r]);else{if("string"!=typeof e)throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");t[e]=void 0===n?null:n}},a.removeQuery=function(t,e,n){var r,i,o;if(d(e))for(r=0,i=e.length;r<i;r++)t[e[r]]=void 0;else if("RegExp"===A(e))for(o in t)e.test(o)&&(t[o]=void 0);else if("object"===s(e))for(o in e)u.call(e,o)&&a.removeQuery(t,o,e[o]);else{if("string"!=typeof e)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==n?"RegExp"===A(n)?!d(t[e])&&n.test(t[e])?t[e]=void 0:t[e]=p(t[e],n):t[e]!==String(n)||d(n)&&1!==n.length?d(t[e])&&(t[e]=p(t[e],n)):t[e]=void 0:t[e]=void 0}},a.hasQuery=function(t,e,n,r){switch(A(e)){case"String":break;case"RegExp":for(var i in t)if(u.call(t,i)&&e.test(i)&&(void 0===n||a.hasQuery(t,i,n)))return!0;return!1;case"Object":for(var s in e)if(u.call(e,s)&&!a.hasQuery(t,s,e[s]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(A(n)){case"Undefined":return e in t;case"Boolean":return n===Boolean(d(t[e])?t[e].length:t[e]);case"Function":return!!n(t[e],e,t);case"Array":return!!d(t[e])&&(r?f:l)(t[e],n);case"RegExp":return d(t[e])?!!r&&f(t[e],n):Boolean(t[e]&&t[e].match(n));case"Number":n=String(n);case"String":return d(t[e])?!!r&&f(t[e],n):t[e]===n;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},a.joinPaths=function(){for(var t=[],e=[],n=0,r=0;r<arguments.length;r++){var i=new a(arguments[r]);t.push(i);for(var s=i.segment(),o=0;o<s.length;o++)"string"==typeof s[o]&&e.push(s[o]),s[o]&&n++}if(!e.length||!n)return new a("");var u=new a("").segment(e);return""!==t[0].path()&&"/"!==t[0].path().slice(0,1)||u.path("/"+u.path()),u.normalize()},a.commonPath=function(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n++)if(t.charAt(n)!==e.charAt(n)){n--;break}return n<1?t.charAt(0)===e.charAt(0)&&"/"===t.charAt(0)?"/":"":("/"===t.charAt(n)&&"/"===e.charAt(n)||(n=t.substring(0,n).lastIndexOf("/")),t.substring(0,n+1))},a.withinString=function(t,e,n){n||(n={});var r=n.start||a.findUri.start,i=n.end||a.findUri.end,s=n.trim||a.findUri.trim,o=n.parens||a.findUri.parens,u=/[a-z0-9-]=["']?$/i;for(r.lastIndex=0;;){var c=r.exec(t);if(!c)break;var A=c.index;if(n.ignoreHtml){var d=t.slice(Math.max(A-3,0),A);if(d&&u.test(d))continue}for(var p=A+t.slice(A).search(i),f=t.slice(A,p),l=-1;;){var h=o.exec(f);if(!h)break;var y=h.index+h[0].length;l=Math.max(l,y)}if(!((f=l>-1?f.slice(0,l)+f.slice(l).replace(s,""):f.replace(s,"")).length<=c[0].length||n.ignore&&n.ignore.test(f))){var g=e(f,A,p=A+f.length,t);void 0!==g?(g=String(g),t=t.slice(0,A)+g+t.slice(p),r.lastIndex=A+g.length):r.lastIndex=p}}return r.lastIndex=0,t},a.ensureValidHostname=function(e,n){var r=!!e,i=!1;if(!!n&&(i=f(a.hostProtocols,n)),i&&!r)throw new TypeError("Hostname cannot be empty, if protocol is "+n);if(e&&e.match(a.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(t.toASCII(e).match(a.invalid_hostname_characters))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_]')}},a.ensureValidPort=function(t){if(t){var e=Number(t);if(!(/^[0-9]+$/.test(e)&&e>0&&e<65536))throw new TypeError('Port "'+t+'" is not a valid port')}},a.noConflict=function(t){if(t){var e={URI:this.noConflict()};return r.URITemplate&&"function"==typeof r.URITemplate.noConflict&&(e.URITemplate=r.URITemplate.noConflict()),r.IPv6&&"function"==typeof r.IPv6.noConflict&&(e.IPv6=r.IPv6.noConflict()),r.SecondLevelDomains&&"function"==typeof r.SecondLevelDomains.noConflict&&(e.SecondLevelDomains=r.SecondLevelDomains.noConflict()),e}return r.URI===this&&(r.URI=i),this},o.build=function(t){return!0===t?this._deferred_build=!0:(void 0===t||this._deferred_build)&&(this._string=a.build(this._parts),this._deferred_build=!1),this},o.clone=function(){return new a(this)},o.valueOf=o.toString=function(){return this.build(!1)._string},o.protocol=v("protocol"),o.username=v("username"),o.password=v("password"),o.hostname=v("hostname"),o.port=v("port"),o.query=E("query","?"),o.fragment=E("fragment","#"),o.search=function(t,e){var n=this.query(t,e);return"string"==typeof n&&n.length?"?"+n:n},o.hash=function(t,e){var n=this.fragment(t,e);return"string"==typeof n&&n.length?"#"+n:n},o.pathname=function(t,e){if(void 0===t||!0===t){var n=this._parts.path||(this._parts.hostname?"/":"");return t?(this._parts.urn?a.decodeUrnPath:a.decodePath)(n):n}return this._parts.urn?this._parts.path=t?a.recodeUrnPath(t):"":this._parts.path=t?a.recodePath(t):"/",this.build(!e),this},o.path=o.pathname,o.href=function(t,e){var n;if(void 0===t)return this.toString();this._string="",this._parts=a._parts();var r=t instanceof a,i="object"===s(t)&&(t.hostname||t.path||t.pathname);t.nodeName&&(t=t[a.getDomAttribute(t)]||"",i=!1);if(!r&&i&&void 0!==t.pathname&&(t=t.toString()),"string"==typeof t||t instanceof String)this._parts=a.parse(String(t),this._parts);else{if(!r&&!i)throw new TypeError("invalid input");var o=r?t._parts:t;for(n in o)"query"!==n&&u.call(this._parts,n)&&(this._parts[n]=o[n]);o.query&&this.query(o.query,!1)}return this.build(!e),this},o.is=function(t){var e=!1,r=!1,i=!1,s=!1,o=!1,u=!1,c=!1,A=!this._parts.urn;switch(this._parts.hostname&&(A=!1,r=a.ip4_expression.test(this._parts.hostname),i=a.ip6_expression.test(this._parts.hostname),o=(s=!(e=r||i))&&n&&n.has(this._parts.hostname),u=s&&a.idn_expression.test(this._parts.hostname),c=s&&a.punycode_expression.test(this._parts.hostname)),t.toLowerCase()){case"relative":return A;case"absolute":return!A;case"domain":case"name":return s;case"sld":return o;case"ip":return e;case"ip4":case"ipv4":case"inet4":return r;case"ip6":case"ipv6":case"inet6":return i;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return c}return null};var w=o.protocol,B=o.port,Q=o.hostname;o.protocol=function(t,e){if(t&&!(t=t.replace(/:(\/\/)?$/,"")).match(a.protocol_expression))throw new TypeError('Protocol "'+t+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return w.call(this,t,e)},o.scheme=o.protocol,o.port=function(t,e){return this._parts.urn?void 0===t?"":this:(void 0!==t&&(0===t&&(t=null),t&&(":"===(t+="").charAt(0)&&(t=t.substring(1)),a.ensureValidPort(t))),B.call(this,t,e))},o.hostname=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t){var n={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==a.parseHost(t,n))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');t=n.hostname,this._parts.preventInvalidHostname&&a.ensureValidHostname(t,this._parts.protocol)}return Q.call(this,t,e)},o.origin=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var n=this.protocol();return this.authority()?(n?n+"://":"")+this.authority():""}var r=a(t);return this.protocol(r.protocol()).authority(r.authority()).build(!e),this},o.host=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?a.buildHost(this._parts):"";if("/"!==a.parseHost(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},o.authority=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?a.buildAuthority(this._parts):"";if("/"!==a.parseAuthority(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},o.userinfo=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var n=a.buildUserinfo(this._parts);return n?n.substring(0,n.length-1):n}return"@"!==t[t.length-1]&&(t+="@"),a.parseUserinfo(t,this._parts),this.build(!e),this},o.resource=function(t,e){var n;return void 0===t?this.path()+this.search()+this.hash():(n=a.parse(t),this._parts.path=n.path,this._parts.query=n.query,this._parts.fragment=n.fragment,this.build(!e),this)},o.subdomain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,n)||""}var r=this._parts.hostname.length-this.domain().length,i=this._parts.hostname.substring(0,r),s=new RegExp("^"+c(i));if(t&&"."!==t.charAt(t.length-1)&&(t+="."),-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");return t&&a.ensureValidHostname(t,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(s,t),this.build(!e),this},o.domain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.match(/\./g);if(n&&n.length<2)return this._parts.hostname;var r=this._parts.hostname.length-this.tld(e).length-1;return r=this._parts.hostname.lastIndexOf(".",r-1)+1,this._parts.hostname.substring(r)||""}if(!t)throw new TypeError("cannot set domain empty");if(-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(a.ensureValidHostname(t,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=t;else{var i=new RegExp(c(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(i,t)}return this.build(!e),this},o.tld=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.lastIndexOf("."),i=this._parts.hostname.substring(r+1);return!0!==e&&n&&n.list[i.toLowerCase()]&&n.get(this._parts.hostname)||i}var a;if(!t)throw new TypeError("cannot set TLD empty");if(t.match(/[^a-zA-Z0-9-]/)){if(!n||!n.is(t))throw new TypeError('TLD "'+t+'" contains characters other than [A-Z0-9]');a=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(a,t)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");a=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(a,t)}return this.build(!e),this},o.directory=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var n=this._parts.path.length-this.filename().length-1,r=this._parts.path.substring(0,n)||(this._parts.hostname?"/":"");return t?a.decodePath(r):r}var i=this._parts.path.length-this.filename().length,s=this._parts.path.substring(0,i),o=new RegExp("^"+c(s));return this.is("relative")||(t||(t="/"),"/"!==t.charAt(0)&&(t="/"+t)),t&&"/"!==t.charAt(t.length-1)&&(t+="/"),t=a.recodePath(t),this._parts.path=this._parts.path.replace(o,t),this.build(!e),this},o.filename=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("string"!=typeof t){if(!this._parts.path||"/"===this._parts.path)return"";var n=this._parts.path.lastIndexOf("/"),r=this._parts.path.substring(n+1);return t?a.decodePathSegment(r):r}var i=!1;"/"===t.charAt(0)&&(t=t.substring(1)),t.match(/\.?\//)&&(i=!0);var s=new RegExp(c(this.filename())+"$");return t=a.recodePath(t),this._parts.path=this._parts.path.replace(s,t),i?this.normalizePath(e):this.build(!e),this},o.suffix=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path||"/"===this._parts.path)return"";var n,r,i=this.filename(),s=i.lastIndexOf(".");return-1===s?"":(n=i.substring(s+1),r=/^[a-z0-9%]+$/i.test(n)?n:"",t?a.decodePathSegment(r):r)}"."===t.charAt(0)&&(t=t.substring(1));var o,u=this.suffix();if(u)o=t?new RegExp(c(u)+"$"):new RegExp(c("."+u)+"$");else{if(!t)return this;this._parts.path+="."+a.recodePath(t)}return o&&(t=a.recodePath(t),this._parts.path=this._parts.path.replace(o,t)),this.build(!e),this},o.segment=function(t,e,n){var r=this._parts.urn?":":"/",i=this.path(),a="/"===i.substring(0,1),s=i.split(r);if(void 0!==t&&"number"!=typeof t&&(n=e,e=t,t=void 0),void 0!==t&&"number"!=typeof t)throw new Error('Bad segment "'+t+'", must be 0-based integer');if(a&&s.shift(),t<0&&(t=Math.max(s.length+t,0)),void 0===e)return void 0===t?s:s[t];if(null===t||void 0===s[t])if(d(e)){s=[];for(var o=0,u=e.length;o<u;o++)(e[o].length||s.length&&s[s.length-1].length)&&(s.length&&!s[s.length-1].length&&s.pop(),s.push(h(e[o])))}else(e||"string"==typeof e)&&(e=h(e),""===s[s.length-1]?s[s.length-1]=e:s.push(e));else e?s[t]=h(e):s.splice(t,1);return a&&s.unshift(""),this.path(s.join(r),n)},o.segmentCoded=function(t,e,n){var r,i,s;if("number"!=typeof t&&(n=e,e=t,t=void 0),void 0===e){if(d(r=this.segment(t,e,n)))for(i=0,s=r.length;i<s;i++)r[i]=a.decode(r[i]);else r=void 0!==r?a.decode(r):void 0;return r}if(d(e))for(i=0,s=e.length;i<s;i++)e[i]=a.encode(e[i]);else e="string"==typeof e||e instanceof String?a.encode(e):e;return this.segment(t,e,n)};var M=o.query;return o.query=function(t,e){if(!0===t)return a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof t){var n=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace),r=t.call(this,n);return this._parts.query=a.buildQuery(r||n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this}return void 0!==t&&"string"!=typeof t?(this._parts.query=a.buildQuery(t,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this):M.call(this,t,e)},o.setQuery=function(t,e,n){var r=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof t||t instanceof String)r[t]=void 0!==e?e:null;else{if("object"!==s(t))throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var i in t)u.call(t,i)&&(r[i]=t[i])}return this._parts.query=a.buildQuery(r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(n=e),this.build(!n),this},o.addQuery=function(t,e,n){var r=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.addQuery(r,t,void 0===e?null:e),this._parts.query=a.buildQuery(r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(n=e),this.build(!n),this},o.removeQuery=function(t,e,n){var r=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.removeQuery(r,t,e),this._parts.query=a.buildQuery(r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(n=e),this.build(!n),this},o.hasQuery=function(t,e,n){var r=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.hasQuery(r,t,e,n)},o.setSearch=o.setQuery,o.addSearch=o.addQuery,o.removeSearch=o.removeQuery,o.hasSearch=o.hasQuery,o.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},o.normalizeProtocol=function(t){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!t)),this},o.normalizeHostname=function(n){return this._parts.hostname&&(this.is("IDN")&&t?this._parts.hostname=t.toASCII(this._parts.hostname):this.is("IPv6")&&e&&(this._parts.hostname=e.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!n)),this},o.normalizePort=function(t){return"string"==typeof this._parts.protocol&&this._parts.port===a.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!t)),this},o.normalizePath=function(t){var e,n=this._parts.path;if(!n)return this;if(this._parts.urn)return this._parts.path=a.recodeUrnPath(this._parts.path),this.build(!t),this;if("/"===this._parts.path)return this;var r,i,s="";for("/"!==(n=a.recodePath(n)).charAt(0)&&(e=!0,n="/"+n),"/.."!==n.slice(-3)&&"/."!==n.slice(-2)||(n+="/"),n=n.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),e&&(s=n.substring(1).match(/^(\.\.\/)+/)||"")&&(s=s[0]);-1!==(r=n.search(/\/\.\.(\/|$)/));)0!==r?(-1===(i=n.substring(0,r).lastIndexOf("/"))&&(i=r),n=n.substring(0,i)+n.substring(r+3)):n=n.substring(3);return e&&this.is("relative")&&(n=s+n.substring(1)),this._parts.path=n,this.build(!t),this},o.normalizePathname=o.normalizePath,o.normalizeQuery=function(t){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(a.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!t)),this},o.normalizeFragment=function(t){return this._parts.fragment||(this._parts.fragment=null,this.build(!t)),this},o.normalizeSearch=o.normalizeQuery,o.normalizeHash=o.normalizeFragment,o.iso8859=function(){var t=a.encode,e=a.decode;a.encode=escape,a.decode=decodeURIComponent;try{this.normalize()}finally{a.encode=t,a.decode=e}return this},o.unicode=function(){var t=a.encode,e=a.decode;a.encode=g,a.decode=unescape;try{this.normalize()}finally{a.encode=t,a.decode=e}return this},o.readable=function(){var e=this.clone();e.username("").password("").normalize();var n="";if(e._parts.protocol&&(n+=e._parts.protocol+"://"),e._parts.hostname&&(e.is("punycode")&&t?(n+=t.toUnicode(e._parts.hostname),e._parts.port&&(n+=":"+e._parts.port)):n+=e.host()),e._parts.hostname&&e._parts.path&&"/"!==e._parts.path.charAt(0)&&(n+="/"),n+=e.path(!0),e._parts.query){for(var r="",i=0,s=e._parts.query.split("&"),o=s.length;i<o;i++){var u=(s[i]||"").split("=");r+="&"+a.decodeQuery(u[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==u[1]&&(r+="="+a.decodeQuery(u[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}n+="?"+r.substring(1)}return n+=a.decodeQuery(e.hash(),!0)},o.absoluteTo=function(t){var e,n,r,i=this.clone(),s=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t instanceof a||(t=new a(t)),i._parts.protocol)return i;if(i._parts.protocol=t._parts.protocol,this._parts.hostname)return i;for(n=0;r=s[n];n++)i._parts[r]=t._parts[r];return i._parts.path?(".."===i._parts.path.substring(-2)&&(i._parts.path+="/"),"/"!==i.path().charAt(0)&&(e=(e=t.directory())||(0===t.path().indexOf("/")?"/":""),i._parts.path=(e?e+"/":"")+i._parts.path,i.normalizePath())):(i._parts.path=t._parts.path,i._parts.query||(i._parts.query=t._parts.query)),i.build(),i},o.relativeTo=function(t){var e,n,r,i,s,o=this.clone().normalize();if(o._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t=new a(t).normalize(),e=o._parts,n=t._parts,i=o.path(),s=t.path(),"/"!==i.charAt(0))throw new Error("URI is already relative");if("/"!==s.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(e.protocol===n.protocol&&(e.protocol=null),e.username!==n.username||e.password!==n.password)return o.build();if(null!==e.protocol||null!==e.username||null!==e.password)return o.build();if(e.hostname!==n.hostname||e.port!==n.port)return o.build();if(e.hostname=null,e.port=null,i===s)return e.path="",o.build();if(!(r=a.commonPath(i,s)))return o.build();var u=n.path.substring(r.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return e.path=u+e.path.substring(r.length)||"./",o.build()},o.equals=function(t){var e,n,r,i,s,o=this.clone(),c=new a(t),A={};if(o.normalize(),c.normalize(),o.toString()===c.toString())return!0;if(r=o.query(),i=c.query(),o.query(""),c.query(""),o.toString()!==c.toString())return!1;if(r.length!==i.length)return!1;for(s in e=a.parseQuery(r,this._parts.escapeQuerySpace),n=a.parseQuery(i,this._parts.escapeQuerySpace),e)if(u.call(e,s)){if(d(e[s])){if(!l(e[s],n[s]))return!1}else if(e[s]!==n[s])return!1;A[s]=!0}for(s in n)if(u.call(n,s)&&!A[s])return!1;return!0},o.preventInvalidHostname=function(t){return this._parts.preventInvalidHostname=!!t,this},o.duplicateQueryParameters=function(t){return this._parts.duplicateQueryParameters=!!t,this},o.escapeQuerySpace=function(t){return this._parts.escapeQuerySpace=!!t,this},a}))}).call(this,n(13)(t))},function(t,e,n){"use strict";var r=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r)return r;throw new Error("unable to locate global object")}();t.exports=e=r.fetch,r.fetch&&(e.default=r.fetch.bind(r)),e.Headers=r.Headers,e.Request=r.Request,e.Response=r.Response},function(t,e,n){var r=n(212),i=n(218);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(42),i=n(21);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=n(96);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e,n){var r=n(55),i=n(101);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e,n){(e=t.exports=n(109)).Stream=e,e.Readable=e,e.Writable=n(60),e.Duplex=n(22),e.Transform=n(113),e.PassThrough=n(278)},function(t,e,n){var r=n(2),i=r.Buffer;function a(t,e){for(var n in t)e[n]=t[n]}function s(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(a(r,e),e.Buffer=s),a(i,s),s.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},s.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e,n){"use strict";(function(e,r,i){var a=n(45);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;t.entry=null;for(;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=m;var o,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?r:a.nextTick;m.WritableState=g;var c=Object.create(n(34));c.inherits=n(0);var A={deprecate:n(112)},d=n(110),p=n(59).Buffer,f=i.Uint8Array||function(){};var l,h=n(111);function y(){}function g(t,e){o=o||n(22),t=t||{};var r=e instanceof o;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,A=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(c||0===c)?c:A,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===t.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,i){--e.pendingcb,n?(a.nextTick(i,r),a.nextTick(w,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(i(r),t._writableState.errorEmitted=!0,t.emit("error",r),w(t,e))}(t,n,r,e,i);else{var s=v(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||C(t,n),r?u(I,t,n,s,i):I(t,n,s,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function m(t){if(o=o||n(22),!(l.call(m,this)||this instanceof o))return new m(t);this._writableState=new g(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),d.call(this)}function b(t,e,n,r,i,a,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,a,e.onwrite),e.sync=!1}function I(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),w(t,e)}function C(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),a=e.corkedRequestsFree;a.entry=n;for(var o=0,u=!0;n;)i[o]=n,n.isBuf||(u=!1),n=n.next,o+=1;i.allBuffers=u,b(t,e,!0,e.length,i,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,A=n.encoding,d=n.callback;if(b(t,e,!1,e.objectMode?1:c.length,c,A,d),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function v(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function E(t,e){t._final((function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),w(t,e)}))}function w(t,e){var n=v(e);return n&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,a.nextTick(E,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}c.inherits(m,d),g.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(g.prototype,"buffer",{get:A.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(m,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===m&&(t&&t._writableState instanceof g)}})):l=function(t){return t instanceof this},m.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},m.prototype.write=function(t,e,n){var r,i=this._writableState,s=!1,o=!i.objectMode&&(r=t,p.isBuffer(r)||r instanceof f);return o&&!p.isBuffer(t)&&(t=function(t){return p.from(t)}(t)),"function"==typeof e&&(n=e,e=null),o?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof n&&(n=y),i.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),a.nextTick(e,n)}(this,n):(o||function(t,e,n,r){var i=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),a.nextTick(r,s),i=!1),i}(this,i,t,n))&&(i.pendingcb++,s=function(t,e,n,r,i,a){if(!n){var s=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=p.from(e,n));return e}(e,r,i);r!==s&&(n=!0,i="buffer",r=s)}var o=e.objectMode?1:r.length;e.length+=o;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:a,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else b(t,e,!1,o,r,i,a);return u}(this,i,o,t,e,n)),s},m.prototype.cork=function(){this._writableState.corked++},m.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||C(this,t))},m.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),m.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},m.prototype._writev=null,m.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,n){e.ending=!0,w(t,e),n&&(e.finished?a.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,r,n)},Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),m.prototype.destroy=h.destroy,m.prototype._undestroy=h.undestroy,m.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,n(8),n(276).setImmediate,n(6))},function(t,e,n){"use strict";var r=n(0),i=n(114),a=n(1).Buffer,s=new Array(16);function o(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(t,e){return t<<e|t>>>32-e}function c(t,e,n,r,i,a,s){return u(t+(e&n|~e&r)+i+a|0,s)+e|0}function A(t,e,n,r,i,a,s){return u(t+(e&r|n&~r)+i+a|0,s)+e|0}function d(t,e,n,r,i,a,s){return u(t+(e^n^r)+i+a|0,s)+e|0}function p(t,e,n,r,i,a,s){return u(t+(n^(e|~r))+i+a|0,s)+e|0}r(o,i),o.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var n=this._a,r=this._b,i=this._c,a=this._d;n=c(n,r,i,a,t[0],3614090360,7),a=c(a,n,r,i,t[1],3905402710,12),i=c(i,a,n,r,t[2],606105819,17),r=c(r,i,a,n,t[3],3250441966,22),n=c(n,r,i,a,t[4],4118548399,7),a=c(a,n,r,i,t[5],1200080426,12),i=c(i,a,n,r,t[6],2821735955,17),r=c(r,i,a,n,t[7],4249261313,22),n=c(n,r,i,a,t[8],1770035416,7),a=c(a,n,r,i,t[9],2336552879,12),i=c(i,a,n,r,t[10],4294925233,17),r=c(r,i,a,n,t[11],2304563134,22),n=c(n,r,i,a,t[12],1804603682,7),a=c(a,n,r,i,t[13],4254626195,12),i=c(i,a,n,r,t[14],2792965006,17),n=A(n,r=c(r,i,a,n,t[15],1236535329,22),i,a,t[1],4129170786,5),a=A(a,n,r,i,t[6],3225465664,9),i=A(i,a,n,r,t[11],643717713,14),r=A(r,i,a,n,t[0],3921069994,20),n=A(n,r,i,a,t[5],3593408605,5),a=A(a,n,r,i,t[10],38016083,9),i=A(i,a,n,r,t[15],3634488961,14),r=A(r,i,a,n,t[4],3889429448,20),n=A(n,r,i,a,t[9],568446438,5),a=A(a,n,r,i,t[14],3275163606,9),i=A(i,a,n,r,t[3],4107603335,14),r=A(r,i,a,n,t[8],1163531501,20),n=A(n,r,i,a,t[13],2850285829,5),a=A(a,n,r,i,t[2],4243563512,9),i=A(i,a,n,r,t[7],1735328473,14),n=d(n,r=A(r,i,a,n,t[12],2368359562,20),i,a,t[5],4294588738,4),a=d(a,n,r,i,t[8],2272392833,11),i=d(i,a,n,r,t[11],1839030562,16),r=d(r,i,a,n,t[14],4259657740,23),n=d(n,r,i,a,t[1],2763975236,4),a=d(a,n,r,i,t[4],1272893353,11),i=d(i,a,n,r,t[7],4139469664,16),r=d(r,i,a,n,t[10],3200236656,23),n=d(n,r,i,a,t[13],681279174,4),a=d(a,n,r,i,t[0],3936430074,11),i=d(i,a,n,r,t[3],3572445317,16),r=d(r,i,a,n,t[6],76029189,23),n=d(n,r,i,a,t[9],3654602809,4),a=d(a,n,r,i,t[12],3873151461,11),i=d(i,a,n,r,t[15],530742520,16),n=p(n,r=d(r,i,a,n,t[2],3299628645,23),i,a,t[0],4096336452,6),a=p(a,n,r,i,t[7],1126891415,10),i=p(i,a,n,r,t[14],2878612391,15),r=p(r,i,a,n,t[5],4237533241,21),n=p(n,r,i,a,t[12],1700485571,6),a=p(a,n,r,i,t[3],2399980690,10),i=p(i,a,n,r,t[10],4293915773,15),r=p(r,i,a,n,t[1],2240044497,21),n=p(n,r,i,a,t[8],1873313359,6),a=p(a,n,r,i,t[15],4264355552,10),i=p(i,a,n,r,t[6],2734768916,15),r=p(r,i,a,n,t[13],1309151649,21),n=p(n,r,i,a,t[4],4149444226,6),a=p(a,n,r,i,t[11],3174756917,10),i=p(i,a,n,r,t[2],718787259,15),r=p(r,i,a,n,t[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|0,this._c=this._c+i|0,this._d=this._d+a|0},o.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=a.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=o},function(t,e,n){(e=t.exports=n(115)).Stream=e,e.Readable=e,e.Writable=n(119),e.Duplex=n(29),e.Transform=n(120),e.PassThrough=n(289),e.finished=n(63),e.pipeline=n(290)},function(t,e,n){"use strict";var r=n(28).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,n,a){if("function"==typeof n)return t(e,null,n);n||(n={}),a=function(t){var e=!1;return function(){if(!e){e=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t.apply(this,r)}}}(a||i);var s=n.readable||!1!==n.readable&&e.readable,o=n.writable||!1!==n.writable&&e.writable,u=function(){e.writable||A()},c=e._writableState&&e._writableState.finished,A=function(){o=!1,c=!0,s||a.call(e)},d=e._readableState&&e._readableState.endEmitted,p=function(){s=!1,d=!0,o||a.call(e)},f=function(t){a.call(e,t)},l=function(){var t;return s&&!d?(e._readableState&&e._readableState.ended||(t=new r),a.call(e,t)):o&&!c?(e._writableState&&e._writableState.ended||(t=new r),a.call(e,t)):void 0},h=function(){e.req.on("finish",A)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?o&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",A),e.on("abort",l),e.req?h():e.on("request",h)),e.on("end",p),e.on("finish",A),!1!==n.error&&e.on("error",f),e.on("close",l),function(){e.removeListener("complete",A),e.removeListener("abort",l),e.removeListener("request",h),e.req&&e.req.removeListener("finish",A),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",A),e.removeListener("end",p),e.removeListener("error",f),e.removeListener("close",l)}}},function(t,e,n){"use strict";var r=n(2).Buffer,i=n(0),a=n(114),s=new Array(16),o=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],A=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],d=[0,1518500249,1859775393,2400959708,2840853838],p=[1352829926,1548603684,1836072691,2053994217,0];function f(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function l(t,e){return t<<e|t>>>32-e}function h(t,e,n,r,i,a,s,o){return l(t+(e^n^r)+a+s|0,o)+i|0}function y(t,e,n,r,i,a,s,o){return l(t+(e&n|~e&r)+a+s|0,o)+i|0}function g(t,e,n,r,i,a,s,o){return l(t+((e|~n)^r)+a+s|0,o)+i|0}function m(t,e,n,r,i,a,s,o){return l(t+(e&r|n&~r)+a+s|0,o)+i|0}function b(t,e,n,r,i,a,s,o){return l(t+(e^(n|~r))+a+s|0,o)+i|0}i(f,a),f.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var n=0|this._a,r=0|this._b,i=0|this._c,a=0|this._d,f=0|this._e,I=0|this._a,C=0|this._b,v=0|this._c,E=0|this._d,w=0|this._e,B=0;B<80;B+=1){var Q,M;B<16?(Q=h(n,r,i,a,f,t[o[B]],d[0],c[B]),M=b(I,C,v,E,w,t[u[B]],p[0],A[B])):B<32?(Q=y(n,r,i,a,f,t[o[B]],d[1],c[B]),M=m(I,C,v,E,w,t[u[B]],p[1],A[B])):B<48?(Q=g(n,r,i,a,f,t[o[B]],d[2],c[B]),M=g(I,C,v,E,w,t[u[B]],p[2],A[B])):B<64?(Q=m(n,r,i,a,f,t[o[B]],d[3],c[B]),M=y(I,C,v,E,w,t[u[B]],p[3],A[B])):(Q=b(n,r,i,a,f,t[o[B]],d[4],c[B]),M=h(I,C,v,E,w,t[u[B]],p[4],A[B])),n=f,f=a,a=l(i,10),i=r,r=Q,I=w,w=E,E=l(v,10),v=C,C=M}var k=this._b+i+E|0;this._b=this._c+a+w|0,this._c=this._d+f+I|0,this._d=this._e+n+C|0,this._e=this._a+r+v|0,this._a=k},f.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=r.alloc?r.alloc(20):new r(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=f},function(t,e,n){(e=t.exports=function(t){t=t.toLowerCase();var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n}).sha=n(291),e.sha1=n(292),e.sha224=n(293),e.sha256=n(121),e.sha384=n(294),e.sha512=n(122)},function(t,e,n){"use strict";var r=n(0),i=n(295),a=n(20),s=n(1).Buffer,o=n(123),u=n(64),c=n(65),A=s.alloc(128);function d(t,e){a.call(this,"digest"),"string"==typeof e&&(e=s.from(e));var n="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>n)?e=("rmd160"===t?new u:c(t)).update(e).digest():e.length<n&&(e=s.concat([e,A],n));for(var r=this._ipad=s.allocUnsafe(n),i=this._opad=s.allocUnsafe(n),o=0;o<n;o++)r[o]=54^e[o],i[o]=92^e[o];this._hash="rmd160"===t?new u:c(t),this._hash.update(r)}r(d,a),d.prototype._update=function(t){this._hash.update(t)},d.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new u:c(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new d("rmd160",e):"md5"===t?new i(o,e):new d(t,e)}},function(t,e,n){e.pbkdf2=n(296),e.pbkdf2Sync=n(128)},function(t,e,n){"use strict";var r=n(10);function i(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}t.exports=i,i.prototype._init=function(){},i.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},i.prototype._buffer=function(t,e){for(var n=Math.min(this.buffer.length-this.bufferOff,t.length-e),r=0;r<n;r++)this.buffer[this.bufferOff+r]=t[e+r];return this.bufferOff+=n,n},i.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(t){var e=0,n=0,r=(this.bufferOff+t.length)/this.blockSize|0,i=new Array(r*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(i,n)));for(var a=t.length-(t.length-e)%this.blockSize;e<a;e+=this.blockSize)this._update(t,e,i,n),n+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return i},i.prototype._updateDecrypt=function(t){for(var e=0,n=0,r=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,i=new Array(r*this.blockSize);r>0;r--)e+=this._buffer(t,e),n+=this._flushBuffer(i,n);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,n;return t&&(e=this.update(t)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(n):n},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e<t.length;)t[e++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},i.prototype._unpad=function(t){return t},i.prototype._finalDecrypt=function(){r.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}},function(t,e,n){var r=n(301),i=n(309),a=n(135);e.createCipher=e.Cipher=r.createCipher,e.createCipheriv=e.Cipheriv=r.createCipheriv,e.createDecipher=e.Decipher=i.createDecipher,e.createDecipheriv=e.Decipheriv=i.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(a)}},function(t,e,n){var r={ECB:n(302),CBC:n(303),CFB:n(304),CFB8:n(305),CFB1:n(306),OFB:n(307),CTR:n(133),GCM:n(133)},i=n(135);for(var a in i)i[a].module=r[i[a].mode];t.exports=i},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i;function a(t){this.rand=t}if(t.exports=function(t){return i||(i=new a(null)),i.generate(t)},t.exports.Rand=a,a.prototype.generate=function(t){return this._rand(t)},a.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),n=0;n<e.length;n++)e[n]=this.rand.getByte();return e},"object"===("undefined"==typeof self?"undefined":r(self)))self.crypto&&self.crypto.getRandomValues?a.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?a.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"===("undefined"==typeof window?"undefined":r(window))&&(a.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var s=n(312);if("function"!=typeof s.randomBytes)throw new Error("Not supported");a.prototype._rand=function(t){return s.randomBytes(t)}}catch(t){}},function(t,e,n){(function(e){var r=n(5),i=n(23);function a(t){var e,n=t.modulus.byteLength();do{e=new r(i(n))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function s(t,n){var i=function(t){var e=a(t);return{blinder:e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(n),s=n.modulus.byteLength(),o=new r(t).mul(i.blinder).umod(n.modulus),u=o.toRed(r.mont(n.prime1)),c=o.toRed(r.mont(n.prime2)),A=n.coefficient,d=n.prime1,p=n.prime2,f=u.redPow(n.exponent1).fromRed(),l=c.redPow(n.exponent2).fromRed(),h=f.isub(l).imul(A).umod(d).imul(p);return l.iadd(h).imul(i.unblinder).umod(n.modulus).toArrayLike(e,"be",s)}s.getr=a,t.exports=s}).call(this,n(2).Buffer)},function(t,e,n){"use strict";var r=e;r.version=n(316).version,r.utils=n(11),r.rand=n(71),r.curve=n(143),r.curves=n(74),r.ec=n(327),r.eddsa=n(331)},function(t,e,n){"use strict";var r,i=e,a=n(75),s=n(143),o=n(11).assert;function u(t){"short"===t.type?this.curve=new s.short(t):"edwards"===t.type?this.curve=new s.edwards(t):this.curve=new s.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var n=new u(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:n}),n}})}i.PresetCurve=u,c("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:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("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:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("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:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("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:a.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"]}),c("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:a.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"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),c("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:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=n(326)}catch(t){r=void 0}c("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:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},function(t,e,n){var r=e;r.utils=n(16),r.common=n(37),r.sha=n(320),r.ripemd=n(324),r.hmac=n(325),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(t,e,n){"use strict";(function(e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i,a=n(2),s=a.Buffer,o={};for(i in a)a.hasOwnProperty(i)&&"SlowBuffer"!==i&&"Buffer"!==i&&(o[i]=a[i]);var u=o.Buffer={};for(i in s)s.hasOwnProperty(i)&&"allocUnsafe"!==i&&"allocUnsafeSlow"!==i&&(u[i]=s[i]);if(o.Buffer.prototype=s.prototype,u.from&&u.from!==Uint8Array.from||(u.from=function(t,e,n){if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type '+r(t));if(t&&void 0===t.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+r(t));return s(t,e,n)}),u.alloc||(u.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError('The "size" argument must be of type number. Received type '+r(t));if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var i=s(t);return e&&0!==e.length?"string"==typeof n?i.fill(e,n):i.fill(e):i.fill(0),i}),!o.kStringMaxLength)try{o.kStringMaxLength=e.binding("buffer").kStringMaxLength}catch(t){}o.constants||(o.constants={MAX_LENGTH:o.kMaxLength},o.kStringMaxLength&&(o.constants.MAX_STRING_LENGTH=o.kStringMaxLength)),t.exports=o}).call(this,n(8))},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(78).Reporter,a=n(38).EncoderBuffer,s=n(38).DecoderBuffer,o=n(10),u=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],c=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(u);function A(t,e,n){var r={};this._baseState=r,r.name=n,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}t.exports=A;var d=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];A.prototype.clone=function(){var t=this._baseState,e={};d.forEach((function(n){e[n]=t[n]}));var n=new this.constructor(e.parent);return n._baseState=e,n},A.prototype._wrap=function(){var t=this._baseState;c.forEach((function(e){this[e]=function(){var n=new this.constructor(this);return t.children.push(n),n[e].apply(n,arguments)}}),this)},A.prototype._init=function(t){var e=this._baseState;o(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),o.equal(e.children.length,1,"Root node can have only one child")},A.prototype._useArgs=function(t){var e=this._baseState,n=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==n.length&&(o(null===e.children),e.children=n,n.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(o(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!==r(t)||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach((function(n){n==(0|n)&&(n|=0);var r=t[n];e[r]=n})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){A.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),u.forEach((function(t){A.prototype[t]=function(){var e=this._baseState,n=Array.prototype.slice.call(arguments);return o(null===e.tag),e.tag=t,this._useArgs(n),this}})),A.prototype.use=function(t){o(t);var e=this._baseState;return o(null===e.use),e.use=t,this},A.prototype.optional=function(){return this._baseState.optional=!0,this},A.prototype.def=function(t){var e=this._baseState;return o(null===e.default),e.default=t,e.optional=!0,this},A.prototype.explicit=function(t){var e=this._baseState;return o(null===e.explicit&&null===e.implicit),e.explicit=t,this},A.prototype.implicit=function(t){var e=this._baseState;return o(null===e.explicit&&null===e.implicit),e.implicit=t,this},A.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},A.prototype.key=function(t){var e=this._baseState;return o(null===e.key),e.key=t,this},A.prototype.any=function(){return this._baseState.any=!0,this},A.prototype.choice=function(t){var e=this._baseState;return o(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},A.prototype.contains=function(t){var e=this._baseState;return o(null===e.use),e.contains=t,this},A.prototype._decode=function(t,e){var n=this._baseState;if(null===n.parent)return t.wrapResult(n.children[0]._decode(t,e));var r,i=n.default,a=!0,o=null;if(null!==n.key&&(o=t.enterKey(n.key)),n.optional){var u=null;if(null!==n.explicit?u=n.explicit:null!==n.implicit?u=n.implicit:null!==n.tag&&(u=n.tag),null!==u||n.any){if(a=this._peekTag(t,u,n.any),t.isError(a))return a}else{var c=t.save();try{null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e),a=!0}catch(t){a=!1}t.restore(c)}}if(n.obj&&a&&(r=t.enterObject()),a){if(null!==n.explicit){var A=this._decodeTag(t,n.explicit);if(t.isError(A))return A;t=A}var d=t.offset;if(null===n.use&&null===n.choice){var p;n.any&&(p=t.save());var f=this._decodeTag(t,null!==n.implicit?n.implicit:n.tag,n.any);if(t.isError(f))return f;n.any?i=t.raw(p):t=f}if(e&&e.track&&null!==n.tag&&e.track(t.path(),d,t.length,"tagged"),e&&e.track&&null!==n.tag&&e.track(t.path(),t.offset,t.length,"content"),n.any||(i=null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e)),t.isError(i))return i;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function(n){n._decode(t,e)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){var l=new s(i);i=this._getUse(n.contains,t._reporterState.obj)._decode(l,e)}}return n.obj&&a&&(i=t.leaveObject(r)),null===n.key||null===i&&!0!==a?null!==o&&t.exitKey(o):t.leaveKey(o,n.key,i),i},A.prototype._decodeGeneric=function(t,e,n){var r=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,r.args[0],n):/str$/.test(t)?this._decodeStr(e,t,n):"objid"===t&&r.args?this._decodeObjid(e,r.args[0],r.args[1],n):"objid"===t?this._decodeObjid(e,null,null,n):"gentime"===t||"utctime"===t?this._decodeTime(e,t,n):"null_"===t?this._decodeNull(e,n):"bool"===t?this._decodeBool(e,n):"objDesc"===t?this._decodeStr(e,t,n):"int"===t||"enum"===t?this._decodeInt(e,r.args&&r.args[0],n):null!==r.use?this._getUse(r.use,e._reporterState.obj)._decode(e,n):e.error("unknown tag: "+t)},A.prototype._getUse=function(t,e){var n=this._baseState;return n.useDecoder=this._use(t,e),o(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},A.prototype._decodeChoice=function(t,e){var n=this._baseState,r=null,i=!1;return Object.keys(n.choice).some((function(a){var s=t.save(),o=n.choice[a];try{var u=o._decode(t,e);if(t.isError(u))return!1;r={type:a,value:u},i=!0}catch(e){return t.restore(s),!1}return!0}),this),i?r:t.error("Choice not matched")},A.prototype._createEncoderBuffer=function(t){return new a(t,this.reporter)},A.prototype._encode=function(t,e,n){var r=this._baseState;if(null===r.default||r.default!==t){var i=this._encodeValue(t,e,n);if(void 0!==i&&!this._skipDefault(i,e,n))return i}},A.prototype._encodeValue=function(t,e,n){var a=this._baseState;if(null===a.parent)return a.children[0]._encode(t,e||new i);var s=null;if(this.reporter=e,a.optional&&void 0===t){if(null===a.default)return;t=a.default}var o=null,u=!1;if(a.any)s=this._createEncoderBuffer(t);else if(a.choice)s=this._encodeChoice(t,e);else if(a.contains)o=this._getUse(a.contains,n)._encode(t,e),u=!0;else if(a.children)o=a.children.map((function(n){if("null_"===n._baseState.tag)return n._encode(null,e,t);if(null===n._baseState.key)return e.error("Child should have a key");var i=e.enterKey(n._baseState.key);if("object"!==r(t))return e.error("Child expected, but input is not object");var a=n._encode(t[n._baseState.key],e,t);return e.leaveKey(i),a}),this).filter((function(t){return t})),o=this._createEncoderBuffer(o);else if("seqof"===a.tag||"setof"===a.tag){if(!a.args||1!==a.args.length)return e.error("Too many args for : "+a.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");var c=this.clone();c._baseState.implicit=null,o=this._createEncoderBuffer(t.map((function(n){var r=this._baseState;return this._getUse(r.args[0],t)._encode(n,e)}),c))}else null!==a.use?s=this._getUse(a.use,n)._encode(t,e):(o=this._encodePrimitive(a.tag,t),u=!0);if(!a.any&&null===a.choice){var A=null!==a.implicit?a.implicit:a.tag,d=null===a.implicit?"universal":"context";null===A?null===a.use&&e.error("Tag could be omitted only for .use()"):null===a.use&&(s=this._encodeComposite(A,u,d,o))}return null!==a.explicit&&(s=this._encodeComposite(a.explicit,!1,"context",s)),s},A.prototype._encodeChoice=function(t,e){var n=this._baseState,r=n.choice[t.type];return r||o(!1,t.type+" not found in "+JSON.stringify(Object.keys(n.choice))),r._encode(t.value,e)},A.prototype._encodePrimitive=function(t,e){var n=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&n.args)return this._encodeObjid(e,n.reverseArgs[0],n.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,n.args&&n.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},A.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},A.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)}},function(t,e,n){"use strict";var r=n(0);function i(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function a(t,e){this.path=t,this.rethrow(e)}e.Reporter=i,i.prototype.isError=function(t){return t instanceof a},i.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},i.prototype.enterKey=function(t){return this._reporterState.path.push(t)},i.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},i.prototype.leaveKey=function(t,e,n){var r=this._reporterState;this.exitKey(t),null!==r.obj&&(r.obj[e]=n)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},i.prototype.leaveObject=function(t){var e=this._reporterState,n=e.obj;return e.obj=t,n},i.prototype.error=function(t){var e,n=this._reporterState,r=t instanceof a;if(e=r?t:new a(n.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!n.options.partial)throw e;return r||n.errors.push(e),e},i.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},r(a,Error),a.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,a),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},function(t,e,n){"use strict";function r(t){var e={};return Object.keys(t).forEach((function(n){(0|n)==n&&(n|=0);var r=t[n];e[r]=n})),e}e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=r(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=r(e.tag)},function(t,e,n){var r=n(81);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){"use strict";e.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=c(t),s=r[0],o=r[1],u=new a(function(t,e,n){return 3*(e+n)/4-n}(0,s,o)),A=0,d=o>0?s-4:s;for(n=0;n<d;n+=4)e=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],u[A++]=e>>16&255,u[A++]=e>>8&255,u[A++]=255&e;2===o&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,u[A++]=255&e);1===o&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,u[A++]=e>>8&255,u[A++]=255&e);return u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,a=[],s=0,o=n-i;s<o;s+=16383)a.push(A(t,s,s+16383>o?o:s+16383));1===i?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return a.join("")};for(var r=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,u=s.length;o<u;++o)r[o]=s[o],i[s.charCodeAt(o)]=o;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function A(t,e,n){for(var i,a,s=[],o=e;o<n;o+=3)i=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),s.push(r[(a=i)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){
|
|
23
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
24
|
+
e.read=function(t,e,n,r,i){var a,s,o=8*i-r-1,u=(1<<o)-1,c=u>>1,A=-7,d=n?i-1:0,p=n?-1:1,f=t[e+d];for(d+=p,a=f&(1<<-A)-1,f>>=-A,A+=o;A>0;a=256*a+t[e+d],d+=p,A-=8);for(s=a&(1<<-A)-1,a>>=-A,A+=r;A>0;s=256*s+t[e+d],d+=p,A-=8);if(0===a)a=1-c;else{if(a===u)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,r),a-=c}return(f?-1:1)*s*Math.pow(2,a-r)},e.write=function(t,e,n,r,i,a){var s,o,u,c=8*a-i-1,A=(1<<c)-1,d=A>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,l=r?1:-1,h=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,s=A):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+d>=1?p/u:p*Math.pow(2,1-d))*u>=2&&(s++,u/=2),s+d>=A?(o=0,s=A):s+d>=1?(o=(e*u-1)*Math.pow(2,i),s+=d):(o=e*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;t[n+f]=255&o,f+=l,o/=256,i-=8);for(s=s<<i|o,c+=i;c>0;t[n+f]=255&s,f+=l,s/=256,c-=8);t[n+f-l]|=128*h}},function(t,e,n){(function(t,r){var i;function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}
|
|
25
|
+
/*! https://mths.be/punycode v1.4.0 by @mathias */!function(s){var o="object"==a(e)&&e&&!e.nodeType&&e,u="object"==a(t)&&t&&!t.nodeType&&t,c="object"==(void 0===r?"undefined":a(r))&&r;c.global!==c&&c.window!==c&&c.self!==c||(s=c);var A,d,p=2147483647,f=/^xn--/,l=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=Math.floor,m=String.fromCharCode;function b(t){throw new RangeError(y[t])}function I(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function C(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+I((t=t.replace(h,".")).split("."),e).join(".")}function v(t){for(var e,n,r=[],i=0,a=t.length;i<a;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<a?56320==(64512&(n=t.charCodeAt(i++)))?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),i--):r.push(e);return r}function E(t){return I(t,(function(t){var e="";return t>65535&&(e+=m((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=m(t)})).join("")}function w(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function B(t,e,n){var r=0;for(t=n?g(t/700):t>>1,t+=g(t/e);t>455;r+=36)t=g(t/35);return g(r+36*t/(t+38))}function Q(t){var e,n,r,i,a,s,o,u,c,A,d,f=[],l=t.length,h=0,y=128,m=72;for((n=t.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)t.charCodeAt(r)>=128&&b("not-basic"),f.push(t.charCodeAt(r));for(i=n>0?n+1:0;i<l;){for(a=h,s=1,o=36;i>=l&&b("invalid-input"),((u=(d=t.charCodeAt(i++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:36)>=36||u>g((p-h)/s))&&b("overflow"),h+=u*s,!(u<(c=o<=m?1:o>=m+26?26:o-m));o+=36)s>g(p/(A=36-c))&&b("overflow"),s*=A;m=B(h-a,e=f.length+1,0==a),g(h/e)>p-y&&b("overflow"),y+=g(h/e),h%=e,f.splice(h++,0,y)}return E(f)}function M(t){var e,n,r,i,a,s,o,u,c,A,d,f,l,h,y,I=[];for(f=(t=v(t)).length,e=128,n=0,a=72,s=0;s<f;++s)(d=t[s])<128&&I.push(m(d));for(r=i=I.length,i&&I.push("-");r<f;){for(o=p,s=0;s<f;++s)(d=t[s])>=e&&d<o&&(o=d);for(o-e>g((p-n)/(l=r+1))&&b("overflow"),n+=(o-e)*l,e=o,s=0;s<f;++s)if((d=t[s])<e&&++n>p&&b("overflow"),d==e){for(u=n,c=36;!(u<(A=c<=a?1:c>=a+26?26:c-a));c+=36)y=u-A,h=36-A,I.push(m(w(A+y%h,0))),u=g(y/h);I.push(m(w(u,0))),a=B(n,l,r==i),n=0,++r}++n,++e}return I.join("")}if(A={version:"1.3.2",ucs2:{decode:v,encode:E},decode:Q,encode:M,toASCII:function(t){return C(t,(function(t){return l.test(t)?"xn--"+M(t):t}))},toUnicode:function(t){return C(t,(function(t){return f.test(t)?Q(t.slice(4).toLowerCase()):t}))}},"object"==a(n(85))&&n(85))void 0===(i=function(){return A}.call(e,n,e,t))||(t.exports=i);else if(o&&u)if(t.exports==o)u.exports=A;else for(d in A)A.hasOwnProperty(d)&&(o[d]=A[d]);else s.punycode=A}(this)}).call(this,n(13)(t),n(6))},function(t,e){(function(e){t.exports=e}).call(this,{})},function(t,e,n){(function(t){var r,i;function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}
|
|
26
|
+
/*!
|
|
27
|
+
* URI.js - Mutating URLs
|
|
28
|
+
* IPv6 Support
|
|
29
|
+
*
|
|
30
|
+
* Version: 1.19.11
|
|
31
|
+
*
|
|
32
|
+
* Author: Rodney Rehm
|
|
33
|
+
* Web: http://medialize.github.io/URI.js/
|
|
34
|
+
*
|
|
35
|
+
* Licensed under
|
|
36
|
+
* MIT License http://www.opensource.org/licenses/mit-license
|
|
37
|
+
*
|
|
38
|
+
*/!function(s,o){"use strict";"object"===a(t)&&t.exports?t.exports=o():void 0===(i="function"==typeof(r=o)?r.call(e,n,e,t):r)||(t.exports=i)}(0,(function(t){"use strict";var e=t&&t.IPv6;return{best:function(t){var e,n,r=t.toLowerCase().split(":"),i=r.length,a=8;for(""===r[0]&&""===r[1]&&""===r[2]?(r.shift(),r.shift()):""===r[0]&&""===r[1]?r.shift():""===r[i-1]&&""===r[i-2]&&r.pop(),-1!==r[(i=r.length)-1].indexOf(".")&&(a=7),e=0;e<i&&""!==r[e];e++);if(e<a)for(r.splice(e,1,"0000");r.length<a;)r.splice(e,0,"0000");for(var s=0;s<a;s++){n=r[s].split("");for(var o=0;o<3&&("0"===n[0]&&n.length>1);o++)n.splice(0,1);r[s]=n.join("")}var u=-1,c=0,A=0,d=-1,p=!1;for(s=0;s<a;s++)p?"0"===r[s]?A+=1:(p=!1,A>c&&(u=d,c=A)):"0"===r[s]&&(p=!0,d=s,A=1);A>c&&(u=d,c=A),c>1&&r.splice(u,c,""),i=r.length;var f="";for(""===r[0]&&(f=":"),s=0;s<i&&(f+=r[s],s!==i-1);s++)f+=":";return""===r[i-1]&&(f+=":"),f},noConflict:function(){return t.IPv6===this&&(t.IPv6=e),this}}}))}).call(this,n(13)(t))},function(t,e,n){(function(t){var r,i;function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}
|
|
39
|
+
/*!
|
|
40
|
+
* URI.js - Mutating URLs
|
|
41
|
+
* Second Level Domain (SLD) Support
|
|
42
|
+
*
|
|
43
|
+
* Version: 1.19.11
|
|
44
|
+
*
|
|
45
|
+
* Author: Rodney Rehm
|
|
46
|
+
* Web: http://medialize.github.io/URI.js/
|
|
47
|
+
*
|
|
48
|
+
* Licensed under
|
|
49
|
+
* MIT License http://www.opensource.org/licenses/mit-license
|
|
50
|
+
*
|
|
51
|
+
*/!function(s,o){"use strict";"object"===a(t)&&t.exports?t.exports=o():void 0===(i="function"==typeof(r=o)?r.call(e,n,e,t):r)||(t.exports=i)}(0,(function(t){"use strict";var e=t&&t.SecondLevelDomains,n={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;var r=t.lastIndexOf(".",e-1);if(r<=0||r>=e-1)return!1;var i=n.list[t.slice(e+1)];return!!i&&i.indexOf(" "+t.slice(r+1,e)+" ")>=0},is:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;if(t.lastIndexOf(".",e-1)>=0)return!1;var r=n.list[t.slice(e+1)];return!!r&&r.indexOf(" "+t.slice(0,e)+" ")>=0},get:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return null;var r=t.lastIndexOf(".",e-1);if(r<=0||r>=e-1)return null;var i=n.list[t.slice(e+1)];return i?i.indexOf(" "+t.slice(r+1,e)+" ")<0?null:t.slice(r+1):null},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=e),this}};return n}))}).call(this,n(13)(t))},function(t,e,n){var r=n(171);t.exports=r("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(t,e,n){"use strict";n.r(e),n.d(e,"Deflate",(function(){return Je})),n.d(e,"Inflate",(function(){return Xe})),n.d(e,"constants",(function(){return nn})),n.d(e,"default",(function(){return rn})),n.d(e,"deflate",(function(){return Ve})),n.d(e,"deflateRaw",(function(){return We})),n.d(e,"gzip",(function(){return Ze})),n.d(e,"inflate",(function(){return $e})),n.d(e,"inflateRaw",(function(){return tn})),n.d(e,"ungzip",(function(){return en}));function r(t){let e=t.length;for(;--e>=0;)t[e]=0}const i=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),a=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),s=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),o=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),u=new Array(576);r(u);const c=new Array(60);r(c);const A=new Array(512);r(A);const d=new Array(256);r(d);const p=new Array(29);r(p);const f=new Array(30);function l(t,e,n,r,i){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=t&&t.length}let h,y,g;function m(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}r(f);const b=t=>t<256?A[t]:A[256+(t>>>7)],I=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},C=(t,e,n)=>{t.bi_valid>16-n?(t.bi_buf|=e<<t.bi_valid&65535,I(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=n-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=n)},v=(t,e,n)=>{C(t,n[2*e],n[2*e+1])},E=(t,e)=>{let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1},w=(t,e,n)=>{const r=new Array(16);let i,a,s=0;for(i=1;i<=15;i++)r[i]=s=s+n[i-1]<<1;for(a=0;a<=e;a++){let e=t[2*a+1];0!==e&&(t[2*a]=E(r[e]++,e))}},B=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},Q=t=>{t.bi_valid>8?I(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},M=(t,e,n,r)=>{const i=2*e,a=2*n;return t[i]<t[a]||t[i]===t[a]&&r[e]<=r[n]},k=(t,e,n)=>{const r=t.heap[n];let i=n<<1;for(;i<=t.heap_len&&(i<t.heap_len&&M(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!M(e,r,t.heap[i],t.depth));)t.heap[n]=t.heap[i],n=i,i<<=1;t.heap[n]=r},_=(t,e,n)=>{let r,s,o,u,c=0;if(0!==t.last_lit)do{r=t.pending_buf[t.d_buf+2*c]<<8|t.pending_buf[t.d_buf+2*c+1],s=t.pending_buf[t.l_buf+c],c++,0===r?v(t,s,e):(o=d[s],v(t,o+256+1,e),u=i[o],0!==u&&(s-=p[o],C(t,s,u)),r--,o=b(r),v(t,o,n),u=a[o],0!==u&&(r-=f[o],C(t,r,u)))}while(c<t.last_lit);v(t,256,e)},x=(t,e)=>{const n=e.dyn_tree,r=e.stat_desc.static_tree,i=e.stat_desc.has_stree,a=e.stat_desc.elems;let s,o,u,c=-1;for(t.heap_len=0,t.heap_max=573,s=0;s<a;s++)0!==n[2*s]?(t.heap[++t.heap_len]=c=s,t.depth[s]=0):n[2*s+1]=0;for(;t.heap_len<2;)u=t.heap[++t.heap_len]=c<2?++c:0,n[2*u]=1,t.depth[u]=0,t.opt_len--,i&&(t.static_len-=r[2*u+1]);for(e.max_code=c,s=t.heap_len>>1;s>=1;s--)k(t,n,s);u=a;do{s=t.heap[1],t.heap[1]=t.heap[t.heap_len--],k(t,n,1),o=t.heap[1],t.heap[--t.heap_max]=s,t.heap[--t.heap_max]=o,n[2*u]=n[2*s]+n[2*o],t.depth[u]=(t.depth[s]>=t.depth[o]?t.depth[s]:t.depth[o])+1,n[2*s+1]=n[2*o+1]=u,t.heap[1]=u++,k(t,n,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const n=e.dyn_tree,r=e.max_code,i=e.stat_desc.static_tree,a=e.stat_desc.has_stree,s=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,u=e.stat_desc.max_length;let c,A,d,p,f,l,h=0;for(p=0;p<=15;p++)t.bl_count[p]=0;for(n[2*t.heap[t.heap_max]+1]=0,c=t.heap_max+1;c<573;c++)A=t.heap[c],p=n[2*n[2*A+1]+1]+1,p>u&&(p=u,h++),n[2*A+1]=p,A>r||(t.bl_count[p]++,f=0,A>=o&&(f=s[A-o]),l=n[2*A],t.opt_len+=l*(p+f),a&&(t.static_len+=l*(i[2*A+1]+f)));if(0!==h){do{for(p=u-1;0===t.bl_count[p];)p--;t.bl_count[p]--,t.bl_count[p+1]+=2,t.bl_count[u]--,h-=2}while(h>0);for(p=u;0!==p;p--)for(A=t.bl_count[p];0!==A;)d=t.heap[--c],d>r||(n[2*d+1]!==p&&(t.opt_len+=(p-n[2*d+1])*n[2*d],n[2*d+1]=p),A--)}})(t,e),w(n,c,t.bl_count)},S=(t,e,n)=>{let r,i,a=-1,s=e[1],o=0,u=7,c=4;for(0===s&&(u=138,c=3),e[2*(n+1)+1]=65535,r=0;r<=n;r++)i=s,s=e[2*(r+1)+1],++o<u&&i===s||(o<c?t.bl_tree[2*i]+=o:0!==i?(i!==a&&t.bl_tree[2*i]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,a=i,0===s?(u=138,c=3):i===s?(u=6,c=3):(u=7,c=4))},D=(t,e,n)=>{let r,i,a=-1,s=e[1],o=0,u=7,c=4;for(0===s&&(u=138,c=3),r=0;r<=n;r++)if(i=s,s=e[2*(r+1)+1],!(++o<u&&i===s)){if(o<c)do{v(t,i,t.bl_tree)}while(0!=--o);else 0!==i?(i!==a&&(v(t,i,t.bl_tree),o--),v(t,16,t.bl_tree),C(t,o-3,2)):o<=10?(v(t,17,t.bl_tree),C(t,o-3,3)):(v(t,18,t.bl_tree),C(t,o-11,7));o=0,a=i,0===s?(u=138,c=3):i===s?(u=6,c=3):(u=7,c=4)}};let R=!1;const T=(t,e,n,r)=>{C(t,0+(r?1:0),3),((t,e,n,r)=>{Q(t),r&&(I(t,n),I(t,~n)),t.pending_buf.set(t.window.subarray(e,e+n),t.pending),t.pending+=n})(t,e,n,!0)};var N={_tr_init:t=>{R||((()=>{let t,e,n,r,o;const m=new Array(16);for(n=0,r=0;r<28;r++)for(p[r]=n,t=0;t<1<<i[r];t++)d[n++]=r;for(d[n-1]=r,o=0,r=0;r<16;r++)for(f[r]=o,t=0;t<1<<a[r];t++)A[o++]=r;for(o>>=7;r<30;r++)for(f[r]=o<<7,t=0;t<1<<a[r]-7;t++)A[256+o++]=r;for(e=0;e<=15;e++)m[e]=0;for(t=0;t<=143;)u[2*t+1]=8,t++,m[8]++;for(;t<=255;)u[2*t+1]=9,t++,m[9]++;for(;t<=279;)u[2*t+1]=7,t++,m[7]++;for(;t<=287;)u[2*t+1]=8,t++,m[8]++;for(w(u,287,m),t=0;t<30;t++)c[2*t+1]=5,c[2*t]=E(t,5);h=new l(u,i,257,286,15),y=new l(c,a,0,30,15),g=new l(new Array(0),s,0,19,7)})(),R=!0),t.l_desc=new m(t.dyn_ltree,h),t.d_desc=new m(t.dyn_dtree,y),t.bl_desc=new m(t.bl_tree,g),t.bi_buf=0,t.bi_valid=0,B(t)},_tr_stored_block:T,_tr_flush_block:(t,e,n,r)=>{let i,a,s=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),x(t,t.l_desc),x(t,t.d_desc),s=(t=>{let e;for(S(t,t.dyn_ltree,t.l_desc.max_code),S(t,t.dyn_dtree,t.d_desc.max_code),x(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*o[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),i=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&-1!==e?T(t,e,n,r):4===t.strategy||a===i?(C(t,2+(r?1:0),3),_(t,u,c)):(C(t,4+(r?1:0),3),((t,e,n,r)=>{let i;for(C(t,e-257,5),C(t,n-1,5),C(t,r-4,4),i=0;i<r;i++)C(t,t.bl_tree[2*o[i]+1],3);D(t,t.dyn_ltree,e-1),D(t,t.dyn_dtree,n-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),_(t,t.dyn_ltree,t.dyn_dtree)),B(t),r&&Q(t)},_tr_tally:(t,e,n)=>(t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(d[n]+256+1)]++,t.dyn_dtree[2*b(e)]++),t.last_lit===t.lit_bufsize-1),_tr_align:t=>{C(t,2,3),v(t,256,u),(t=>{16===t.bi_valid?(I(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}};var O=(t,e,n,r)=>{let i=65535&t|0,a=t>>>16&65535|0,s=0;for(;0!==n;){s=n>2e3?2e3:n,n-=s;do{i=i+e[r++]|0,a=a+i|0}while(--s);i%=65521,a%=65521}return i|a<<16|0};const H=new Uint32Array((()=>{let t,e=[];for(var n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e})());var L=(t,e,n,r)=>{const i=H,a=r+n;t^=-1;for(let n=r;n<a;n++)t=t>>>8^i[255&(t^e[n])];return-1^t},U={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},F={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:j,_tr_stored_block:P,_tr_flush_block:G,_tr_tally:q,_tr_align:Y}=N,{Z_NO_FLUSH:K,Z_PARTIAL_FLUSH:z,Z_FULL_FLUSH:J,Z_FINISH:V,Z_BLOCK:W,Z_OK:Z,Z_STREAM_END:X,Z_STREAM_ERROR:$,Z_DATA_ERROR:tt,Z_BUF_ERROR:et,Z_DEFAULT_COMPRESSION:nt,Z_FILTERED:rt,Z_HUFFMAN_ONLY:it,Z_RLE:at,Z_FIXED:st,Z_DEFAULT_STRATEGY:ot,Z_UNKNOWN:ut,Z_DEFLATED:ct}=F,At=(t,e)=>(t.msg=U[e],e),dt=t=>(t<<1)-(t>4?9:0),pt=t=>{let e=t.length;for(;--e>=0;)t[e]=0};let ft=(t,e,n)=>(e<<t.hash_shift^n)&t.hash_mask;const lt=t=>{const e=t.state;let n=e.pending;n>t.avail_out&&(n=t.avail_out),0!==n&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+n),t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending&&(e.pending_out=0))},ht=(t,e)=>{G(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,lt(t.strm)},yt=(t,e)=>{t.pending_buf[t.pending++]=e},gt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},mt=(t,e,n,r)=>{let i=t.avail_in;return i>r&&(i=r),0===i?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),n),1===t.state.wrap?t.adler=O(t.adler,e,i,n):2===t.state.wrap&&(t.adler=L(t.adler,e,i,n)),t.next_in+=i,t.total_in+=i,i)},bt=(t,e)=>{let n,r,i=t.max_chain_length,a=t.strstart,s=t.prev_length,o=t.nice_match;const u=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,c=t.window,A=t.w_mask,d=t.prev,p=t.strstart+258;let f=c[a+s-1],l=c[a+s];t.prev_length>=t.good_match&&(i>>=2),o>t.lookahead&&(o=t.lookahead);do{if(n=e,c[n+s]===l&&c[n+s-1]===f&&c[n]===c[a]&&c[++n]===c[a+1]){a+=2,n++;do{}while(c[++a]===c[++n]&&c[++a]===c[++n]&&c[++a]===c[++n]&&c[++a]===c[++n]&&c[++a]===c[++n]&&c[++a]===c[++n]&&c[++a]===c[++n]&&c[++a]===c[++n]&&a<p);if(r=258-(p-a),a=p-258,r>s){if(t.match_start=e,s=r,r>=o)break;f=c[a+s-1],l=c[a+s]}}}while((e=d[e&A])>u&&0!=--i);return s<=t.lookahead?s:t.lookahead},It=t=>{const e=t.w_size;let n,r,i,a,s;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-262)){t.window.set(t.window.subarray(e,e+e),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,r=t.hash_size,n=r;do{i=t.head[--n],t.head[n]=i>=e?i-e:0}while(--r);r=e,n=r;do{i=t.prev[--n],t.prev[n]=i>=e?i-e:0}while(--r);a+=e}if(0===t.strm.avail_in)break;if(r=mt(t.strm,t.window,t.strstart+t.lookahead,a),t.lookahead+=r,t.lookahead+t.insert>=3)for(s=t.strstart-t.insert,t.ins_h=t.window[s],t.ins_h=ft(t,t.ins_h,t.window[s+1]);t.insert&&(t.ins_h=ft(t,t.ins_h,t.window[s+3-1]),t.prev[s&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=s,s++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},Ct=(t,e)=>{let n,r;for(;;){if(t.lookahead<262){if(It(t),t.lookahead<262&&e===K)return 1;if(0===t.lookahead)break}if(n=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==n&&t.strstart-n<=t.w_size-262&&(t.match_length=bt(t,n)),t.match_length>=3)if(r=q(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=ft(t,t.ins_h,t.window[t.strstart+1]);else r=q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(r&&(ht(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===V?(ht(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(ht(t,!1),0===t.strm.avail_out)?1:2},vt=(t,e)=>{let n,r,i;for(;;){if(t.lookahead<262){if(It(t),t.lookahead<262&&e===K)return 1;if(0===t.lookahead)break}if(n=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==n&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-262&&(t.match_length=bt(t,n),t.match_length<=5&&(t.strategy===rt||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,r=q(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,r&&(ht(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(r=q(t,0,t.window[t.strstart-1]),r&&ht(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(r=q(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===V?(ht(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(ht(t,!1),0===t.strm.avail_out)?1:2};function Et(t,e,n,r,i){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=r,this.func=i}const wt=[new Et(0,0,0,0,(t,e)=>{let n=65535;for(n>t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(It(t),0===t.lookahead&&e===K)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;const r=t.block_start+n;if((0===t.strstart||t.strstart>=r)&&(t.lookahead=t.strstart-r,t.strstart=r,ht(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-262&&(ht(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(ht(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(ht(t,!1),t.strm.avail_out),1)}),new Et(4,4,8,4,Ct),new Et(4,5,16,8,Ct),new Et(4,6,32,32,Ct),new Et(4,4,16,16,vt),new Et(8,16,32,32,vt),new Et(8,16,128,128,vt),new Et(8,32,128,256,vt),new Et(32,128,258,1024,vt),new Et(32,258,258,4096,vt)];function Bt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ct,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),pt(this.dyn_ltree),pt(this.dyn_dtree),pt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),pt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),pt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Qt=t=>{if(!t||!t.state)return At(t,$);t.total_in=t.total_out=0,t.data_type=ut;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=K,j(e),Z},Mt=t=>{const e=Qt(t);var n;return e===Z&&((n=t.state).window_size=2*n.w_size,pt(n.head),n.max_lazy_match=wt[n.level].max_lazy,n.good_match=wt[n.level].good_length,n.nice_match=wt[n.level].nice_length,n.max_chain_length=wt[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=2,n.match_available=0,n.ins_h=0),e},kt=(t,e,n,r,i,a)=>{if(!t)return $;let s=1;if(e===nt&&(e=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),i<1||i>9||n!==ct||r<8||r>15||e<0||e>9||a<0||a>st)return At(t,$);8===r&&(r=9);const o=new Bt;return t.state=o,o.strm=t,o.wrap=s,o.gzhead=null,o.w_bits=r,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<i+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.d_buf=1*o.lit_bufsize,o.l_buf=3*o.lit_bufsize,o.level=e,o.strategy=a,o.method=n,Mt(t)};var _t={deflateInit:(t,e)=>kt(t,e,ct,15,8,ot),deflateInit2:kt,deflateReset:Mt,deflateResetKeep:Qt,deflateSetHeader:(t,e)=>t&&t.state?2!==t.state.wrap?$:(t.state.gzhead=e,Z):$,deflate:(t,e)=>{let n,r;if(!t||!t.state||e>W||e<0)return t?At(t,$):$;const i=t.state;if(!t.output||!t.input&&0!==t.avail_in||666===i.status&&e!==V)return At(t,0===t.avail_out?et:$);i.strm=t;const a=i.last_flush;if(i.last_flush=e,42===i.status)if(2===i.wrap)t.adler=0,yt(i,31),yt(i,139),yt(i,8),i.gzhead?(yt(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),yt(i,255&i.gzhead.time),yt(i,i.gzhead.time>>8&255),yt(i,i.gzhead.time>>16&255),yt(i,i.gzhead.time>>24&255),yt(i,9===i.level?2:i.strategy>=it||i.level<2?4:0),yt(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(yt(i,255&i.gzhead.extra.length),yt(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=L(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(yt(i,0),yt(i,0),yt(i,0),yt(i,0),yt(i,0),yt(i,9===i.level?2:i.strategy>=it||i.level<2?4:0),yt(i,3),i.status=113);else{let e=ct+(i.w_bits-8<<4)<<8,n=-1;n=i.strategy>=it||i.level<2?0:i.level<6?1:6===i.level?2:3,e|=n<<6,0!==i.strstart&&(e|=32),e+=31-e%31,i.status=113,gt(i,e),0!==i.strstart&&(gt(i,t.adler>>>16),gt(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(t.adler=L(t.adler,i.pending_buf,i.pending-n,n)),lt(t),n=i.pending,i.pending!==i.pending_buf_size));)yt(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(t.adler=L(t.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=L(t.adler,i.pending_buf,i.pending-n,n)),lt(t),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}r=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,yt(i,r)}while(0!==r);i.gzhead.hcrc&&i.pending>n&&(t.adler=L(t.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=L(t.adler,i.pending_buf,i.pending-n,n)),lt(t),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}r=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,yt(i,r)}while(0!==r);i.gzhead.hcrc&&i.pending>n&&(t.adler=L(t.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&<(t),i.pending+2<=i.pending_buf_size&&(yt(i,255&t.adler),yt(i,t.adler>>8&255),t.adler=0,i.status=113)):i.status=113),0!==i.pending){if(lt(t),0===t.avail_out)return i.last_flush=-1,Z}else if(0===t.avail_in&&dt(e)<=dt(a)&&e!==V)return At(t,et);if(666===i.status&&0!==t.avail_in)return At(t,et);if(0!==t.avail_in||0!==i.lookahead||e!==K&&666!==i.status){let n=i.strategy===it?((t,e)=>{let n;for(;;){if(0===t.lookahead&&(It(t),0===t.lookahead)){if(e===K)return 1;break}if(t.match_length=0,n=q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(ht(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(ht(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(ht(t,!1),0===t.strm.avail_out)?1:2})(i,e):i.strategy===at?((t,e)=>{let n,r,i,a;const s=t.window;for(;;){if(t.lookahead<=258){if(It(t),t.lookahead<=258&&e===K)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(i=t.strstart-1,r=s[i],r===s[++i]&&r===s[++i]&&r===s[++i])){a=t.strstart+258;do{}while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<a);t.match_length=258-(a-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(n=q(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(ht(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(ht(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(ht(t,!1),0===t.strm.avail_out)?1:2})(i,e):wt[i.level].func(i,e);if(3!==n&&4!==n||(i.status=666),1===n||3===n)return 0===t.avail_out&&(i.last_flush=-1),Z;if(2===n&&(e===z?Y(i):e!==W&&(P(i,0,0,!1),e===J&&(pt(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),lt(t),0===t.avail_out))return i.last_flush=-1,Z}return e!==V?Z:i.wrap<=0?X:(2===i.wrap?(yt(i,255&t.adler),yt(i,t.adler>>8&255),yt(i,t.adler>>16&255),yt(i,t.adler>>24&255),yt(i,255&t.total_in),yt(i,t.total_in>>8&255),yt(i,t.total_in>>16&255),yt(i,t.total_in>>24&255)):(gt(i,t.adler>>>16),gt(i,65535&t.adler)),lt(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?Z:X)},deflateEnd:t=>{if(!t||!t.state)return $;const e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?At(t,$):(t.state=null,113===e?At(t,tt):Z)},deflateSetDictionary:(t,e)=>{let n=e.length;if(!t||!t.state)return $;const r=t.state,i=r.wrap;if(2===i||1===i&&42!==r.status||r.lookahead)return $;if(1===i&&(t.adler=O(t.adler,e,n,0)),r.wrap=0,n>=r.w_size){0===i&&(pt(r.head),r.strstart=0,r.block_start=0,r.insert=0);let t=new Uint8Array(r.w_size);t.set(e.subarray(n-r.w_size,n),0),e=t,n=r.w_size}const a=t.avail_in,s=t.next_in,o=t.input;for(t.avail_in=n,t.next_in=0,t.input=e,It(r);r.lookahead>=3;){let t=r.strstart,e=r.lookahead-2;do{r.ins_h=ft(r,r.ins_h,r.window[t+3-1]),r.prev[t&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=t,t++}while(--e);r.strstart=t,r.lookahead=2,It(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,t.next_in=s,t.input=o,t.avail_in=a,r.wrap=i,Z},deflateInfo:"pako deflate (from Nodeca project)"};const xt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var St=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const n=e.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const e in n)xt(n,e)&&(t[e]=n[e])}}return t},Dt=t=>{let e=0;for(let n=0,r=t.length;n<r;n++)e+=t[n].length;const n=new Uint8Array(e);for(let e=0,r=0,i=t.length;e<i;e++){let i=t[e];n.set(i,r),r+=i.length}return n};let Rt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Rt=!1}const Tt=new Uint8Array(256);for(let t=0;t<256;t++)Tt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Tt[254]=Tt[254]=1;var Nt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,n,r,i,a,s=t.length,o=0;for(i=0;i<s;i++)n=t.charCodeAt(i),55296==(64512&n)&&i+1<s&&(r=t.charCodeAt(i+1),56320==(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),i++)),o+=n<128?1:n<2048?2:n<65536?3:4;for(e=new Uint8Array(o),a=0,i=0;a<o;i++)n=t.charCodeAt(i),55296==(64512&n)&&i+1<s&&(r=t.charCodeAt(i+1),56320==(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?e[a++]=n:n<2048?(e[a++]=192|n>>>6,e[a++]=128|63&n):n<65536?(e[a++]=224|n>>>12,e[a++]=128|n>>>6&63,e[a++]=128|63&n):(e[a++]=240|n>>>18,e[a++]=128|n>>>12&63,e[a++]=128|n>>>6&63,e[a++]=128|63&n);return e},Ot=(t,e)=>{const n=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let r,i;const a=new Array(2*n);for(i=0,r=0;r<n;){let e=t[r++];if(e<128){a[i++]=e;continue}let s=Tt[e];if(s>4)a[i++]=65533,r+=s-1;else{for(e&=2===s?31:3===s?15:7;s>1&&r<n;)e=e<<6|63&t[r++],s--;s>1?a[i++]=65533:e<65536?a[i++]=e:(e-=65536,a[i++]=55296|e>>10&1023,a[i++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Rt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let n="";for(let r=0;r<e;r++)n+=String.fromCharCode(t[r]);return n})(a,i)},Ht=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let n=e-1;for(;n>=0&&128==(192&t[n]);)n--;return n<0||0===n?e:n+Tt[t[n]]>e?n:e};var Lt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Ut=Object.prototype.toString,{Z_NO_FLUSH:Ft,Z_SYNC_FLUSH:jt,Z_FULL_FLUSH:Pt,Z_FINISH:Gt,Z_OK:qt,Z_STREAM_END:Yt,Z_DEFAULT_COMPRESSION:Kt,Z_DEFAULT_STRATEGY:zt,Z_DEFLATED:Jt}=F;function Vt(t){this.options=St({level:Kt,method:Jt,chunkSize:16384,windowBits:15,memLevel:8,strategy:zt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Lt,this.strm.avail_out=0;let n=_t.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(n!==qt)throw new Error(U[n]);if(e.header&&_t.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Nt(e.dictionary):"[object ArrayBuffer]"===Ut.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,n=_t.deflateSetDictionary(this.strm,t),n!==qt)throw new Error(U[n]);this._dict_set=!0}}function Wt(t,e){const n=new Vt(e);if(n.push(t,!0),n.err)throw n.msg||U[n.err];return n.result}Vt.prototype.push=function(t,e){const n=this.strm,r=this.options.chunkSize;let i,a;if(this.ended)return!1;for(a=e===~~e?e:!0===e?Gt:Ft,"string"==typeof t?n.input=Nt(t):"[object ArrayBuffer]"===Ut.call(t)?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(a===jt||a===Pt)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(i=_t.deflate(n,a),i===Yt)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=_t.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===qt;if(0!==n.avail_out){if(a>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},Vt.prototype.onData=function(t){this.chunks.push(t)},Vt.prototype.onEnd=function(t){t===qt&&(this.result=Dt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Zt={Deflate:Vt,deflate:Wt,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Wt(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Wt(t,e)},constants:F};var Xt=function(t,e){let n,r,i,a,s,o,u,c,A,d,p,f,l,h,y,g,m,b,I,C,v,E,w,B;const Q=t.state;n=t.next_in,w=t.input,r=n+(t.avail_in-5),i=t.next_out,B=t.output,a=i-(e-t.avail_out),s=i+(t.avail_out-257),o=Q.dmax,u=Q.wsize,c=Q.whave,A=Q.wnext,d=Q.window,p=Q.hold,f=Q.bits,l=Q.lencode,h=Q.distcode,y=(1<<Q.lenbits)-1,g=(1<<Q.distbits)-1;t:do{f<15&&(p+=w[n++]<<f,f+=8,p+=w[n++]<<f,f+=8),m=l[p&y];e:for(;;){if(b=m>>>24,p>>>=b,f-=b,b=m>>>16&255,0===b)B[i++]=65535&m;else{if(!(16&b)){if(0==(64&b)){m=l[(65535&m)+(p&(1<<b)-1)];continue e}if(32&b){Q.mode=12;break t}t.msg="invalid literal/length code",Q.mode=30;break t}I=65535&m,b&=15,b&&(f<b&&(p+=w[n++]<<f,f+=8),I+=p&(1<<b)-1,p>>>=b,f-=b),f<15&&(p+=w[n++]<<f,f+=8,p+=w[n++]<<f,f+=8),m=h[p&g];n:for(;;){if(b=m>>>24,p>>>=b,f-=b,b=m>>>16&255,!(16&b)){if(0==(64&b)){m=h[(65535&m)+(p&(1<<b)-1)];continue n}t.msg="invalid distance code",Q.mode=30;break t}if(C=65535&m,b&=15,f<b&&(p+=w[n++]<<f,f+=8,f<b&&(p+=w[n++]<<f,f+=8)),C+=p&(1<<b)-1,C>o){t.msg="invalid distance too far back",Q.mode=30;break t}if(p>>>=b,f-=b,b=i-a,C>b){if(b=C-b,b>c&&Q.sane){t.msg="invalid distance too far back",Q.mode=30;break t}if(v=0,E=d,0===A){if(v+=u-b,b<I){I-=b;do{B[i++]=d[v++]}while(--b);v=i-C,E=B}}else if(A<b){if(v+=u+A-b,b-=A,b<I){I-=b;do{B[i++]=d[v++]}while(--b);if(v=0,A<I){b=A,I-=b;do{B[i++]=d[v++]}while(--b);v=i-C,E=B}}}else if(v+=A-b,b<I){I-=b;do{B[i++]=d[v++]}while(--b);v=i-C,E=B}for(;I>2;)B[i++]=E[v++],B[i++]=E[v++],B[i++]=E[v++],I-=3;I&&(B[i++]=E[v++],I>1&&(B[i++]=E[v++]))}else{v=i-C;do{B[i++]=B[v++],B[i++]=B[v++],B[i++]=B[v++],I-=3}while(I>2);I&&(B[i++]=B[v++],I>1&&(B[i++]=B[v++]))}break}}break}}while(n<r&&i<s);I=f>>3,n-=I,f-=I<<3,p&=(1<<f)-1,t.next_in=n,t.next_out=i,t.avail_in=n<r?r-n+5:5-(n-r),t.avail_out=i<s?s-i+257:257-(i-s),Q.hold=p,Q.bits=f};const $t=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),te=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),ee=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),ne=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var re=(t,e,n,r,i,a,s,o)=>{const u=o.bits;let c,A,d,p,f,l,h=0,y=0,g=0,m=0,b=0,I=0,C=0,v=0,E=0,w=0,B=null,Q=0;const M=new Uint16Array(16),k=new Uint16Array(16);let _,x,S,D=null,R=0;for(h=0;h<=15;h++)M[h]=0;for(y=0;y<r;y++)M[e[n+y]]++;for(b=u,m=15;m>=1&&0===M[m];m--);if(b>m&&(b=m),0===m)return i[a++]=20971520,i[a++]=20971520,o.bits=1,0;for(g=1;g<m&&0===M[g];g++);for(b<g&&(b=g),v=1,h=1;h<=15;h++)if(v<<=1,v-=M[h],v<0)return-1;if(v>0&&(0===t||1!==m))return-1;for(k[1]=0,h=1;h<15;h++)k[h+1]=k[h]+M[h];for(y=0;y<r;y++)0!==e[n+y]&&(s[k[e[n+y]]++]=y);if(0===t?(B=D=s,l=19):1===t?(B=$t,Q-=257,D=te,R-=257,l=256):(B=ee,D=ne,l=-1),w=0,y=0,h=g,f=a,I=b,C=0,d=-1,E=1<<b,p=E-1,1===t&&E>852||2===t&&E>592)return 1;for(;;){_=h-C,s[y]<l?(x=0,S=s[y]):s[y]>l?(x=D[R+s[y]],S=B[Q+s[y]]):(x=96,S=0),c=1<<h-C,A=1<<I,g=A;do{A-=c,i[f+(w>>C)+A]=_<<24|x<<16|S|0}while(0!==A);for(c=1<<h-1;w&c;)c>>=1;if(0!==c?(w&=c-1,w+=c):w=0,y++,0==--M[h]){if(h===m)break;h=e[n+s[y]]}if(h>b&&(w&p)!==d){for(0===C&&(C=b),f+=g,I=h-C,v=1<<I;I+C<m&&(v-=M[I+C],!(v<=0));)I++,v<<=1;if(E+=1<<I,1===t&&E>852||2===t&&E>592)return 1;d=w&p,i[d]=b<<24|I<<16|f-a|0}}return 0!==w&&(i[f+w]=h-C<<24|64<<16|0),o.bits=b,0};const{Z_FINISH:ie,Z_BLOCK:ae,Z_TREES:se,Z_OK:oe,Z_STREAM_END:ue,Z_NEED_DICT:ce,Z_STREAM_ERROR:Ae,Z_DATA_ERROR:de,Z_MEM_ERROR:pe,Z_BUF_ERROR:fe,Z_DEFLATED:le}=F,he=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function ye(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const ge=t=>{if(!t||!t.state)return Ae;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,oe},me=t=>{if(!t||!t.state)return Ae;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,ge(t)},be=(t,e)=>{let n;if(!t||!t.state)return Ae;const r=t.state;return e<0?(n=0,e=-e):(n=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?Ae:(null!==r.window&&r.wbits!==e&&(r.window=null),r.wrap=n,r.wbits=e,me(t))},Ie=(t,e)=>{if(!t)return Ae;const n=new ye;t.state=n,n.window=null;const r=be(t,e);return r!==oe&&(t.state=null),r};let Ce,ve,Ee=!0;const we=t=>{if(Ee){Ce=new Int32Array(512),ve=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(re(1,t.lens,0,288,Ce,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;re(2,t.lens,0,32,ve,0,t.work,{bits:5}),Ee=!1}t.lencode=Ce,t.lenbits=9,t.distcode=ve,t.distbits=5},Be=(t,e,n,r)=>{let i;const a=t.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),r>=a.wsize?(a.window.set(e.subarray(n-a.wsize,n),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(e.subarray(n-r,n-r+i),a.wnext),(r-=i)?(a.window.set(e.subarray(n-r,n),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0};var Qe={inflateReset:me,inflateReset2:be,inflateResetKeep:ge,inflateInit:t=>Ie(t,15),inflateInit2:Ie,inflate:(t,e)=>{let n,r,i,a,s,o,u,c,A,d,p,f,l,h,y,g,m,b,I,C,v,E,w=0;const B=new Uint8Array(4);let Q,M;const k=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return Ae;n=t.state,12===n.mode&&(n.mode=13),s=t.next_out,i=t.output,u=t.avail_out,a=t.next_in,r=t.input,o=t.avail_in,c=n.hold,A=n.bits,d=o,p=u,E=oe;t:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;A<16;){if(0===o)break t;o--,c+=r[a++]<<A,A+=8}if(2&n.wrap&&35615===c){n.check=0,B[0]=255&c,B[1]=c>>>8&255,n.check=L(n.check,B,2,0),c=0,A=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){t.msg="incorrect header check",n.mode=30;break}if((15&c)!==le){t.msg="unknown compression method",n.mode=30;break}if(c>>>=4,A-=4,v=8+(15&c),0===n.wbits)n.wbits=v;else if(v>n.wbits){t.msg="invalid window size",n.mode=30;break}n.dmax=1<<n.wbits,t.adler=n.check=1,n.mode=512&c?10:12,c=0,A=0;break;case 2:for(;A<16;){if(0===o)break t;o--,c+=r[a++]<<A,A+=8}if(n.flags=c,(255&n.flags)!==le){t.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){t.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=c>>8&1),512&n.flags&&(B[0]=255&c,B[1]=c>>>8&255,n.check=L(n.check,B,2,0)),c=0,A=0,n.mode=3;case 3:for(;A<32;){if(0===o)break t;o--,c+=r[a++]<<A,A+=8}n.head&&(n.head.time=c),512&n.flags&&(B[0]=255&c,B[1]=c>>>8&255,B[2]=c>>>16&255,B[3]=c>>>24&255,n.check=L(n.check,B,4,0)),c=0,A=0,n.mode=4;case 4:for(;A<16;){if(0===o)break t;o--,c+=r[a++]<<A,A+=8}n.head&&(n.head.xflags=255&c,n.head.os=c>>8),512&n.flags&&(B[0]=255&c,B[1]=c>>>8&255,n.check=L(n.check,B,2,0)),c=0,A=0,n.mode=5;case 5:if(1024&n.flags){for(;A<16;){if(0===o)break t;o--,c+=r[a++]<<A,A+=8}n.length=c,n.head&&(n.head.extra_len=c),512&n.flags&&(B[0]=255&c,B[1]=c>>>8&255,n.check=L(n.check,B,2,0)),c=0,A=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(f=n.length,f>o&&(f=o),f&&(n.head&&(v=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(a,a+f),v)),512&n.flags&&(n.check=L(n.check,r,f,a)),o-=f,a+=f,n.length-=f),n.length))break t;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===o)break t;f=0;do{v=r[a+f++],n.head&&v&&n.length<65536&&(n.head.name+=String.fromCharCode(v))}while(v&&f<o);if(512&n.flags&&(n.check=L(n.check,r,f,a)),o-=f,a+=f,v)break t}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===o)break t;f=0;do{v=r[a+f++],n.head&&v&&n.length<65536&&(n.head.comment+=String.fromCharCode(v))}while(v&&f<o);if(512&n.flags&&(n.check=L(n.check,r,f,a)),o-=f,a+=f,v)break t}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;A<16;){if(0===o)break t;o--,c+=r[a++]<<A,A+=8}if(c!==(65535&n.check)){t.msg="header crc mismatch",n.mode=30;break}c=0,A=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=12;break;case 10:for(;A<32;){if(0===o)break t;o--,c+=r[a++]<<A,A+=8}t.adler=n.check=he(c),c=0,A=0,n.mode=11;case 11:if(0===n.havedict)return t.next_out=s,t.avail_out=u,t.next_in=a,t.avail_in=o,n.hold=c,n.bits=A,ce;t.adler=n.check=1,n.mode=12;case 12:if(e===ae||e===se)break t;case 13:if(n.last){c>>>=7&A,A-=7&A,n.mode=27;break}for(;A<3;){if(0===o)break t;o--,c+=r[a++]<<A,A+=8}switch(n.last=1&c,c>>>=1,A-=1,3&c){case 0:n.mode=14;break;case 1:if(we(n),n.mode=20,e===se){c>>>=2,A-=2;break t}break;case 2:n.mode=17;break;case 3:t.msg="invalid block type",n.mode=30}c>>>=2,A-=2;break;case 14:for(c>>>=7&A,A-=7&A;A<32;){if(0===o)break t;o--,c+=r[a++]<<A,A+=8}if((65535&c)!=(c>>>16^65535)){t.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&c,c=0,A=0,n.mode=15,e===se)break t;case 15:n.mode=16;case 16:if(f=n.length,f){if(f>o&&(f=o),f>u&&(f=u),0===f)break t;i.set(r.subarray(a,a+f),s),o-=f,a+=f,u-=f,s+=f,n.length-=f;break}n.mode=12;break;case 17:for(;A<14;){if(0===o)break t;o--,c+=r[a++]<<A,A+=8}if(n.nlen=257+(31&c),c>>>=5,A-=5,n.ndist=1+(31&c),c>>>=5,A-=5,n.ncode=4+(15&c),c>>>=4,A-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;A<3;){if(0===o)break t;o--,c+=r[a++]<<A,A+=8}n.lens[k[n.have++]]=7&c,c>>>=3,A-=3}for(;n.have<19;)n.lens[k[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,Q={bits:n.lenbits},E=re(0,n.lens,0,19,n.lencode,0,n.work,Q),n.lenbits=Q.bits,E){t.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;w=n.lencode[c&(1<<n.lenbits)-1],y=w>>>24,g=w>>>16&255,m=65535&w,!(y<=A);){if(0===o)break t;o--,c+=r[a++]<<A,A+=8}if(m<16)c>>>=y,A-=y,n.lens[n.have++]=m;else{if(16===m){for(M=y+2;A<M;){if(0===o)break t;o--,c+=r[a++]<<A,A+=8}if(c>>>=y,A-=y,0===n.have){t.msg="invalid bit length repeat",n.mode=30;break}v=n.lens[n.have-1],f=3+(3&c),c>>>=2,A-=2}else if(17===m){for(M=y+3;A<M;){if(0===o)break t;o--,c+=r[a++]<<A,A+=8}c>>>=y,A-=y,v=0,f=3+(7&c),c>>>=3,A-=3}else{for(M=y+7;A<M;){if(0===o)break t;o--,c+=r[a++]<<A,A+=8}c>>>=y,A-=y,v=0,f=11+(127&c),c>>>=7,A-=7}if(n.have+f>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=30;break}for(;f--;)n.lens[n.have++]=v}}if(30===n.mode)break;if(0===n.lens[256]){t.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,Q={bits:n.lenbits},E=re(1,n.lens,0,n.nlen,n.lencode,0,n.work,Q),n.lenbits=Q.bits,E){t.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,Q={bits:n.distbits},E=re(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,Q),n.distbits=Q.bits,E){t.msg="invalid distances set",n.mode=30;break}if(n.mode=20,e===se)break t;case 20:n.mode=21;case 21:if(o>=6&&u>=258){t.next_out=s,t.avail_out=u,t.next_in=a,t.avail_in=o,n.hold=c,n.bits=A,Xt(t,p),s=t.next_out,i=t.output,u=t.avail_out,a=t.next_in,r=t.input,o=t.avail_in,c=n.hold,A=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;w=n.lencode[c&(1<<n.lenbits)-1],y=w>>>24,g=w>>>16&255,m=65535&w,!(y<=A);){if(0===o)break t;o--,c+=r[a++]<<A,A+=8}if(g&&0==(240&g)){for(b=y,I=g,C=m;w=n.lencode[C+((c&(1<<b+I)-1)>>b)],y=w>>>24,g=w>>>16&255,m=65535&w,!(b+y<=A);){if(0===o)break t;o--,c+=r[a++]<<A,A+=8}c>>>=b,A-=b,n.back+=b}if(c>>>=y,A-=y,n.back+=y,n.length=m,0===g){n.mode=26;break}if(32&g){n.back=-1,n.mode=12;break}if(64&g){t.msg="invalid literal/length code",n.mode=30;break}n.extra=15&g,n.mode=22;case 22:if(n.extra){for(M=n.extra;A<M;){if(0===o)break t;o--,c+=r[a++]<<A,A+=8}n.length+=c&(1<<n.extra)-1,c>>>=n.extra,A-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;w=n.distcode[c&(1<<n.distbits)-1],y=w>>>24,g=w>>>16&255,m=65535&w,!(y<=A);){if(0===o)break t;o--,c+=r[a++]<<A,A+=8}if(0==(240&g)){for(b=y,I=g,C=m;w=n.distcode[C+((c&(1<<b+I)-1)>>b)],y=w>>>24,g=w>>>16&255,m=65535&w,!(b+y<=A);){if(0===o)break t;o--,c+=r[a++]<<A,A+=8}c>>>=b,A-=b,n.back+=b}if(c>>>=y,A-=y,n.back+=y,64&g){t.msg="invalid distance code",n.mode=30;break}n.offset=m,n.extra=15&g,n.mode=24;case 24:if(n.extra){for(M=n.extra;A<M;){if(0===o)break t;o--,c+=r[a++]<<A,A+=8}n.offset+=c&(1<<n.extra)-1,c>>>=n.extra,A-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===u)break t;if(f=p-u,n.offset>f){if(f=n.offset-f,f>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=30;break}f>n.wnext?(f-=n.wnext,l=n.wsize-f):l=n.wnext-f,f>n.length&&(f=n.length),h=n.window}else h=i,l=s-n.offset,f=n.length;f>u&&(f=u),u-=f,n.length-=f;do{i[s++]=h[l++]}while(--f);0===n.length&&(n.mode=21);break;case 26:if(0===u)break t;i[s++]=n.length,u--,n.mode=21;break;case 27:if(n.wrap){for(;A<32;){if(0===o)break t;o--,c|=r[a++]<<A,A+=8}if(p-=u,t.total_out+=p,n.total+=p,p&&(t.adler=n.check=n.flags?L(n.check,i,p,s-p):O(n.check,i,p,s-p)),p=u,(n.flags?c:he(c))!==n.check){t.msg="incorrect data check",n.mode=30;break}c=0,A=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;A<32;){if(0===o)break t;o--,c+=r[a++]<<A,A+=8}if(c!==(4294967295&n.total)){t.msg="incorrect length check",n.mode=30;break}c=0,A=0}n.mode=29;case 29:E=ue;break t;case 30:E=de;break t;case 31:return pe;case 32:default:return Ae}return t.next_out=s,t.avail_out=u,t.next_in=a,t.avail_in=o,n.hold=c,n.bits=A,(n.wsize||p!==t.avail_out&&n.mode<30&&(n.mode<27||e!==ie))&&Be(t,t.output,t.next_out,p-t.avail_out),d-=t.avail_in,p-=t.avail_out,t.total_in+=d,t.total_out+=p,n.total+=p,n.wrap&&p&&(t.adler=n.check=n.flags?L(n.check,i,p,t.next_out-p):O(n.check,i,p,t.next_out-p)),t.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0===d&&0===p||e===ie)&&E===oe&&(E=fe),E},inflateEnd:t=>{if(!t||!t.state)return Ae;let e=t.state;return e.window&&(e.window=null),t.state=null,oe},inflateGetHeader:(t,e)=>{if(!t||!t.state)return Ae;const n=t.state;return 0==(2&n.wrap)?Ae:(n.head=e,e.done=!1,oe)},inflateSetDictionary:(t,e)=>{const n=e.length;let r,i,a;return t&&t.state?(r=t.state,0!==r.wrap&&11!==r.mode?Ae:11===r.mode&&(i=1,i=O(i,e,n,0),i!==r.check)?de:(a=Be(t,e,n,n),a?(r.mode=31,pe):(r.havedict=1,oe))):Ae},inflateInfo:"pako inflate (from Nodeca project)"};var Me=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const ke=Object.prototype.toString,{Z_NO_FLUSH:_e,Z_FINISH:xe,Z_OK:Se,Z_STREAM_END:De,Z_NEED_DICT:Re,Z_STREAM_ERROR:Te,Z_DATA_ERROR:Ne,Z_MEM_ERROR:Oe}=F;function He(t){this.options=St({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Lt,this.strm.avail_out=0;let n=Qe.inflateInit2(this.strm,e.windowBits);if(n!==Se)throw new Error(U[n]);if(this.header=new Me,Qe.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Nt(e.dictionary):"[object ArrayBuffer]"===ke.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(n=Qe.inflateSetDictionary(this.strm,e.dictionary),n!==Se)))throw new Error(U[n])}function Le(t,e){const n=new He(e);if(n.push(t),n.err)throw n.msg||U[n.err];return n.result}He.prototype.push=function(t,e){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let a,s,o;if(this.ended)return!1;for(s=e===~~e?e:!0===e?xe:_e,"[object ArrayBuffer]"===ke.call(t)?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;;){for(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),a=Qe.inflate(n,s),a===Re&&i&&(a=Qe.inflateSetDictionary(n,i),a===Se?a=Qe.inflate(n,s):a===Ne&&(a=Re));n.avail_in>0&&a===De&&n.state.wrap>0&&0!==t[n.next_in];)Qe.inflateReset(n),a=Qe.inflate(n,s);switch(a){case Te:case Ne:case Re:case Oe:return this.onEnd(a),this.ended=!0,!1}if(o=n.avail_out,n.next_out&&(0===n.avail_out||a===De))if("string"===this.options.to){let t=Ht(n.output,n.next_out),e=n.next_out-t,i=Ot(n.output,t);n.next_out=e,n.avail_out=r-e,e&&n.output.set(n.output.subarray(t,t+e),0),this.onData(i)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(a!==Se||0!==o){if(a===De)return a=Qe.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},He.prototype.onData=function(t){this.chunks.push(t)},He.prototype.onEnd=function(t){t===Se&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Dt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Ue={Inflate:He,inflate:Le,inflateRaw:function(t,e){return(e=e||{}).raw=!0,Le(t,e)},ungzip:Le,constants:F};const{Deflate:Fe,deflate:je,deflateRaw:Pe,gzip:Ge}=Zt,{Inflate:qe,inflate:Ye,inflateRaw:Ke,ungzip:ze}=Ue;var Je=Fe,Ve=je,We=Pe,Ze=Ge,Xe=qe,$e=Ye,tn=Ke,en=ze,nn=F,rn={Deflate:Fe,deflate:je,deflateRaw:Pe,gzip:Ge,Inflate:qe,inflate:Ye,inflateRaw:Ke,ungzip:ze,constants:F}},function(t,e){t.exports={abi:[{constant:!0,inputs:[],name:"creator",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CAN_SEE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"customValues",type:"bytes32[]"},{name:"stakeholders",type:"address[]"}],name:"accessRequestV3",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[],name:"visibility",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"kill",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"versionAPI",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"indexCategory",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newCreator",type:"address"}],name:"transferCreatorship",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"}],name:"hasAccess",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CAN_ACCESS",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_visibility_code",type:"uint8"}],name:"setVisibility",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"contentSpace",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CAN_EDIT",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!1,name:"requestNonce",type:"uint256"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"contextHash",type:"bytes32"},{indexed:!1,name:"accessor",type:"address"},{indexed:!1,name:"requestTimestamp",type:"uint256"}],name:"AccessRequestV3",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentSpace",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"visibility",type:"uint8"}],name:"VisibilityChanged",type:"event"}]}},function(t,e,n){var r=n(24),i=n(17),a=n(7),s=n(3),o=n(4);function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var A=n(12),d=n(25),p=n(19),f=p.ValidateLibrary,l=p.ValidateObject,h=p.ValidateVersion,y=p.ValidatePartHash,g=p.ValidateWriteToken,m=p.ValidateParameters,b=n(199);e.permissionLevels={owner:{short:"Owner Only",description:"Only the owner has access to the object and ability to change permissions",settings:{visibility:0,statusCode:-1,kmsConk:!1}},editable:{short:"Editable",description:"Members of the editors group have full access to the object and the ability to change permissions",settings:{visibility:0,statusCode:-1,kmsConk:!0}},viewable:{short:"Viewable",description:"In addition to editors, members of the 'accessor' group can have read-only access to the object including playing video and retrieving metadata, images and documents",settings:{visibility:0,statusCode:0,kmsConk:!0}},listable:{short:"Publicly Listable",description:"Anyone can list the public portion of this object but only accounts with specific rights can access",settings:{visibility:1,statusCode:0,kmsConk:!0}},public:{short:"Public",description:"Anyone can access this object",settings:{visibility:10,statusCode:0,kmsConk:!0}}},e.Visibility=function(){var t=o(s.mark((function t(e){var n,r,i=this;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.id,t.prev=1,r=this.utils.HashToAddress(n),this.visibilityInfo[r]||(this.visibilityInfo[r]=new Promise(function(){var t=o(s.mark((function t(e,a){return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,i.authClient.ContractHasMethod({contractAddress:r,methodName:"visibility"});case 3:if(t.sent){t.next=7;break}return e(0),t.abrupt("return");case 7:return t.t0=e,t.next=10,i.CallContractMethod({contractAddress:i.utils.HashToAddress(n),methodName:"visibility"});case 10:t.t1=t.sent,(0,t.t0)(t.t1),t.next=17;break;case 14:t.prev=14,t.t2=t.catch(0),a(t.t2);case 17:case"end":return t.stop()}}),t,null,[[0,14]])})));return function(e,n){return t.apply(this,arguments)}}())),t.prev=4,t.next=7,this.visibilityInfo[r];case 7:return t.abrupt("return",t.sent);case 10:throw t.prev=10,t.t0=t.catch(4),delete this.visibilityInfo[r],t.t0;case 14:t.next=21;break;case 16:if(t.prev=16,t.t1=t.catch(1),"CALL_EXCEPTION"!==t.t1.code){t.next=20;break}return t.abrupt("return",0);case 20:throw t.t1;case 21:case"end":return t.stop()}}),t,this,[[1,16],[4,10]])})));return function(e){return t.apply(this,arguments)}}(),e.Permission=function(){var t=o(s.mark((function t(e){var n,r,i,a,o,u,c,A=this;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.objectId,l(n),t.next=4,this.AccessType({id:n});case 4:if(t.t0=t.sent,t.t1=this.authClient.ACCESS_TYPES.OBJECT,t.t0===t.t1){t.next=8;break}throw Error("Permission only valid for normal content objects: "+n);case 8:return t.next=10,this.Visibility({id:n});case 10:return r=t.sent,t.next=13,this.CallContractMethod({contractAddress:this.utils.HashToAddress(n),methodName:"addressKMS"});case 13:if(i=t.sent,a=i&&"ikms".concat(this.utils.AddressToHash(i)),o=!1,!a){t.next=27;break}return t.t2=this,t.next=20,this.ContentObjectLibraryId({objectId:n});case 20:return t.t3=t.sent,t.t4=n,t.t5="eluv.caps.".concat(a),t.t6={libraryId:t.t3,objectId:t.t4,metadataSubtree:t.t5},t.next=26,t.t2.ContentObjectMetadata.call(t.t2,t.t6);case 26:o=!!t.sent;case 27:return t.next=29,this.CallContractMethod({contractAddress:this.utils.HashToAddress(n),methodName:"statusCode"});case 29:return u=t.sent,u=parseInt(u._hex,16),(c=Object.keys(this.permissionLevels).filter((function(t){var e=A.permissionLevels[t].settings;return r>=e.visibility&&u>=e.statusCode&&o===e.kmsConk})))||(c=o?["editable"]:["owner"]),t.abrupt("return",c.slice(-1)[0]);case 34:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DefaultKMSAddress=o(s.mark((function t(){var e,n,r,i=arguments;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=i.length>0&&void 0!==i[0]?i[0]:{},n=e.tenantId,t.t0=n,!t.t0){t.next=8;break}return t.next=5,this.AccessType({id:n});case 5:t.t1=t.sent,t.t2=this.authClient.ACCESS_TYPES.TENANT,t.t0=t.t1===t.t2;case 8:if(!t.t0){t.next=14;break}return t.next=11,this.CallContractMethod({contractAddress:this.utils.HashToAddress(n),methodName:"addressKMS"});case 11:if(!(r=t.sent)){t.next=14;break}return t.abrupt("return",r);case 14:return t.next=16,this.CallContractMethod({contractAddress:this.contentSpaceAddress,methodName:"addressKMS"});case 16:return t.abrupt("return",t.sent);case 17:case"end":return t.stop()}}),t,this)}))),e.ContentSpaceId=function(){return this.contentSpaceId},e.ContentTypeOwner=function(){var t=o(s.mark((function t(e){var n,r,i,a;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.name,r=e.typeId,i=e.versionHash,t.next=3,this.ContentType({name:n,typeId:r,versionHash:i});case 3:return a=t.sent,t.t0=this.utils,t.next=7,this.ethClient.CallContractMethod({contractAddress:this.utils.HashToAddress(a.id),methodName:"owner",methodArgs:[]});case 7:return t.t1=t.sent,t.abrupt("return",t.t0.FormatAddress.call(t.t0,t.t1));case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentType=function(){var t=o(s.mark((function t(e){var n,r,i,a,o,u,c;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.name,r=e.typeId,i=e.versionHash,a=e.publicOnly,o=void 0!==a&&a,this.Log("Retrieving content type: ".concat(n||r||i)),i&&(r=this.utils.DecodeVersionHash(i).objectId),!n){t.next=13;break}return this.Log("Looking up type by name in content space metadata..."),t.prev=5,t.next=8,this.ContentObjectMetadata({libraryId:this.contentSpaceLibraryId,objectId:this.contentSpaceObjectId,metadataSubtree:A("public","contentTypes",n)});case 8:r=t.sent,t.next=13;break;case 11:t.prev=11,t.t0=t.catch(5);case 13:if(r){t.next=23;break}return this.Log("Looking up type by name in available types..."),t.next=17,this.ContentTypes();case 17:if(u=t.sent,!n){t.next=22;break}return t.abrupt("return",Object.values(u).find((function(t){return(t.name||"").toLowerCase()===n.toLowerCase()})));case 22:return t.abrupt("return",Object.values(u).find((function(t){return t.hash===i})));case 23:if(i){t.next=27;break}return t.next=26,this.LatestVersionHash({objectId:r});case 26:i=t.sent;case 27:if(t.prev=27,this.Log("Looking up type by ID..."),!o){t.next=39;break}return t.next=32,this.ContentObjectMetadata({libraryId:this.contentSpaceLibraryId,objectId:r,versionHash:i,metadataSubtree:"public"});case 32:if(t.t1=t.sent,t.t1){t.next=35;break}t.t1={};case 35:t.t2=t.t1,c={public:t.t2},t.next=45;break;case 39:return t.next=41,this.ContentObjectMetadata({libraryId:this.contentSpaceLibraryId,objectId:r,versionHash:i});case 41:if(t.t3=t.sent,t.t3){t.next=44;break}t.t3={};case 44:c=t.t3;case 45:return t.abrupt("return",{id:r,hash:i,name:c.public&&c.public.name||c.name||r,meta:c});case 48:throw t.prev=48,t.t4=t.catch(27),this.Log("Error looking up content type:"),this.Log(t.t4),new Error("Content Type ".concat(n||r," is invalid"));case 53:case"end":return t.stop()}}),t,this,[[5,11],[27,48]])})));return function(e){return t.apply(this,arguments)}}(),e.ContentTypes=o(s.mark((function t(){var e,n,r,i=this;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.contentTypes=this.contentTypes||{},this.Log("Looking up all available content types"),t.next=4,this.Collection({collectionType:"contentTypes"});case 4:return e=t.sent,this.Log("Personally available types:"),this.Log(e),n={},t.prev=8,t.next=11,this.ContentObjectMetadata({libraryId:this.contentSpaceLibraryId,objectId:this.contentSpaceObjectId,metadataSubtree:"public/contentTypes"});case 11:if(t.t0=t.sent,t.t0){t.next=14;break}t.t0={};case 14:n=t.t0,t.next=19;break;case 17:t.prev=17,t.t1=t.catch(8);case 19:return r=Object.values(n).map((function(t){return i.utils.HashToAddress(t)})),this.Log("Content space types:"),this.Log(r),e=e.concat(r).filter((function(t){return t})).map((function(t){return i.utils.FormatAddress(t)})).filter((function(t,e,n){return n.indexOf(t)===e})),t.next=25,Promise.all(e.map(function(){var t=o(s.mark((function t(e){var n;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=i.utils.AddressToObjectId(e),i.contentTypes[n]){t.next=11;break}return t.prev=2,t.next=5,i.ContentType({typeId:n,publicOnly:!0});case 5:i.contentTypes[n]=t.sent,t.next=11;break;case 8:t.prev=8,t.t0=t.catch(2),console.error(t.t0);case 11:case"end":return t.stop()}}),t,null,[[2,8]])})));return function(e){return t.apply(this,arguments)}}()));case 25:return t.abrupt("return",this.contentTypes);case 26:case"end":return t.stop()}}),t,this,[[8,17]])}))),e.ContentLibraries=o(s.mark((function t(){var e,n=this;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.Collection({collectionType:"libraries"});case 2:return e=t.sent,t.abrupt("return",e.map((function(t){return n.utils.AddressToLibraryId(t)})));case 4:case"end":return t.stop()}}),t,this)}))),e.ContentLibrary=function(){var t=o(s.mark((function t(e){var n,r,i;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,f(n),r=A("qlibs",n),t.t0=this.utils,t.t1=this.HttpClient,t.next=7,this.authClient.AuthorizationHeader({libraryId:n});case 7:return t.t2=t.sent,t.t3=r,t.t4={headers:t.t2,method:"GET",path:t.t3},t.t5=t.t1.Request.call(t.t1,t.t4),t.next=13,t.t0.ResponseToJson.call(t.t0,t.t5);case 13:return i=t.sent,t.abrupt("return",c(c({},i),{},{meta:i.meta||{}}));case 15:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentLibraryOwner=function(){var t=o(s.mark((function t(e){var n;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,f(n),t.t0=this.utils,t.next=5,this.ethClient.CallContractMethod({contractAddress:this.utils.HashToAddress(n),methodName:"owner",methodArgs:[]});case 5:return t.t1=t.sent,t.abrupt("return",t.t0.FormatAddress.call(t.t0,t.t1));case 7:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.LibraryContentTypes=function(){var t=o(s.mark((function t(e){var n,r,i,a=this;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,f(n),this.Log("Retrieving library content types for ".concat(n)),t.next=5,this.ethClient.CallContractMethod({contractAddress:this.utils.HashToAddress(n),methodName:"contentTypesLength",methodArgs:[]});case 5:if(r=t.sent.toNumber(),this.Log("".concat(r," types")),0!==r){t.next=9;break}return t.abrupt("return",{});case 9:return i={},t.next=12,Promise.all(Array.from(new Array(r),function(){var t=o(s.mark((function t(e,r){var o,u;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.ethClient.CallContractMethod({contractAddress:a.utils.HashToAddress(n),methodName:"contentTypes",methodArgs:[r]});case 2:return o=t.sent,u=a.utils.AddressToObjectId(o),t.next=6,a.ContentType({typeId:u});case 6:i[u]=t.sent;case 7:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()));case 12:return this.Log(i),t.abrupt("return",i);case 14:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjects=function(){var t=o(s.mark((function t(e){var n,r,i,a,o,u,c;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.filterOptions,i=void 0===r?{}:r,f(n),this.Log("Retrieving content objects from ".concat(n)),a=A("qlibs",n,"q"),o={filter:[]},i.cacheId&&(o.cache_id=i.cacheId),i.start&&(o.start=i.start),i.limit&&(o.limit=i.limit),i.select&&(o.select=i.select),i.sort&&(o.sort_by=i.sort,i.sortDesc&&(o.sort_descending=!0)),u={eq:":eq:",neq:":ne:",lt:":lt:",lte:":le:",gt:":gt:",gte:":ge:",cnt:":co:",ncnt:":nc:"},c=function(t){var e=t.key,n=t.type,r=t.filter;o.filter.push("".concat(e).concat(u[n]).concat(r))},i.filter&&(Array.isArray(i.filter)?i.filter.forEach((function(t){return c(t)})):c(i.filter)),this.Log("Filter options:"),this.Log(i),t.t0=this.utils,t.t1=this.HttpClient,t.next=19,this.authClient.AuthorizationHeader({libraryId:n});case 19:return t.t2=t.sent,t.t3=a,t.t4=o,t.t5={headers:t.t2,method:"GET",path:t.t3,queryParams:t.t4},t.t6=t.t1.Request.call(t.t1,t.t5),t.next=26,t.t0.ResponseToJson.call(t.t0,t.t6);case 26:return t.abrupt("return",t.sent);case 27:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObject=function(){var t=o(s.mark((function t(e){var n,r,i,a;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.versionHash,m({libraryId:n,objectId:r,versionHash:i}),this.Log("Retrieving content object: ".concat(n||""," ").concat(r||i)),i&&(r=this.utils.DecodeVersionHash(i).objectId),a=A("q",i||r),t.t0=this.utils,t.t1=this.HttpClient,t.next=9,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,versionHash:i});case 9:return t.t2=t.sent,t.t3=a,t.t4={headers:t.t2,method:"GET",path:t.t3},t.t5=t.t1.Request.call(t.t1,t.t4),t.next=15,t.t0.ResponseToJson.call(t.t0,t.t5);case 15:return t.abrupt("return",t.sent);case 16:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectOwner=function(){var t=o(s.mark((function t(e){var n;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.objectId,l(n),this.Log("Retrieving content object owner: ".concat(n)),t.t0=this.utils,t.next=6,this.ethClient.CallContractMethod({contractAddress:this.utils.HashToAddress(n),methodName:"owner",methodArgs:[]});case 6:return t.t1=t.sent,t.abrupt("return",t.t0.FormatAddress.call(t.t0,t.t1));case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectTenantId=function(){var t=o(s.mark((function t(e){var n,r;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.objectId,(r=e.versionHash)?h(r):l(n),r&&(n=this.utils.DecodeVersionHash(r).objectId),this.objectTenantIds[n]){t.next=7;break}return t.next=6,this.authClient.MakeElvMasterCall({methodName:"elv_getTenantById",params:[this.contentSpaceId,n]});case 6:this.objectTenantIds[n]=t.sent;case 7:return t.abrupt("return",this.objectTenantIds[n]);case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectLibraryId=function(){var t=o(s.mark((function t(e){var n,r,i=this;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.objectId,(r=e.versionHash)?h(r):l(n),r&&(n=this.utils.DecodeVersionHash(r).objectId),t.next=5,this.authClient.AccessType(n);case 5:t.t0=t.sent,t.next=t.t0===this.authClient.ACCESS_TYPES.LIBRARY?8:t.t0===this.authClient.ACCESS_TYPES.OBJECT?9:t.t0===this.authClient.ACCESS_TYPES.OTHER?20:21;break;case 8:return t.abrupt("return",this.utils.AddressToLibraryId(this.utils.HashToAddress(n)));case 9:return this.objectLibraryIds[n]||(this.Log("Retrieving content object library ID: ".concat(n||r)),this.objectLibraryIds[n]=new Promise(function(){var t=o(s.mark((function t(e,r){return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.t0=e,t.t1=i.utils,t.next=5,i.CallContractMethod({contractAddress:i.utils.HashToAddress(n),methodName:"libraryAddress"});case 5:t.t2=t.sent,t.t3=t.t1.AddressToLibraryId.call(t.t1,t.t2),(0,t.t0)(t.t3),t.next=13;break;case 10:t.prev=10,t.t4=t.catch(0),r(t.t4);case 13:case"end":return t.stop()}}),t,null,[[0,10]])})));return function(e,n){return t.apply(this,arguments)}}())),t.prev=10,t.next=13,this.objectLibraryIds[n];case 13:return t.abrupt("return",t.sent);case 16:throw t.prev=16,t.t1=t.catch(10),delete this.objectLibraryIds[n],t.t1;case 20:throw Error("Unable to retrieve library ID for ".concat(r||n,": Unknown type. (wrong network or deleted object?)"));case 21:return t.abrupt("return",this.contentSpaceLibraryId);case 22:case"end":return t.stop()}}),t,this,[[10,16]])})));return function(e){return t.apply(this,arguments)}}(),e.ProduceMetadataLinks=function(){var t=o(s.mark((function t(e){var n,r,a,u,d,p,f,l,h,y=this;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,a=e.versionHash,u=e.path,d=void 0===u?"/":u,p=e.metadata,f=e.authorizationToken,l=e.noAuth,p&&"object"===i(p)){t.next=3;break}return t.abrupt("return",p);case 3:if(!Array.isArray(p)){t.next=7;break}return t.next=6,this.utils.LimitedMap(5,p,function(){var t=o(s.mark((function t(e,i){return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,y.ProduceMetadataLinks({libraryId:n,objectId:r,versionHash:a,path:A(d,i.toString()),metadata:e,authorizationToken:f,noAuth:l});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}());case 6:return t.abrupt("return",t.sent);case 7:if(!p["/"]||!p["/"].match(/\.\/(rep|files)\/.+/)&&!p["/"].match(/^\/?qfab\/([\w]+)\/?(rep|files)\/.+/)){t.next=16;break}return t.t0=c,t.t1=c({},p),t.t2={},t.next=13,this.LinkUrl({libraryId:n,objectId:r,versionHash:a,linkPath:d,authorizationToken:f});case 13:return t.t3=t.sent,t.t4={url:t.t3},t.abrupt("return",(0,t.t0)(t.t1,t.t2,t.t4));case 16:return h={},t.next=19,this.utils.LimitedMap(5,Object.keys(p),function(){var t=o(s.mark((function t(e){return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,y.ProduceMetadataLinks({libraryId:n,objectId:r,versionHash:a,path:A(d,e),metadata:p[e],authorizationToken:f,noAuth:l});case 2:h[e]=t.sent;case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 19:return t.abrupt("return",h);case 20:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.MetadataAuth=function(){var t=o(s.mark((function t(e){var n,r,i,a,o,u,c,A,d,p,f,l,h;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,i=e.versionHash,a=e.path,o=void 0===a?"/":a,u=e.channelAuth,c=void 0!==u&&u,A=e.noAuth,d=void 0!==A&&A,m({libraryId:n,objectId:r,versionHash:i}),i&&(r=this.utils.DecodeVersionHash(i).objectId),d=this.noAuth||d,p=d,d){t.next=14;break}return t.next=8,this.Visibility({id:r});case 8:return l=t.sent,t.next=11,this.AccessType({id:r});case 11:f=t.sent,p=(o||"").replace(/^\/+/,"").startsWith("public"),d=l>=10||p&&l>=1;case 14:if(!this.oauthToken){t.next=22;break}return t.next=17,this.authClient.KMSAddress({objectId:r,versionHash:i});case 17:if(!(h=t.sent)||this.utils.EqualAddress(h,this.utils.nullAddress)){t.next=22;break}return t.next=21,this.authClient.AuthorizationToken({libraryId:n,objectId:r,versionHash:i,channelAuth:!0,oauthToken:this.oauthToken});case 21:return t.abrupt("return",t.sent);case 22:if(this.inaccessibleLibraries[n]||!p||f!==this.authClient.ACCESS_TYPES.OBJECT||c){t.next=48;break}if(t.prev=23,t.t0=this.authClient,t.t1=n,t.t1){t.next=30;break}return t.next=29,this.ContentObjectLibraryId({objectId:r,versionHash:i});case 29:t.t1=t.sent;case 30:return t.t2=t.t1,t.t3=d,t.t4={libraryId:t.t2,noAuth:t.t3},t.next=35,t.t0.AuthorizationToken.call(t.t0,t.t4);case 35:return t.abrupt("return",t.sent);case 38:if(t.prev=38,t.t5=t.catch(23),!t.t5.message||!t.t5.message.toLowerCase().startsWith("access denied")){t.next=45;break}return this.inaccessibleLibraries[n]=!0,t.next=44,this.authClient.AuthorizationToken({libraryId:n,objectId:r,versionHash:i,noAuth:d,channelAuth:c});case 44:return t.abrupt("return",t.sent);case 45:throw t.t5;case 46:t.next=51;break;case 48:return t.next=50,this.authClient.AuthorizationToken({libraryId:n,objectId:r,versionHash:i,noAuth:d,channelAuth:c});case 50:return t.abrupt("return",t.sent);case 51:case"end":return t.stop()}}),t,this,[[23,38]])})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectMetadata=function(){var t=o(s.mark((function t(e){var n,r,i,a,o,u,d,p,f,l,h,y,g,b,I,C,v,E,w,B,Q,M,k,_,x,S,D,R,T;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.versionHash,a=e.writeToken,o=e.metadataSubtree,u=void 0===o?"/":o,d=e.queryParams,p=void 0===d?{}:d,f=e.select,l=void 0===f?[]:f,h=e.remove,y=void 0===h?[]:h,g=e.authorizationToken,b=e.noAuth,I=void 0!==b&&b,C=e.resolveLinks,v=void 0!==C&&C,E=e.resolveIncludeSource,w=void 0!==E&&E,B=e.resolveIgnoreErrors,Q=void 0!==B&&B,M=e.linkDepthLimit,k=void 0===M?1:M,_=e.produceLinkUrls,x=void 0!==_&&_,m({libraryId:n,objectId:r,versionHash:i}),this.Log("Retrieving content object metadata: ".concat(n||""," ").concat(r||i," ").concat(a||"","\n Subtree: ").concat(u)),p=c({},p||{}),i&&(r=this.utils.DecodeVersionHash(i).objectId),S=A("q",a||i||r,"meta",u),t.next=8,this.MetadataAuth({libraryId:n,objectId:r,versionHash:i,path:u,noAuth:I});case 8:return D=t.sent,R=[g,p.authorization,D].flat().filter((function(t){return t})),delete p.authorization,t.prev=11,t.next=14,this.utils.ResponseToJson(this.HttpClient.Request({headers:{Authorization:R.map((function(t){return"Bearer ".concat(t)}))},queryParams:c(c({},p),{},{select:l,remove:y,link_depth:k,resolve:v,resolve_include_source:w,resolve_ignore_errors:Q}),method:"GET",path:S}));case 14:T=t.sent,t.next=22;break;case 17:if(t.prev=17,t.t0=t.catch(11),404===t.t0.status){t.next=21;break}throw t.t0;case 21:T="/"===u?{}:void 0;case 22:if(x){t.next=24;break}return t.abrupt("return",T);case 24:return t.next=26,this.ProduceMetadataLinks({libraryId:n,objectId:r,versionHash:i,path:u,metadata:T,authorizationToken:g,noAuth:I});case 26:return t.abrupt("return",t.sent);case 27:case"end":return t.stop()}}),t,this,[[11,17]])})));return function(e){return t.apply(this,arguments)}}(),e.AssetMetadata=function(){var t=o(s.mark((function t(e){var n,i,a,o,u,d,p,f,l,h=this;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,i=e.objectId,a=e.versionHash,o=e.metadata,u=e.localization,d=e.noAuth,p=e.produceLinkUrls,f=void 0!==p&&p,m({libraryId:n,objectId:i,versionHash:a}),i||(i=this.utils.DecodeVersionHash(a).objectId),o){t.next=12;break}return t.next=6,this.ContentObjectMetadata({libraryId:n,objectId:i,versionHash:a,metadataSubtree:"public/asset_metadata",resolveLinks:!0,linkDepthLimit:2,resolveIgnoreErrors:!0,produceLinkUrls:f,noAuth:d});case 6:if(t.t0=t.sent,t.t0){t.next=9;break}t.t0={};case 9:o=t.t0,t.next=16;break;case 12:if(!f){t.next=16;break}return t.next=15,this.ProduceMetadataLinks({libraryId:n,objectId:i,versionHash:a,path:A("public","asset_metadata"),metadata:o,noAuth:d});case 15:o=t.sent;case 16:return o.info||(o.info={}),l=c({},o),u&&u.reverse().forEach((function(t){var e,n=(e=h.utils).SafeTraverse.apply(e,[o].concat(r(t)))||{};l=b({},l,n,(function(t,e){return null===e||""===e?t:void 0}))})),t.abrupt("return",l);case 20:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectVersions=function(){var t=o(s.mark((function t(e){var n,r,i;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,m({libraryId:n,objectId:r}),this.Log("Retrieving content object versions: ".concat(n||""," ").concat(r)),i=A("qid",r),t.t0=this.utils,t.t1=this.HttpClient,t.next=8,this.authClient.AuthorizationHeader({libraryId:n,objectId:r});case 8:return t.t2=t.sent,t.t3=i,t.t4={headers:t.t2,method:"GET",path:t.t3},t.t5=t.t1.Request.call(t.t1,t.t4),t.abrupt("return",t.t0.ResponseToJson.call(t.t0,t.t5));case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.LatestVersionHash=function(){var t=o(s.mark((function t(e){var n,r,i,a;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.objectId,(r=e.versionHash)&&(n=this.utils.DecodeVersionHash(r).objectId),l(n),t.prev=3,t.next=6,this.CallContractMethod({contractAddress:this.utils.HashToAddress(n),methodName:"objectHash"});case 6:i=t.sent,t.next=11;break;case 9:t.prev=9,t.t0=t.catch(3);case 11:if(i){t.next=20;break}return t.next=14,this.CallContractMethod({contractAddress:this.utils.HashToAddress(n),methodName:"countVersionHashes"});case 14:if((a=t.sent).toNumber()){t.next=17;break}throw Error("Unable to determine latest version hash for ".concat(r||n," - Item deleted?"));case 17:return t.next=19,this.CallContractMethod({contractAddress:this.utils.HashToAddress(n),methodName:"versionHashes",methodArgs:[a-1]});case 19:i=t.sent;case 20:return t.abrupt("return",i);case 21:case"end":return t.stop()}}),t,this,[[3,9]])})));return function(e){return t.apply(this,arguments)}}(),e.AvailableDRMs=o(s.mark((function t(){var e,n,r,i,a,o,u,c,A;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=["clear","aes-128"],"undefined"!=typeof window){t.next=3;break}return t.abrupt("return",e);case 3:if(window.navigator&&window.navigator.userAgent&&((n=window.navigator.userAgent.match(/(iPad|iPhone|iphone|iPod).*?(OS |os |OS_)(\d+((_|\.)\d)?((_|\.)\d)?)/))&&n[3]&&(r=n[3].split("_"),i=parseInt(r[0]),a=parseInt(r[1]),(i>13||13===i&&a>=1)&&(e[1]="sample-aes",e[2]="fairplay")),/^((?!chrome|android).)*safari/i.test(window.navigator.userAgent)&&(o=window.navigator.userAgent.match(/.+Version\/(\d+)\.(\d+)/))&&o[2]&&(u=parseInt(o[1]),c=parseInt(o[2]),(u>13||13===u&&c>=1)&&(e[1]="sample-aes",e[2]="fairplay"))),"undefined"==typeof window||"function"==typeof window.navigator.requestMediaKeySystemAccess){t.next=6;break}return t.abrupt("return",e);case 6:return t.prev=6,A=[{initDataTypes:["cenc"],audioCapabilities:[{contentType:'audio/mp4;codecs="mp4a.40.2"'}],videoCapabilities:[{contentType:'video/mp4;codecs="avc1.42E01E"'}]}],t.next=10,navigator.requestMediaKeySystemAccess("com.widevine.alpha",A);case 10:e.push("widevine"),t.next=15;break;case 13:t.prev=13,t.t0=t.catch(6);case 15:return t.abrupt("return",e);case 16:case"end":return t.stop()}}),t,null,[[6,13]])}))),e.PlayoutPathResolution=function(){var t=o(s.mark((function t(e){var n,r,i,a,o,u,c,d,p,f,l,h,y,g,m,b,I;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,i=e.versionHash,a=e.writeToken,o=e.linkPath,u=e.handler,c=e.offering,d=void 0===c?"":c,p=e.signedLink,f=void 0!==p&&p,l=e.authorizationToken,n){t.next=5;break}return t.next=4,this.ContentObjectLibraryId({objectId:r});case 4:n=t.sent;case 5:if(i){t.next=9;break}return t.next=8,this.LatestVersionHash({objectId:r});case 8:i=t.sent;case 9:if(h=A("qlibs",n,"q",a||i,"rep",u,d,"options.json"),!o){t.next=26;break}return t.next=13,this.ContentObjectMetadata({libraryId:n,objectId:r,versionHash:i,writeToken:a,metadataSubtree:o,resolveLinks:!1,resolveIgnoreErrors:!0,resolveIncludeSource:!0,authorizationToken:l});case 13:if(I=t.sent,b=!!I&&!!I["/"]&&!I["/"].endsWith("options.json"),h=A("qlibs",n,"q",a||i,"meta",o),f){t.next=25;break}return t.next=19,this.LinkTarget({libraryId:n,objectId:r,versionHash:i,writeToken:a,linkPath:o,linkInfo:I,authorizationToken:l});case 19:return m=t.sent,g=this.utils.DecodeVersionHash(m).objectId,t.next=23,this.ContentObjectLibraryId({objectId:g});case 23:y=t.sent,b||d||(h=A("q",m,"rep",u,"options.json"));case 25:b&&(h=A(h,d,"options.json"));case 26:return t.abrupt("return",{path:h,multiOfferingLink:b,linkTarget:{libraryId:y,objectId:g,versionHash:m}});case 27:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AvailableOfferings=function(){var t=o(s.mark((function t(e){var n,r,i,a,o,u,c,A,d,p,f,l;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.objectId,r=e.versionHash,i=e.writeToken,a=e.linkPath,o=e.signedLink,u=e.directLink,c=e.handler,A=void 0===c?"playout":c,d=e.authorizationToken,n||(n=this.utils.DecodeVersionHash(r).objectId),!u){t.next=15;break}return t.t0=this,t.next=6,this.ContentObjectLibraryId({objectId:n});case 6:return t.t1=t.sent,t.t2=n,t.t3=r,t.t4=a,t.t5=d,t.t6={libraryId:t.t1,objectId:t.t2,versionHash:t.t3,metadataSubtree:t.t4,resolveLinks:!0,authorizationToken:t.t5},t.next=14,t.t0.ContentObjectMetadata.call(t.t0,t.t6);case 14:return t.abrupt("return",t.sent);case 15:return t.next=17,this.PlayoutPathResolution({objectId:n,versionHash:r,writeToken:i,linkPath:a,signedLink:o,handler:A,authorizationToken:d});case 17:return p=t.sent,f=p.path,t.prev=19,t.t7=d,t.next=23,this.authClient.AuthorizationToken({objectId:n,channelAuth:!0,oauthToken:this.oauthToken});case 23:return t.t8=t.sent,l=[t.t7,t.t8].flat().filter((function(t){return t})),t.next=27,this.utils.ResponseToJson(this.HttpClient.Request({path:f,method:"GET",headers:{Authorization:"Bearer ".concat(l.join(","))}}));case 27:return t.abrupt("return",t.sent);case 30:if(t.prev=30,t.t9=t.catch(19),!t.t9.status||500!==parseInt(t.t9.status)){t.next=34;break}return t.abrupt("return",{});case 34:throw t.t9;case 35:case"end":return t.stop()}}),t,this,[[19,30]])})));return function(e){return t.apply(this,arguments)}}(),e.PlayoutOptions=function(){var t=o(s.mark((function t(e){var n,r,i,u,d,p,f,y,g,m,b,I,C,v,E,w,B,Q,M,k,_,x,S,D,R,T,N,O,H,L,U,F,j,P,G,q,Y,K,z,J,V,W,Z,X,$,tt,et=this;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.offeringURI,r=e.objectId,i=e.versionHash,u=e.writeToken,d=e.linkPath,p=e.signedLink,f=void 0!==p&&p,y=e.protocols,g=void 0===y?["dash","hls"]:y,m=e.handler,b=void 0===m?"playout":m,I=e.offering,C=void 0===I?"default":I,v=e.playoutType,E=e.drms,w=void 0===E?[]:E,B=e.context,Q=e.hlsjsProfile,M=void 0===Q||Q,k=e.authorizationToken,_=e.options,x=void 0===_?{}:_,!n){t.next=8;break}if(S=n.match(/(hq__[^/]+)\/rep\/([^/]+)\/([^/]+)\/options.json/),i=S[1],b=S[2],C=S[3],i&&b&&C){t.next=8;break}throw Error("Invalid offering URI: ".concat(n));case 8:if(i?h(i):l(r),g=g.map((function(t){return t.toLowerCase()})),w=w.map((function(t){return t.toLowerCase()})),r){t.next=15;break}r=this.utils.DecodeVersionHash(i).objectId,t.next=19;break;case 15:if(i){t.next=19;break}return t.next=18,this.LatestVersionHash({objectId:r});case 18:i=t.sent;case 19:return t.next=21,this.ContentObjectLibraryId({objectId:r});case 21:if(D=t.sent,t.prev=22,d){t.next=29;break}return R=A("public","asset_metadata","sources",C),t.next=27,this.ContentObjectMetadata({libraryId:D,objectId:r,versionHash:i,metadataSubtree:R,authorizationToken:k});case 27:t.sent&&(d=R);case 29:t.next=33;break;case 31:t.prev=31,t.t0=t.catch(22);case 33:return t.next=35,this.PlayoutPathResolution({libraryId:D,objectId:r,versionHash:i,writeToken:u,linkPath:d,signedLink:f,handler:b,offering:C,authorizationToken:k});case 35:if(T=t.sent,N=T.path,O=T.linkTarget,t.t1=this.authClient,t.t2=O.objectId||r,t.t3=O.versionHash||i,t.t3){t.next=45;break}return t.next=44,this.LatestVersionHash({objectId:r});case 44:t.t3=t.sent;case 45:return t.t4=t.t3,t.t5=g,t.t6=w,t.t7=B,t.t8={objectId:t.t2,versionHash:t.t4,protocols:t.t5,drms:t.t6,context:t.t7},H=t.t1.AudienceData.call(t.t1,t.t8),t.t9=k,t.next=54,this.authClient.AuthorizationToken({libraryId:D,objectId:r,channelAuth:!0,oauthToken:this.oauthToken,audienceData:H});case 54:return t.t10=t.sent,L=[t.t9,t.t10].flat().filter((function(t){return t})),U=c({authorization:L,resolve:!!d},x),t.t11=Object,t.next=60,this.utils.ResponseToJson(this.HttpClient.Request({path:N,method:"GET",queryParams:U}));case 60:if(t.t12=t.sent,F=t.t11.values.call(t.t11,t.t12),f||!O.versionHash){t.next=68;break}return t.t13=k,t.next=66,this.authClient.AuthorizationToken({libraryId:O.libraryId,objectId:O.objectId,channelAuth:!0,oauthToken:this.oauthToken,audienceData:H});case 66:t.t14=t.sent,U.authorization=[t.t13,t.t14].flat().filter((function(t){return t}));case 68:j={},q=0;case 70:if(!(q<F.length)){t.next=116;break}if(Y=F[q],K=Y.properties.protocol,z=Y.properties.drm,P=P||Y.sid,G=G||!!Y.properties.multiview,P&&(U.sid=P),J=Y.uri.split("?")[0],v&&(J=J.replace("playlist","playlist-".concat(v))),V=Y.properties.license_servers,W=Y.properties.cert,M&&"hls"===K&&"aes-128"===z&&(U.player_profile="hls-js"),t.t15=c,t.t16=c({},j[K]||{}),t.t17={},t.t18=c,t.t19=c({},(j[K]||{}).playoutMethods||{}),t.t20={},t.t21=a,t.t22={},t.t23=z||"clear",!f){t.next=97;break}return t.next=94,this.LinkUrl({versionHash:i,linkPath:A(d,C,J),queryParams:U,noAuth:!0});case 94:t.t24=t.sent,t.next=100;break;case 97:return t.next=99,this.Rep({libraryId:O.libraryId||D,objectId:O.objectId||r,versionHash:O.versionHash||i,rep:A(b,C,J),noAuth:!0,queryParams:U});case 99:t.t24=t.sent;case 100:for(Z in t.t25=t.t24,t.t26=z?a({},z,{licenseServers:V,cert:W}):void 0,t.t27={playoutUrl:t.t25,drms:t.t26},t.t28=(0,t.t21)(t.t22,t.t23,t.t27),t.t29=(0,t.t18)(t.t19,t.t20,t.t28),t.t30={playoutMethods:t.t29},j[K]=(0,t.t15)(t.t16,t.t17,t.t30),j[K].playoutMethods)j[K].playoutMethods[Z].drms&&j[K].playoutMethods[Z].drms[z]&&j[K].playoutMethods[Z].drms[z].cert&&((X=new URL(j[K].playoutMethods[Z].playoutUrl)).pathname=X.pathname.split("/").slice(0,-1).concat(["drm.cert"]).join("/"),j[K].playoutMethods[Z].drms[z].cert_url=X.toString());if($=g.includes(K),tt=w.includes(z||"clear")||0===w.length&&!z,$&&tt){t.next=112;break}return t.abrupt("continue",113);case 112:(!j[K].playoutUrl||z&&"clear"!==z)&&(j[K].playoutUrl=j[K].playoutMethods[z||"clear"].playoutUrl,j[K].drms=j[K].playoutMethods[z||"clear"].drms);case 113:q++,t.next=70;break;case 116:return G&&P&&(j.sessionId=P,j.multiview=!0,j.AvailableViews=o(s.mark((function t(){return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=et.utils,t.next=3,et.HttpClient.Request({path:A("q",O.versionHash||i,"rep",b,C,"views.json"),method:"GET",queryParams:{sid:P,authorization:L}});case 3:return t.t1=t.sent,t.next=6,t.t0.ResponseToFormat.call(t.t0,"json",t.t1);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)}))),j.SwitchView=function(){var t=o(s.mark((function t(e){return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,et.HttpClient.Request({path:A("q",O.versionHash||i,"rep",b,C,"select_view"),method:"POST",queryParams:{sid:P,authorization:L},body:{view:e}});case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),this.Log(j),t.abrupt("return",j);case 119:case"end":return t.stop()}}),t,this,[[22,31]])})));return function(e){return t.apply(this,arguments)}}(),e.BitmovinPlayoutOptions=function(){var t=o(s.mark((function t(e){var n,r,i,a,o,u,c,A,d,p,f,y,g,m,b,I,C,v,E,w,B,Q,M,k;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.objectId,r=e.versionHash,i=e.writeToken,a=e.linkPath,o=e.signedLink,u=void 0!==o&&o,c=e.protocols,A=void 0===c?["dash","hls"]:c,d=e.drms,p=void 0===d?[]:d,f=e.handler,y=void 0===f?"playout":f,g=e.offering,m=void 0===g?"default":g,b=e.playoutType,I=e.context,C=e.authorizationToken,v=e.options,E=void 0===v?{}:v,r?h(r):l(n),n||(n=this.utils.DecodeVersionHash(r).objectId),t.next=5,this.PlayoutOptions({objectId:n,versionHash:r,writeToken:i,linkPath:a,signedLink:u,protocols:A,drms:p,handler:y,offering:m,playoutType:b,hlsjsProfile:!1,context:I,authorizationToken:C,options:E});case 5:return delete(w=t.sent).playoutMethods,t.next=9,this.PlayoutPathResolution({objectId:n,versionHash:r,writeToken:i,linkPath:a,signedLink:u,handler:y,offering:m,authorizationToken:C});case 9:if(B=t.sent,Q=B.linkTarget,M=[],C&&M.push(C),!u&&Q.versionHash){t.next=21;break}return t.t0=M,t.next=17,this.authClient.AuthorizationToken({objectId:n,channelAuth:!0,oauthToken:this.oauthToken});case 17:t.t1=t.sent,t.t0.push.call(t.t0,t.t1),t.next=26;break;case 21:return t.t2=M,t.next=24,this.authClient.AuthorizationToken({libraryId:Q.libraryId,objectId:Q.objectId,channelAuth:!0,oauthToken:this.oauthToken});case 24:t.t3=t.sent,t.t2.push.call(t.t2,t.t3);case 26:return k={drm:{}},Object.keys(w).forEach((function(t){var e=w[t];k[t]=e.playoutUrl,e.drms&&Object.keys(e.drms).forEach((function(t){if(e.drms[t].licenseServers&&0!==e.drms[t].licenseServers.length){var n=function(t){return t.toLowerCase().startsWith("https")},r=e.drms[t].licenseServers;r.find(n)&&(r=r.filter(n));var i=r.sort((function(){return.5-Math.random()}))[0];k.drm[t]||(k.drm[t]={LA_URL:i,headers:{Authorization:"Bearer ".concat(M.flat().filter((function(t){return t})).join(","))}})}}))})),t.abrupt("return",k);case 29:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CallBitcodeMethod=function(){var t=o(s.mark((function t(e){var n,r,i,a,o,u,c,d,p,f,l,h,y,g,b,I;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,i=e.versionHash,a=e.writeToken,o=e.method,u=e.queryParams,c=void 0===u?{}:u,d=e.body,p=void 0===d?{}:d,f=e.headers,l=void 0===f?{}:f,h=e.constant,y=void 0===h||h,g=e.format,b=void 0===g?"json":g,m({libraryId:n,objectId:r,versionHash:i}),o){t.next=4;break}throw"Bitcode method not specified";case 4:if(i&&(r=this.utils.DecodeVersionHash(i).objectId),I=A("q",a||i||r,"call",o),n&&(I=A("qlibs",n,I)),l.authorization||l.Authorization){t.next=12;break}return t.next=11,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,update:!y});case 11:l.Authorization=t.sent.Authorization;case 12:return this.Log("Calling bitcode method: ".concat(n||""," ").concat(r||i," ").concat(a||"","\n ").concat(y?"GET":"POST"," ").concat(I,"\n Query Params:\n ").concat(JSON.stringify(c||""),"\n Body:\n ").concat(JSON.stringify(p||""),"\n Headers\n ").concat(JSON.stringify(l||""))),t.t0=this.utils,t.t1=b,t.next=17,this.HttpClient.Request({body:p,headers:l,method:y?"GET":"POST",path:I,queryParams:c,failover:!1});case 17:return t.t2=t.sent,t.abrupt("return",t.t0.ResponseToFormat.call(t.t0,t.t1,t.t2));case 19:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.Rep=function(){var t=o(s.mark((function t(e){var n,r,i,a,o,u,c,A,d,p,f,l;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,i=e.versionHash,a=e.rep,o=e.queryParams,u=void 0===o?{}:o,c=e.channelAuth,A=void 0!==c&&c,d=e.noAuth,p=void 0!==d&&d,f=e.noCache,l=void 0!==f&&f,m({libraryId:n,objectId:r,versionHash:i}),a){t.next=4;break}throw"Rep not specified";case 4:return t.abrupt("return",this.FabricUrl({libraryId:n,objectId:r,versionHash:i,rep:a,queryParams:u,channelAuth:A,noAuth:p,noCache:l}));case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.PublicRep=function(){var t=o(s.mark((function t(e){var n,r,i,a,o,u;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,i=e.versionHash,a=e.rep,o=e.queryParams,u=void 0===o?{}:o,m({libraryId:n,objectId:r,versionHash:i}),a){t.next=4;break}throw"Rep not specified";case 4:return t.abrupt("return",this.FabricUrl({libraryId:n,objectId:r,versionHash:i,publicRep:a,queryParams:u,noAuth:!0}));case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.FabricUrl=function(){var t=o(s.mark((function t(e){var n,r,i,a,o,u,d,p,f,l,h,y,g,b,I,C,v,E;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,i=e.versionHash,a=e.writeToken,o=e.partHash,u=e.rep,d=e.publicRep,p=e.call,f=e.queryParams,l=void 0===f?{}:f,h=e.channelAuth,y=void 0!==h&&h,g=e.noAuth,b=void 0!==g&&g,I=e.noCache,C=void 0!==I&&I,(r||i)&&m({libraryId:n,objectId:r,versionHash:i}),i&&(r=this.utils.DecodeVersionHash(i).objectId),this.Log("Building Fabric URL:\n libraryId: ".concat(n,"\n objectId: ").concat(r,"\n versionHash: ").concat(i,"\n writeToken: ").concat(a,"\n partHash: ").concat(o,"\n rep: ").concat(u,"\n publicRep: ").concat(d,"\n call: ").concat(p,"\n channelAuth: ").concat(y,"\n noAuth: ").concat(b,"\n noCache: ").concat(C,"\n queryParams: ").concat(JSON.stringify(l||{},null,2))),v=[],l.authorization&&v.push(l.authorization),b&&l.authorization){t.next=12;break}return t.t0=v,t.next=10,this.authClient.AuthorizationToken({libraryId:n,objectId:r,versionHash:i,channelAuth:y,noAuth:b,noCache:C});case 10:t.t1=t.sent,t.t0.push.call(t.t0,t.t1);case 12:if(l=c(c({},l),{},{authorization:v.flat()}),!u&&!d||!r||i){t.next=17;break}return t.next=16,this.LatestVersionHash({objectId:r});case 16:i=t.sent;case 17:return E="",n?(E=A(E,"qlibs",n),(r||i)&&(E=A(E,"q",a||i||r))):i&&(E=A("q",i)),o?E=A(E,"data",o):u?E=A(E,"rep",u):d?E=A(E,"public",d):p&&(E=A(E,"call",p)),t.abrupt("return",this.HttpClient.URL({path:E,queryParams:l}));case 21:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.FileUrl=function(){var t=o(s.mark((function t(e){var n,r,i,a,o,u,d,p,f,l,h,y;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,i=e.versionHash,a=e.writeToken,o=e.filePath,u=e.queryParams,d=void 0===u?{}:u,p=e.noCache,f=void 0!==p&&p,m({libraryId:n,objectId:r,versionHash:i}),o){t.next=4;break}throw"File path not specified";case 4:return i&&(r=this.utils.DecodeVersionHash(i).objectId),l=n?A("qlibs",n,"q",a||i||r):A("q",i),t.next=8,this.authClient.AuthorizationToken({libraryId:n,objectId:r,noCache:f});case 8:return h=t.sent,d=c(c({},d),{},{authorization:h}),t.next=12,this.ContentObjectMetadata({libraryId:n,objectId:r,versionHash:i,writeToken:a,metadataSubtree:A("files",o)});case 12:return y=t.sent,y&&y["."].encryption&&"cgck"===y["."].encryption.scheme?(l=A(l,"rep","files_download",o),d["header-x_decryption_mode"]="decrypt"):l=A(l,"files",o),t.abrupt("return",this.HttpClient.URL({path:l,queryParams:d}));case 16:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectImageUrl=function(){var t=o(s.mark((function t(e){var n,r,i,a,o,u,c;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,i=e.versionHash,a=e.height,o=e.imagePath,u=void 0===o?"public/display_image":o,m({libraryId:n,objectId:r,versionHash:i}),i){t.next=6;break}return t.next=5,this.LatestVersionHash({objectId:r});case 5:i=t.sent;case 6:if(this.Log("Retrieving content object image url: ".concat(n," ").concat(r," ").concat(i)),this.objectImageUrls[i]){t.next=26;break}return t.prev=8,t.next=11,this.ContentObjectMetadata({versionHash:i,metadataSubtree:u});case 11:if(t.sent){t.next=15;break}return this.Log("No image url set: ".concat(n," ").concat(r," ").concat(i)),t.abrupt("return");case 15:t.next=21;break;case 17:t.prev=17,t.t0=t.catch(8),this.Log("Unable to query for image metadata: ".concat(n," ").concat(r," ").concat(i),!0),this.Log(t.t0,!0);case 21:return c={},a&&!isNaN(parseInt(a))&&(c.height=parseInt(a)),t.next=25,this.LinkUrl({versionHash:i,linkPath:u,queryParams:c});case 25:this.objectImageUrls[i]=t.sent;case 26:return t.abrupt("return",this.objectImageUrls[i]);case 27:case"end":return t.stop()}}),t,this,[[8,17]])})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectGraph=function(){var t=o(s.mark((function t(e){var n,r,i,a,u,c,d,p,f,l,h=this;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.versionHash,a=e.autoUpdate,u=void 0!==a&&a,c=e.select,m({libraryId:n,objectId:r,versionHash:i}),this.Log("Retrieving content object graph: ".concat(n||""," ").concat(r||i)),i&&(r=this.utils.DecodeVersionHash(i).objectId),d=A("q",i||r,"links"),t.prev=5,t.t0=this.utils,t.t1=this.HttpClient,t.next=10,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,versionHash:i});case 10:return t.t2=t.sent,t.t3={auto_update:u,select:c},t.t4=d,t.t5={headers:t.t2,queryParams:t.t3,method:"GET",path:t.t4},t.t6=t.t1.Request.call(t.t1,t.t5),t.next=17,t.t0.ResponseToJson.call(t.t0,t.t6);case 17:return t.abrupt("return",t.sent);case 20:if(t.prev=20,t.t7=t.catch(5),t.prev=22,(f=t.t7.body.errors[0].cause.cause.cause.cycle)&&0!==f.length){t.next=26;break}throw t.t7;case 26:return l={},t.next=29,Promise.all(f.map(function(){var t=o(s.mark((function t(e){var n,r;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!l[e]){t.next=2;break}return t.abrupt("return");case 2:return n=h.utils.DecodeVersionHash(e).objectId,t.next=5,h.ContentObjectMetadata({versionHash:e,metadataSubtree:"public/asset_metadata/display_title"});case 5:if(t.t2=t.sent,t.t2){t.next=10;break}return t.next=9,h.ContentObjectMetadata({versionHash:e,metadataSubtree:"public/name"});case 9:t.t2=t.sent;case 10:if(t.t1=t.t2,t.t1){t.next=15;break}return t.next=14,h.ContentObjectMetadata({versionHash:e,metadataSubtree:"name"});case 14:t.t1=t.sent;case 15:if(t.t0=t.t1,t.t0){t.next=18;break}t.t0=n;case 18:r=t.t0,l[e]={name:r,objectId:n};case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 29:p=f.map((function(t){return"".concat(l[t].name," (").concat(l[t].objectId,")")})),t.next=35;break;case 32:throw t.prev=32,t.t8=t.catch(22),t.t7;case 35:throw new Error("Cycle found in links: ".concat(p.join(" -> ")));case 36:case"end":return t.stop()}}),t,this,[[5,20],[22,32]])})));return function(e){return t.apply(this,arguments)}}(),e.LinkTarget=function(){var t=o(s.mark((function t(e){var n,r,a,o,u,c,A,d,p;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,a=e.versionHash,o=e.writeToken,u=e.linkPath,c=e.authorizationToken,A=e.linkInfo,m({libraryId:n,objectId:r,versionHash:a}),o&&g(o),a&&(r=this.utils.DecodeVersionHash(a).objectId),!o||n){t.next=8;break}return t.next=7,this.ContentObjectLibraryId({objectId:r});case 7:n=t.sent;case 8:if(A){t.next=12;break}return t.next=11,this.ContentObjectMetadata({libraryId:n,objectId:r,versionHash:a,writeToken:o,metadataSubtree:u,resolveLinks:!1,resolveIgnoreErrors:!0,resolveIncludeSource:!0,authorizationToken:c});case 11:A=t.sent;case 12:if(!A||!A["/"]){t.next=27;break}if((d=((A["/"]||"").match(/^\/?qfab\/([\w]+)\/?.+/)||[])[1])||(d=A["."].container),!d){t.next=19;break}return t.abrupt("return",d);case 19:if(!a){t.next=21;break}return t.abrupt("return",a);case 21:if(t.t0=a,t.t0){t.next=26;break}return t.next=25,this.LatestVersionHash({objectId:r});case 25:t.t0=t.sent;case 26:return t.abrupt("return",t.t0);case 27:return t.next=29,this.ContentObjectMetadata({libraryId:n,objectId:r,versionHash:a,writeToken:o,metadataSubtree:u,resolveIncludeSource:!0,authorizationToken:c});case 29:if((A=t.sent)&&A["."]){t.next=49;break}if("object"!==i(A)){t.next=38;break}if(t.t1=a,t.t1){t.next=37;break}return t.next=36,this.LatestVersionHash({objectId:r});case 36:t.t1=t.sent;case 37:return t.abrupt("return",t.t1);case 38:if(p=u.split("/").slice(0,-1).join("/")){t.next=46;break}if(t.t2=a,t.t2){t.next=45;break}return t.next=44,this.LatestVersionHash({objectId:r});case 44:t.t2=t.sent;case 45:return t.abrupt("return",t.t2);case 46:return t.next=48,this.ContentObjectMetadata({libraryId:n,objectId:r,versionHash:a,writeToken:o,metadataSubtree:p,resolveIncludeSource:!0,authorizationToken:c});case 48:A=t.sent;case 49:return t.abrupt("return",A["."].source);case 50:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.LinkUrl=function(){var t=o(s.mark((function t(e){var n,r,i,a,o,u,d,p,f,l,h,y,b,I,C;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,i=e.versionHash,a=e.writeToken,o=e.linkPath,u=e.mimeType,d=e.authorizationToken,p=e.queryParams,f=void 0===p?{}:p,l=e.channelAuth,h=void 0!==l&&l,y=e.noAuth,b=void 0!==y&&y,m({libraryId:n,objectId:r,versionHash:i}),a&&g(a),o){t.next=5;break}throw Error("Link path not specified");case 5:return i&&(r=this.utils.DecodeVersionHash(i).objectId),I=n?A("qlibs",n,"q",a||i||r,"meta",o):A("q",i,"meta",o),C=[d],t.t0=C,t.next=11,this.MetadataAuth({libraryId:n,objectId:r,versionHash:i,path:o,channelAuth:h,noAuth:b});case 11:return t.t1=t.sent,t.t0.push.call(t.t0,t.t1),f.authorization&&C.push(f.authorization),f=c(c({},f),{},{authorization:C.flat().filter((function(t){return t})),resolve:!0}),u&&(f["header-accept"]=u),t.abrupt("return",this.HttpClient.URL({path:I,queryParams:f}));case 17:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.LinkData=function(){var t=o(s.mark((function t(e){var n,r,i,a,o,u,c,A,p,f,l;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.versionHash,a=e.writeToken,o=e.linkPath,u=e.queryParams,c=void 0===u?{}:u,A=e.format,p=void 0===A?"json":A,f=e.channelAuth,t.next=3,this.LinkUrl({libraryId:n,objectId:r,versionHash:i,writeToken:a,linkPath:o,queryParams:c,channelAuth:f});case 3:return l=t.sent,t.t0=this.utils,t.t1=p,t.next=8,d.Fetch(l);case 8:return t.t2=t.sent,t.abrupt("return",t.t0.ResponseToFormat.call(t.t0,t.t1,t.t2));case 10:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CreateEncryptionConk=function(){var t=o(s.mark((function t(e){var n,r,i,a,o,u,c,A,d,p,f;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,i=e.versionHash,a=e.writeToken,o=e.createKMSConk,u=void 0===o||o,!this.signer.remoteSigner){t.next=3;break}return t.abrupt("return");case 3:if(m({libraryId:n,objectId:r,versionHash:i}),g(a),r||(r=client.DecodeVersionHash(i).objectId),n){t.next=10;break}return t.next=9,this.ContentObjectLibraryId({objectId:r});case 9:n=t.sent;case 10:return c="eluv.caps.iusr".concat(this.utils.AddressToHash(this.signer.address)),t.next=13,this.ContentObjectMetadata({libraryId:n,objectId:r,writeToken:a,metadataSubtree:c});case 13:if(!(A=t.sent)){t.next=20;break}return t.next=17,this.Crypto.DecryptCap(A,this.signer.signingKey.privateKey);case 17:this.encryptionConks[r]=t.sent,t.next=34;break;case 20:return t.next=22,this.Crypto.GeneratePrimaryConk({spaceId:this.contentSpaceId,objectId:r});case 22:return this.encryptionConks[r]=t.sent,t.t0=this,t.t1=n,t.t2=r,t.t3=a,t.t4=c,t.next=30,this.Crypto.EncryptConk(this.encryptionConks[r],this.signer.signingKey.publicKey);case 30:return t.t5=t.sent,t.t6={libraryId:t.t1,objectId:t.t2,writeToken:t.t3,metadataSubtree:t.t4,metadata:t.t5},t.next=34,t.t0.ReplaceMetadata.call(t.t0,t.t6);case 34:if(!u){t.next=64;break}return t.prev=35,t.next=38,this.authClient.KMSAddress({objectId:r});case 38:return d=t.sent,t.next=41,this.authClient.KMSInfo({objectId:r});case 41:return p=t.sent.publicKey,f="eluv.caps.ikms".concat(this.utils.AddressToHash(d)),t.next=45,this.ContentObjectMetadata({libraryId:n,objectId:r,writeToken:a,metadataSubtree:f});case 45:if(t.sent){t.next=58;break}return t.t7=this,t.t8=n,t.t9=r,t.t10=a,t.t11=f,t.next=54,this.Crypto.EncryptConk(this.encryptionConks[r],p);case 54:return t.t12=t.sent,t.t13={libraryId:t.t8,objectId:t.t9,writeToken:t.t10,metadataSubtree:t.t11,metadata:t.t12},t.next=58,t.t7.ReplaceMetadata.call(t.t7,t.t13);case 58:t.next=64;break;case 60:t.prev=60,t.t14=t.catch(35),console.error("Failed to create encryption cap for KMS:"),console.error(t.t14);case 64:return t.abrupt("return",this.encryptionConks[r]);case 65:case"end":return t.stop()}}),t,this,[[35,60]])})));return function(e){return t.apply(this,arguments)}}(),e.EncryptionConk=function(){var t=o(s.mark((function t(e){var n,r,i,a,o,u,c,A,d,p,f;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.versionHash,a=e.writeToken,o=e.download,u=void 0!==o&&o,m({libraryId:n,objectId:r,versionHash:i}),a&&g(a),r||(r=client.DecodeVersionHash(i).objectId),t.next=6,this.authClient.Owner({id:r});case 6:return c=t.sent,A="eluv.caps.iusr".concat(this.utils.AddressToHash(this.signer.address)),t.next=10,this.ContentObjectMetadata({libraryId:n,objectId:r,metadataSubtree:A});case 10:if(d=t.sent,this.utils.EqualAddress(c,this.signer.address)||d){t.next=21;break}if(!u){t.next=18;break}return t.next=15,this.authClient.ReEncryptionConk({libraryId:n,objectId:r,versionHash:i});case 15:return t.abrupt("return",t.sent);case 18:return t.next=20,this.authClient.EncryptionConk({libraryId:n,objectId:r,versionHash:i});case 20:return t.abrupt("return",t.sent);case 21:if(this.encryptionConks[r]){t.next=38;break}return p="eluv.caps.iusr".concat(this.utils.AddressToHash(this.signer.address)),t.next=25,this.ContentObjectMetadata({libraryId:n,objectId:r,versionHash:i,writeToken:a,metadataSubtree:p});case 25:if(!(f=t.sent)){t.next=32;break}return t.next=29,this.Crypto.DecryptCap(f,this.signer.signingKey.privateKey);case 29:this.encryptionConks[r]=t.sent,t.next=38;break;case 32:if(!a){t.next=37;break}return t.next=35,this.CreateEncryptionConk({libraryId:n,objectId:r,versionHash:i,writeToken:a,createKMSConk:!1});case 35:t.next=38;break;case 37:throw"No encryption conk present for "+r;case 38:return t.abrupt("return",this.encryptionConks[r]);case 39:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.Encrypt=function(){var t=o(s.mark((function t(e){var n,r,i,a,o,u;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.writeToken,a=e.chunk,m({libraryId:n,objectId:r}),t.next=4,this.EncryptionConk({libraryId:n,objectId:r,writeToken:i});case 4:return o=t.sent,t.next=7,this.Crypto.Encrypt(o,a);case 7:return u=t.sent,t.abrupt("return",u.buffer.slice(u.byteOffset,u.byteOffset+u.byteLength));case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.Decrypt=function(){var t=o(s.mark((function t(e){var n,r,i,a,o,u;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.writeToken,a=e.chunk,m({libraryId:n,objectId:r}),t.next=4,this.EncryptionConk({libraryId:n,objectId:r,writeToken:i,download:!0});case 4:return o=t.sent,t.next=7,this.Crypto.Decrypt(o,a);case 7:return u=t.sent,t.abrupt("return",u.buffer.slice(u.byteOffset,u.byteOffset+u.byteLength));case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AccessType=function(){var t=o(s.mark((function t(e){var n;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.id,t.next=3,this.authClient.AccessType(n);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AccessInfo=function(){var t=o(s.mark((function t(e){var n,r,i;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.objectId,r=e.args,l(n),r||(r=[0,[],[]]),this.Log("Retrieving access info: ".concat(n)),t.next=6,this.ethClient.CallContractMethod({contractAddress:this.utils.HashToAddress(n),methodName:"getAccessInfo",methodArgs:r});case 6:return i=t.sent,this.Log(i),t.abrupt("return",{visibilityCode:i[0],visible:i[0]>=1,accessible:i[0]>=10,editable:i[0]>=100,hasAccess:0===i[1],accessCode:i[1],accessCharge:this.utils.WeiToEther(i[2]).toString()});case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AccessRequest=function(){var t=o(s.mark((function t(e){var n,r,i,a,o,u,c,A,d;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.versionHash,a=e.args,o=void 0===a?[]:a,u=e.update,c=void 0!==u&&u,A=e.noCache,d=void 0!==A&&A,m({libraryId:n,objectId:r,versionHash:i}),i&&(r=this.utils.DecodeVersionHash(i).objectId),t.next=5,this.authClient.MakeAccessRequest({libraryId:n,objectId:r,versionHash:i,args:o,update:c,skipCache:!0,noCache:d});case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.SetAuthContext=function(t){var e=t.context;if(e&&Object.values(e).find((function(t){return"string"!=typeof t})))throw Error("Context must be a map of string->string");this.authContext=e},e.GenerateStateChannelToken=function(){var t=o(s.mark((function t(e){var n,r,i,a,o;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.objectId,r=e.versionHash,i=e.context,a=e.noCache,o=void 0!==a&&a,r?h(r):l(n),!r){t.next=6;break}n=this.utils.DecodeVersionHash(r).objectId,t.next=10;break;case 6:if(this.stateChannelAccess[n]){t.next=10;break}return t.next=9,this.LatestVersionHash({objectId:n});case 9:r=t.sent;case 10:return this.stateChannelAccess[n]=r,t.next=13,this.authClient.AuthorizationToken({objectId:n,channelAuth:!0,oauthToken:this.oauthToken,context:i,noCache:o});case 13:return t.abrupt("return",t.sent);case 14:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.FinalizeStateChannelAccess=function(){var t=o(s.mark((function t(e){var n,r,i;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.objectId,r=e.versionHash,i=e.percentComplete,r?h(r):l(n),!r){t.next=6;break}n=this.utils.DecodeVersionHash(r).objectId,t.next=13;break;case 6:if(!this.stateChannelAccess[n]){t.next=10;break}r=this.stateChannelAccess[n],t.next=13;break;case 10:return t.next=12,this.LatestVersionHash({objectId:n});case 12:r=t.sent;case 13:return this.stateChannelAccess[n]=void 0,t.next=16,this.authClient.ChannelContentFinalize({objectId:n,versionHash:r,percent:i});case 16:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectAccessComplete=function(){var t=o(s.mark((function t(e){var n,r,i;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.objectId,r=e.score,i=void 0===r?100:r,l(n),!(i<0||i>100)){t.next=4;break}throw Error("Invalid AccessComplete score: "+i);case 4:return t.next=6,this.authClient.AccessComplete({id:n,score:i});case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.Collection=function(){var t=o(s.mark((function t(e){var n;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.collectionType,["accessGroups","contentObjects","contentTypes","contracts","libraries"].includes(n)){t.next=4;break}throw new Error("Invalid collection type: "+n);case 4:if(!this.signer){t.next=10;break}return t.next=7,this.userProfileClient.WalletAddress();case 7:t.t0=t.sent,t.next=11;break;case 10:t.t0=void 0;case 11:if(t.t0){t.next=14;break}throw new Error("Unable to get collection: User wallet doesn't exist");case 14:return this.Log("Retrieving ".concat(n," contract collection for user ").concat(this.signer.address)),t.next=17,this.ethClient.MakeProviderCall({methodName:"send",args:["elv_getWalletCollection",[this.contentSpaceId,"iusr".concat(this.utils.AddressToHash(this.signer.address)),n]]});case 17:if(t.t1=t.sent,t.t1){t.next=20;break}t.t1=[];case 20:return t.abrupt("return",t.t1);case 21:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.VerifyContentObject=function(){var t=o(s.mark((function t(e){var n,r,i;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.versionHash,m({libraryId:n,objectId:r,versionHash:i}),t.next=4,ContentObjectVerification.VerifyContentObject({client:this,libraryId:n,objectId:r,versionHash:i});case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.Proofs=function(){var t=o(s.mark((function t(e){var n,r,i,a,o;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.versionHash,a=e.partHash,m({libraryId:n,objectId:r,versionHash:i}),y(a),i&&(r=this.utils.DecodeVersionHash(i).objectId),o=A("q",i||r,"data",a,"proofs"),t.t0=this.utils,t.t1=this.HttpClient,t.next=9,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,versionHash:i});case 9:return t.t2=t.sent,t.t3=o,t.t4={headers:t.t2,method:"GET",path:t.t3},t.t5=t.t1.Request.call(t.t1,t.t4),t.abrupt("return",t.t0.ResponseToJson.call(t.t0,t.t5));case 14:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.QParts=function(){var t=o(s.mark((function t(e){var n,r,i,a,o,u;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.partHash,a=e.format,o=void 0===a?"blob":a,m({libraryId:n,objectId:r,versionHash:versionHash}),y(i),u=A("qparts",i),t.t0=this.utils,t.t1=o,t.t2=this.HttpClient,t.next=9,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,partHash:i});case 9:return t.t3=t.sent,t.t4=u,t.t5={headers:t.t3,method:"GET",path:t.t4},t.t6=t.t2.Request.call(t.t2,t.t5),t.abrupt("return",t.t0.ResponseToFormat.call(t.t0,t.t1,t.t6));case 14:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},function(t,e,n){var r=n(54)(n(26),"Map");t.exports=r},function(t,e,n){var r=n(26).Symbol;t.exports=r},function(t,e,n){(function(e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r="object"==(void 0===e?"undefined":n(e))&&e&&e.Object===Object&&e;t.exports=r}).call(this,n(6))},function(t,e,n){var r=n(56),i=n(41);t.exports=function(t,e,n){(void 0!==n&&!i(t[e],n)||void 0===n&&!(e in t))&&r(t,e,n)}},function(t,e,n){var r=n(54),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,n){var r=n(242)(Object.getPrototypeOf,Object);t.exports=r},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(243),i=n(32),a=Object.prototype,s=a.hasOwnProperty,o=a.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return i(t)&&s.call(t,"callee")&&!o.call(t,"callee")};t.exports=u},function(t,e){var n=Array.isArray;t.exports=n},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){(function(t){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(26),a=n(245),s="object"==r(e)&&e&&!e.nodeType&&e,o=s&&"object"==r(t)&&t&&!t.nodeType&&t,u=o&&o.exports===s?i.Buffer:void 0,c=(u?u.isBuffer:void 0)||a;t.exports=c}).call(this,n(13)(t))},function(t,e,n){var r=n(247),i=n(248),a=n(249),s=a&&a.isTypedArray,o=s?i(s):r;t.exports=o},function(t,e){t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},function(t,e,n){var r=n(253),i=n(255),a=n(57);t.exports=function(t){return a(t)?r(t,!0):i(t)}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var i=n(t);return!!(e=null==e?9007199254740991:e)&&("number"==i||"symbol"!=i&&r.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e){t.exports=function(t){return t}},function(t,e,n){t.exports=i;var r=n(33).EventEmitter;function i(){r.call(this)}n(0)(i,r),i.Readable=n(58),i.Writable=n(279),i.Duplex=n(280),i.Transform=n(281),i.PassThrough=n(282),i.Stream=i,i.prototype.pipe=function(t,e){var n=this;function i(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",i),t.on("drain",a),t._isStdio||e&&!1===e.end||(n.on("end",o),n.on("close",u));var s=!1;function o(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(A(),0===r.listenerCount(this,"error"))throw t}function A(){n.removeListener("data",i),t.removeListener("drain",a),n.removeListener("end",o),n.removeListener("close",u),n.removeListener("error",c),t.removeListener("error",c),n.removeListener("end",A),n.removeListener("close",A),t.removeListener("close",A)}return n.on("error",c),t.on("error",c),n.on("end",A),n.on("close",A),t.on("close",A),t.emit("pipe",n),t}},function(t,e,n){"use strict";(function(e,r){var i=n(45);t.exports=b;var a,s=n(51);b.ReadableState=m;n(33).EventEmitter;var o=function(t,e){return t.listeners(e).length},u=n(110),c=n(59).Buffer,A=e.Uint8Array||function(){};var d=Object.create(n(34));d.inherits=n(0);var p=n(273),f=void 0;f=p&&p.debuglog?p.debuglog("stream"):function(){};var l,h=n(274),y=n(111);d.inherits(b,u);var g=["error","close","destroy","pause","resume"];function m(t,e){t=t||{};var r=e instanceof(a=a||n(22));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(s||0===s)?s:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(l||(l=n(35).StringDecoder),this.decoder=new l(t.encoding),this.encoding=t.encoding)}function b(t){if(a=a||n(22),!(this instanceof b))return new b(t);this._readableState=new m(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function I(t,e,n,r,i){var a,s=t._readableState;null===e?(s.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,E(t)}(t,s)):(i||(a=function(t,e){var n;r=e,c.isBuffer(r)||r instanceof A||"string"==typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(s,e)),a?t.emit("error",a):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),r?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):C(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!n?(e=s.decoder.write(e),s.objectMode||0!==e.length?C(t,s,e,!1):B(t,s)):C(t,s,e,!1))):r||(s.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(s)}function C(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&E(t)),B(t,e)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),b.prototype.destroy=y.destroy,b.prototype._undestroy=y.undestroy,b.prototype._destroy=function(t,e){this.push(null),e(t)},b.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=c.from(t,e),e=""),n=!0),I(this,t,e,!1,n)},b.prototype.unshift=function(t){return I(this,t,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(t){return l||(l=n(35).StringDecoder),this._readableState.decoder=new l(t),this._readableState.encoding=t,this};function v(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function E(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(f("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(w,t):w(t))}function w(t){f("emit readable"),t.emit("readable"),_(t)}function B(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(Q,t,e))}function Q(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(f("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}function M(t){f("readable nexttick read 0"),t.read(0)}function k(t,e){e.reading||(f("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),_(t),e.flowing&&!e.reading&&t.read(0)}function _(t){var e=t._readableState;for(f("flow",e.flowing);e.flowing&&null!==t.read(););}function x(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var r;t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):r=t===e.head.data.length?e.shift():n?function(t,e){var n=e.head,r=1,i=n.data;t-=i.length;for(;n=n.next;){var a=n.data,s=t>a.length?a.length:t;if(s===a.length?i+=a:i+=a.slice(0,t),0===(t-=s)){s===a.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=a.slice(s));break}++r}return e.length-=r,i}(t,e):function(t,e){var n=c.allocUnsafe(t),r=e.head,i=1;r.data.copy(n),t-=r.data.length;for(;r=r.next;){var a=r.data,s=t>a.length?a.length:t;if(a.copy(n,n.length-t,0,s),0===(t-=s)){s===a.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=a.slice(s));break}++i}return e.length-=i,n}(t,e);return r}(t,e.buffer,e.decoder),n);var n}function S(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(D,e,t))}function D(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function R(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}b.prototype.read=function(t){f("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return f("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?S(this):E(this),null;if(0===(t=v(t,e))&&e.ended)return 0===e.length&&S(this),null;var r,i=e.needReadable;return f("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&f("length less than watermark",i=!0),e.ended||e.reading?f("reading or ended",i=!1):i&&(f("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=v(n,e))),null===(r=t>0?x(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&S(this)),null!==r&&this.emit("data",r),r},b.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(t,e){var n=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t)}a.pipesCount+=1,f("pipe count=%d opts=%j",a.pipesCount,e);var u=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?A:b;function c(e,r){f("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,f("cleanup"),t.removeListener("close",g),t.removeListener("finish",m),t.removeListener("drain",d),t.removeListener("error",y),t.removeListener("unpipe",c),n.removeListener("end",A),n.removeListener("end",b),n.removeListener("data",h),p=!0,!a.awaitDrain||t._writableState&&!t._writableState.needDrain||d())}function A(){f("onend"),t.end()}a.endEmitted?i.nextTick(u):n.once("end",u),t.on("unpipe",c);var d=function(t){return function(){var e=t._readableState;f("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,_(t))}}(n);t.on("drain",d);var p=!1;var l=!1;function h(e){f("ondata"),l=!1,!1!==t.write(e)||l||((1===a.pipesCount&&a.pipes===t||a.pipesCount>1&&-1!==R(a.pipes,t))&&!p&&(f("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,l=!0),n.pause())}function y(e){f("onerror",e),b(),t.removeListener("error",y),0===o(t,"error")&&t.emit("error",e)}function g(){t.removeListener("finish",m),b()}function m(){f("onfinish"),t.removeListener("close",g),b()}function b(){f("unpipe"),n.unpipe(t)}return n.on("data",h),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",y),t.once("close",g),t.once("finish",m),t.emit("pipe",n),a.flowing||(f("pipe resume"),n.resume()),t},b.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<i;a++)r[a].emit("unpipe",this,n);return this}var s=R(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n)),this},b.prototype.on=function(t,e){var n=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&E(this):i.nextTick(M,this))}return n},b.prototype.addListener=b.prototype.on,b.prototype.resume=function(){var t=this._readableState;return t.flowing||(f("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(k,t,e))}(this,t)),this},b.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},b.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(f("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(f("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var a=0;a<g.length;a++)t.on(g[a],this.emit.bind(this,g[a]));return this._read=function(e){f("wrapped _read",e),r&&(r=!1,t.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=x}).call(this,n(6),n(8))},function(t,e,n){t.exports=n(33).EventEmitter},function(t,e,n){"use strict";var r=n(45);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var n=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?(r.nextTick(i,n,t),n._writableState&&(n._writableState.errorEmitted=!0)):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(t){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}}).call(this,n(6))},function(t,e,n){"use strict";t.exports=s;var r=n(22),i=Object.create(n(34));function a(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(t){if(!(this instanceof s))return new s(t);r.call(this,t),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",o)}function o(){var t=this;"function"==typeof this._flush?this._flush((function(e,n){u(t,e,n)})):u(this,null,null)}function u(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=n(0),i.inherits(s,r),s.prototype.push=function(t,e){return this._transformState.needTransform=!1,r.prototype.push.call(this,t,e)},s.prototype._transform=function(t,e,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},s.prototype._destroy=function(t,e){var n=this;r.prototype._destroy.call(this,t,(function(t){e(t),n.emit("close")}))}},function(t,e,n){"use strict";var r=n(1).Buffer,i=n(62).Transform;function a(t){i.call(this),this._block=r.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(0)(a,i),a.prototype._transform=function(t,e,n){var r=null;try{this.update(t,e)}catch(t){r=t}n(r)},a.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},a.prototype.update=function(t,e){if(function(t,e){if(!r.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(t)||(t=r.from(t,e));for(var n=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)n[a++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)n[this._blockOffset++]=t[i++];for(var s=0,o=8*t.length;o>0;++s)this._length[s]+=o,(o=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*o);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return e},a.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=a},function(t,e,n){"use strict";(function(e,r){var i;t.exports=B,B.ReadableState=w;n(33).EventEmitter;var a=function(t,e){return t.listeners(e).length},s=n(116),o=n(2).Buffer,u=e.Uint8Array||function(){};var c,A=n(284);c=A&&A.debuglog?A.debuglog("stream"):function(){};var d,p,f,l=n(285),h=n(117),y=n(118).getHighWaterMark,g=n(28).codes,m=g.ERR_INVALID_ARG_TYPE,b=g.ERR_STREAM_PUSH_AFTER_EOF,I=g.ERR_METHOD_NOT_IMPLEMENTED,C=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(0)(B,s);var v=h.errorOrDestroy,E=["error","close","destroy","pause","resume"];function w(t,e,r){i=i||n(29),t=t||{},"boolean"!=typeof r&&(r=e instanceof i),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=y(this,t,"readableHighWaterMark",r),this.buffer=new l,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(d||(d=n(35).StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function B(t){if(i=i||n(29),!(this instanceof B))return new B(t);var e=this instanceof i;this._readableState=new w(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function Q(t,e,n,r,i){c("readableAddChunk",e);var a,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,e.sync?_(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,x(t)))}(t,s);else if(i||(a=function(t,e){var n;r=e,o.isBuffer(r)||r instanceof u||"string"==typeof e||void 0===e||t.objectMode||(n=new m("chunk",["string","Buffer","Uint8Array"],e));var r;return n}(s,e)),a)v(t,a);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===o.prototype||(e=function(t){return o.from(t)}(e)),r)s.endEmitted?v(t,new C):M(t,s,e,!0);else if(s.ended)v(t,new b);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!n?(e=s.decoder.write(e),s.objectMode||0!==e.length?M(t,s,e,!1):S(t,s)):M(t,s,e,!1)}else r||(s.reading=!1,S(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function M(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",n)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&_(t)),S(t,e)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),B.prototype.destroy=h.destroy,B.prototype._undestroy=h.undestroy,B.prototype._destroy=function(t,e){e(t)},B.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=o.from(t,e),e=""),n=!0),Q(this,t,e,!1,n)},B.prototype.unshift=function(t){return Q(this,t,null,!0,!1)},B.prototype.isPaused=function(){return!1===this._readableState.flowing},B.prototype.setEncoding=function(t){d||(d=n(35).StringDecoder);var e=new d(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function k(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function _(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,r.nextTick(x,t))}function x(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,O(t)}function S(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(D,t,e))}function D(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var n=e.length;if(c("maybeReadMore read 0"),t.read(0),n===e.length)break}e.readingMore=!1}function R(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function T(t){c("readable nexttick read 0"),t.read(0)}function N(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),O(t),e.flowing&&!e.reading&&t.read(0)}function O(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function H(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(t,e.decoder),n);var n}function L(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(U,e,t))}function U(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var n=e._writableState;(!n||n.autoDestroy&&n.finished)&&e.destroy()}}function F(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}B.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?L(this):_(this),null;if(0===(t=k(t,e))&&e.ended)return 0===e.length&&L(this),null;var r,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=k(n,e))),null===(r=t>0?H(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&L(this)),null!==r&&this.emit("data",r),r},B.prototype._read=function(t){v(this,new I("_read()"))},B.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?u:y;function o(e,r){c("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),t.removeListener("close",l),t.removeListener("finish",h),t.removeListener("drain",A),t.removeListener("error",f),t.removeListener("unpipe",o),n.removeListener("end",u),n.removeListener("end",y),n.removeListener("data",p),d=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||A())}function u(){c("onend"),t.end()}i.endEmitted?r.nextTick(s):n.once("end",s),t.on("unpipe",o);var A=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,O(t))}}(n);t.on("drain",A);var d=!1;function p(e){c("ondata");var r=t.write(e);c("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==F(i.pipes,t))&&!d&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function f(e){c("onerror",e),y(),t.removeListener("error",f),0===a(t,"error")&&v(t,e)}function l(){t.removeListener("finish",h),y()}function h(){c("onfinish"),t.removeListener("close",l),y()}function y(){c("unpipe"),n.unpipe(t)}return n.on("data",p),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",f),t.once("close",l),t.once("finish",h),t.emit("pipe",n),i.flowing||(c("pipe resume"),n.resume()),t},B.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<i;a++)r[a].emit("unpipe",this,{hasUnpiped:!1});return this}var s=F(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n)),this},B.prototype.on=function(t,e){var n=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?_(this):i.reading||r.nextTick(T,this))),n},B.prototype.addListener=B.prototype.on,B.prototype.removeListener=function(t,e){var n=s.prototype.removeListener.call(this,t,e);return"readable"===t&&r.nextTick(R,this),n},B.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||r.nextTick(R,this),e},B.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(N,t,e))}(this,t)),t.paused=!1,this},B.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},B.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var a=0;a<E.length;a++)t.on(E[a],this.emit.bind(this,E[a]));return this._read=function(e){c("wrapped _read",e),r&&(r=!1,t.resume())},this},"function"==typeof Symbol&&(B.prototype[Symbol.asyncIterator]=function(){return void 0===p&&(p=n(287)),p(this)}),Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),B._fromList=H,Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(B.from=function(t,e){return void 0===f&&(f=n(288)),f(B,t,e)})}).call(this,n(6),n(8))},function(t,e,n){t.exports=n(33).EventEmitter},function(t,e,n){"use strict";(function(e){function n(t,e){i(t,e),r(t)}function r(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,a){var s=this,o=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return o||u?(a?a(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!a&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(r,s):(s._writableState.errorEmitted=!0,e.nextTick(n,s,t)):e.nextTick(n,s,t):a?(e.nextTick(r,s),a(t)):e.nextTick(r,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var n=t._readableState,r=t._writableState;n&&n.autoDestroy||r&&r.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,n(8))},function(t,e,n){"use strict";var r=n(28).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,n,i){var a=function(t,e,n){return null!=t.highWaterMark?t.highWaterMark:e?t[n]:null}(e,i,n);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new r(i?n:"highWaterMark",a);return Math.floor(a)}return t.objectMode?16:16384}}},function(t,e,n){"use strict";(function(e,r){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;t.entry=null;for(;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree.next=t}(e,t)}}var a;t.exports=B,B.WritableState=w;var s={deprecate:n(112)},o=n(116),u=n(2).Buffer,c=e.Uint8Array||function(){};var A,d=n(117),p=n(118).getHighWaterMark,f=n(28).codes,l=f.ERR_INVALID_ARG_TYPE,h=f.ERR_METHOD_NOT_IMPLEMENTED,y=f.ERR_MULTIPLE_CALLBACK,g=f.ERR_STREAM_CANNOT_PIPE,m=f.ERR_STREAM_DESTROYED,b=f.ERR_STREAM_NULL_VALUES,I=f.ERR_STREAM_WRITE_AFTER_END,C=f.ERR_UNKNOWN_ENCODING,v=d.errorOrDestroy;function E(){}function w(t,e,s){a=a||n(29),t=t||{},"boolean"!=typeof s&&(s=e instanceof a),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=p(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===t.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,i=n.sync,a=n.writecb;if("function"!=typeof a)throw new y;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,i,a){--e.pendingcb,n?(r.nextTick(a,i),r.nextTick(S,t,e),t._writableState.errorEmitted=!0,v(t,i)):(a(i),t._writableState.errorEmitted=!0,v(t,i),S(t,e))}(t,n,i,e,a);else{var s=_(n)||t.destroyed;s||n.corked||n.bufferProcessing||!n.bufferedRequest||k(t,n),i?r.nextTick(M,t,n,s,a):M(t,n,s,a)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function B(t){var e=this instanceof(a=a||n(29));if(!e&&!A.call(B,this))return new B(t);this._writableState=new w(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),o.call(this)}function Q(t,e,n,r,i,a,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new m("write")):n?t._writev(i,e.onwrite):t._write(i,a,e.onwrite),e.sync=!1}function M(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),S(t,e)}function k(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,a=new Array(r),s=e.corkedRequestsFree;s.entry=n;for(var o=0,u=!0;n;)a[o]=n,n.isBuf||(u=!1),n=n.next,o+=1;a.allBuffers=u,Q(t,e,!0,e.length,a,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,A=n.encoding,d=n.callback;if(Q(t,e,!1,e.objectMode?1:c.length,c,A,d),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function _(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function x(t,e){t._final((function(n){e.pendingcb--,n&&v(t,n),e.prefinished=!0,t.emit("prefinish"),S(t,e)}))}function S(t,e){var n=_(e);if(n&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,r.nextTick(x,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return n}n(0)(B,o),w.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(w.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(A=Function.prototype[Symbol.hasInstance],Object.defineProperty(B,Symbol.hasInstance,{value:function(t){return!!A.call(this,t)||this===B&&(t&&t._writableState instanceof w)}})):A=function(t){return t instanceof this},B.prototype.pipe=function(){v(this,new g)},B.prototype.write=function(t,e,n){var i,a=this._writableState,s=!1,o=!a.objectMode&&(i=t,u.isBuffer(i)||i instanceof c);return o&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(n=e,e=null),o?e="buffer":e||(e=a.defaultEncoding),"function"!=typeof n&&(n=E),a.ending?function(t,e){var n=new I;v(t,n),r.nextTick(e,n)}(this,n):(o||function(t,e,n,i){var a;return null===n?a=new b:"string"==typeof n||e.objectMode||(a=new l("chunk",["string","Buffer"],n)),!a||(v(t,a),r.nextTick(i,a),!1)}(this,a,t,n))&&(a.pendingcb++,s=function(t,e,n,r,i,a){if(!n){var s=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,n));return e}(e,r,i);r!==s&&(n=!0,i="buffer",r=s)}var o=e.objectMode?1:r.length;e.length+=o;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var A=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:a,next:null},A?A.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Q(t,e,!1,o,r,i,a);return c}(this,a,o,t,e,n)),s},B.prototype.cork=function(){this._writableState.corked++},B.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||k(this,t))},B.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new C(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(B.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(B.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),B.prototype._write=function(t,e,n){n(new h("_write()"))},B.prototype._writev=null,B.prototype.end=function(t,e,n){var i=this._writableState;return"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,n){e.ending=!0,S(t,e),n&&(e.finished?r.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,i,n),this},Object.defineProperty(B.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),B.prototype.destroy=d.destroy,B.prototype._undestroy=d.undestroy,B.prototype._destroy=function(t,e){e(t)}}).call(this,n(6),n(8))},function(t,e,n){"use strict";t.exports=A;var r=n(28).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,a=r.ERR_MULTIPLE_CALLBACK,s=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n(29);function c(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new a);n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function A(t){if(!(this instanceof A))return new A(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",d)}function d(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?p(this,null,null):this._flush((function(e,n){p(t,e,n)}))}function p(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new o;if(t._transformState.transforming)throw new s;return t.push(null)}n(0)(A,u),A.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},A.prototype._transform=function(t,e,n){n(new i("_transform()"))},A.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},A.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},A.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e,n){var r=n(0),i=n(30),a=n(1).Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],o=new Array(64);function u(){this.init(),this._w=o,i.call(this,64,56)}function c(t,e,n){return n^t&(e^n)}function A(t,e,n){return t&e|n&(t|e)}function d(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function p(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function f(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}r(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,a=0|this._c,o=0|this._d,u=0|this._e,l=0|this._f,h=0|this._g,y=0|this._h,g=0;g<16;++g)n[g]=t.readInt32BE(4*g);for(;g<64;++g)n[g]=0|(((e=n[g-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+n[g-7]+f(n[g-15])+n[g-16];for(var m=0;m<64;++m){var b=y+p(u)+c(u,l,h)+s[m]+n[m]|0,I=d(r)+A(r,i,a)|0;y=h,h=l,l=u,u=o+b|0,o=a,a=i,i=r,r=b+I|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=u+this._e|0,this._f=l+this._f|0,this._g=h+this._g|0,this._h=y+this._h|0},u.prototype._hash=function(){var t=a.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},function(t,e,n){var r=n(0),i=n(30),a=n(1).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],o=new Array(160);function u(){this.init(),this._w=o,i.call(this,128,112)}function c(t,e,n){return n^t&(e^n)}function A(t,e,n){return t&e|n&(t|e)}function d(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function p(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function f(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function l(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function h(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function y(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function g(t,e){return t>>>0<e>>>0?1:0}r(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,a=0|this._dh,o=0|this._eh,u=0|this._fh,m=0|this._gh,b=0|this._hh,I=0|this._al,C=0|this._bl,v=0|this._cl,E=0|this._dl,w=0|this._el,B=0|this._fl,Q=0|this._gl,M=0|this._hl,k=0;k<32;k+=2)e[k]=t.readInt32BE(4*k),e[k+1]=t.readInt32BE(4*k+4);for(;k<160;k+=2){var _=e[k-30],x=e[k-30+1],S=f(_,x),D=l(x,_),R=h(_=e[k-4],x=e[k-4+1]),T=y(x,_),N=e[k-14],O=e[k-14+1],H=e[k-32],L=e[k-32+1],U=D+O|0,F=S+N+g(U,D)|0;F=(F=F+R+g(U=U+T|0,T)|0)+H+g(U=U+L|0,L)|0,e[k]=F,e[k+1]=U}for(var j=0;j<160;j+=2){F=e[j],U=e[j+1];var P=A(n,r,i),G=A(I,C,v),q=d(n,I),Y=d(I,n),K=p(o,w),z=p(w,o),J=s[j],V=s[j+1],W=c(o,u,m),Z=c(w,B,Q),X=M+z|0,$=b+K+g(X,M)|0;$=($=($=$+W+g(X=X+Z|0,Z)|0)+J+g(X=X+V|0,V)|0)+F+g(X=X+U|0,U)|0;var tt=Y+G|0,et=q+P+g(tt,Y)|0;b=m,M=Q,m=u,Q=B,u=o,B=w,o=a+$+g(w=E+X|0,E)|0,a=i,E=v,i=r,v=C,r=n,C=I,n=$+et+g(I=X+tt|0,X)|0}this._al=this._al+I|0,this._bl=this._bl+C|0,this._cl=this._cl+v|0,this._dl=this._dl+E|0,this._el=this._el+w|0,this._fl=this._fl+B|0,this._gl=this._gl+Q|0,this._hl=this._hl+M|0,this._ah=this._ah+n+g(this._al,I)|0,this._bh=this._bh+r+g(this._bl,C)|0,this._ch=this._ch+i+g(this._cl,v)|0,this._dh=this._dh+a+g(this._dl,E)|0,this._eh=this._eh+o+g(this._el,w)|0,this._fh=this._fh+u+g(this._fl,B)|0,this._gh=this._gh+m+g(this._gl,Q)|0,this._hh=this._hh+b+g(this._hl,M)|0},u.prototype._hash=function(){var t=a.allocUnsafe(64);function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},function(t,e,n){var r=n(61);t.exports=function(t){return(new r).update(t).digest()}},function(t,e,n){t.exports=n(125)},function(t){t.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},function(t,e){var n=Math.pow(2,30)-1;t.exports=function(t,e){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!=typeof e)throw new TypeError("Key length not a number");if(e<0||e>n||e!=e)throw new TypeError("Bad key length")}},function(t,e,n){(function(e,n){var r;if(e.process&&e.process.browser)r="utf-8";else if(e.process&&e.process.version){r=parseInt(n.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else r="utf-8";t.exports=r}).call(this,n(6),n(8))},function(t,e,n){var r=n(123),i=n(64),a=n(65),s=n(1).Buffer,o=n(126),u=n(127),c=n(129),A=s.alloc(128),d={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function p(t,e,n){var o=function(t){function e(e){return a(t).update(e).digest()}return"rmd160"===t||"ripemd160"===t?function(t){return(new i).update(t).digest()}:"md5"===t?r:e}(t),u="sha512"===t||"sha384"===t?128:64;e.length>u?e=o(e):e.length<u&&(e=s.concat([e,A],u));for(var c=s.allocUnsafe(u+d[t]),p=s.allocUnsafe(u+d[t]),f=0;f<u;f++)c[f]=54^e[f],p[f]=92^e[f];var l=s.allocUnsafe(u+n+4);c.copy(l,0,0,u),this.ipad1=l,this.ipad2=c,this.opad=p,this.alg=t,this.blocksize=u,this.hash=o,this.size=d[t]}p.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(t,e,n,r,i){o(n,r);var a=new p(i=i||"sha1",t=c(t,u,"Password"),(e=c(e,u,"Salt")).length),A=s.allocUnsafe(r),f=s.allocUnsafe(e.length+4);e.copy(f,0,0,e.length);for(var l=0,h=d[i],y=Math.ceil(r/h),g=1;g<=y;g++){f.writeUInt32BE(g,e.length);for(var m=a.run(f,a.ipad1),b=m,I=1;I<n;I++){b=a.run(b,a.ipad2);for(var C=0;C<h;C++)m[C]^=b[C]}m.copy(A,l),l+=h}return A}},function(t,e,n){var r=n(1).Buffer;t.exports=function(t,e,n){if(r.isBuffer(t))return t;if("string"==typeof t)return r.from(t,e);if(ArrayBuffer.isView(t))return r.from(t.buffer);throw new TypeError(n+" must be a string, a Buffer, a typed array or a DataView")}},function(t,e,n){var r=n(297),i=n(69),a=n(70),s=n(310),o=n(47);function u(t,e,n){if(t=t.toLowerCase(),a[t])return i.createCipheriv(t,e,n);if(s[t])return new r({key:e,iv:n,mode:t});throw new TypeError("invalid suite type")}function c(t,e,n){if(t=t.toLowerCase(),a[t])return i.createDecipheriv(t,e,n);if(s[t])return new r({key:e,iv:n,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}e.createCipher=e.Cipher=function(t,e){var n,r;if(t=t.toLowerCase(),a[t])n=a[t].key,r=a[t].iv;else{if(!s[t])throw new TypeError("invalid suite type");n=8*s[t].key,r=s[t].iv}var i=o(e,!1,n,r);return u(t,i.key,i.iv)},e.createCipheriv=e.Cipheriv=u,e.createDecipher=e.Decipher=function(t,e){var n,r;if(t=t.toLowerCase(),a[t])n=a[t].key,r=a[t].iv;else{if(!s[t])throw new TypeError("invalid suite type");n=8*s[t].key,r=s[t].iv}var i=o(e,!1,n,r);return c(t,i.key,i.iv)},e.createDecipheriv=e.Decipheriv=c,e.listCiphers=e.getCiphers=function(){return Object.keys(s).concat(i.getCiphers())}},function(t,e,n){"use strict";e.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},e.writeUInt32BE=function(t,e,n){t[0+n]=e>>>24,t[1+n]=e>>>16&255,t[2+n]=e>>>8&255,t[3+n]=255&e},e.ip=function(t,e,n,r){for(var i=0,a=0,s=6;s>=0;s-=2){for(var o=0;o<=24;o+=8)i<<=1,i|=e>>>o+s&1;for(o=0;o<=24;o+=8)i<<=1,i|=t>>>o+s&1}for(s=6;s>=0;s-=2){for(o=1;o<=25;o+=8)a<<=1,a|=e>>>o+s&1;for(o=1;o<=25;o+=8)a<<=1,a|=t>>>o+s&1}n[r+0]=i>>>0,n[r+1]=a>>>0},e.rip=function(t,e,n,r){for(var i=0,a=0,s=0;s<4;s++)for(var o=24;o>=0;o-=8)i<<=1,i|=e>>>o+s&1,i<<=1,i|=t>>>o+s&1;for(s=4;s<8;s++)for(o=24;o>=0;o-=8)a<<=1,a|=e>>>o+s&1,a<<=1,a|=t>>>o+s&1;n[r+0]=i>>>0,n[r+1]=a>>>0},e.pc1=function(t,e,n,r){for(var i=0,a=0,s=7;s>=5;s--){for(var o=0;o<=24;o+=8)i<<=1,i|=e>>o+s&1;for(o=0;o<=24;o+=8)i<<=1,i|=t>>o+s&1}for(o=0;o<=24;o+=8)i<<=1,i|=e>>o+s&1;for(s=1;s<=3;s++){for(o=0;o<=24;o+=8)a<<=1,a|=e>>o+s&1;for(o=0;o<=24;o+=8)a<<=1,a|=t>>o+s&1}for(o=0;o<=24;o+=8)a<<=1,a|=t>>o+s&1;n[r+0]=i>>>0,n[r+1]=a>>>0},e.r28shl=function(t,e){return t<<e&268435455|t>>>28-e};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,n,i){for(var a=0,s=0,o=r.length>>>1,u=0;u<o;u++)a<<=1,a|=t>>>r[u]&1;for(u=o;u<r.length;u++)s<<=1,s|=e>>>r[u]&1;n[i+0]=a>>>0,n[i+1]=s>>>0},e.expand=function(t,e,n){var r=0,i=0;r=(1&t)<<5|t>>>27;for(var a=23;a>=15;a-=4)r<<=6,r|=t>>>a&63;for(a=11;a>=3;a-=4)i|=t>>>a&63,i<<=6;i|=(31&t)<<1|t>>>31,e[n+0]=r>>>0,e[n+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var n=0,r=0;r<4;r++){n<<=4,n|=i[64*r+(t>>>18-6*r&63)]}for(r=0;r<4;r++){n<<=4,n|=i[256+64*r+(e>>>18-6*r&63)]}return n>>>0};var a=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,n=0;n<a.length;n++)e<<=1,e|=t>>>a[n]&1;return e>>>0},e.padSplit=function(t,e,n){for(var r=t.toString(2);r.length<e;)r="0"+r;for(var i=[],a=0;a<e;a+=n)i.push(r.slice(a,a+n));return i.join(" ")}},function(t,e,n){"use strict";var r=n(10),i=n(0),a=n(131),s=n(68);function o(){this.tmp=new Array(2),this.keys=null}function u(t){s.call(this,t);var e=new o;this._desState=e,this.deriveKeys(e,t.key)}i(u,s),t.exports=u,u.create=function(t){return new u(t)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(t,e){t.keys=new Array(32),r.equal(e.length,this.blockSize,"Invalid key length");var n=a.readUInt32BE(e,0),i=a.readUInt32BE(e,4);a.pc1(n,i,t.tmp,0),n=t.tmp[0],i=t.tmp[1];for(var s=0;s<t.keys.length;s+=2){var o=c[s>>>1];n=a.r28shl(n,o),i=a.r28shl(i,o),a.pc2(n,i,t.keys,s)}},u.prototype._update=function(t,e,n,r){var i=this._desState,s=a.readUInt32BE(t,e),o=a.readUInt32BE(t,e+4);a.ip(s,o,i.tmp,0),s=i.tmp[0],o=i.tmp[1],"encrypt"===this.type?this._encrypt(i,s,o,i.tmp,0):this._decrypt(i,s,o,i.tmp,0),s=i.tmp[0],o=i.tmp[1],a.writeUInt32BE(n,s,r),a.writeUInt32BE(n,o,r+4)},u.prototype._pad=function(t,e){for(var n=t.length-e,r=e;r<t.length;r++)t[r]=n;return!0},u.prototype._unpad=function(t){for(var e=t[t.length-1],n=t.length-e;n<t.length;n++)r.equal(t[n],e);return t.slice(0,t.length-e)},u.prototype._encrypt=function(t,e,n,r,i){for(var s=e,o=n,u=0;u<t.keys.length;u+=2){var c=t.keys[u],A=t.keys[u+1];a.expand(o,t.tmp,0),c^=t.tmp[0],A^=t.tmp[1];var d=a.substitute(c,A),p=o;o=(s^a.permute(d))>>>0,s=p}a.rip(o,s,r,i)},u.prototype._decrypt=function(t,e,n,r,i){for(var s=n,o=e,u=t.keys.length-2;u>=0;u-=2){var c=t.keys[u],A=t.keys[u+1];a.expand(s,t.tmp,0),c^=t.tmp[0],A^=t.tmp[1];var d=a.substitute(c,A),p=s;s=(o^a.permute(d))>>>0,o=p}a.rip(s,o,r,i)}},function(t,e,n){var r=n(36),i=n(1).Buffer,a=n(134);function s(t){var e=t._cipher.encryptBlockRaw(t._prev);return a(t._prev),e}e.encrypt=function(t,e){var n=Math.ceil(e.length/16),a=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*n)]);for(var o=0;o<n;o++){var u=s(t),c=a+16*o;t._cache.writeUInt32BE(u[0],c+0),t._cache.writeUInt32BE(u[1],c+4),t._cache.writeUInt32BE(u[2],c+8),t._cache.writeUInt32BE(u[3],c+12)}var A=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),r(e,A)}},function(t,e){t.exports=function(t){for(var e,n=t.length;n--;){if(255!==(e=t.readUInt8(n))){e++,t.writeUInt8(e,n);break}t.writeUInt8(0,n)}}},function(t){t.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},function(t,e,n){var r=n(46),i=n(1).Buffer,a=n(20),s=n(0),o=n(308),u=n(36),c=n(134);function A(t,e,n,s){a.call(this);var u=i.alloc(4,0);this._cipher=new r.AES(e);var A=this._cipher.encryptBlock(u);this._ghash=new o(A),n=function(t,e,n){if(12===e.length)return t._finID=i.concat([e,i.from([0,0,0,1])]),i.concat([e,i.from([0,0,0,2])]);var r=new o(n),a=e.length,s=a%16;r.update(e),s&&(s=16-s,r.update(i.alloc(s,0))),r.update(i.alloc(8,0));var u=8*a,A=i.alloc(8);A.writeUIntBE(u,0,8),r.update(A),t._finID=r.state;var d=i.from(t._finID);return c(d),d}(this,n,A),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}s(A,a),A.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=i.alloc(e,0),this._ghash.update(e))}this._called=!0;var n=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(n),this._len+=t.length,n},A.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var n=0;t.length!==e.length&&n++;for(var r=Math.min(t.length,e.length),i=0;i<r;++i)n+=t[i]^e[i];return n}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},A.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},A.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},A.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length},t.exports=A},function(t,e,n){var r=n(46),i=n(1).Buffer,a=n(20);function s(t,e,n,s){a.call(this),this._cipher=new r.AES(e),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._mode=t}n(0)(s,a),s.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},t.exports=s},function(t,e,n){(function(t){var r=n(139),i=n(313),a=n(314);var s={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(e){var n=new t(i[e].prime,"hex"),r=new t(i[e].gen,"hex");return new a(n,r)},e.createDiffieHellman=e.DiffieHellman=function e(n,i,o,u){return t.isBuffer(i)||void 0===s[i]?e(n,"binary",i,o):(i=i||"binary",u=u||"binary",o=o||new t([2]),t.isBuffer(o)||(o=new t(o,u)),"number"==typeof n?new a(r(n,o),o,!0):(t.isBuffer(n)||(n=new t(n,i)),new a(n,o,!0)))}}).call(this,n(2).Buffer)},function(t,e,n){var r=n(23);t.exports=m,m.simpleSieve=y,m.fermatTest=g;var i=n(5),a=new i(24),s=new(n(140)),o=new i(1),u=new i(2),c=new i(5),A=(new i(16),new i(8),new i(10)),d=new i(3),p=(new i(7),new i(11)),f=new i(4),l=(new i(12),null);function h(){if(null!==l)return l;var t=[];t[0]=2;for(var e=1,n=3;n<1048576;n+=2){for(var r=Math.ceil(Math.sqrt(n)),i=0;i<e&&t[i]<=r&&n%t[i]!=0;i++);e!==i&&t[i]<=r||(t[e++]=n)}return l=t,t}function y(t){for(var e=h(),n=0;n<e.length;n++)if(0===t.modn(e[n]))return 0===t.cmpn(e[n]);return!0}function g(t){var e=i.mont(t);return 0===u.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)}function m(t,e){if(t<16)return new i(2===e||5===e?[140,123]:[140,39]);var n,l;for(e=new i(e);;){for(n=new i(r(Math.ceil(t/8)));n.bitLength()>t;)n.ishrn(1);if(n.isEven()&&n.iadd(o),n.testn(1)||n.iadd(u),e.cmp(u)){if(!e.cmp(c))for(;n.mod(A).cmp(d);)n.iadd(f)}else for(;n.mod(a).cmp(p);)n.iadd(f);if(y(l=n.shrn(1))&&y(n)&&g(l)&&g(n)&&s.test(l)&&s.test(n))return n}}},function(t,e,n){var r=n(5),i=n(71);function a(t){this.rand=t||new i.Rand}t.exports=a,a.create=function(t){return new a(t)},a.prototype._randbelow=function(t){var e=t.bitLength(),n=Math.ceil(e/8);do{var i=new r(this.rand.generate(n))}while(i.cmp(t)>=0);return i},a.prototype._randrange=function(t,e){var n=e.sub(t);return t.add(this._randbelow(n))},a.prototype.test=function(t,e,n){var i=t.bitLength(),a=r.mont(t),s=new r(1).toRed(a);e||(e=Math.max(1,i/48|0));for(var o=t.subn(1),u=0;!o.testn(u);u++);for(var c=t.shrn(u),A=o.toRed(a);e>0;e--){var d=this._randrange(new r(2),o);n&&n(d);var p=d.toRed(a).redPow(c);if(0!==p.cmp(s)&&0!==p.cmp(A)){for(var f=1;f<u;f++){if(0===(p=p.redSqr()).cmp(s))return!1;if(0===p.cmp(A))break}if(f===u)return!1}}return!0},a.prototype.getDivisor=function(t,e){var n=t.bitLength(),i=r.mont(t),a=new r(1).toRed(i);e||(e=Math.max(1,n/48|0));for(var s=t.subn(1),o=0;!s.testn(o);o++);for(var u=t.shrn(o),c=s.toRed(i);e>0;e--){var A=this._randrange(new r(2),s),d=t.gcd(A);if(0!==d.cmpn(1))return d;var p=A.toRed(i).redPow(u);if(0!==p.cmp(a)&&0!==p.cmp(c)){for(var f=1;f<o;f++){if(0===(p=p.redSqr()).cmp(a))return p.fromRed().subn(1).gcd(t);if(0===p.cmp(c))break}if(f===o)return(p=p.redSqr()).fromRed().subn(1).gcd(t)}}return!1}},function(t,e,n){var r=n(1).Buffer,i=n(27),a=n(62),s=n(0),o=n(315),u=n(343),c=n(125);function A(t){a.Writable.call(this);var e=c[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function d(t){a.Writable.call(this);var e=c[t];if(!e)throw new Error("Unknown message digest");this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function p(t){return new A(t)}function f(t){return new d(t)}Object.keys(c).forEach((function(t){c[t].id=r.from(c[t].id,"hex"),c[t.toLowerCase()]=c[t]})),s(A,a.Writable),A.prototype._write=function(t,e,n){this._hash.update(t),n()},A.prototype.update=function(t,e){return"string"==typeof t&&(t=r.from(t,e)),this._hash.update(t),this},A.prototype.sign=function(t,e){this.end();var n=this._hash.digest(),r=o(n,t,this._hashType,this._signType,this._tag);return e?r.toString(e):r},s(d,a.Writable),d.prototype._write=function(t,e,n){this._hash.update(t),n()},d.prototype.update=function(t,e){return"string"==typeof t&&(t=r.from(t,e)),this._hash.update(t),this},d.prototype.verify=function(t,e,n){"string"==typeof e&&(e=r.from(e,n)),this.end();var i=this._hash.digest();return u(e,i,t,this._signType,this._tag)},t.exports={Sign:p,Verify:f,createSign:p,createVerify:f}},function(t,e,n){"use strict";var r=e;function i(t){return 1===t.length?"0"+t:t}function a(t){for(var e="",n=0;n<t.length;n++)e+=i(t[n].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"!=typeof t){for(var r=0;r<t.length;r++)n[r]=0|t[r];return n}if("hex"===e){(t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t);for(r=0;r<t.length;r+=2)n.push(parseInt(t[r]+t[r+1],16))}else for(r=0;r<t.length;r++){var i=t.charCodeAt(r),a=i>>8,s=255&i;a?n.push(a,s):n.push(s)}return n},r.zero2=i,r.toHex=a,r.encode=function(t,e){return"hex"===e?a(t):t}},function(t,e,n){"use strict";var r=e;r.base=n(48),r.short=n(317),r.mont=n(318),r.edwards=n(319)},function(t,e,n){"use strict";var r=n(16).rotr32;function i(t,e,n){return t&e^~t&n}function a(t,e,n){return t&e^t&n^e&n}function s(t,e,n){return t^e^n}e.ft_1=function(t,e,n,r){return 0===t?i(e,n,r):1===t||3===t?s(e,n,r):2===t?a(e,n,r):void 0},e.ch32=i,e.maj32=a,e.p32=s,e.s0_256=function(t){return r(t,2)^r(t,13)^r(t,22)},e.s1_256=function(t){return r(t,6)^r(t,11)^r(t,25)},e.g0_256=function(t){return r(t,7)^r(t,18)^t>>>3},e.g1_256=function(t){return r(t,17)^r(t,19)^t>>>10}},function(t,e,n){"use strict";var r=n(16),i=n(37),a=n(144),s=n(10),o=r.sum32,u=r.sum32_4,c=r.sum32_5,A=a.ch32,d=a.maj32,p=a.s0_256,f=a.s1_256,l=a.g0_256,h=a.g1_256,y=i.BlockHash,g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function m(){if(!(this instanceof m))return new m;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}r.inherits(m,y),t.exports=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r<n.length;r++)n[r]=u(h(n[r-2]),n[r-7],l(n[r-15]),n[r-16]);var i=this.h[0],a=this.h[1],y=this.h[2],g=this.h[3],m=this.h[4],b=this.h[5],I=this.h[6],C=this.h[7];for(s(this.k.length===n.length),r=0;r<n.length;r++){var v=c(C,f(m),A(m,b,I),this.k[r],n[r]),E=o(p(i),d(i,a,y));C=I,I=b,b=m,m=o(g,v),g=y,y=a,a=i,i=o(v,E)}this.h[0]=o(this.h[0],i),this.h[1]=o(this.h[1],a),this.h[2]=o(this.h[2],y),this.h[3]=o(this.h[3],g),this.h[4]=o(this.h[4],m),this.h[5]=o(this.h[5],b),this.h[6]=o(this.h[6],I),this.h[7]=o(this.h[7],C)},m.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(t,e,n){"use strict";var r=n(16),i=n(37),a=n(10),s=r.rotr64_hi,o=r.rotr64_lo,u=r.shr64_hi,c=r.shr64_lo,A=r.sum64,d=r.sum64_hi,p=r.sum64_lo,f=r.sum64_4_hi,l=r.sum64_4_lo,h=r.sum64_5_hi,y=r.sum64_5_lo,g=i.BlockHash,m=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=m,this.W=new Array(160)}function I(t,e,n,r,i){var a=t&n^~t&i;return a<0&&(a+=4294967296),a}function C(t,e,n,r,i,a){var s=e&r^~e&a;return s<0&&(s+=4294967296),s}function v(t,e,n,r,i){var a=t&n^t&i^n&i;return a<0&&(a+=4294967296),a}function E(t,e,n,r,i,a){var s=e&r^e&a^r&a;return s<0&&(s+=4294967296),s}function w(t,e){var n=s(t,e,28)^s(e,t,2)^s(e,t,7);return n<0&&(n+=4294967296),n}function B(t,e){var n=o(t,e,28)^o(e,t,2)^o(e,t,7);return n<0&&(n+=4294967296),n}function Q(t,e){var n=s(t,e,14)^s(t,e,18)^s(e,t,9);return n<0&&(n+=4294967296),n}function M(t,e){var n=o(t,e,14)^o(t,e,18)^o(e,t,9);return n<0&&(n+=4294967296),n}function k(t,e){var n=s(t,e,1)^s(t,e,8)^u(t,e,7);return n<0&&(n+=4294967296),n}function _(t,e){var n=o(t,e,1)^o(t,e,8)^c(t,e,7);return n<0&&(n+=4294967296),n}function x(t,e){var n=s(t,e,19)^s(e,t,29)^u(t,e,6);return n<0&&(n+=4294967296),n}function S(t,e){var n=o(t,e,19)^o(e,t,29)^c(t,e,6);return n<0&&(n+=4294967296),n}r.inherits(b,g),t.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(t,e){for(var n=this.W,r=0;r<32;r++)n[r]=t[e+r];for(;r<n.length;r+=2){var i=x(n[r-4],n[r-3]),a=S(n[r-4],n[r-3]),s=n[r-14],o=n[r-13],u=k(n[r-30],n[r-29]),c=_(n[r-30],n[r-29]),A=n[r-32],d=n[r-31];n[r]=f(i,a,s,o,u,c,A,d),n[r+1]=l(i,a,s,o,u,c,A,d)}},b.prototype._update=function(t,e){this._prepareBlock(t,e);var n=this.W,r=this.h[0],i=this.h[1],s=this.h[2],o=this.h[3],u=this.h[4],c=this.h[5],f=this.h[6],l=this.h[7],g=this.h[8],m=this.h[9],b=this.h[10],k=this.h[11],_=this.h[12],x=this.h[13],S=this.h[14],D=this.h[15];a(this.k.length===n.length);for(var R=0;R<n.length;R+=2){var T=S,N=D,O=Q(g,m),H=M(g,m),L=I(g,m,b,k,_),U=C(g,m,b,k,_,x),F=this.k[R],j=this.k[R+1],P=n[R],G=n[R+1],q=h(T,N,O,H,L,U,F,j,P,G),Y=y(T,N,O,H,L,U,F,j,P,G);T=w(r,i),N=B(r,i),O=v(r,i,s,o,u),H=E(r,i,s,o,u,c);var K=d(T,N,O,H),z=p(T,N,O,H);S=_,D=x,_=b,x=k,b=g,k=m,g=d(f,l,q,Y),m=p(l,l,q,Y),f=u,l=c,u=s,c=o,s=r,o=i,r=d(q,Y,K,z),i=p(q,Y,K,z)}A(this.h,0,r,i),A(this.h,2,s,o),A(this.h,4,u,c),A(this.h,6,f,l),A(this.h,8,g,m),A(this.h,10,b,k),A(this.h,12,_,x),A(this.h,14,S,D)},b.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(t,e,n){"use strict";var r=e;r.bignum=n(5),r.define=n(335).define,r.base=n(338),r.constants=n(339),r.decoders=n(150),r.encoders=n(148)},function(t,e,n){"use strict";var r=e;r.der=n(149),r.pem=n(336)},function(t,e,n){"use strict";var r=n(0),i=n(76).Buffer,a=n(77),s=n(79);function o(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){a.call(this,"der",t)}function c(t){return t<10?"0"+t:t}t.exports=o,o.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},r(u,a),u.prototype._encodeComposite=function(t,e,n,r){var a=function(t,e,n,r){var i;"seqof"===t?t="seq":"setof"===t&&(t="set");if(s.tagByName.hasOwnProperty(t))i=s.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return r.error("Unknown tag: "+t);i=t}if(i>=31)return r.error("Multi-octet tag encoding unsupported");e||(i|=32);return i|=s.tagClassByName[n||"universal"]<<6}(t,e,n,this.reporter);if(r.length<128){var o=i.alloc(2);return o[0]=a,o[1]=r.length,this._createEncoderBuffer([o,r])}for(var u=1,c=r.length;c>=256;c>>=8)u++;var A=i.alloc(2+u);A[0]=a,A[1]=128|u;for(var d=1+u,p=r.length;p>0;d--,p>>=8)A[d]=255&p;return this._createEncoderBuffer([A,r])},u.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var n=i.alloc(2*t.length),r=0;r<t.length;r++)n.writeUInt16BE(t.charCodeAt(r),2*r);return this._createEncoderBuffer(n)}return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(e)||"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported")},u.prototype._encodeObjid=function(t,e,n){if("string"==typeof t){if(!e)return this.reporter.error("string objid given, but no values map found");if(!e.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=e[t].split(/[\s.]+/g);for(var r=0;r<t.length;r++)t[r]|=0}else if(Array.isArray(t)){t=t.slice();for(var a=0;a<t.length;a++)t[a]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!n){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}for(var s=0,o=0;o<t.length;o++){var u=t[o];for(s++;u>=128;u>>=7)s++}for(var c=i.alloc(s),A=c.length-1,d=t.length-1;d>=0;d--){var p=t[d];for(c[A--]=127&p;(p>>=7)>0;)c[A--]=128|127&p}return this._createEncoderBuffer(c)},u.prototype._encodeTime=function(t,e){var n,r=new Date(t);return"gentime"===e?n=[c(r.getUTCFullYear()),c(r.getUTCMonth()+1),c(r.getUTCDate()),c(r.getUTCHours()),c(r.getUTCMinutes()),c(r.getUTCSeconds()),"Z"].join(""):"utctime"===e?n=[c(r.getUTCFullYear()%100),c(r.getUTCMonth()+1),c(r.getUTCDate()),c(r.getUTCHours()),c(r.getUTCMinutes()),c(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(n,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!i.isBuffer(t)){var n=t.toArray();!t.sign&&128&n[0]&&n.unshift(0),t=i.from(n)}if(i.isBuffer(t)){var r=t.length;0===t.length&&r++;var a=i.alloc(r);return t.copy(a),0===t.length&&(a[0]=0),this._createEncoderBuffer(a)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);for(var s=1,o=t;o>=256;o>>=8)s++;for(var u=new Array(s),c=u.length-1;c>=0;c--)u[c]=255&t,t>>=8;return 128&u[0]&&u.unshift(0),this._createEncoderBuffer(i.from(u))},u.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},u.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},u.prototype._skipDefault=function(t,e,n){var r,i=this._baseState;if(null===i.default)return!1;var a=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,n).join()),a.length!==i.defaultBuffer.length)return!1;for(r=0;r<a.length;r++)if(a[r]!==i.defaultBuffer[r])return!1;return!0}},function(t,e,n){"use strict";var r=e;r.der=n(151),r.pem=n(337)},function(t,e,n){"use strict";var r=n(0),i=n(5),a=n(38).DecoderBuffer,s=n(77),o=n(79);function u(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new c,this.tree._init(t.body)}function c(t){s.call(this,"der",t)}function A(t,e){var n=t.readUInt8(e);if(t.isError(n))return n;var r=o.tagClass[n>>6],i=0==(32&n);if(31==(31&n)){var a=n;for(n=0;128==(128&a);){if(a=t.readUInt8(e),t.isError(a))return a;n<<=7,n|=127&a}}else n&=31;return{cls:r,primitive:i,tag:n,tagStr:o.tag[n]}}function d(t,e,n){var r=t.readUInt8(n);if(t.isError(r))return r;if(!e&&128===r)return null;if(0==(128&r))return r;var i=127&r;if(i>4)return t.error("length octect is too long");r=0;for(var a=0;a<i;a++){r<<=8;var s=t.readUInt8(n);if(t.isError(s))return s;r|=s}return r}t.exports=u,u.prototype.decode=function(t,e){return a.isDecoderBuffer(t)||(t=new a(t,e)),this.tree._decode(t,e)},r(c,s),c.prototype._peekTag=function(t,e,n){if(t.isEmpty())return!1;var r=t.save(),i=A(t,'Failed to peek tag: "'+e+'"');return t.isError(i)?i:(t.restore(r),i.tag===e||i.tagStr===e||i.tagStr+"of"===e||n)},c.prototype._decodeTag=function(t,e,n){var r=A(t,'Failed to decode tag of "'+e+'"');if(t.isError(r))return r;var i=d(t,r.primitive,'Failed to get length of "'+e+'"');if(t.isError(i))return i;if(!n&&r.tag!==e&&r.tagStr!==e&&r.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(r.primitive||null!==i)return t.skip(i,'Failed to match body of: "'+e+'"');var a=t.save(),s=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(s)?s:(i=t.offset-a.offset,t.restore(a),t.skip(i,'Failed to match body of: "'+e+'"'))},c.prototype._skipUntilEnd=function(t,e){for(;;){var n=A(t,e);if(t.isError(n))return n;var r=d(t,n.primitive,e);if(t.isError(r))return r;var i=void 0;if(i=n.primitive||null!==r?t.skip(r):this._skipUntilEnd(t,e),t.isError(i))return i;if("end"===n.tagStr)break}},c.prototype._decodeList=function(t,e,n,r){for(var i=[];!t.isEmpty();){var a=this._peekTag(t,"end");if(t.isError(a))return a;var s=n.decode(t,"der",r);if(t.isError(s)&&a)break;i.push(s)}return i},c.prototype._decodeStr=function(t,e){if("bitstr"===e){var n=t.readUInt8();return t.isError(n)?n:{unused:n,data:t.raw()}}if("bmpstr"===e){var r=t.raw();if(r.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");for(var i="",a=0;a<r.length/2;a++)i+=String.fromCharCode(r.readUInt16BE(2*a));return i}if("numstr"===e){var s=t.raw().toString("ascii");return this._isNumstr(s)?s:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===e)return t.raw();if("objDesc"===e)return t.raw();if("printstr"===e){var o=t.raw().toString("ascii");return this._isPrintstr(o)?o:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(e)?t.raw().toString():t.error("Decoding of string type: "+e+" unsupported")},c.prototype._decodeObjid=function(t,e,n){for(var r,i=[],a=0,s=0;!t.isEmpty();)a<<=7,a|=127&(s=t.readUInt8()),0==(128&s)&&(i.push(a),a=0);128&s&&i.push(a);var o=i[0]/40|0,u=i[0]%40;if(r=n?i:[o,u].concat(i.slice(1)),e){var c=e[r.join(" ")];void 0===c&&(c=e[r.join(".")]),void 0!==c&&(r=c)}return r},c.prototype._decodeTime=function(t,e){var n,r,i,a,s,o,u=t.raw().toString();if("gentime"===e)n=0|u.slice(0,4),r=0|u.slice(4,6),i=0|u.slice(6,8),a=0|u.slice(8,10),s=0|u.slice(10,12),o=0|u.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");n=0|u.slice(0,2),r=0|u.slice(2,4),i=0|u.slice(4,6),a=0|u.slice(6,8),s=0|u.slice(8,10),o=0|u.slice(10,12),n=n<70?2e3+n:1900+n}return Date.UTC(n,r-1,i,a,s,o,0)},c.prototype._decodeNull=function(){return null},c.prototype._decodeBool=function(t){var e=t.readUInt8();return t.isError(e)?e:0!==e},c.prototype._decodeInt=function(t,e){var n=t.raw(),r=new i(n);return e&&(r=e[r.toString(10)]||r),r},c.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree}},function(t){t.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},function(t,e,n){(function(e){var r=n(73),i=n(5);t.exports=function(t){return new s(t)};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function s(t){this.curveType=a[t],this.curveType||(this.curveType={name:t}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function o(t,n,r){Array.isArray(t)||(t=t.toArray());var i=new e(t);if(r&&i.length<r){var a=new e(r-i.length);a.fill(0),i=e.concat([a,i])}return n?i.toString(n):i}a.p224=a.secp224r1,a.p256=a.secp256r1=a.prime256v1,a.p192=a.secp192r1=a.prime192v1,a.p384=a.secp384r1,a.p521=a.secp521r1,s.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},s.prototype.computeSecret=function(t,n,r){return n=n||"utf8",e.isBuffer(t)||(t=new e(t,n)),o(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},s.prototype.getPublicKey=function(t,e){var n=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(n[n.length-1]%2?n[0]=7:n[0]=6),o(n,t)},s.prototype.getPrivateKey=function(t){return o(this.keys.getPrivate(),t)},s.prototype.setPublicKey=function(t,n){return n=n||"utf8",e.isBuffer(t)||(t=new e(t,n)),this.keys._importPublic(t),this},s.prototype.setPrivateKey=function(t,n){n=n||"utf8",e.isBuffer(t)||(t=new e(t,n));var r=new i(t);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}}).call(this,n(2).Buffer)},function(t,e,n){e.publicEncrypt=n(344),e.privateDecrypt=n(345),e.privateEncrypt=function(t,n){return e.publicEncrypt(t,n,!0)},e.publicDecrypt=function(t,n){return e.privateDecrypt(t,n,!0)}},function(t,e,n){var r=n(27),i=n(1).Buffer;function a(t){var e=i.allocUnsafe(4);return e.writeUInt32BE(t,0),e}t.exports=function(t,e){for(var n,s=i.alloc(0),o=0;s.length<e;)n=a(o++),s=i.concat([s,r("sha1").update(t).update(n).digest()]);return s.slice(0,e)}},function(t,e){t.exports=function(t,e){for(var n=t.length,r=-1;++r<n;)t[r]^=e[r];return t}},function(t,e,n){var r=n(5),i=n(1).Buffer;t.exports=function(t,e){return i.from(t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed().toArray())}},function(t,e,n){"use strict";(function(t,r){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var a=n(1),s=n(23),o=a.Buffer,u=a.kMaxLength,c=t.crypto||t.msCrypto,A=Math.pow(2,32)-1;function d(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>A||t<0)throw new TypeError("offset must be a uint32");if(t>u||t>e)throw new RangeError("offset out of range")}function p(t,e,n){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>A||t<0)throw new TypeError("size must be a uint32");if(t+e>n||t>u)throw new RangeError("buffer too small")}function f(t,e,n,i){if(r.browser){var a=t.buffer,o=new Uint8Array(a,e,n);return c.getRandomValues(o),i?void r.nextTick((function(){i(null,t)})):t}if(!i)return s(n).copy(t,e),t;s(n,(function(n,r){if(n)return i(n);r.copy(t,e),i(null,t)}))}c&&c.getRandomValues||!r.browser?(e.randomFill=function(e,n,r,i){if(!(o.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof n)i=n,n=0,r=e.length;else if("function"==typeof r)i=r,r=e.length-n;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return d(n,e.length),p(r,n,e.length),f(e,n,r,i)},e.randomFillSync=function(e,n,r){void 0===n&&(n=0);if(!(o.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');d(n,e.length),void 0===r&&(r=e.length-n);return p(r,n,e.length),f(e,n,r)}):(e.randomFill=i,e.randomFillSync=i)}).call(this,n(6),n(8))},function(t,e,n){(function(t){var r,i,a,s;function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e,n){return e&&u(t.prototype,e),n&&u(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function A(t){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}window,s=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==A(t)&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=10)}([function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return a}));var r=n(7),i=n.n(r),a=function(){function e(t){o(this,e),this.wasm=t}return c(e,[{key:"arrayToBuf",value:function(e){var n=this.wasm,r={ptr:null,len:0};if(!e)return r;var i=null;if(e instanceof Uint8Array||void 0!==t&&e instanceof t)i=e;else{if(!(e instanceof ArrayBuffer||e.__proto__.toString().includes("ArrayBuffer")))throw new Error("arrayToBuf() failed: Expected Uint8Array, Buffer, or\n ArrayBuffer");i=new Uint8Array(e)}return r.len=i.length,r.ptr=n._malloc(i.length),n.writeArrayToMemory(i,r.ptr),r}},{key:"arrayToSmartBuf",value:function(t){var e=this.wasm,n=this.arrayToBuf(t);return n.ptr&&setTimeout((function(){e._free(n.ptr),n.len=0,n.ptr=null}),0),n}},{key:"smartMalloc",value:function(t){var e=this.wasm,n=e._malloc(t);return setTimeout((function(){e._free(n)}),0),n}}],[{key:"bytesToHex",value:function(t){return t.reduce((function(t,e){return t+e.toString(16).padStart(2,"0")}),"")}},{key:"bytesToBinary",value:function(t){return t.reduce((function(t,e){return t+e.toString(2).padStart(8,"0")+" "}),"")}},{key:"hexToBytes",value:function(t){return new Uint8Array(t.match(/.{1,2}/g).map((function(t){return parseInt(t,16)})))}},{key:"randomBytes",value:function(t){if("undefined"!=typeof window&&"undefined"!==window.crypto){var e=new Uint8Array(t);return window.crypto.getRandomValues(e),e}return i.a.randomBytes(t)}}]),e}()}).call(this,n(3).Buffer)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){function t(e){o(this,t),this.wasm=e,this.ptr=null,this.len=0}return c(t,[{key:"clear",value:function(){this.len=0}},{key:"free",value:function(){null!==this.ptr&&(this.wasm._free(this.ptr),this.len=0,this.ptr=null)}},{key:"resize",value:function(t){null!==this.ptr&&this.free(),this.len=t,this.ptr=this.wasm._malloc(t)}},{key:"ensureSize",value:function(t){(null===this.ptr||this.len<t)&&this.resize(t)}}]),t}()},function(t,e){t.exports=n(346)},function(t,e,n){"use strict";(function(t){
|
|
52
|
+
/*!
|
|
53
|
+
* The buffer module from node.js, for the browser.
|
|
54
|
+
*
|
|
55
|
+
* @author Feross Aboukhadijeh <http://feross.org>
|
|
56
|
+
* @license MIT
|
|
57
|
+
*/
|
|
58
|
+
var r=n(12),i=n(13),a=n(14);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return d(this,t)}return c(this,t,e,n)}function c(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r),u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=p(t,e),t}(t,e,n,r):"string"==typeof e?function(t,e,n){if("string"==typeof n&&""!==n||(n="utf8"),!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|l(e,n),i=(t=o(t,r)).write(e,n);return i!==r&&(t=t.slice(0,i)),t}(t,e,n):function(t,e){if(u.isBuffer(e)){var n=0|f(e.length);return 0===(t=o(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?o(t,0):p(t,e);if("Buffer"===e.type&&a(e.data))return p(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function A(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function d(t,e){if(A(e),t=o(t,e<0?0:0|f(e)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function p(t,e){var n=e.length<0?0:0|f(e.length);t=o(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function f(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function l(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return j(t).length;default:if(r)return F(t).length;e=(""+e).toLowerCase(),r=!0}}function h(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return _(this,e,n);case"utf8":case"utf-8":return Q(this,e,n);case"ascii":return M(this,e,n);case"latin1":case"binary":return k(this,e,n);case"base64":return B(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function y(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function g(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:m(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):m(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,n,r,i){var a,s=1,o=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,o/=2,u/=2,n/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var A=-1;for(a=n;a<o;a++)if(c(t,a)===c(e,-1===A?0:a-A)){if(-1===A&&(A=a),a-A+1===u)return A*s}else-1!==A&&(a-=a-A),A=-1}else for(n+u>o&&(n=o-u),a=n;a>=0;a--){for(var d=!0,p=0;p<u;p++)if(c(t,a+p)!==c(e,p)){d=!1;break}if(d)return a}return-1}function b(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var s=0;s<r;++s){var o=parseInt(e.substr(2*s,2),16);if(isNaN(o))return s;t[n+s]=o}return s}function I(t,e,n,r){return P(F(e,t.length-n),t,n,r)}function C(t,e,n,r){return P(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function v(t,e,n,r){return C(t,e,n,r)}function E(t,e,n,r){return P(j(e),t,n,r)}function w(t,e,n,r){return P(function(t,e){for(var n,r,i,a=[],s=0;s<t.length&&!((e-=2)<0);++s)r=(n=t.charCodeAt(s))>>8,i=n%256,a.push(i),a.push(r);return a}(e,t.length-n),t,n,r)}function B(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function Q(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var a,s,o,u,c=t[i],A=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(A=c);break;case 2:128==(192&(a=t[i+1]))&&(u=(31&c)<<6|63&a)>127&&(A=u);break;case 3:a=t[i+1],s=t[i+2],128==(192&a)&&128==(192&s)&&(u=(15&c)<<12|(63&a)<<6|63&s)>2047&&(u<55296||u>57343)&&(A=u);break;case 4:a=t[i+1],s=t[i+2],o=t[i+3],128==(192&a)&&128==(192&s)&&128==(192&o)&&(u=(15&c)<<18|(63&a)<<12|(63&s)<<6|63&o)>65535&&u<1114112&&(A=u)}null===A?(A=65533,d=1):A>65535&&(A-=65536,r.push(A>>>10&1023|55296),A=56320|1023&A),r.push(A),i+=d}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var n="",r=0;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}function M(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function k(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function _(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=e;a<n;++a)i+=U(t[a]);return i}function x(t,e,n){for(var r=t.slice(e,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function S(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function D(t,e,n,r,i,a){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function R(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,a=Math.min(t.length-n,2);i<a;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function T(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,a=Math.min(t.length-n,4);i<a;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function N(t,e,n,r,i,a){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(t,e,n,r,a){return a||N(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function H(t,e,n,r,a){return a||N(t,0,n,8),i.write(t,e,n,r,52,8),n+8}e.Buffer=u,e.SlowBuffer=function(t){return+t!=t&&(t=0),u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,n){return c(null,t,e,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,n){return function(t,e,n,r){return A(e),e<=0?o(t,e):void 0!==n?"string"==typeof r?o(t,e).fill(n,r):o(t,e).fill(n):o(t,e)}(null,t,e,n)},u.allocUnsafe=function(t){return d(null,t)},u.allocUnsafeSlow=function(t){return d(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,a=Math.min(n,r);i<a;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!a(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=u.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var s=t[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},u.byteLength=l,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?Q(this,0,t):h.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var a=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),o=Math.min(a,s),c=this.slice(r,i),A=t.slice(e,n),d=0;d<o;++d)if(c[d]!==A[d]){a=c[d],s=A[d];break}return a<s?-1:s<a?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return g(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return g(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return I(this,t,e,n);case"ascii":return C(this,t,e,n);case"latin1":case"binary":return v(this,t,e,n);case"base64":return E(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},u.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;n=new u(i,void 0);for(var a=0;a<i;++a)n[a]=this[a+t]}return n},u.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||S(t,e,this.length);for(var r=this[t],i=1,a=0;++a<e&&(i*=256);)r+=this[t+a]*i;return r},u.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||S(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||S(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||S(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||S(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||S(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||S(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||S(t,e,this.length);for(var r=this[t],i=1,a=0;++a<e&&(i*=256);)r+=this[t+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||S(t,e,this.length);for(var r=e,i=1,a=this[t+--r];r>0&&(i*=256);)a+=this[t+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},u.prototype.readInt8=function(t,e){return e||S(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||S(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||S(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||S(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||S(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||S(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||S(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||S(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||S(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){t=+t,e|=0,n|=0,r||D(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[e]=255&t;++a<n&&(i*=256);)this[e+a]=t/i&255;return e+n},u.prototype.writeUIntBE=function(t,e,n,r){t=+t,e|=0,n|=0,r||D(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):T(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):T(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);D(this,t,e,n,i-1,-i)}var a=0,s=1,o=0;for(this[e]=255&t;++a<n&&(s*=256);)t<0&&0===o&&0!==this[e+a-1]&&(o=1),this[e+a]=(t/s>>0)-o&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);D(this,t,e,n,i-1,-i)}var a=n-1,s=1,o=0;for(this[e+a]=255&t;--a>=0&&(s*=256);)t<0&&0===o&&0!==this[e+a+1]&&(o=1),this[e+a]=(t/s>>0)-o&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):T(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||D(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):T(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return O(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return O(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return H(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return H(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,a=r-n;if(this===t&&n<e&&e<r)for(i=a-1;i>=0;--i)t[i+e]=this[i+n];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+a),e);return a},u.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var a;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(a=e;a<n;++a)this[a]=t;else{var s=u.isBuffer(t)?t:F(new u(t,r).toString()),o=s.length;for(a=0;a<n-e;++a)this[a+e]=s[a%o]}return this};var L=/[^+\/0-9A-Za-z-_]/g;function U(t){return t<16?"0"+t.toString(16):t.toString(16)}function F(t,e){var n;e=e||1/0;for(var r=t.length,i=null,a=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;a.push(n)}else if(n<2048){if((e-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function j(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(L,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function P(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(11))},function(t,e){var n,r,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(t){if(n===setTimeout)return setTimeout(t,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(t){n=a}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var u,c=[],A=!1,d=-1;function p(){A&&u&&(A=!1,u.length?c=u.concat(c):d=-1,c.length&&f())}function f(){if(!A){var t=o(p);A=!0;for(var e=c.length;e;){for(u=c,c=[];++d<e;)u&&u[d].run();d=-1,e=c.length}u=null,A=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function l(t,e){this.fun=t,this.array=e}function h(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new l(t,e)),1!==c.length||A||o(f)},l.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";e.a={"ElvCrypto.wasm":"AGFzbQEAAAABwQEYYAN/f38Bf2AGf3x/f39/AX9gAn9/AGABfwF/YAN/fn8BfmABfwBgAn9/AX9gAAF/YAZ/f39/f38Bf2AHf39/f39/fwF/YAh/f39/f39/fwF/YAp/f39/f39/f39/AX9gBH9/f38Bf2AGf39/f39/AGAJf39/f39/f39/AX9gBX9/f39/AX9gA39/fwBgBX9/f39/AGAEf39+fwBgCH9/f39/f39/AGAEf39/fwBgA35/fwF/YAJ+fwF/YAJ8fwF8AowBDgNlbnYBYgADA2VudgFjAAUDZW52AWQABgNlbnYBZQAFA2VudgFmAAMDZW52AWcAAwNlbnYBaAAAA2VudgFpAAcDZW52AWoABgNlbnYBawAGA2VudgxfX3RhYmxlX2Jhc2UDfwADZW52AWEDfwADZW52Bm1lbW9yeQIAgAIDZW52BXRhYmxlAXABCgoDnwKdAgUCEAUCBRACAhAQEBACEAIFEBAQAgICEBASEBICEBECAgUCAgICAhAFAgUFAgIQBRADAgIQEAICAgICAgICEAIABQUQAwUCBQMAAgICEAUDBRYDAgUCEAUQAgUFBgYCAxAFEAUCAgUCBQURAwUFAgICEBACEBAFERAFAgUCAgIOAw8RFAIFBQYCAgUQEBACAhACAgUQAgICAgALFwYQAxAAAhAFEQICAgAQFAcCAgUCBwYCAgAQEAUQAwMABQIHEAILEBAFBQIFAwMDBgMGEAMDAgICDwYMDAAMBQkCBAABAwYOBhYVDRACAQYDBwcEAAMUFAcHDQ0CBhAQAgcFBxACEAcQBhAQBwUCAgcJExAQAhAMCwIQBhAKAgkCCAYNAn8BIwELfwFBoMkACwfHASgBbADaAQFtANkBAW4A1wEBbwDUAQFwANMBAXEApgIBcgCkAgFzAKICAXQAywEBdQCdAgF2AJwCAXcAyAEBeACVAgF5AJECAXoAjAIBQQCIAgFCAIYCAUMAugEBRAC6AQFFALUBAUYA/gEBRwD9AQFIAMgBAUkA9wEBSgC1AQFLAPABAUwA7AEBTQCkAQFOAOUBAU8A5AEBUADjAQFRAOIBAVIA4QEBUwDgAQFUAN8BAVUAowEBVgDeAQFXAPYBAVgASwFZAFwJGgEAIwALCuoB+gHpAfMB6AH5AecB+AHmAfIBCvr1BZ0CvAEBAX4gACAAKQMAIgFC//////////8DgzcDACAAIAApAwggAUI6h3wiAUL//////////wODNwMIIAAgACkDECABQjqHfCIBQv//////////A4M3AxAgACAAKQMYIAFCOod8IgFC//////////8DgzcDGCAAIAApAyAgAUI6h3wiAUL//////////wODNwMgIAAgACkDKCABQjqHfCIBQv//////////A4M3AyggACAAKQMwIAFCOod8NwMwC0gAIAAgASkDADcDACAAIAEpAwg3AwggACABKQMQNwMQIAAgASkDGDcDGCAAIAEpAyA3AyAgACABKQMoNwMoIAAgASkDMDcDMAtRAQF/IwMhAyMDQUBrJAMgACABIAIQfiAAIAEoAjggAigCOGoiATYCOCABQYCAgBBMBEAgAyQDDwsgA0HADBALIAAgAxAeIABBATYCOCADJAMLDQAgABAKIABBQGsQCgsdACAAIAFGBEAPCyAAIAEQESAAQUBrIAFBQGsQEQuCAQEBfiAAIAApAwAiAUL//////////wCDNwMAIAAgACkDCCABQjiHfCIBQv//////////AIM3AwggACAAKQMQIAFCOId8IgFC//////////8AgzcDECAAIAApAxggAUI4h3wiAUL//////////wCDNwMYIAAgACkDICABQjiHfDcDIAtSAQF/IwMhAyMDQTBqJAMgACABIAIQwAEgACABKAIoIAIoAihqIgE2AiggAUGAgIAITARAIAMkAw8LIANBgBAQEiAAIAMQKSAAQQE2AiggAyQDCxIAIAAgARALIAAgASgCODYCOAs0ACAAIAEpAwA3AwAgACABKQMINwMIIAAgASkDEDcDECAAIAEpAxg3AxggACABKQMgNwMgC2oBAn8jAyEDIwNBsAFqJAMgA0HwAGohBCACKAI4rCABKAI4rH5CgICAEFUEQCAEQcAMEAsgASAEEB4gAUEBNgI4CyADIAEgAhAxIARBwAwQCyAAIARBgDQpAwAgAxAjIABBAjYCOCADJAMLHgAgACABIAIQFSAAQYABaiABQYABaiACQYABahAVCxsAIAAgASACEAwgAEFAayABQUBrIAJBQGsQDAtqAQJ/IwMhAyMDQYABaiQDIANB0ABqIQQgAigCKKwgASgCKKx+QoCAgAhVBEAgBEGAEBASIAEgBBApIAFBATYCKAsgAyABIAIQPiAEQYAQEBIgACAEQYg0KQMAIAMQJSAAQQI2AiggAyQDCxIAIAAgARASIAAgASgCKDYCKAuXAgEHfyMDIQMjA0HwBWokAyADQcAMEAsgA0HAAWoiCCADEKMCIAFBQGshBSABKAI4IgYgASgCeCIEaqwgAigCOCACKAJ4aqx+QoCAgBBVBEAgBkEBSgRAIAEQKyABKAJ4IQQLIARBAUoEQCAFECsLCyADQYAFaiIEIAEgAhAxIANBkARqIgYgBSACQUBrIgkQMSADQYABaiIHIAEgBRB+IAcQCiADQUBrIgUgAiAJEH4gBRAKIANBoANqIgEgByAFEDEgA0GwAmoiAiAEIAYQzAEgBiAIIAYQzQEgBCAEIAYQzAEgASABIAIQzQEgBBDPASAAIAQQLyAAQQM2AjggARDPASAAQUBrIAEQLyAAQQI2AnggAyQDC0oBAn8jAyECIwNB8AFqJAMgAkGADRALIAJBQGsiAyABIAIQMSACQbABaiIBQcAMEAsgACABQYA0KQMAIAMQIyAAQQI2AjggAiQDCw4AIAAQDSAAQYABahANCyYAIAAgASACEJcBIAAgACgCOCIAQQAgAmsgACABKAI4c3FzNgI4CxgAIAAgASACEBsgAEFAayABQUBrIAIQGwsmACAAIAEgAhDCASAAIAAoAigiAEEAIAJrIAAgASgCKHNxczYCKAuFCwIJfxB+IAAgACkDACILQv//////////A4MiEDcDACAAIAApAwggC0I6h3wiC0L//////////wODIg03AwggACAAKQMQIAtCOod8IgtC//////////8DgyIONwMQIAAgACkDGCALQjqHfCILQv//////////A4MiETcDGCAAIAApAyAgC0I6h3wiC0L//////////wODIhI3AyAgACAAKQMoIAtCOod8IgxC//////////8DgyILNwMoIAAgACkDMCAMQjqHfCIPNwMwAkACQCAPIAEpAzAiE1EEfiALIAFBKGoiCCkDACIMUQR+IBIgAUEgaiIDKQMAIgxRBH4gESABQRhqIgQpAwAiDFEEfiAOIAFBEGoiBSkDACIMUQR+IAFBCGoiAikDACIMIA1RBH4gECABKQMAIgxRBH4gAyEGIAQhByAFIQMgAiEEIAghBSALBSAQIQsMBwsFIA0hCwwGCwUgDiELDAULBSARIQsMBAsFIBIhCwwDCwUMAgsFIBMhDCAPIQsMAQshDwwBCyALIAxVBH4gAUEoaiIFKQMAIQ8gAUEgaiIJIQYgAUEYaiIKIQcgAUEQaiIIIQMgAUEIaiICIQQgCSkDACESIAopAwAhESAIKQMAIQ4gAikDACENIAEpAwAFDwshEAtBACECA0AgASATQgGGIA9COYeEIhM3AzAgBSAPQgGGQv7/////////A4MgEkI5h4QiDzcDACAGIBJCAYZC/v////////8DgyARQjmHhCISNwMAIAcgEUIBhkL+/////////wODIA5COYeEIhE3AwAgAyAOQgGGQv7/////////A4MgDUI5h4QiDjcDACAEIA1CAYZC/v////////8DgyAQQjmHhCINNwMAIAEgEEIBhkL+/////////wODIhA3AwAgAkEBaiECAn8CQCATIAApAzAiC1EEfyAPIAApAygiC1EEfyASIAApAyAiC1EEfyARIAApAxgiC1EEfyAOIAApAxAiC1EEfyANIAApAwgiC1EEfyAAKQMAIgsgEFEEf0EABSAQIQwMBwsFIA0hDAwGCwUgDiEMDAULBSARIQwMBAsFIBIhDAwDCwUgDyEMDAILBSATIQwMAQsMAQtBAUF/IAsgDFUbC0F/Sg0ACwNAIAEgDUI5hkKAgICAgICAgAKDIBBCAYeEIho3AwAgBCAOQjmGQoCAgICAgICAAoMgDUIBh4QiFDcDACADIBFCOYZCgICAgICAgIACgyAOQgGHhCIONwMAIAcgEkI5hkKAgICAgICAgAKDIBFCAYeEIg03AwAgBiAPQjmGQoCAgICAgICAAoMgEkIBh4QiEDcDACAFIBNCOYZCgICAgICAgIACgyAPQgGHhCIMNwMAIAEgE0IBhyILNwMwQQAgACkDMCIVIAt9IAApAygiFiAMfSAAKQMgIhcgEH0gACkDGCIYIA19IAApAxAiGSAOfSAAKQMIIhMgFH0gACkDACIPIBp9IhJCOod8IhFCOod8Ig5COod8Ig1COod8IhBCOod8IgxCOod8IgtCP4inQQFza6whFCAAIA8gFCAPIBJC//////////8Dg4WDhTcDACAAIBMgFCATIBFC//////////8Dg4WDhTcDCCAAIBkgFCAZIA5C//////////8Dg4WDhTcDECAAIBggFCAYIA1C//////////8Dg4WDhTcDGCAAIBcgFCAXIBBC//////////8Dg4WDhTcDICAAIBYgFCAWIAxC//////////8Dg4WDhTcDKCAAIBUgFCALIBWFg4U3AzAgAkEBSgRAIAJBf2ohAiABKQMAIRAgBCkDACENIAMpAwAhDiAHKQMAIREgBikDACESIAUpAwAhDyABKQMwIRMMAQsLC5MCAgF/B34gAEIANwMAIABCADcDCCAAQgA3AxAgAEIANwMYIABCADcDICAAQgA3AyggAEIANwMwA0AgACAJQgiGIARCMoeEIgk3AzAgACAEQgiGQoD+////////A4MgBUIyh4QiBDcDKCAAIAVCCIZCgP7///////8DgyAGQjKHhCIFNwMgIAAgBkIIhkKA/v///////wODIAdCMoeEIgY3AxggACAHQgiGQoD+////////A4MgCEIyh4QiBzcDECAAIAhCCIZCgP7///////8DgyADQjKHhCIINwMIIAAgA0IIhkKA/v///////wODIgM3AwAgACADIAEgAmotAACthCIDNwMAIAJBAWoiAkEwRw0ACwuGAwIBfwd+IAEgASkDACIDQv//////////A4MiBzcDACABIAEpAwggA0I6h3wiA0L//////////wODIgg3AwggASABKQMQIANCOod8IgNC//////////8DgyIJNwMQIAEgASkDGCADQjqHfCIEQv//////////A4MiAzcDGCABIAEpAyAgBEI6h3wiBUL//////////wODIgQ3AyAgASABKQMoIAVCOod8IgZC//////////8DgyIFNwMoIAEgASkDMCAGQjqHfCIGNwMwQS8hAQNAIAAgAWogBzwAACAIQjKGQoCAgICAgID+A4MgB0IIh4QhByAJQjKGQoCAgICAgID+A4MgCEIIh4QhCCADQjKGQoCAgICAgID+A4MgCUIIh4QhCSAEQjKGQoCAgICAgID+A4MgA0IIh4QhAyAFQjKGQoCAgICAgID+A4MgBEIIh4QhBCAGQjKGQoCAgICAgID+A4MgBUIIh4QhBSAGQgiHIQYgAUF/aiECIAEEQCACIQEMAQsLC14BAn8jAyEDIwNB4ABqJAMgA0EoaiIEIAIQXSAAIAEgBBDAASAAIAEoAiggBCgCKGoiATYCKCABQYCAgAhMBEAgAyQDDwsgA0GAEBASIAAgAxApIABBATYCKCADJAMLXQECfyMDIQMjA0GAAWokAyADQThqIgQgAhAwIAAgASAEEH4gACABKAI4IAQoAjhqIgE2AjggAUGAgIAQTARAIAMkAw8LIANBwAwQCyAAIAMQHiAAQQE2AjggAyQDC5IPAgR/CX4gAkJ/UQRAIAMpAzAhAgNAQgAgBEEDdCADaiIGKQMAIgh9IgtC/////wGDIQ0gASkDACIKQv////8BgyEJIAYgCCAJIA1+fCANIApCHYciCn4gC0IdiEL/////AYMiCyAJfnwiDEIdhkKAgICA/v///wODfCIIQv//////////A4M3AwAgASkDCCIOQv////8BgyEJIARBAWoiBkEDdCADaiIFKQMAIAogC34gDEIdh3wgCEI6h3x8IAkgDX58IA0gDkIdhyIOfiAJIAt+fCIPQh2GQoCAgID+////A4N8IQkgBSAJQv//////////A4M3AwAgASkDECIKQv////8BgyEIIARBAmpBA3QgA2oiBSkDACALIA5+IA9CHYd8IAlCOod8fCAIIA1+fCANIApCHYciCn4gCCALfnwiDEIdhkKAgICA/v///wODfCEJIAUgCUL//////////wODNwMAIAEpAxgiDkL/////AYMhCCAEQQNqQQN0IANqIgUpAwAgCiALfiAMQh2HfCAJQjqHfHwgCCANfnwgDSAOQh2HIg5+IAggC358Ig9CHYZCgICAgP7///8Dg3whCSAFIAlC//////////8DgzcDACABKQMgIgpC/////wGDIQggBEEEakEDdCADaiIFKQMAIAsgDn4gD0Idh3wgCUI6h3x8IAggDX58IApCHYciCiANfiAIIAt+fCIMQh2GQoCAgID+////A4N8IQkgBSAJQv//////////A4M3AwAgASkDKCIOQv////8BgyEIIARBBWpBA3QgA2oiBSkDACAKIAt+IAxCHYd8IAlCOod8fCAIIA1+fCAOQh2HIg4gDX4gCCALfnwiD0IdhkKAgICA/v///wODfCEJIAUgCUL//////////wODNwMAIAEpAzAiCkL/////AYMhCCAEQQZqQQN0IANqIAsgDn4gD0Idh3wgCUI6h3wgAnwgCCANfnwgDSAKQh2HIgp+IAggC358IgxCHYZCgICAgP7///8Dg3wiAkL//////////wODNwMAIARBB2pBA3QgA2oiBCkDACAKIAt+IAxCHYd8IAJCOod8fCECIAQgAjcDACAGQQdHBEAgBiEEDAELCwUgAkIBUSEFIAMpAzAhDQNAIARBA3QgA2oiBikDACIIIAIgCH5C//////////8DgyAFGyIJQv////8BgyELIAEpAwAiDEL/////AYMhCiAGIAggCiALfnwgCyAMQh2HIgx+IAlCHYciCSAKfnwiDkIdhkKAgICA/v///wODfCIKQv//////////A4M3AwAgASkDCCIPQv////8BgyEIIARBAWoiBkEDdCADaiIHKQMAIAkgDH4gDkIdh3wgCkI6h3x8IAggC358IAsgD0IdhyIPfiAIIAl+fCIQQh2GQoCAgID+////A4N8IQggByAIQv//////////A4M3AwAgASkDECIMQv////8BgyEKIARBAmpBA3QgA2oiBykDACAJIA9+IBBCHYd8IAhCOod8fCAKIAt+fCALIAxCHYciDH4gCSAKfnwiDkIdhkKAgICA/v///wODfCEIIAcgCEL//////////wODNwMAIAEpAxgiD0L/////AYMhCiAEQQNqQQN0IANqIgcpAwAgCSAMfiAOQh2HfCAIQjqHfHwgCiALfnwgCyAPQh2HIg9+IAkgCn58IhBCHYZCgICAgP7///8Dg3whCCAHIAhC//////////8DgzcDACABKQMgIgxC/////wGDIQogBEEEakEDdCADaiIHKQMAIAkgD34gEEIdh3wgCEI6h3x8IAogC358IAsgDEIdhyIMfiAJIAp+fCIOQh2GQoCAgID+////A4N8IQggByAIQv//////////A4M3AwAgASkDKCIPQv////8BgyEKIARBBWpBA3QgA2oiBykDACAJIAx+IA5CHYd8IAhCOod8fCAKIAt+fCALIA9CHYciD34gCSAKfnwiEEIdhkKAgICA/v///wODfCEIIAcgCEL//////////wODNwMAIAEpAzAiDEL/////AYMhCiAEQQZqQQN0IANqIAkgD34gEEIdh3wgCEI6h3wgDXwgCiALfnwgCyAMQh2HIgx+IAkgCn58Ig5CHYZCgICAgP7///8Dg3wiDUL//////////wODNwMAIARBB2pBA3QgA2oiBCkDACAJIAx+IA5CHYd8IA1COod8fCENIAQgDTcDACAGQQdHBEAgBiEEDAELCwsgACADKQM4IgI3AwAgACADQUBrKQMAIg03AwggACADKQNIIgs3AxAgACADKQNQIgk3AxggACADKQNYIgg3AyAgACADKQNgIgo3AyggAykDaCEMIAAgAkL//////////wODNwMAIAAgDSACQjqHfCICQv//////////A4M3AwggACALIAJCOod8IgJC//////////8DgzcDECAAIAkgAkI6h3wiAkL//////////wODNwMYIAAgCCACQjqHfCICQv//////////A4M3AyAgACAKIAJCOod8IgJC//////////8DgzcDKCAAIAwgAkI6h3w3AzALnAEBBn8jAyEDIwNBgARqJAMgA0GAA2oiBiABIAIQGCADQYACaiIFIAFBgAFqIgcgAkGAAWoiCBAYIANBgAFqIgQgCCACEBUgAyAHIAEQFSADEA0gBBANIAMgAyAEEBggBCAGEC0gAyADIAQQFSADEA0gBCAFEC0gAEGAAWoiASADIAQQFSAFEDkgACAFIAYQFSAAEA0gARANIAMkAwuSCwIEfwl+IAJCf1EEQCADKQMgIQIDQEIAIARBA3QgA2oiBSkDACIIfSIKQv////8AgyEMIAEpAwAiC0L/////AIMhCSAFIAggCSAMfnwgDCALQhyHIgt+IApCHIhC/////wCDIgogCX58Ig1CHIZCgICAgP////8Ag3wiCEL//////////wCDNwMAIAEpAwgiDkL/////AIMhCSAEQQFqIgVBA3QgA2oiBikDACAKIAt+IA1CHId8IAhCOId8fCAJIAx+fCAMIA5CHIciDn4gCSAKfnwiD0IchkKAgICA/////wCDfCEJIAYgCUL//////////wCDNwMAIAEpAxAiC0L/////AIMhCCAEQQJqQQN0IANqIgYpAwAgCiAOfiAPQhyHfCAJQjiHfHwgCCAMfnwgDCALQhyHIgt+IAggCn58Ig1CHIZCgICAgP////8Ag3whCSAGIAlC//////////8AgzcDACABKQMYIg5C/////wCDIQggBEEDakEDdCADaiIGKQMAIAogC34gDUIch3wgCUI4h3x8IAggDH58IAwgDkIchyIOfiAIIAp+fCIPQhyGQoCAgID/////AIN8IQkgBiAJQv//////////AIM3AwAgASkDICILQv////8AgyEIIARBBGpBA3QgA2ogCiAOfiAPQhyHfCAJQjiHfCACfCAIIAx+fCAMIAtCHIciC34gCCAKfnwiDUIchkKAgICA/////wCDfCICQv//////////AIM3AwAgBEEFakEDdCADaiIEKQMAIAogC34gDUIch3wgAkI4h3x8IQIgBCACNwMAIAVBBUcEQCAFIQQMAQsLBSACQgFRIQYgAykDICEMA0AgBEEDdCADaiIFKQMAIgggAiAIfkL//////////wCDIAYbIglC/////wCDIQogASkDACINQv////8AgyELIAUgCCAKIAt+fCAKIA1CHIciDX4gCUIchyIJIAt+fCIOQhyGQoCAgID/////AIN8IgtC//////////8AgzcDACABKQMIIg9C/////wCDIQggBEEBaiIFQQN0IANqIgcpAwAgCSANfiAOQhyHfCALQjiHfHwgCCAKfnwgCiAPQhyHIg9+IAggCX58IhBCHIZCgICAgP////8Ag3whCCAHIAhC//////////8AgzcDACABKQMQIg1C/////wCDIQsgBEECakEDdCADaiIHKQMAIAkgD34gEEIch3wgCEI4h3x8IAogC358IAogDUIchyINfiAJIAt+fCIOQhyGQoCAgID/////AIN8IQggByAIQv//////////AIM3AwAgASkDGCIPQv////8AgyELIARBA2pBA3QgA2oiBykDACAJIA1+IA5CHId8IAhCOId8fCAKIAt+fCAKIA9CHIciD34gCSALfnwiEEIchkKAgICA/////wCDfCEIIAcgCEL//////////wCDNwMAIAEpAyAiDUL/////AIMhCyAEQQRqQQN0IANqIAkgD34gEEIch3wgCEI4h3wgDHwgCiALfnwgCiANQhyHIg1+IAkgC358Ig5CHIZCgICAgP////8Ag3wiDEL//////////wCDNwMAIARBBWpBA3QgA2oiBCkDACAJIA1+IA5CHId8IAxCOId8fCEMIAQgDDcDACAFQQVHBEAgBSEEDAELCwsgACADKQMoIgI3AwAgACADKQMwIgw3AwggACADKQM4Igo3AxAgACADQUBrKQMAIgk3AxggAykDSCEIIAAgAkL//////////wCDNwMAIAAgDCACQjiHfCICQv//////////AIM3AwggACAKIAJCOId8IgJC//////////8AgzcDECAAIAkgAkI4h3wiAkL//////////wCDNwMYIAAgCCACQjiHfDcDIAsfACAAIAFGBEAPCyAAIAEQDiAAQYABaiABQYABahAOCxgAIAAoAgBBIHFFBEAgASACIAAQqgEaCwuAAQECfyMDIQUjA0GAAmokAyAEQYDABHFFIAIgA0pxBEAgBSABQRh0QRh1IAIgA2siAUGAAiABQYACSRsQShogAUH/AUsEQAJ/IAIgA2shBgNAIAAgBUGAAhAnIAFBgH5qIgFB/wFLDQALIAYLQf8BcSEBCyAAIAUgARAnCyAFJAML6wcCBX8LfiAAIAApAwAiB0L//////////wCDIgs3AwAgACAAKQMIIAdCOId8IgdC//////////8AgyIJNwMIIAAgACkDECAHQjiHfCIHQv//////////AIMiDDcDECAAIAApAxggB0I4h3wiCEL//////////wCDIgc3AxggACAAKQMgIAhCOId8Igo3AyACQAJAIAogASkDICINUQR+IAcgAUEYaiIGKQMAIghRBH4gDCABQRBqIgMpAwAiCFEEfiABQQhqIgIpAwAiCCAJUQR+IAsgASkDACIIUQR+IAMhBCACIQUgBiEDIAcFIAshBwwFCwUgCSEHDAQLBSAMIQcMAwsFDAILBSANIQggCiEHDAELIQoMAQsgByAIVQR+IAFBGGoiAykDACEKIAFBEGoiBiEEIAFBCGoiAiEFIAYpAwAhDCACKQMAIQkgASkDAAUPCyELC0EAIQIDQCABIA1CAYYgCkI3h4QiDTcDICADIApCAYZC/v////////8AgyAMQjeHhCIKNwMAIAQgDEIBhkL+/////////wCDIAlCN4eEIgw3AwAgBSAJQgGGQv7/////////AIMgC0I3h4QiCTcDACABIAtCAYZC/v////////8AgyILNwMAIAJBAWohAgJ/AkAgDSAAKQMgIgdRBH8gCiAAKQMYIgdRBH8gDCAAKQMQIgdRBH8gCSAAKQMIIgdRBH8gCyAAKQMAIgdRBH9BAAUgCyEIDAULBSAJIQgMBAsFIAwhCAwDCwUgCiEIDAILBSANIQgMAQsMAQtBAUF/IAcgCFUbC0F/Sg0ACwNAIAEgCUI3hkKAgICAgICAwACDIAtCAYeEIg43AwAgBSAMQjeGQoCAgICAgIDAAIMgCUIBh4QiCTcDACAEIApCN4ZCgICAgICAgMAAgyAMQgGHhCILNwMAIAMgDUI3hkKAgICAgICAwACDIApCAYeEIgg3AwAgASANQgGHIgc3AyAgAEEAIAApAyAiDyAHfSAAKQMYIhAgCH0gACkDECIRIAt9IAApAwgiCiAJfSAAKQMAIg0gDn0iDEI4h3wiCUI4h3wiC0I4h3wiCEI4h3wiB0I/iKdBAXNrrCIOIAxC//////////8AgyANhYMgDYU3AwAgACAOIAlC//////////8AgyAKhYMgCoU3AwggACAOIAtC//////////8AgyARhYMgEYU3AxAgACAQIA4gECAIQv//////////AIOFg4U3AxggACAPIA4gByAPhYOFNwMgIAJBAUoEQCACQX9qIQIgASkDACELIAUpAwAhCSAEKQMAIQwgAykDACEKIAEpAyAhDQwBCwsLOQEBfyMDIQIjA0GwAWokAyACEDIgAiABEDMgAkHwAGoiAUHADBALIAAgAUGANCkDACACECMgAiQDCycBAX8jAyEBIwNBQGskAyABQcAMEAsgACABEB4gAEEBNgI4IAEkAwvaAQEEfiAAIAApAwgiA0E6IAFrrSIEhkL//////////wODIAApAwAgAa0iAoeENwMAIAAgACkDECIFIASGQv//////////A4MgAyACh4Q3AwggACAAKQMYIgMgBIZC//////////8DgyAFIAKHhDcDECAAIAApAyAiBSAEhkL//////////wODIAMgAoeENwMYIAAgACkDKCIDIASGQv//////////A4MgBSACh4Q3AyAgACAAKQMwIgUgBIZC//////////8DgyADIAKHhDcDKCAAIAUgAoc3AzALRQEDfyMDIQIjA0GAAWokAyACQUBrIgMgASABQUBrIgQQDCADIAMQMCACIAMgBBAMIABBQGsgAyABEAwgACACEBEgAiQDC7QCAQl/IwMhAiMDQYAMaiQDIAJBgApqIgkgACABECQgAkGABmoiBSAAQYACaiIGIAFBgAJqIgQQJCACQYACaiIDIAAgBhAUIAIgASAEEBQgAxAaIAIQGiACQYAIaiIIIAMgAhAkIAMgBiAAQYAEaiIHEBQgAiAEIAFBgARqIgoQFCADEBogAhAaIAJBgARqIgQgAyACECQgAyAJEFYgAiAFEFYgCCAIIAMQFCAGIAggAhAUIAQgBCACEBQgBSAFIAMQFCADIAAgBxAUIAIgASAKEBQgAxAaIAIQGiADIAIgAxAkIAUgBSADEBQgAyAHIAoQJCACIAMQViAHIAUgAhAUIAQgBCACEBQgAxA0IAYgBiADEBQgBBAaIAQQNCAAIAkgBBAUIAAQGiAGEBogBxAaIAIkAwsoAQF/IwMhAiMDQUBrJAMgAkHADBALIAAgAkGANCkDACABECMgAiQDC80BAQJ/IwMhAyMDQYABaiQDIANBwAwQCyADIAEoAjhBf2oiAiACQQF2ciICIAJBAnZyIgIgAkEEdnIiAiACQQh2ciICIAJBEHZyIgIgAkEBdkHVqtWqBXFrIgJBs+bMmQNxIAJBAnZBs+bMmQNxaiICIAJBBHZqQY+evPgAcUGBgoQIbEEYdiICENABIAAgAyABEKECIABBASACdCIBNgI4IAFBgICAEEwEQCADJAMPCyADQUBrIgFBwAwQCyAAIAEQHiAAQQE2AjggAyQDC5AIAgV/C34gAEIANwMAIABCADcDCCAAQgA3AxAgAEIANwMYIABCADcDICAAQgA3AyggAEIANwMwIABCADcDOCAAQUBrQgA3AwAgAEIANwNIIABCADcDUCAAQgA3A1ggAEIANwNgIABCADcDaANAIAIpAwAiC0L/////AYMhDCADQQN0IABqIANBA3QgAWoiBSkDACIIQv////8BgyIJIAtCHYciDX4gCEIdhyIPIAx+fCIQQh2GQoCAgID+////A4MgCSAMfiAOfHwiDEL//////////wODNwMAIAIpAwgiC0L/////AYMhCiAFKQMAIghC/////wGDIgkgC0IdhyIRfiAIQh2HIhIgCn58Ig5CHYZCgICAgP7///8DgyADQQFqIgZBA3QgAGoiBykDACANIA9+IBBCHYd8IAxCOod8fCAJIAp+fHwhCiAHIApC//////////8DgzcDACACKQMQIgtC/////wGDIQ0gBSkDACIIQv////8BgyIJIAtCHYciD34gCEIdhyIQIA1+fCIMQh2GQoCAgID+////A4MgA0ECakEDdCAAaiIEKQMAIBEgEn4gDkIdh3wgCkI6h3x8IAkgDX58fCEKIAQgCkL//////////wODNwMAIAIpAxgiC0L/////AYMhDSAFKQMAIghC/////wGDIgkgC0IdhyIRfiAIQh2HIhIgDX58Ig5CHYZCgICAgP7///8DgyADQQNqQQN0IABqIgQpAwAgDyAQfiAMQh2HfCAKQjqHfHwgCSANfnx8IQogBCAKQv//////////A4M3AwAgAikDICILQv////8BgyENIAUpAwAiCEL/////AYMiCSALQh2HIg9+IAhCHYciECANfnwiDEIdhkKAgICA/v///wODIANBBGpBA3QgAGoiBCkDACARIBJ+IA5CHYd8IApCOod8fCAJIA1+fHwhCiAEIApC//////////8DgzcDACACKQMoIgtC/////wGDIQ0gBSkDACIIQv////8BgyIJIAtCHYciEX4gCEIdhyISIA1+fCIOQh2GQoCAgID+////A4MgA0EFakEDdCAAaiIEKQMAIA8gEH4gDEIdh3wgCkI6h3x8IAkgDX58fCEPIAQgD0L//////////wODNwMAIAIpAzAiCEL/////AYMhECAFKQMAIglC/////wGDIgwgCEIdhyILfiAJQh2HIgggEH58IglCHYZCgICAgP7///8DgyADQQZqQQN0IABqIgQpAwAgESASfiAOQh2HfCAPQjqHfHwgDCAQfnx8IQwgBCAMQv//////////A4M3AwAgA0EHakEDdCAAaiAIIAt+IAlCHYd8IAxCOod8NwMAIAZBB0cEQCAGIQMgBykDACEODAELCwtnACAAQgA3AwAgAEIANwMIIABCADcDECAAQgA3AxggAEIANwMgIABCADcDKCAAQgA3AzAgAEIANwM4IABBQGtCADcDACAAQgA3A0ggAEIANwNQIABCADcDWCAAQgA3A2AgAEIANwNoC48BACAAIAEpAwA3AwAgACABKQMINwMIIAAgASkDEDcDECAAIAEpAxg3AxggACABKQMgNwMgIAAgASkDKDcDKCAAIAEpAzBC//////////8DgzcDMCAAIAEpAzBCOoc3AzggAEFAayIAQgA3AwAgAEIANwMIIABCADcDECAAQgA3AxggAEIANwMgIABCADcDKAtlAQV/IwMhASMDQcACaiQDIAEgAEGAAWoiAxAOIAFBgAFqIgIgARAOIAFBgAJqIgQgAhARIAIgAkFAayIFEDAgBSAEEBEgASABIAIQFSADIAAQDiAAIAEQDiAAEA0gAxANIAEkAwsOACAAEFEgAEGAAWoQUQtVAQJ/IAAgAUYEQCAAQYAEaiECIABBgAJqIQMFIAAgARAmIABBgAJqIgMgAUGAAmoQJiAAQYAEaiICIAFBgARqECYLIAAgABBQIAMgAxBfIAIgAhBQC+YLARR/IwMhEiMDQSBqJAMgEiIDQRBqIgIgACgCDCABLQAAIAEtAAJBEHQgAS0AA0EYdHIgAS0AAUEIdHJycyIINgIAIAIgACgCECABLQAEIAEtAAdBGHQgAS0ABkEQdHIgAS0ABUEIdHJycyIGNgIEIAIgACgCFCABLQAIIAEtAAtBGHQgAS0ACkEQdHIgAS0ACUEIdHJycyIENgIIIAIgACgCGCABLQAMIAEtAA9BGHQgAS0ADkEQdHIgAS0ADUEIdHJycyIHNgIMIAAoAhwhCyAIQf8BcSEMIAAoAgRBAUoEQCACIQVBBCEJQQEhDQNAIAMgBkEIdkH/AXFBAnRBoB5qKAIAIgJBCHQgAkEYdnIgCyAMQQJ0QaAeaigCAHNzIARBEHZB/wFxQQJ0QaAeaigCACICQRB0IAJBEHZycyAHQRh2QQJ0QaAeaigCACICQRh0IAJBCHZyczYCACADIARBCHZB/wFxQQJ0QaAeaigCACICQQh0IAJBGHZyIABBDGogCUEBckECdGooAgAgBkH/AXFBAnRBoB5qKAIAc3MgB0EQdkH/AXFBAnRBoB5qKAIAIgJBEHQgAkEQdnJzIAhBGHZBAnRBoB5qKAIAIgJBGHQgAkEIdnJzIgo2AgQgAyAHQQh2Qf8BcUECdEGgHmooAgAiAkEIdCACQRh2ciAAQQxqIAlBAnJBAnRqKAIAIARB/wFxQQJ0QaAeaigCAHNzIAhBEHZB/wFxQQJ0QaAeaigCACICQRB0IAJBEHZycyAGQRh2QQJ0QaAeaigCACICQRh0IAJBCHZycyIONgIIIAMgCEEIdkH/AXFBAnRBoB5qKAIAIgJBCHQgAkEYdnIgAEEMaiAJQQNyQQJ0aigCACAHQf8BcUECdEGgHmooAgBzcyAGQRB2Qf8BcUECdEGgHmooAgAiAkEQdCACQRB2cnMgBEEYdkECdEGgHmooAgAiAkEYdCACQQh2cnMiBzYCDCAAQQxqIAlBBGoiBEECdGooAgAhCyADKAIAIghB/wFxIQwgDUEBaiIGIAAoAgRIBEACfyAFIRQgBCEJIAYhDSAKIQYgDiEEIAMhBSAUCyEDDAELCyAEIQIgA0EMaiEJIAVBBGohDyAFQQhqIRAgBUEMaiERIANBBGohDSAOIQQFIAMhBSACIQNBBCECIANBDGohCSAFQQRqIQ8gBUEIaiEQIAVBDGohESADQQRqIQ0gBiEKCwJ/IANBCGohFSAFIAsgDEHgF2otAABzIgYgCkEIdkH/AXFB4BdqLQAAQQh0cyIOIARBEHZB/wFxQeAXai0AAEEQdHMiCyAHQRh2QeAXai0AAEEYdHMiDDYCACAPIABBDGogAkEBckECdGooAgAgCkH/AXFB4BdqLQAAcyAEQQh2Qf8BcUHgF2otAABBCHRzIAdBEHZB/wFxQeAXai0AAEEQdHMgCEEYdkHgF2otAABBGHRzNgIAIBAgAEEMaiACQQJyQQJ0aigCACAEQf8BcUHgF2otAABzIAdBCHZB/wFxQeAXai0AAEEIdHMgCEEQdkH/AXFB4BdqLQAAQRB0cyAKQRh2QeAXai0AAEEYdHM2AgAgESAAQQxqIAJBA3JBAnRqKAIAIAdB/wFxQeAXai0AAHMgCEEIdkH/AXFB4BdqLQAAQQh0cyAKQRB2Qf8BcUHgF2otAABBEHRzIARBGHZB4BdqLQAAQRh0czYCACABIAY6AAAgASAOQQh2OgABIAEgC0EQdjoAAiABIAxBGHY6AAMgBUEANgIAIANBADYCACABIA8oAgAiADoABCABIABBCHY6AAUgASAAQRB2OgAGIAEgAEEYdjoAByAPQQA2AgAgDUEANgIAIAEgECgCACIAOgAIIAEgAEEIdjoACSABIABBEHY6AAogASAAQRh2OgALIBBBADYCACAVC0EANgIAIAEgESgCACIAOgAMIAEgAEEIdjoADSABIABBEHY6AA4gASAAQRh2OgAPIBFBADYCACAJQQA2AgAgEiQDC6wCAgF/B34gAEIANwMAIABCADcDCCAAQgA3AxAgAEIANwMYIABCADcDICAAQgA3AyggAEIANwMwIAJBAEwEQA8LIAJBMCACQTBIGyEDQQAhAgNAIAAgCkIIhiAFQjKHhCIKNwMwIAAgBUIIhkKA/v///////wODIAZCMoeEIgU3AyggACAGQgiGQoD+////////A4MgB0Iyh4QiBjcDICAAIAdCCIZCgP7///////8DgyAIQjKHhCIHNwMYIAAgCEIIhkKA/v///////wODIAlCMoeEIgg3AxAgACAJQgiGQoD+////////A4MgBEIyh4QiCTcDCCAAIARCCIZCgP7///////8DgyIENwMAIAAgBCABIAJqLQAArYQiBDcDACACQQFqIgIgA0gNAAsLawEFfyMDIQMjA0HAAWokAyAAIAMiAkYEQCACQUBrIQQgAEFAayEBBSACIAAQESACQUBrIgQgAEFAayIBEBELIANBgAFqIgUgABARIAAgARAwIAEgBRARIAAgAiAAEAwgASAEIAEQDCADJAMLZAEEfyMDIQMjA0GAAmokAyADQcABaiIEIAIgAkFAayIFEAwgBCAEEDAgA0GAAWoiBiAEIAUQDCADQUBrIgUgBCACEAwgAyAGEBEgACABIAMQDCAAQUBrIAFBQGsgBRAMIAMkAwspAQJ/IwMhASMDQUBrJAMgAUHADBALIAAgARAeIAAQ0gEhAiABJAMgAgthAQR/IwMhAiMDQcABaiQDIAJBgAFqIgMgASABQUBrIgQQDCACIAQQMCACQUBrIgUgASABEAwgBRAKIABBQGsgBSAEEBMgACABIAIQDCADEAogABAKIAAgAyAAEBMgAiQDC7EDAQx/IwMhAyMDQYAIaiQDQaw1KAIAQQNsIQwgA0GAB2oiBiAAIAEQGCADQYAGaiIHIABBgAFqIgogAUGAAWoiAhAYIANBgAVqIgggAEGAAmoiCyABQYACaiINEBggA0GABGoiCSAAIAoQFSAJEA0gA0GAA2oiBCABIAIQFSAEEA0gCSAJIAQQGCAEIAYgBxAVIAkgCSAEEDogCRANIAQgCiALEBUgBBANIANBgAJqIgUgAiANEBUgBRANIAQgBCAFEBggBSAHIAgQFSAEIAQgBRA6IAQQDSAFIAAgCxAVIAUQDSADQYABaiICIAEgDRAVIAIQDSAFIAUgAhAYIAIgBiAIEBUgAiAFIAIQOiACEA0gBSAGIAYQFSAGIAYgBRAVIAYQDSAIIAggDBBXIAgQOSADIAcgCBAVIAMQDSAHIAcgCBA6IAcQDSACIAIgDBBXIAIQOSACEA0gBSACIAQQGCAIIAkgBxAYIAAgCCAFEDogAiACIAYQGCAHIAcgAxAYIAogAiAHEBUgBiAGIAkQGCADIAMgBBAYIAsgAyAGEBUgABANIAoQDSALEA0gAyQDC/QFAgV/C34gAEIANwMAIABCADcDCCAAQgA3AxAgAEIANwMYIABCADcDICAAQgA3AyggAEIANwMwIABCADcDOCAAQUBrQgA3AwAgAEIANwNIA0AgAikDACILQv////8AgyEIIANBA3QgAGogA0EDdCABaiIFKQMAIglC/////wCDIgogC0IchyINfiAJQhyHIg8gCH58IhBCHIZCgICAgP////8AgyAIIAp+IA58fCIIQv//////////AIM3AwAgAikDCCILQv////8AgyEMIAUpAwAiCUL/////AIMiCiALQhyHIhF+IAlCHIciEiAMfnwiDkIchkKAgICA/////wCDIANBAWoiBkEDdCAAaiIHKQMAIA0gD34gEEIch3wgCEI4h3x8IAogDH58fCEMIAcgDEL//////////wCDNwMAIAIpAxAiC0L/////AIMhDSAFKQMAIglC/////wCDIgogC0IchyIPfiAJQhyHIhAgDX58IghCHIZCgICAgP////8AgyADQQJqQQN0IABqIgQpAwAgESASfiAOQhyHfCAMQjiHfHwgCiANfnx8IQwgBCAMQv//////////AIM3AwAgAikDGCILQv////8AgyENIAUpAwAiCUL/////AIMiCiALQhyHIhF+IAlCHIciEiANfnwiDkIchkKAgICA/////wCDIANBA2pBA3QgAGoiBCkDACAPIBB+IAhCHId8IAxCOId8fCAKIA1+fHwhDyAEIA9C//////////8AgzcDACACKQMgIglC/////wCDIRAgBSkDACIKQv////8AgyIIIAlCHIciC34gCkIchyIJIBB+fCIKQhyGQoCAgID/////AIMgA0EEakEDdCAAaiIEKQMAIBEgEn4gDkIch3wgD0I4h3x8IAggEH58fCEIIAQgCEL//////////wCDNwMAIANBBWpBA3QgAGogCSALfiAKQhyHfCAIQjiHfDcDACAGQQVHBEAgBiEDIAcpAwAhDgwBCwsL/wECBn8BfiMDIQMjA0HwAmokAyADQfABaiEEIANBgAFqIQUgA0FAayEIIANBqAJqIQZBACACayACIAJBAEgbIgcgASgCOGxBgYCAEEgEQCAAIAEgBxCWASAAIAEoAjggB2w2AjgFIAMQ0QEgAyAHEGggAxAKIAhBgA0QCyAFIAMgCBAxIARBwAwQCyAGIARBgDQpAwAiCSAFECMgBkECNgI4IAEoAjhBgICACEoEQCAEQcAMEAsgASAEEB4gAUEBNgI4CyAFIAEgBhAxIARBwAwQCyAAIAQgCSAFECMgAEECNgI4CyACQX9KBEAgAyQDDwsgACAAEDAgABAKIAMkAwuSAQEEfyMDIQMjA0GAA2okAyADIAEgAUGAAWoiBBAYIANBgAFqIgIgBBAOIANBgAJqIgUgASAEEBUgAhA5IAIgASACEBUgBRANIAIQDSAAIAUgAhAYIAIgAxAOIAIQOSACIAIgAxAVIAIQDSACIAIQLSAAIAAgAhAVIABBgAFqIgEgAyADEBUgABANIAEQDSADJAMLYgECfyAAQShqIAAoAgAiAkEFdkEPcUECdGoiAyABQf8BcSADKAIAQQh0cjYCACAAIAJBCGoiATYCACABBEAgAUH/A3EEQA8LBSAAIAAoAgRBAWo2AgQgAEEANgIACyAAEHILqAcBD38jAyEKIwNBsANqJAMgCkGAA2ohBiAKQdACaiEFIApBoAJqIQcgCkHwAWohCCAKQcABaiEEIApBkAFqIQMgCkHgAGohAiAKQTBqIQlBsDUoAgAhD0GAOygCAEUEQCAGIAAgARAWIAUgAEEwaiILIAFBMGoiDRAWIAcgAEHgAGoiDCABQeAAaiIOEBYgCCAAIAsQECAIEA8gBCABIA0QECAEEA8gCCAIIAQQFiAEIAYgBRAQIAggCCAEECEgCBAPIAQgCyAMEBAgBBAPIAMgDSAOEBAgAxAPIAQgBCADEBYgAyAFIAcQECAEIAQgAxAhIAQQDyADIAAgDBAQIAMQDyACIAEgDhAQIAIQDyADIAMgAhAWIAIgBiAHEBAgAiADIAIQISACEA8gAyAGIAYQECAGIAYgAxAQIAYQDyAHIAcgD0EDbCIBEE0gCSAFIAcQECAJEA8gBSAFIAcQISAFEA8gAiACIAEQTSADIAIgBBAWIAcgCCAFEBYgACAHIAMQISACIAIgBhAWIAUgBSAJEBYgCyACIAUQECAGIAYgCBAWIAkgCSAEEBYgDCAJIAYQECAAEA8gCxAPIAwQDyAKJAMPCyAPRSINBEAgChCPAQsgBiAAIAEQFiAFIABBMGoiCyABQTBqIg4QFiAHIABB4ABqIgwgAUHgAGoiEBAWIAggACALEBAgCBAPIAQgASAOEBAgBBAPIAggCCAEEBYgBCAGIAUQECAIIAggBBAhIAgQDyAEIAsgDBAQIAQQDyADIA4gEBAQIAMQDyAEIAQgAxAWIAMgBSAHEBAgBCAEIAMQISAEEA8gAyAAIAwQECADEA8gAiABIBAQECACEA8gAyADIAIQFiACIAYgBxAQIAIgAyACECEgAhAPIA0EQCAJIAcgChAWBSAJIAcgDxBNCyADIAIgCRAhIAMQDyAJIAMgAxAQIAMgAyAJEBAgCSAFIAMQISAJEA8gAyADIAUQECADEA8gDQRAIAIgAiAKEBYFIAIgAiAPEE0LIAUgByAHEBAgByAHIAUQECACIAIgBxAhIAIgAiAGECEgAhAPIAUgAiACEBAgAiACIAUQECACEA8gBSAGIAYQECAGIAYgBRAQIAYgBiAHECEgBhAPIAUgBCACEBYgByAGIAIQFiACIAMgCRAWIAsgAiAHEBAgAyADIAgQFiAAIAMgBRAhIAkgCSAEEBYgBSAIIAYQFiAMIAkgBRAQIAAQDyALEA8gDBAPIAokAwv3DQICfw9+IABCADcDACAAQgA3AwggAEIANwMQIABCADcDGCAAQgA3AyAgAEIANwMoIABCADcDMCAAQgA3AzggAEFAa0IANwMAIABCADcDSEEBIQIDQCACQQN0IAFqKQMAIgZC/////wCDIQogASkDACIFQv////8AgyIIIAZCHIciB34gBUIchyIGIAp+fCIFQhyGQoCAgID/////AIMgBCAJfCAIIAp+fHwhCCAGIAd+IAVCHId8IAhCOId8IQQgAkEDdCAAaiAIQv//////////AIM3AwAgAkEBaiEDIAJBBEkEQCADIgJBA3QgAGopAwAhCQwBCwsgACAENwMoIAEpAxAiBkL/////AIMhByAAIAEpAwgiBUL/////AIMiBCAGQhyHIg9+IAVCHIciDCAHfnwiCEIchkKAgICA/////wCDIAApAxggBCAHfnx8IgdC//////////8AgzcDGCABKQMYIgZC/////wCDIQ4gACABKQMIIgVC/////wCDIgQgBkIchyILfiAFQhyHIgkgDn58IgpCHIZCgICAgP////8AgyAAKQMgIAwgD34gCEIch3wgB0I4h3x8IAQgDn58fCIIQv//////////AIM3AyAgASkDICIGQv////8AgyEMIAAgASkDCCIFQv////8AgyIEIAZCHIciB34gBUIchyIGIAx+fCIFQhyGQoCAgID/////AIMgACkDKCAJIAt+IApCHId8IAhCOId8fCAEIAx+fHwiBEL//////////wCDNwMoIAAgBiAHfiAFQhyHfCAEQjiHfDcDMCABKQMYIgZC/////wCDIQcgACABKQMQIgVC/////wCDIgQgBkIchyILfiAFQhyHIgkgB358IgpCHIZCgICAgP////8AgyAAKQMoIAQgB358fCIIQv//////////AIM3AyggASkDICIGQv////8AgyEMIAAgASkDECIFQv////8AgyIEIAZCHIciB34gBUIchyIGIAx+fCIFQhyGQoCAgID/////AIMgACkDMCAJIAt+IApCHId8IAhCOId8fCAEIAx+fHwiBEL//////////wCDNwMwIAAgBiAHfiAFQhyHfCAEQjiHfDcDOCABKQMgIgZC/////wCDIQcgACABKQMYIgVC/////wCDIgQgBkIchyILfiAFQhyHIgkgB358IgVCHIZCgICAgP////8AgyAAKQM4IAQgB358fCIEQv//////////AIM3AzggACkDIEIBhiEQIAApAyhCAYYhESAAKQMwQgGGIRIgACkDOEIBhiENIAAgACkDAEIBhiIKNwMAIAAgACkDCEIBhiIINwMIIAAgACkDEEIBhiIHNwMQIAAgACkDGEIBhiIGNwMYIAAgEDcDICAAIBE3AyggACASNwMwIAAgDTcDOCAAQUBrIgMgCSALfiAFQhyHfCAEQjiHfEIBhiIPNwMAIABCADcDSCAAIAEpAwAiBEL/////AIMiCyAEQhyHIgl+IgVCHYZCgICAgP7///8AgyAKIAsgC358fCIEQv//////////AIMiDDcDACAAIAggCSAJfiAFQhuHfHwgBEI4h3wiDjcDCCAAIAEpAwgiBEL/////AIMiCiAEQhyHIgh+IgVCHYZCgICAgP7///8AgyAHIAogCn58fCIEQv//////////AIMiCzcDECAAIAYgCCAIfiAFQhuHfHwgBEI4h3wiCTcDGCAAIAEpAxAiBEL/////AIMiByAEQhyHIgZ+IgVCHYZCgICAgP7///8AgyAHIAd+IBB8fCIEQv//////////AIMiCjcDICAAIAYgBn4gBUIbh3wgEXwgBEI4h3wiCDcDKCAAIAEpAxgiBEL/////AIMiByAEQhyHIgZ+IgVCHYZCgICAgP7///8AgyAHIAd+IBJ8fCIEQv//////////AIMiBzcDMCAAIAYgBn4gBUIbh3wgDXwgBEI4h3wiBjcDOCABKQMgIgVC/////wCDIQ0gACAMNwMAIAAgDkL//////////wCDNwMIIAAgCyAOQjiHfCIEQv//////////AIM3AxAgACAJIARCOId8IgRC//////////8AgzcDGCAAIAogBEI4h3wiBEL//////////wCDNwMgIAAgCCAEQjiHfCIEQv//////////AIM3AyggACAHIARCOId8IgRC//////////8AgzcDMCAAIAYgBEI4h3wiBEL//////////wCDNwM4IAMgDyANIA1+fCANIAVCHIciB34iBkIdhkKAgICA/v///wCDfCIFQv//////////AIMgBEI4h3wiBEL//////////wCDNwMAIAAgByAHfiAGQhuHfCAFQjiHfCAEQjiHfDcDSAuqBwEPfyMDIQojA0HABGokAyAKQYAEaiEGIApBwANqIQUgCkGAA2ohByAKQcACaiEIIApBgAJqIQQgCkHAAWohAyAKQYABaiECIApBQGshCUGsNSgCACEPQYA7KAIARQRAIAYgACABEBMgBSAAQUBrIgsgAUFAayINEBMgByAAQYABaiIMIAFBgAFqIg4QEyAIIAAgCxAMIAgQCiAEIAEgDRAMIAQQCiAIIAggBBATIAQgBiAFEAwgCCAIIAQQIiAIEAogBCALIAwQDCAEEAogAyANIA4QDCADEAogBCAEIAMQEyADIAUgBxAMIAQgBCADECIgBBAKIAMgACAMEAwgAxAKIAIgASAOEAwgAhAKIAMgAyACEBMgAiAGIAcQDCACIAMgAhAiIAIQCiADIAYgBhAMIAYgBiADEAwgBhAKIAcgByAPQQNsIgEQPyAJIAUgBxAMIAkQCiAFIAUgBxAiIAUQCiACIAIgARA/IAMgAiAEEBMgByAIIAUQEyAAIAcgAxAiIAIgAiAGEBMgBSAFIAkQEyALIAIgBRAMIAYgBiAIEBMgCSAJIAQQEyAMIAkgBhAMIAAQCiALEAogDBAKIAokAw8LIA9FIg0EQCAKQYAIEEYLIAYgACABEBMgBSAAQUBrIgsgAUFAayIOEBMgByAAQYABaiIMIAFBgAFqIhAQEyAIIAAgCxAMIAgQCiAEIAEgDhAMIAQQCiAIIAggBBATIAQgBiAFEAwgCCAIIAQQIiAIEAogBCALIAwQDCAEEAogAyAOIBAQDCADEAogBCAEIAMQEyADIAUgBxAMIAQgBCADECIgBBAKIAMgACAMEAwgAxAKIAIgASAQEAwgAhAKIAMgAyACEBMgAiAGIAcQDCACIAMgAhAiIAIQCiANBEAgCSAHIAoQEwUgCSAHIA8QPwsgAyACIAkQIiADEAogCSADIAMQDCADIAMgCRAMIAkgBSADECIgCRAKIAMgAyAFEAwgAxAKIA0EQCACIAIgChATBSACIAIgDxA/CyAFIAcgBxAMIAcgByAFEAwgAiACIAcQIiACIAIgBhAiIAIQCiAFIAIgAhAMIAIgAiAFEAwgAhAKIAUgBiAGEAwgBiAGIAUQDCAGIAYgBxAiIAYQCiAFIAQgAhATIAcgBiACEBMgAiADIAkQEyALIAIgBxAMIAMgAyAIEBMgACADIAUQIiAJIAkgBBATIAUgCCAGEBMgDCAJIAUQDCAAEAogCxAKIAwQCiAKJAMLaAICfwF+IwMhAiMDQbABaiQDIAJB8ABqIQMgASgCOKwiBCAEfkKAgIAQVgRAIANBwAwQCyABIAMQHiABQQE2AjgLIAIgARBHIANBwAwQCyAAIANBgDQpAwAgAhAjIABBAjYCOCACJAMLVgECfyMDIQIjA0GwAmokAyACIAEQCyACQUBrIgFBgA0QCyACQYABaiIDIAIgARAxIAJB8AFqIgFBwAwQCyAAIAFBgDQpAwAgAxAjIABBAjYCOCACJAMLxhkCAn8QfiAAQgA3AwAgAEIANwMIIABCADcDECAAQgA3AxggAEIANwMgIABCADcDKCAAQgA3AzAgAEIANwM4IABBQGtCADcDACAAQgA3A0ggAEIANwNQIABCADcDWCAAQgA3A2AgAEIANwNoQQEhAgNAIAJBA3QgAWopAwAiBkL/////AYMhCyABKQMAIgVC/////wGDIgkgBkIdhyIHfiAFQh2HIgYgC358IgVCHYZCgICAgP7///8DgyAEIAp8IAkgC358fCEJIAYgB34gBUIdh3wgCUI6h3whBCACQQN0IABqIAlC//////////8DgzcDACACQQFqIQMgAkEGSQRAIAMiAkEDdCAAaikDACEKDAELCyAAIAQ3AzggASkDECIGQv////8BgyEHIAAgASkDCCIFQv////8BgyIEIAZCHYciDn4gBUIdhyIIIAd+fCIJQh2GQoCAgID+////A4MgACkDGCAEIAd+fHwiB0L//////////wODNwMYIAEpAxgiBkL/////AYMhDSAAIAEpAwgiBUL/////AYMiBCAGQh2HIgx+IAVCHYciCiANfnwiC0IdhkKAgICA/v///wODIAApAyAgCCAOfiAJQh2HfCAHQjqHfHwgBCANfnx8IgdC//////////8DgzcDICABKQMgIgZC/////wGDIQ0gACABKQMIIgVC/////wGDIgQgBkIdhyIOfiAFQh2HIgggDX58IglCHYZCgICAgP7///8DgyAAKQMoIAogDH4gC0Idh3wgB0I6h3x8IAQgDX58fCIHQv//////////A4M3AyggASkDKCIGQv////8BgyENIAAgASkDCCIFQv////8BgyIEIAZCHYciDH4gBUIdhyIKIA1+fCILQh2GQoCAgID+////A4MgACkDMCAIIA5+IAlCHYd8IAdCOod8fCAEIA1+fHwiCUL//////////wODNwMwIAEpAzAiBkL/////AYMhCCAAIAEpAwgiBUL/////AYMiBCAGQh2HIgd+IAVCHYciBiAIfnwiBUIdhkKAgICA/v///wODIAApAzggCiAMfiALQh2HfCAJQjqHfHwgBCAIfnx8IgRC//////////8DgzcDOCAAQUBrIgIgBiAHfiAFQh2HfCAEQjqHfDcDACABKQMYIgZC/////wGDIQcgACABKQMQIgVC/////wGDIgQgBkIdhyIMfiAFQh2HIgogB358IgtCHYZCgICAgP7///8DgyAAKQMoIAQgB358fCIHQv//////////A4M3AyggASkDICIGQv////8BgyENIAAgASkDECIFQv////8BgyIEIAZCHYciDn4gBUIdhyIIIA1+fCIJQh2GQoCAgID+////A4MgACkDMCAKIAx+IAtCHYd8IAdCOod8fCAEIA1+fHwiB0L//////////wODNwMwIAEpAygiBkL/////AYMhDSAAIAEpAxAiBUL/////AYMiBCAGQh2HIgx+IAVCHYciCiANfnwiC0IdhkKAgICA/v///wODIAApAzggCCAOfiAJQh2HfCAHQjqHfHwgBCANfnx8IglC//////////8DgzcDOCABKQMwIgVC/////wGDIQggASkDECIEQv////8BgyIHIAVCHYciBn4gBEIdhyIFIAh+fCIEQh2GQoCAgID+////A4MgAEFAayIDKQMAIAogDH4gC0Idh3wgCUI6h3x8IAcgCH58fCEHIAMgB0L//////////wODNwMAIAAgBSAGfiAEQh2HfCAHQjqHfDcDSCABKQMgIgZC/////wGDIQcgACABKQMYIgVC/////wGDIgQgBkIdhyIOfiAFQh2HIgggB358IgxCHYZCgICAgP7///8DgyAAKQM4IAQgB358fCIHQv//////////A4M3AzggASkDKCIGQv////8BgyENIAEpAxgiBUL/////AYMiBCAGQh2HIgp+IAVCHYciCyANfnwiCUIdhkKAgICA/v///wODIABBQGsiAykDACAIIA5+IAxCHYd8IAdCOod8fCAEIA1+fHwhCCADIAhC//////////8DgzcDACABKQMwIgZC/////wGDIQwgACABKQMYIgVC/////wGDIgQgBkIdhyIHfiAFQh2HIgYgDH58IgVCHYZCgICAgP7///8DgyAAKQNIIAogC34gCUIdh3wgCEI6h3x8IAQgDH58fCIEQv//////////A4M3A0ggACAGIAd+IAVCHYd8IARCOod8NwNQIAEpAygiBkL/////AYMhByAAIAEpAyAiBUL/////AYMiBCAGQh2HIgx+IAVCHYciCiAHfnwiC0IdhkKAgICA/v///wODIAApA0ggBCAHfnx8IglC//////////8DgzcDSCABKQMwIgZC/////wGDIQggACABKQMgIgVC/////wGDIgQgBkIdhyIHfiAFQh2HIgYgCH58IgVCHYZCgICAgP7///8DgyAAKQNQIAogDH4gC0Idh3wgCUI6h3x8IAQgCH58fCIEQv//////////A4M3A1AgACAGIAd+IAVCHYd8IARCOod8NwNYIAEpAzAiBkL/////AYMhByAAIAEpAygiBUL/////AYMiBCAGQh2HIhN+IAVCHYciDSAHfnwiDkIdhkKAgICA/v///wODIAApA1ggBCAHfnx8IghC//////////8DgzcDWCAAKQMwQgGGIQ8gACkDOEIBhiEQIAIpAwBCAYYhESAAKQNIQgGGIRIgACkDUEIBhiEFIAApA1hCAYYhBCAAIAApAwBCAYYiDDcDACAAIAApAwhCAYYiCjcDCCAAIAApAxBCAYYiCzcDECAAIAApAxhCAYYiCTcDGCAAIAApAyBCAYYiBzcDICAAIAApAyhCAYYiBjcDKCAAIA83AzAgACAQNwM4IAIgETcDACAAIBI3A0ggACAFNwNQIAAgBDcDWCAAIA0gE34gDkIdh3wgCEI6h3xCAYY3A2AgAEIANwNoIAAgASkDACIEQv////8BgyIOIARCHYciCH4iBUIehkKAgICA/P///wODIAwgDiAOfnx8IgRC//////////8DgzcDACAAIAogCCAIfiAFQhyHfHwgBEI6h3w3AwggACABKQMIIgRC/////wGDIgwgBEIdhyIKfiIFQh6GQoCAgID8////A4MgCyAMIAx+fHwiBEL//////////wODNwMQIAAgCSAKIAp+IAVCHId8fCAEQjqHfDcDGCAAIAEpAxAiBEL/////AYMiCyAEQh2HIgl+IgVCHoZCgICAgPz///8DgyAHIAsgC358fCIEQv//////////A4M3AyAgACAGIAkgCX4gBUIch3x8IARCOod8NwMoIAAgASkDGCIEQv////8BgyIHIARCHYciBn4iBUIehkKAgICA/P///wODIAcgB34gD3x8IgRC//////////8DgyIINwMwIAAgBiAGfiAFQhyHfCAQfCAEQjqHfCIMNwM4IAIgASkDICIEQv////8BgyIHIARCHYciBn4iBUIehkKAgICA/P///wODIAcgB34gEXx8IgRC//////////8DgyIKNwMAIAAgBiAGfiAFQhyHfCASfCAEQjqHfCILNwNIIAAgASkDKCIEQv////8BgyIHIARCHYciBn4iBUIehkKAgICA/P///wODIAApA1AgByAHfnx8IgRC//////////8DgyIJNwNQIAAgACkDWCAGIAZ+IAVCHId8fCAEQjqHfCIHNwNYIAEpAzAiBEL/////AYMiBiAEQh2HIgV+IgRCHoZCgICAgPz///8DgyAAKQNgIAYgBn58fCIGQjqHIAApA2ggBSAFfiAEQhyHfHx8IQUgACAAKQMAIgRC//////////8DgzcDACAAIAApAwggBEI6h3wiBEL//////////wODNwMIIAAgACkDECAEQjqHfCIEQv//////////A4M3AxAgACAAKQMYIARCOod8IgRC//////////8DgzcDGCAAIAApAyAgBEI6h3wiBEL//////////wODNwMgIAAgACkDKCAEQjqHfCIEQv//////////A4M3AyggACAIIARCOod8IgRC//////////8DgzcDMCAAIAwgBEI6h3wiBEL//////////wODNwM4IAIgCiAEQjqHfCIEQv//////////A4M3AwAgACALIARCOod8IgRC//////////8DgzcDSCAAIAkgBEI6h3wiBEL//////////wODNwNQIAAgByAEQjqHfCIEQv//////////A4M3A1ggACAGQv//////////A4MgBEI6h3wiBEL//////////wODNwNgIAAgBSAEQjqHfDcDaAvqAgEGfyMDIQUjA0HABmokAyACEAogBSACQQMQlgEgBRAKIAVBOGoiAyABRwRAIAMgARAmIANBgAJqIAFBgAJqECYgA0GABGogAUGABGoQJgsgBRBpIgRBAkoEQCABQYACaiEHIAFBgARqIQggBEF+aiEEA0AgAyADEKIBAkACQAJAIARBOm0iBkEDdCAFaikDAEIBIAQgBkE6bGuthoNCAFIgBEE6bSIGQQN0IAJqKQMAQgEgBCAGQTpsa62Gg0IAUmtBf2sOAwECAAILIAMgARAuDAELIAEgARBQIAcgBxBfIAggCBBQIAMgARAuIAEgARBQIAcgBxBfIAggCBBQCyAEQX9qIQYgBEEBSgRAIAYhBAwBCwsLIAAgA0YEQCAAEDUgAEGAAmoQNSAAQYAEahA1BSAAIAMQJiAAQYACaiIBIANBgAJqECYgAEGABGoiAiADQYAEahAmIAAQNSABEDUgAhA1CyAFJAMLWQEDfyMDIQIjA0GAAmokAyACQYABaiIDIAEQPCACIAMgARAYIAAgAhCYASAAQYACaiIEIAIQmAEgAEGABGoiACACEJgBIAQgBCABEGogACAAIAMQaiACJAMLmAIBBH8gACACaiEEIAFB/wFxIQMgAkHDAE4EQANAIABBA3EEQCAAIAM6AAAgAEEBaiEADAELCyADQQh0IANyIANBEHRyIANBGHRyIQEgBEF8cSIFQUBqIQYDQCAAIAZMBEAgACABNgIAIAAgATYCBCAAIAE2AgggACABNgIMIAAgATYCECAAIAE2AhQgACABNgIYIAAgATYCHCAAIAE2AiAgACABNgIkIAAgATYCKCAAIAE2AiwgACABNgIwIAAgATYCNCAAIAE2AjggACABNgI8IABBQGshAAwBCwsDQCAAIAVIBEAgACABNgIAIABBBGohAAwBCwsLA0AgACAESARAIAAgAzoAACAAQQFqIQAMAQsLIAQgAmsLpQ0BCX8gAEUEQA8LQZQ7KAIAIQQgAEF4aiIDIABBfGooAgAiAkF4cSIAaiEFIAJBAXEEfyADBQJ/IAMoAgAhASACQQNxRQRADwsgAyABayIDIARJBEAPCyAAIAFqIQAgA0GYOygCAEYEQCADIAUoAgQiAUEDcUEDRw0BGkGMOyAANgIAIAUgAUF+cTYCBCADIABBAXI2AgQgACADaiAANgIADwsgAUEDdiEEIAFBgAJJBEAgAygCCCIBIAMoAgwiAkYEQEGEO0GEOygCAEEBIAR0QX9zcTYCAAUgASACNgIMIAIgATYCCAsgAwwBCyADKAIYIQcgAyADKAIMIgFGBEACQCADQRBqIgJBBGoiBCgCACIBBEAgBCECBSACKAIAIgFFBEBBACEBDAILCwNAAkAgAUEUaiIEKAIAIgZFBEAgAUEQaiIEKAIAIgZFDQELIAQhAiAGIQEMAQsLIAJBADYCAAsFIAMoAggiAiABNgIMIAEgAjYCCAsgBwR/IAMgAygCHCICQQJ0QbQ9aiIEKAIARgRAIAQgATYCACABRQRAQYg7QYg7KAIAQQEgAnRBf3NxNgIAIAMMAwsFIAdBEGoiAiAHQRRqIAMgAigCAEYbIAE2AgAgAyABRQ0CGgsgASAHNgIYIAMoAhAiAgRAIAEgAjYCECACIAE2AhgLIAMoAhQiAgRAIAEgAjYCFCACIAE2AhgLIAMFIAMLCwsiByAFTwRADwsgBSgCBCIIQQFxRQRADwsgCEECcQRAIAUgCEF+cTYCBCADIABBAXI2AgQgACAHaiAANgIAIAAhAgUgBUGcOygCAEYEQEGQOyAAQZA7KAIAaiIANgIAQZw7IAM2AgAgAyAAQQFyNgIEQZg7KAIAIANHBEAPC0GYO0EANgIAQYw7QQA2AgAPC0GYOygCACAFRgRAQYw7IABBjDsoAgBqIgA2AgBBmDsgBzYCACADIABBAXI2AgQgACAHaiAANgIADwsgCEEDdiEEIAhBgAJJBEAgBSgCCCIBIAUoAgwiAkYEQEGEO0GEOygCAEEBIAR0QX9zcTYCAAUgASACNgIMIAIgATYCCAsFAkAgBSgCGCEJIAUoAgwiASAFRgRAAkAgBUEQaiICQQRqIgQoAgAiAQRAIAQhAgUgAigCACIBRQRAQQAhAQwCCwsDQAJAIAFBFGoiBCgCACIGRQRAIAFBEGoiBCgCACIGRQ0BCyAEIQIgBiEBDAELCyACQQA2AgALBSAFKAIIIgIgATYCDCABIAI2AggLIAkEQCAFKAIcIgJBAnRBtD1qIgQoAgAgBUYEQCAEIAE2AgAgAUUEQEGIO0GIOygCAEEBIAJ0QX9zcTYCAAwDCwUgCUEQaiICIAlBFGogAigCACAFRhsgATYCACABRQ0CCyABIAk2AhggBSgCECICBEAgASACNgIQIAIgATYCGAsgBSgCFCICBEAgASACNgIUIAIgATYCGAsLCwsgAyAAIAhBeHFqIgJBAXI2AgQgAiAHaiACNgIAIANBmDsoAgBGBEBBjDsgAjYCAA8LCyACQQN2IQEgAkGAAkkEQCABQQN0Qaw7aiEAQYQ7KAIAIgJBASABdCIBcQR/IABBCGoiAigCAAVBhDsgASACcjYCACAAQQhqIQIgAAshASACIAM2AgAgASADNgIMIAMgATYCCCADIAA2AgwPCyACQQh2IgAEfyACQf///wdLBH9BHwUgACAAQYD+P2pBEHZBCHEiAXQiBEGA4B9qQRB2QQRxIQBBDiAAIAFyIAQgAHQiAEGAgA9qQRB2QQJxIgFyayAAIAF0QQ92aiIAQQF0IAIgAEEHanZBAXFyCwVBAAsiAUECdEG0PWohACADIAE2AhwgA0EANgIUIANBADYCEEGIOygCACIEQQEgAXQiBnEEQAJAIAIgACgCACIAKAIEQXhxRgRAIAAhAQUCQCACQQBBGSABQQF2ayABQR9GG3QhBANAIABBEGogBEEfdkECdGoiBigCACIBBEAgBEEBdCEEIAIgASgCBEF4cUYNAiABIQAMAQsLIAYgAzYCACADIAA2AhggAyADNgIMIAMgAzYCCAwCCwsgASgCCCIAIAM2AgwgASADNgIIIAMgADYCCCADIAE2AgwgA0EANgIYCwVBiDsgBCAGcjYCACAAIAM2AgAgAyAANgIYIAMgAzYCDCADIAM2AggLQaQ7QaQ7KAIAQX9qIgA2AgAgAARADwtBzD4hAANAIAAoAgAiA0EIaiEAIAMNAAtBpDtBfzYCAAt1ACAAQgA3AgAgAEIANwIIIABCADcCECAAQgA3AhggAEIANwIgIABCADcCKCAAQgA3AjAgAEIANwI4IABBQGtCADcCACAAQgA3AkggAEIANwJQIABCADcCWCAAQgA3AmAgAEIANwJoIABCADcCcCAAQgA3AngLngICBn8BfiMDIQMjA0GQAmokAyADQbABaiEEIANB4ABqIQUgA0EwaiEIIANB2AFqIQZBACACayACIAJBAEgbIgcgASgCKGxBgYCACEgEQCAAIAEgBxCPAiAAIAEoAiggB2w2AigFIANCADcDACADQgA3AwggA0IANwMQIANCADcDGCADQgA3AyAgAyAHEJMBIAMQDyAIQbAQEBIgBSADIAgQPiAEQYAQEBIgBiAEQYg0KQMAIgkgBRAlIAZBAjYCKCABKAIoQYCAgARKBEAgBEGAEBASIAEgBBApIAFBATYCKAsgBSABIAYQPiAEQYAQEBIgACAEIAkgBRAlIABBAjYCKAsgAkF/SgRAIAMkAw8LIAAgABBdIAAQDyADJAMLKQECfyMDIQEjA0EwaiQDIAFBgBAQEiAAIAEQKSAAEMQBIQIgASQDIAILDgAgABDRASAAQQE2AjgLIgEBfyAAIAEQDiAAQYABaiICIAFBgAFqEC0gABANIAIQDQsNACAAECsgAEFAaxArC1IBA38QByEDIAAjAigCACICaiIBIAJIIABBAEpxIAFBAEhyBEAgARAEGkEMEANBfw8LIAEgA0oEQCABEAVFBEBBDBADQX8PCwsjAiABNgIAIAILxgMBA38gAkGAwABOBEAgACABIAIQBhogAA8LIAAhBCAAIAJqIQMgAEEDcSABQQNxRgRAA0AgAEEDcQRAIAJFBEAgBA8LIAAgASwAADoAACAAQQFqIQAgAUEBaiEBIAJBAWshAgwBCwsgA0F8cSICQUBqIQUDQCAAIAVMBEAgACABKAIANgIAIAAgASgCBDYCBCAAIAEoAgg2AgggACABKAIMNgIMIAAgASgCEDYCECAAIAEoAhQ2AhQgACABKAIYNgIYIAAgASgCHDYCHCAAIAEoAiA2AiAgACABKAIkNgIkIAAgASgCKDYCKCAAIAEoAiw2AiwgACABKAIwNgIwIAAgASgCNDYCNCAAIAEoAjg2AjggACABKAI8NgI8IABBQGshACABQUBrIQEMAQsLA0AgACACSARAIAAgASgCADYCACAAQQRqIQAgAUEEaiEBDAELCwUgA0EEayECA0AgACACSARAIAAgASwAADoAACAAIAEsAAE6AAEgACABLAACOgACIAAgASwAAzoAAyAAQQRqIQAgAUEEaiEBDAELCwsDQCAAIANIBEAgACABLAAAOgAAIABBAWohACABQQFqIQEMAQsLIAQLiwEBA38gAUUEQA8LIAAoAgAhAgJAAkAgASgCACIDQQBKBEACQEEAIQMDQCACIANqIgQgACgCBCICTg0BIAAoAgggBGogAyABKAIIaiwAADoAACAAKAIAIQIgA0EBaiIDIAEoAgAiBEgNAAsgBCEBDAILBSADIQEMAQsMAQsgASACaiECCyAAIAI2AgALaAICfwF+IwMhAiMDQYABaiQDIAJB0ABqIQMgASgCKKwiBCAEfkKAgIAIVgRAIANBgBAQEiABIAMQKSABQQE2AigLIAIgARBDIANBgBAQEiAAIANBiDQpAwAgAhAlIABBAjYCKCACJAMLWgEDfyMDIQIjA0GAAmokAyABEA0gAUGAAWoiAxANIAJBgAFqIgQgASADEBUgBCAEEC0gAiAEIAMQFSAAQYABaiIDIAQgARAVIAAgAhAOIAAQDSADEA0gAiQDCxgAIAAgASACED8gAEFAayABQUBrIAIQPwsNACAAEE8gAEFAaxBPCyQBAX8gABArIABBQGsiARArIAAQOwRAIAEQOwRAQQEPCwtBAAv/AQEIfyMDIQMjA0GABmokAyADQYACaiIHIABBgAFqIgYQDiADQYAFaiIEIAYQPCADQYAEaiIFIAcgAEGAAmoiARAYIANBgANqIgIgARA8IAEgBCAEEBUgARANIAEgASABEBUgASABIAEQFSABEA0gAiACQaw1KAIAQQNsEFcgAhA5IAIQDSADQYABaiIIIAIgARAYIAMgBCACEBUgAxANIAEgASAFEBggBSACIAIQFSACIAIgBRAVIAIQDSAEIAQgAhA6IAQQDSADIAMgBBAYIAYgAyAIEBUgBSAAIAcQGCAEEA0gACAEIAUQGCAAIAAgABAVIAAQDSAGEA0gAyQDC4MBAgJ/AX4gAKchAiAAQv////8PVgRAA0AgAUF/aiIBIAAgAEIKgCIEQgp+fadB/wFxQTByOgAAIABC/////58BVgRAIAQhAAwBCwsgBKchAgsgAgRAA0AgAUF/aiIBIAIgAkEKbiIDQQpsa0EwcjoAACACQQpPBEAgAyECDAELCwsgAQu0MwEMfyMDIQojA0EQaiQDIABB9QFJBEBBhDsoAgAiBUEQIABBC2pBeHEgAEELSRsiAkEDdiIAdiIBQQNxBEAgAUEBcUEBcyAAaiICQQN0Qaw7aiIAKAIIIgNBCGoiBCgCACEBIAAgAUYEQEGEO0EBIAJ0QX9zIAVxNgIABSABIAA2AgwgACABNgIICyADIAJBA3QiAEEDcjYCBCAAIANqIgAgACgCBEEBcjYCBCAKJAMgBA8LIAJBjDsoAgAiCUsEfyABBEBBAiAAdCIDQQAgA2tyIAEgAHRxIgBBACAAa3FBf2oiAEEMdkEQcSIBIAAgAXYiAEEFdkEIcSIBciAAIAF2IgBBAnZBBHEiAXIgACABdiIAQQF2QQJxIgFyIAAgAXYiAEEBdkEBcSIBciAAIAF2aiIEQQN0Qaw7aiIAKAIIIgFBCGoiBigCACEDIAAgA0YEQEGEO0EBIAR0QX9zIAVxIgA2AgAFIAMgADYCDCAAIAM2AgggBSEACyABIAJBA3I2AgQgASACaiIFIARBA3QiAyACayIEQQFyNgIEIAEgA2ogBDYCACAJBEBBmDsoAgAhASAJQQN2IgJBA3RBrDtqIQNBASACdCICIABxBH8gA0EIaiICKAIABUGEOyAAIAJyNgIAIANBCGohAiADCyEAIAIgATYCACAAIAE2AgwgASAANgIIIAEgAzYCDAtBjDsgBDYCAEGYOyAFNgIAIAokAyAGDwtBiDsoAgAiCwR/QQAgC2sgC3FBf2oiAEEMdkEQcSIBIAAgAXYiAEEFdkEIcSIBciAAIAF2IgBBAnZBBHEiAXIgACABdiIAQQF2QQJxIgFyIAAgAXYiAEEBdkEBcSIBciAAIAF2akECdEG0PWooAgAiBCEAIAQoAgRBeHEgAmshCANAAkAgACgCECIBBEAgASEABSAAKAIUIgBFDQELIAAgBCAAKAIEQXhxIAJrIgEgCEkiAxshBCABIAggAxshCAwBCwsgAiAEaiIMIARLBH8gBCgCGCEHIAQgBCgCDCIARgRAAkAgBEEUaiIBKAIAIgBFBEAgBEEQaiIBKAIAIgBFBEBBACEADAILCwNAAkAgAEEUaiIDKAIAIgZFBEAgAEEQaiIDKAIAIgZFDQELIAMhASAGIQAMAQsLIAFBADYCAAsFIAQoAggiASAANgIMIAAgATYCCAsgBwRAAkAgBCAEKAIcIgFBAnRBtD1qIgMoAgBGBEAgAyAANgIAIABFBEBBiDtBASABdEF/cyALcTYCAAwCCwUgB0EQaiAHQRRqIAQgBygCEEYbIAA2AgAgAEUNAQsgACAHNgIYIAQoAhAiAQRAIAAgATYCECABIAA2AhgLIAQoAhQiAQRAIAAgATYCFCABIAA2AhgLCwsgCEEQSQRAIAQgAiAIaiIAQQNyNgIEIAAgBGoiACAAKAIEQQFyNgIEBSAEIAJBA3I2AgQgDCAIQQFyNgIEIAggDGogCDYCACAJBEBBmDsoAgAhACAJQQN2IgJBA3RBrDtqIQFBASACdCICIAVxBH8gAUEIaiICKAIABUGEOyACIAVyNgIAIAFBCGohAiABCyEDIAIgADYCACADIAA2AgwgACADNgIIIAAgATYCDAtBjDsgCDYCAEGYOyAMNgIACyAKJAMgBEEIag8FIAILBSACCwUgAgshAAUgAEG/f0sEQEF/IQAFAkAgAEELaiIBQXhxIQBBiDsoAgAiBQRAQQAgAGshBAJAAkAgAUEIdiIBBH8gAEH///8HSwR/QR8FIAEgAUGA/j9qQRB2QQhxIgJ0IgZBgOAfakEQdkEEcSEBQQ4gBiABdCIGQYCAD2pBEHZBAnEiCCABIAJycmsgBiAIdEEPdmoiAUEBdCAAIAFBB2p2QQFxcgsFQQALIgdBAnRBtD1qKAIAIgEEf0EAIQIgAEEAQRkgB0EBdmsgB0EfRht0IQYDfyABKAIEQXhxIABrIgggBEkEQCAIBH8gCCEEIAEFQQAhBCABIQIMBAshAgsgAyABKAIUIgMgA0UgAyABQRBqIAZBH3ZBAnRqKAIAIgFGchshAyAGQQF0IQYgAQ0AIAILBUEACyIBIANyBH8gAwUgBUECIAd0IgFBACABa3JxIgJFDQRBACEBIAJBACACa3FBf2oiAkEMdkEQcSIDIAIgA3YiAkEFdkEIcSIDciACIAN2IgJBAnZBBHEiA3IgAiADdiICQQF2QQJxIgNyIAIgA3YiAkEBdkEBcSIDciACIAN2akECdEG0PWooAgALIgINACABIQMMAQsgASEDIAQhAQN/IAIoAgRBeHEgAGsiCCABSSEGIAggASAGGyEBIAIgAyAGGyEDIAIoAhAiBEUEQCACKAIUIQQLIAQEfyAEIQIMAQUgAQsLIQQLIAMEQCAEQYw7KAIAIABrSQRAIAAgA2oiByADSwRAIAMoAhghCSADIAMoAgwiAUYEQAJAIANBFGoiAigCACIBRQRAIANBEGoiAigCACIBRQRAQQAhAQwCCwsDQAJAIAFBFGoiBigCACIIRQRAIAFBEGoiBigCACIIRQ0BCyAGIQIgCCEBDAELCyACQQA2AgALBSADKAIIIgIgATYCDCABIAI2AggLIAkEQAJAIAMgAygCHCICQQJ0QbQ9aiIGKAIARgRAIAYgATYCACABRQRAQYg7IAVBASACdEF/c3EiATYCAAwCCwUgCUEQaiAJQRRqIAMgCSgCEEYbIAE2AgAgAUUEQCAFIQEMAgsLIAEgCTYCGCADKAIQIgIEQCABIAI2AhAgAiABNgIYCyADKAIUIgIEQCABIAI2AhQgAiABNgIYCyAFIQELBSAFIQELIARBEEkEQCADIAAgBGoiAEEDcjYCBCAAIANqIgAgACgCBEEBcjYCBAUCQCADIABBA3I2AgQgByAEQQFyNgIEIAQgB2ogBDYCACAEQQN2IQIgBEGAAkkEQCACQQN0Qaw7aiEAQYQ7KAIAIgFBASACdCICcQR/IABBCGoiAigCAAVBhDsgASACcjYCACAAQQhqIQIgAAshASACIAc2AgAgASAHNgIMIAcgATYCCCAHIAA2AgwMAQsgBEEIdiIABH8gBEH///8HSwR/QR8FIAAgAEGA/j9qQRB2QQhxIgJ0IgZBgOAfakEQdkEEcSEAQQ4gBiAAdCIGQYCAD2pBEHZBAnEiBSAAIAJycmsgBiAFdEEPdmoiAEEBdCAEIABBB2p2QQFxcgsFQQALIgJBAnRBtD1qIQAgByACNgIcIAdBADYCFCAHQQA2AhBBASACdCIGIAFxRQRAQYg7IAEgBnI2AgAgACAHNgIAIAcgADYCGCAHIAc2AgwgByAHNgIIDAELIAQgACgCACIAKAIEQXhxRgRAIAAhAQUCQCAEQQBBGSACQQF2ayACQR9GG3QhAgNAIABBEGogAkEfdkECdGoiBigCACIBBEAgAkEBdCECIAQgASgCBEF4cUYNAiABIQAMAQsLIAYgBzYCACAHIAA2AhggByAHNgIMIAcgBzYCCAwCCwsgASgCCCIAIAc2AgwgASAHNgIIIAcgADYCCCAHIAE2AgwgB0EANgIYCwsgCiQDIANBCGoPCwsLCwsLCwJAAkBBjDsoAgAiAiAATwRAQZg7KAIAIQEgAiAAayIDQQ9LBEBBmDsgACABaiIENgIAQYw7IAM2AgAgBCADQQFyNgIEIAEgAmogAzYCACABIABBA3I2AgQFQYw7QQA2AgBBmDtBADYCACABIAJBA3I2AgQgASACaiIAIAAoAgRBAXI2AgQLDAELAkBBkDsoAgAiASAASwRADAELIABBL2oiBUHcPigCAAR/QeQ+KAIABUHkPkGAIDYCAEHgPkGAIDYCAEHoPkF/NgIAQew+QX82AgBB8D5BADYCAEHAPkEANgIAQdw+IApBcHFB2KrVqgVzNgIAQYAgCyICaiIDQQAgAmsiCHEiBiAATQRADAMLQbw+KAIAIgIEQCAGQbQ+KAIAIgRqIgcgBE0gByACS3IEQAwECwsgAEEwaiEHAkACQEHAPigCAEEEcQRAQQAhAgUCQAJAAkBBnDsoAgAiAkUNAEHEPiEEA0ACQCAEKAIAIgkgAk0EQCAJIAQoAgRqIAJLDQELIAQoAggiBA0BDAILCyAIIAMgAWtxIgJB/////wdJBEAgAhBSIgEgBCgCACAEKAIEakYEQCABQX9HDQYFDAMLBUEAIQILDAILQQAQUiIBQX9GBH9BAAVBtD4oAgAiBCAGIAFB4D4oAgAiAkF/aiIDakEAIAJrcSABa0EAIAEgA3EbaiICaiEDIAJB/////wdJIAIgAEtxBH9BvD4oAgAiCARAIAMgBE0gAyAIS3IEQEEAIQIMBQsLIAEgAhBSIgNGDQUgAyEBDAIFQQALCyECDAELIAFBf0cgAkH/////B0lxIAcgAktxRQRAIAFBf0YEQEEAIQIMAgUMBAsAC0HkPigCACIDIAUgAmtqQQAgA2txIgNB/////wdPDQJBACACayEEIAMQUkF/RgR/IAQQUhpBAAUgAiADaiECDAMLIQILQcA+QcA+KAIAQQRyNgIACyAGQf////8HSQRAIAYQUiEBQQAQUiIDIAFrIgYgAEEoakshBCAGIAIgBBshAiAEQQFzIAFBf0ZyIAFBf0cgA0F/R3EgASADSXFBAXNyRQ0BCwwBC0G0PiACQbQ+KAIAaiIDNgIAIANBuD4oAgBLBEBBuD4gAzYCAAtBnDsoAgAiAwRAAkBBxD4hBAJAAkADQCABIAQoAgAiBiAEKAIEIgVqRg0BIAQoAggiBA0ACwwBCyAEKAIMQQhxRQRAIAYgA00gASADS3EEQCAEIAIgBWo2AgQgA0EAIANBCGoiAWtBB3FBACABQQdxGyIEaiEBIAJBkDsoAgBqIgYgBGshAkGcOyABNgIAQZA7IAI2AgAgASACQQFyNgIEIAMgBmpBKDYCBEGgO0HsPigCADYCAAwDCwsLIAFBlDsoAgBJBEBBlDsgATYCAAsgASACaiEGQcQ+IQQCQAJAA0AgBiAEKAIARg0BIAQoAggiBA0ACwwBCyAEKAIMQQhxRQRAIAQgATYCACAEIAIgBCgCBGo2AgQgACABQQAgAUEIaiICa0EHcUEAIAJBB3EbaiIHaiEFIAZBACAGQQhqIgFrQQdxQQAgAUEHcRtqIgIgB2sgAGshBCAHIABBA3I2AgQgAiADRgRAQZA7IARBkDsoAgBqIgA2AgBBnDsgBTYCACAFIABBAXI2AgQFAkAgAkGYOygCAEYEQEGMOyAEQYw7KAIAaiIANgIAQZg7IAU2AgAgBSAAQQFyNgIEIAAgBWogADYCAAwBCyACKAIEIglBA3FBAUYEQCAJQQN2IQMgCUGAAkkEQCACKAIIIgAgAigCDCIBRgRAQYQ7QYQ7KAIAQQEgA3RBf3NxNgIABSAAIAE2AgwgASAANgIICwUCQCACKAIYIQggAiACKAIMIgBGBEACQCACQRBqIgFBBGoiAygCACIABEAgAyEBBSACKAIQIgBFBEBBACEADAILCwNAAkAgAEEUaiIGKAIAIgNFBEAgAEEQaiIGKAIAIgNFDQELIAYhASADIQAMAQsLIAFBADYCAAsFIAIoAggiASAANgIMIAAgATYCCAsgCEUNACACIAIoAhwiAUECdEG0PWoiAygCAEYEQAJAIAMgADYCACAADQBBiDtBiDsoAgBBASABdEF/c3E2AgAMAgsFIAhBEGogCEEUaiACIAgoAhBGGyAANgIAIABFDQELIAAgCDYCGCACKAIQIgEEQCAAIAE2AhAgASAANgIYCyACKAIUIgFFDQAgACABNgIUIAEgADYCGAsLIAIgCUF4cSIAaiECIAAgBGohBAsgAiACKAIEQX5xNgIEIAUgBEEBcjYCBCAEIAVqIAQ2AgAgBEEDdiEBIARBgAJJBEAgAUEDdEGsO2ohAEGEOygCACICQQEgAXQiAXEEfyAAQQhqIgIoAgAFQYQ7IAEgAnI2AgAgAEEIaiECIAALIQEgAiAFNgIAIAEgBTYCDCAFIAE2AgggBSAANgIMDAELIARBCHYiAAR/IARB////B0sEf0EfBSAAIABBgP4/akEQdkEIcSIBdCICQYDgH2pBEHZBBHEhAEEOIAIgAHQiAkGAgA9qQRB2QQJxIgMgACABcnJrIAIgA3RBD3ZqIgBBAXQgBCAAQQdqdkEBcXILBUEACyIBQQJ0QbQ9aiEAIAUgATYCHCAFQQA2AhQgBUEANgIQQYg7KAIAIgJBASABdCIDcUUEQEGIOyACIANyNgIAIAAgBTYCACAFIAA2AhggBSAFNgIMIAUgBTYCCAwBCyAEIAAoAgAiACgCBEF4cUYEQCAAIQEFAkAgBEEAQRkgAUEBdmsgAUEfRht0IQIDQCAAQRBqIAJBH3ZBAnRqIgMoAgAiAQRAIAJBAXQhAiAEIAEoAgRBeHFGDQIgASEADAELCyADIAU2AgAgBSAANgIYIAUgBTYCDCAFIAU2AggMAgsLIAEoAggiACAFNgIMIAEgBTYCCCAFIAA2AgggBSABNgIMIAVBADYCGAsLIAokAyAHQQhqDwsLQcQ+IQQDQAJAIAQoAgAiBiADTQRAIAYgBCgCBGoiBiADSw0BCyAEKAIIIQQMAQsLQZw7IAFBACABQQhqIgRrQQdxQQAgBEEHcRsiBGoiBTYCAEGQOyACQVhqIgggBGsiBDYCACAFIARBAXI2AgQgASAIakEoNgIEQaA7Qew+KAIANgIAIANBACAGQVFqIgRBCGoiBWtBB3FBACAFQQdxGyAEaiIEIAQgA0EQakkbIgRBGzYCBCAEQcQ+KQIANwIIIARBzD4pAgA3AhBBxD4gATYCAEHIPiACNgIAQdA+QQA2AgBBzD4gBEEIajYCACAEQRhqIQEDQCABQQRqIgJBBzYCACABQQhqIAZJBEAgAiEBDAELCyADIARHBEAgBCAEKAIEQX5xNgIEIAMgBCADayIGQQFyNgIEIAQgBjYCACAGQQN2IQIgBkGAAkkEQCACQQN0Qaw7aiEBQYQ7KAIAIgRBASACdCICcQR/IAFBCGoiBCgCAAVBhDsgAiAEcjYCACABQQhqIQQgAQshAiAEIAM2AgAgAiADNgIMIAMgAjYCCCADIAE2AgwMAgsgBkEIdiIBBH8gBkH///8HSwR/QR8FIAEgAUGA/j9qQRB2QQhxIgJ0IgRBgOAfakEQdkEEcSEBQQ4gBCABdCIEQYCAD2pBEHZBAnEiBSABIAJycmsgBCAFdEEPdmoiAUEBdCAGIAFBB2p2QQFxcgsFQQALIgJBAnRBtD1qIQEgAyACNgIcIANBADYCFCADQQA2AhBBiDsoAgAiBEEBIAJ0IgVxRQRAQYg7IAQgBXI2AgAgASADNgIAIAMgATYCGCADIAM2AgwgAyADNgIIDAILIAYgASgCACIBKAIEQXhxRgRAIAEhAgUCQCAGQQBBGSACQQF2ayACQR9GG3QhBANAIAFBEGogBEEfdkECdGoiBSgCACICBEAgBEEBdCEEIAYgAigCBEF4cUYNAiACIQEMAQsLIAUgAzYCACADIAE2AhggAyADNgIMIAMgAzYCCAwDCwsgAigCCCIBIAM2AgwgAiADNgIIIAMgATYCCCADIAI2AgwgA0EANgIYCwsFQZQ7KAIAIgNFIAEgA0lyBEBBlDsgATYCAAtBxD4gATYCAEHIPiACNgIAQdA+QQA2AgBBqDtB3D4oAgA2AgBBpDtBfzYCAEG4O0GsOzYCAEG0O0GsOzYCAEHAO0G0OzYCAEG8O0G0OzYCAEHIO0G8OzYCAEHEO0G8OzYCAEHQO0HEOzYCAEHMO0HEOzYCAEHYO0HMOzYCAEHUO0HMOzYCAEHgO0HUOzYCAEHcO0HUOzYCAEHoO0HcOzYCAEHkO0HcOzYCAEHwO0HkOzYCAEHsO0HkOzYCAEH4O0HsOzYCAEH0O0HsOzYCAEGAPEH0OzYCAEH8O0H0OzYCAEGIPEH8OzYCAEGEPEH8OzYCAEGQPEGEPDYCAEGMPEGEPDYCAEGYPEGMPDYCAEGUPEGMPDYCAEGgPEGUPDYCAEGcPEGUPDYCAEGoPEGcPDYCAEGkPEGcPDYCAEGwPEGkPDYCAEGsPEGkPDYCAEG4PEGsPDYCAEG0PEGsPDYCAEHAPEG0PDYCAEG8PEG0PDYCAEHIPEG8PDYCAEHEPEG8PDYCAEHQPEHEPDYCAEHMPEHEPDYCAEHYPEHMPDYCAEHUPEHMPDYCAEHgPEHUPDYCAEHcPEHUPDYCAEHoPEHcPDYCAEHkPEHcPDYCAEHwPEHkPDYCAEHsPEHkPDYCAEH4PEHsPDYCAEH0PEHsPDYCAEGAPUH0PDYCAEH8PEH0PDYCAEGIPUH8PDYCAEGEPUH8PDYCAEGQPUGEPTYCAEGMPUGEPTYCAEGYPUGMPTYCAEGUPUGMPTYCAEGgPUGUPTYCAEGcPUGUPTYCAEGoPUGcPTYCAEGkPUGcPTYCAEGwPUGkPTYCAEGsPUGkPTYCAEGcOyABQQAgAUEIaiIDa0EHcUEAIANBB3EbIgNqIgQ2AgBBkDsgAkFYaiICIANrIgM2AgAgBCADQQFyNgIEIAEgAmpBKDYCBEGgO0HsPigCADYCAAtBkDsoAgAiASAASwRADAILC0G0P0EMNgIADAILQZA7IAEgAGsiAjYCAEGcOyAAQZw7KAIAIgFqIgM2AgAgAyACQQFyNgIEIAEgAEEDcjYCBAsgCiQDIAFBCGoPCyAKJANBAAvNAQECfyMDIQMjA0HgAGokAyADQYAQEBIgAyABKAIoQX9qIgIgAkEBdnIiAiACQQJ2ciICIAJBBHZyIgIgAkEIdnIiAiACQRB2ciICIAJBAXZB1arVqgVxayICQbPmzJkDcSACQQJ2QbPmzJkDcWoiAiACQQR2akGPnrz4AHFBgYKECGxBGHYiAhCUAiAAIAMgARCQAiAAQQEgAnQiATYCKCABQYCAgAhMBEAgAyQDDwsgA0EwaiIBQYAQEBIgACABECkgAEEBNgIoIAMkAwtVAQN/IwMhASMDQbACaiQDIAEQzgEgAUFAayICQYANEAsgAUGAAWoiAyABIAIQMSABQfABaiICQcAMEAsgACACQYA0KQMAIAMQIyAAQQI2AjggASQDCyIBAX8gAEGAAWoiAiABQYABahAOIAAgARAtIAAQDSACEA0LLQAgAigCTBogACABIAIQqgEhAEEBQQAgARshAiAAIAFHBH8gACABbgUgAgsaC+sCAQh/QQghBgNAAkBBACAHIABBgBBqai0AACAGQX9qIgZ2QQFxayIIIAFBBHQgAGooAgBxIAJzIQIgAUEEdCAAaigCBCAIcSADcyEDIAFBBHQgAGooAgggCHEgBHMhBCABQQR0IABqKAIMIAhxIAVzIQUgBkUEQCAHQQFqIgdBEEYNAUEIIQYLIAFBAWoiAUGAAUkNAQsLIABBgxBqIAI6AAAgAEGCEGogAkEIdjoAACAAQYEQaiACQRB2OgAAIABBgBBqIAJBGHY6AAAgAEGHEGogAzoAACAAQYYQaiADQQh2OgAAIABBhRBqIANBEHY6AAAgAEGEEGogA0EYdjoAACAAQYsQaiAEOgAAIABBihBqIARBCHY6AAAgAEGJEGogBEEQdjoAACAAQYgQaiAEQRh2OgAAIABBjxBqIAU6AAAgAEGOEGogBUEIdjoAACAAQY0QaiAFQRB2OgAAIABBjBBqIAVBGHY6AAALVQECfyACQQBMBEAPCyAAKAIAIQMDQCADIAAoAgRIBEAgAyAAKAIIaiABIARqLAAAOgAAIAAgACgCAEEBajYCACADQQFqIQMgBEEBaiIEIAJIDQELCwsRACAAIAEoAgAgASgCCBCDAguYBQEMfyMDIQcjA0GAA2okAyAHQdACaiECIAdBoAJqIQYgB0HwAWohBCAHQZABaiEIIAdB4ABqIQNBgDsoAgBFBEAgAiAAQTBqIgUQVSAGIAUgAEHgAGoiARAWIAQgARBVIAEgAiACEBAgARAPIAEgASABEBAgASABIAEQECABEA8gBCAEQbA1KAIAQQNsEE0gCCAEIAEQFiADIAIgBBAQIAMQDyABIAEgBhAWIAYgBCAEEBAgBCAEIAYQECACIAIgBBAhIAIQDyADIAMgAhAWIAMgAyAIEBAgBiAAIAUQFiACEA8gACACIAYQFiAAIAAgABAQIAAQDyAFIAMQFyAFEA8gByQDDwtBsDUoAgAiC0UiDARAIAcQjwELIAIgABBVIAYgAEEwaiIJEFUgBCAAQeAAaiIKEFUgB0HAAWoiBSAAIAkQFiAFIAUgBRAQIAUQDyAHQTBqIgEgCiAAEBYgASABIAEQECABEA8gDARAIAMgBCAHEBYFIAMgBCALEE0LIAMgAyABECEgCCADIAMQECAIEA8gAyADIAgQECAIIAYgAxAhIAgQDyADIAMgBhAQIAMQDyADIAMgCBAWIAggCCAFEBYgBSAEIAQQECAEIAQgBRAQIAwEQCABIAEgBxAWBSABIAEgCxBNCyABIAEgBBAhIAEgASACECEgARAPIAUgASABEBAgASABIAUQECABEA8gBSACIAIQECACIAIgBRAQIAIgAiAEECEgAhAPIAIgAiABEBYgAyADIAIQECACIAkgChAWIAIgAiACEBAgAhAPIAEgASACEBYgACAIIAEQISACIAIgAhAQIAIQDyAGIAYgBhAQIAYQDyAKIAIgBhAWIAAQDyAJIAMQFyAJEA8gChAPIAckAwuaBQEMfyMDIQcjA0GABGokAyAHQcADaiECIAdBgANqIQYgB0HAAmohBCAHQcABaiEIIAdBgAFqIQNBgDsoAgBFBEAgAiAAQUBrIgUQRSAGIAUgAEGAAWoiARATIAQgARBFIAEgAiACEAwgARAKIAEgASABEAwgASABIAEQDCABEAogBCAEQaw1KAIAQQNsED8gCCAEIAEQEyADIAIgBBAMIAMQCiABIAEgBhATIAYgBCAEEAwgBCAEIAYQDCACIAIgBBAiIAIQCiADIAMgAhATIAMgAyAIEAwgBiAAIAUQEyACEAogACACIAYQEyAAIAAgABAMIAAQCiAFIAMQESAFEAogByQDDwtBrDUoAgAiC0UiDARAIAdBgAgQRgsgAiAAEEUgBiAAQUBrIgkQRSAEIABBgAFqIgoQRSAHQYACaiIFIAAgCRATIAUgBSAFEAwgBRAKIAdBQGsiASAKIAAQEyABIAEgARAMIAEQCiAMBEAgAyAEIAcQEwUgAyAEIAsQPwsgAyADIAEQIiAIIAMgAxAMIAgQCiADIAMgCBAMIAggBiADECIgCBAKIAMgAyAGEAwgAxAKIAMgAyAIEBMgCCAIIAUQEyAFIAQgBBAMIAQgBCAFEAwgDARAIAEgASAHEBMFIAEgASALED8LIAEgASAEECIgASABIAIQIiABEAogBSABIAEQDCABIAEgBRAMIAEQCiAFIAIgAhAMIAIgAiAFEAwgAiACIAQQIiACEAogAiACIAEQEyADIAMgAhAMIAIgCSAKEBMgAiACIAIQDCACEAogASABIAIQEyAAIAggARAiIAIgAiACEAwgAhAKIAYgBiAGEAwgBhAKIAogAiAGEBMgABAKIAkgAxARIAkQCiAKEAogByQDC0cBAn8jAyECIwNBQGskAyACQcAMEAsgACACEB4gAEEBNgI4IAJBwAwQCyABIAIQHiABQQE2AjggACABEKACRSEDIAIkAyADC8gBAQJ+IAAgACkDACIDQv//////////A4M3AwAgACAAKQMIIANCOod8IgJC//////////8DgzcDCCAAIAApAxAgAkI6h3wiAkL//////////wODNwMQIAAgACkDGCACQjqHfCICQv//////////A4M3AxggACAAKQMgIAJCOod8IgJC//////////8DgzcDICAAIAApAyggAkI6h3wiAkL//////////wODNwMoIAAgACkDMCACQjqHfDcDMCADp0EBIAF0QX9qcQvAAQECfiAAIAApAwggACkDACIDQjqHfCICQv//////////A4M3AwggACAAKQMQIAJCOod8IgJC//////////8DgzcDECAAIAApAxggAkI6h3wiAkL//////////wODNwMYIAAgACkDICACQjqHfCICQv//////////A4M3AyAgACAAKQMoIAJCOod8IgJC//////////8DgzcDKCAAIAApAzAgAkI6h3w3AzAgACABrCADQv//////////A4N8NwMAC+ECAgJ/B34gACAAKQMAIgNC//////////8DgyIENwMAIAAgACkDCCADQjqHfCIDQv//////////A4MiBTcDCCAAIAApAxAgA0I6h3wiA0L//////////wODIgY3AxAgACAAKQMYIANCOod8IgNC//////////8DgyIHNwMYIAAgACkDICADQjqHfCIDQv//////////A4MiCDcDICAAIAApAyggA0I6h3wiA0L//////////wODIgk3AyggACAAKQMwIANCOod8IgM3AzAgA0IAUQR/IAlCAFEEfyAIQgBRBH8gB0IAUQR/IAZCAFEEfyAFQgBRBH8gBEIAUQR/QQAPBUEACwVBAQsFQQILBUEDCwVBBAsFQQULBUEGCyICQTpsIQEgAkEDdCAAaikDACIDQgBRBEAgAQ8LIAEhAANAIANCAn8hBCAAQQFqIQAgA0IBfEIDWgRAIAQhAwwBCwsgAAsaACAAIAEgAhAYIABBgAFqIAFBgAFqIAIQGAsOACAAEFggAEGAAWoQWAsYACAAIAEgAhATIABBQGsgAUFAayACEBMLJAEBfyMDIQEjA0FAayQDIAEQXiAAIAEQESAAQUBrEE8gASQDC+cGAQx/IwMhCCMDQfAfaiQDIAAQWSEDIABBgAJqIgoQWSADcQRAIAgkAw8LIAAQhQEgCEHoHGoiBiAAEA4gBkGAAWoiCyAAQYABaiIMEA4gBkGAAmoiCSAKEA4gBhBaIAhB8ABqIgIgABAOIAJBgAFqIgMgDBAOIAJBgAJqIgQgChAOIAJBgANqIgUgAhAOIAJBgARqIgcgAxAOIAJBgAVqIgMgBBAOIAUgBhA9IAJBgAZqIgQgAkGAA2oQDiACQYAHaiIFIAcQDiACQYAIaiIHIAMQDiAEIAYQPSACQYAJaiIDIAJBgAZqEA4gAkGACmoiBCAFEA4gAkGAC2oiBSAHEA4gAyAGED0gAkGADGoiAyACQYAJahAOIAJBgA1qIgcgBBAOIAJBgA5qIgQgBRAOIAMgBhA9IAJBgA9qIgMgAkGADGoQDiACQYAQaiIFIAcQDiACQYARaiIHIAQQDiADIAYQPSACQYASaiIDIAJBgA9qEA4gAkGAE2oiBCAFEA4gAkGAFGoiBSAHEA4gAyAGED0gAkGAFWoiAyACQYASahAOIAJBgBZqIAQQDiACQYAXaiAFEA4gAyAGED0gCEHwGGoiBCABEAsgBCkDAEICgachBSAEQQEQaCAEEAogBCkDAEICgachASAIQbAZaiIDIAQQCyADQQEQaCADEAogBCADIAUQlwEgBiAAIAEQHCALIAwgARAcIAkgCiABEBwgCEHoGWoiByAGEA4gB0GAAWoiBSALEA4gB0GAAmogCRAOIAQQaSINQQNqQQRtIQkgBEEFEGchASANQXpOBEBBACEDA0AgAyAIaiABQfABaiIBOgAAIAQgAUEYdEEYdRB9IAQQCiAEQQQQLCADQQFqIQsgBEEFEGchASADIAlIBEAgCyEDDAELCwsgCUEBaiAIaiABOgAAIAAgAUEYdEEYdUF/akECbSIBQYADbCACahAOIAwgAUGAA2wgAmpBgAFqEA4gCiABQYADbCACakGAAmoQDiANQXlKBEAgCSEBA0AgBiACIAEgCGosAAAQ2AEgABBaIAAQWiAAEFogABBaIAAgBhA9IAFBf2ohAyABQQBKBEAgAyEBDAELCwsgBRANIAUgBRAtIAUQDSAAIAcQPSAFEA0gBSAFEC0gBRANIAAQhQEgCCQDC+UBAQZ/IwMhAiMDQYAIaiQDIAJBgAZqIgUgARBAIAJBgARqIgMgAUGAAmoiBiABQYAEaiIHECQgAxA0IAUgBSADEH8gBRAaIAMgBxBAIAMQNCACQYACaiIEIAEgBhAkIAMgAyAEEH8gAxAaIAQgBhBAIAIgASAHECQgBCAEIAIQfyAEEBogAiAGIAQQJCACEDQgACAFIAEQJCACIAAgAhAUIABBgARqIgEgAyAHECQgARA0IAIgASACEBQgAhAaIAIgAhClAiAAIAUgAhAkIABBgAJqIAMgAhAkIAEgBCACECQgAiQDC1cBAn8gACgCBEECdEEEaiICQQBKBEADQCAAQfwBaiABQQJ0akEANgIAIABBDGogAUECdGpBADYCACABQQFqIgEgAkgNAAsLIABCADcA7AMgAEIANwD0AwvKAwEEfyAAKAIEIQQgAEEoaiAAKAIAIgVBBXZBD3FBAnRqIgIgAigCAEEIdEGAAXI2AgAgACAFQQhqIgI2AgACQAJAIAIEQCACQf8DcSIDRQ0BBSAAIARBAWo2AgQgAEEANgIADAELDAELIAAQciAAKAIAIgJB/wNxIQMLIANBwANHBEADQCAAQShqIAJBBXZBD3FBAnRqIgMgAygCAEEIdDYCACAAIAJBCGoiAjYCAAJAAkAgAgRAIAJB/wNxRQ0BBSAAIAAoAgRBAWo2AgQgAEEANgIADAELDAELIAAQciAAKAIAIQILIAJB/wNxQcADRw0ACwsgACAENgJgIAAgBTYCZCAAEHIgACgC6AJBAEoEQEEAIQIDQCABIAJqIABBCGogAkECdkECdGooAgAgAkEDdEEYcUEYc3Y6AAAgAkEBaiICIAAoAugCSA0ACwsgAEEoakEAQYACEEoaIABBADYCBCAAQQA2AgAgAEHnzKfQBjYCCCAAQYXdntt7NgIMIABB8ua74wM2AhAgAEG66r+qejYCFCAAQf+kuYgFNgIYIABBjNGV2Hk2AhwgAEGrs4/8ATYCICAAQZmag98FNgIkIABBIDYC6AILhgQBF39BECEBIAAoAighBANAIABBKGogAUECdGogAUECdCAAakEMaigCACAEaiABQQJ0IABqQSBqKAIAIgNBCnYgA0ENdCADQRN2cnMgA0EPdCADQRF2cnNqIAFBAnQgAGpBbGooAgAiAkEHdiACQRl0ciACQQ50IAJBEnZyIAJBA3Zzc2o2AgAgAUEBaiIBQcAARwRAIAIhBAwBCwsgACgCCCIMIQIgACgCDCINIQQgACgCJCIOIQkgACgCICIPIQUgACgCHCIQIQYgACgCGCIRIQEgACgCFCISIQcgACgCECITIQMDQCAHIABBKGogCEECdGooAgAgCEECdEHgEGooAgAgCSABQQd0IAFBGXZyIAFBGnQgAUEGdnIgAUEVdCABQQt2cnNzaiABIAZxIAUgAUF/c3FzampqIgdqIQogByACQQp0IAJBFnZyIAJBHnQgAkECdnIgAkETdCACQQ12cnNzIAIgAyAEc3EgAyAEcXNqaiELIAhBAWoiCEHAAEcEQCADIQcCfyABIRcgBiEVIAUhCSACIRYgCyECIAohASAEIQMgFwshBiAVIQUgFiEEDAELCyAAIAsgDGo2AgggACACIA1qNgIMIAAgBCATajYCECAAIAMgEmo2AhQgACAKIBFqNgIYIAAgASAQajYCHCAAIAYgD2o2AiAgACAFIA5qNgIkC30AIABBKGpBAEGAAhBKGiAAQQA2AgQgAEEANgIAIABB58yn0AY2AgggAEGF3Z7bezYCDCAAQfLmu+MDNgIQIABBuuq/qno2AhQgAEH/pLmIBTYCGCAAQYzRldh5NgIcIABBq7OP/AE2AiAgAEGZmoPfBTYCJCAAQSA2AugCC/kBAQN/IwMhBSMDQZAJaiQDIAVBmAZqIgYQcyAAKAIAQQBKBEADQCAGIAcgACgCCGosAAAQQSAHQQFqIgcgACgCAEgNAAsLIAFBAEoEQCAGIAFBGHYQQSAGIAFBEHZB/wFxEEEgBiABQQh2Qf8BcRBBIAYgAUH/AXEQQQsCQCACRQ0AIAIoAgBBAEwNAEEAIQADQCAGIAAgAigCCGosAAAQQSAAQQFqIgAgAigCAEgNAAsLIAYgBRBxIANBADYCACAERQRAIAMgBUEgEGIgBSQDDwsgBEEgSgRAIAMgBEEgaxC5ASADIAVBIBBiBSADIAUgBBBiCyAFJAML/wEBCH8jAyECIwNB8AJqJAMgACAAKAJcIgFBAWo2AlwgASAAQeAAamotAAAhBCABQR5MBEAgAiQDIAQPCyACIgMQcwNAIAAgACgCVCICQQFqIgE2AlQgAyACQRRIBH8gAUECdCAAagUgAEEANgJUQQAhAkEPIQEDf0EAIAEgAUEVRhsiB0ECdCAAaigCACIGIAJBAnQgAGoiCCgCAGsgACgCWGshASABIAZHBEAgACABIAZLNgJYCyAIIAE2AgAgB0EBaiEBIAJBAWoiAkEVRw0AIAALCygCABBBIAVBAWoiBUGAAUcNAAsgAyAAQeAAahBxIABBADYCXCADJAMgBAtzAQN/IwMhASMDQeABaiQDIAFCATcDACABQgA3AwggAUIANwMQIAFCADcDGCABQgA3AyAgAUEwaiICQbAQEBIgAUHgAGoiAyABIAIQPiABQbABaiICQYAQEBIgACACQYg0KQMAIAMQJSAAQQI2AiggASQDCycBAX8jAyEBIwNBMGokAyABQYAQEBIgACABECkgAEEBNgIoIAEkAwtKAQJ/IwMhAiMDQbABaiQDIAJBsBAQEiACQTBqIgMgASACED4gAkGAAWoiAUGAEBASIAAgAUGINCkDACADECUgAEECNgIoIAIkAwvLAQIBfwV+IABCADcDACAAQgA3AwggAEIANwMQIABCADcDGCAAQgA3AyADQCAAIAdCCIYgBkIwh4QiBzcDICAAIAZCCIZCgP7///////8AgyAEQjCHhCIGNwMYIAAgBEIIhkKA/v///////wCDIAVCMIeEIgQ3AxAgACAFQgiGQoD+////////AIMgA0Iwh4QiBTcDCCAAIANCCIZCgP7///////8AgyIDNwMAIAAgAyABIAJqLQAArYQiAzcDACACQQFqIgJBIEcNAAsLmAICAX8FfiABIAEpAwAiA0L//////////wCDIgU3AwAgASABKQMIIANCOId8IgNC//////////8AgyIGNwMIIAEgASkDECADQjiHfCIDQv//////////AIMiBzcDECABIAEpAxggA0I4h3wiBEL//////////wCDIgM3AxggASABKQMgIARCOId8IgQ3AyBBHyEBA0AgACABaiAFPAAAIAZCMIZCgICAgICAwP8AgyAFQgiHhCEFIAdCMIZCgICAgICAwP8AgyAGQgiHhCEGIANCMIZCgICAgICAwP8AgyAHQgiHhCEHIARCMIZCgICAgICAwP8AgyADQgiHhCEDIARCCIchBCABQX9qIQIgAQRAIAIhAQwBCwsLagECfyMDIQMjA0GAAWokAyADIAIQGSADIAMQRSADECsgA0FAayIEIAEQGSAEIAQQmgIgAyAEEGYEQCAAIAEQGSAAQUBrIAIQGSAAQYABahBeBSAAEE8gAEFAaxBeIABBgAFqEE8LIAMkAwvmFwE2fiABIAIQHiACKQMAISQgAikDCCElIAIpAxAhJiACKQMYIScgAikDICEoIAIpAyghKSACKQMwISogASkDCCIJIAEpAxAiDiABKQMYIg0gASkDICIMIAEpAygiBSABKQMwIhKEhISEhEIAUSABKQMAIhVCAVFxBEAgAEIBNwMAIABCADcDCCAAQgA3AxAgAEIANwMYIABCADcDICAAQgA3AyggAEIANwMwDwtCASEPICQhAyAlIQQgJiEKICchECAoIREgKSEUICohIwJAAkADQCADQgFRBH8gBCAKIBAgESAUICOEhISEhEIAUQVBAAtFBEAgFUICgacEfiAVIR4gFiEVIAkhFiATIQkgDiETIA0hISAaIQ4gDCEaIBchDSAFIRcgEiEiIAshDCAIBQN+IA9CAoGnBEAgCyApfCAIICh8IBcgJ3wgGiAmfCATICV8IA8gJHwiD0I6h3wiE0I6h3wiIUI6h3wiF0I6h3wiIkI6h3whHiAPQv//////////A4MhDyAWICp8IB5COod8IRYgE0L//////////wODIRMgIUL//////////wODIRogF0L//////////wODIRcgIkL//////////wODIQggHkL//////////wODIQsLIBVCAYciHiAJQjmGQoCAgICAgICAAoOEIRUgDkI5hkKAgICAgICAgAKDIAlCAYeEIQkgDUI5hkKAgICAgICAgAKDIA5CAYeEIQ4gDEI5hkKAgICAgICAgAKDIA1CAYeEIQ0gBUI5hkKAgICAgICAgAKDIAxCAYeEIQwgEkI5hkKAgICAgICAgAKDIAVCAYeEIQUgEkIBhyESIBNCOYZCgICAgICAgIACgyAPQgGHhCEPIBpCOYZCgICAgICAgIACgyATQgGHhCETIBdCOYZCgICAgICAgIACgyAaQgGHhCEaIAhCOYZCgICAgICAgIACgyAXQgGHhCEXIAtCOYZCgICAgICAgIACgyAIQgGHhCEIIBZCOYZCgICAgICAgIACgyALQgGHhCELIBZCAYchFiAeQgKBp0UNACAVIR4gFiEVIAkhFiATIQkgDiETIA0hISAaIQ4gDCEaIBchDSAFIRcgEiEiIAshDCAICwshEiADQgKBpwR+IAYhBSADIQggByEGIAQhCyAYIQcgCiEYIBAhHyAZIQogESEZIBQhICAcIREgHSEUIBsFA34gBkICgacEQCAdICl8IBwgKHwgGyAnfCAZICZ8IBggJXwgBiAkfCIGQjqHfCIIQjqHfCILQjqHfCIfQjqHfCIgQjqHfCEFIAZC//////////8DgyEGIAcgKnwgBUI6h3whByAIQv//////////A4MhGCALQv//////////A4MhGSAfQv//////////A4MhGyAgQv//////////A4MhHCAFQv//////////A4MhHQsgA0IBhyIFIARCOYZCgICAgICAgIACg4QhAyAKQjmGQoCAgICAgICAAoMgBEIBh4QhBCAQQjmGQoCAgICAgICAAoMgCkIBh4QhCiARQjmGQoCAgICAgICAAoMgEEIBh4QhECAUQjmGQoCAgICAgICAAoMgEUIBh4QhESAjQjmGQoCAgICAgICAAoMgFEIBh4QhFCAjQgGHISMgGEI5hkKAgICAgICAgAKDIAZCAYeEIQYgGUI5hkKAgICAgICAgAKDIBhCAYeEIRggG0I5hkKAgICAgICAgAKDIBlCAYeEIRkgHEI5hkKAgICAgICAgAKDIBtCAYeEIRsgHUI5hkKAgICAgICAgAKDIBxCAYeEIRwgB0I5hkKAgICAgICAgAKDIB1CAYeEIR0gB0IBhyEHIAVCAoGnRQ0AIAYhBSADIQggByEGIAQhCyAYIQcgCiEYIBAhHyAZIQogESEZIBQhICAcIREgHSEUIBsLCyEQAn4CQCAiICNRBH4gFyAgUQR+IBkgGlEEfiAfICFRBH4gEyAYUQR+IAsgFlEEfiAIIB5RDQYgHiEEIAgFIBYhBCALCwUgEyEEIBgLBSAhIQQgHwsFIBohBCAZCwUgFyEEICALBSAiIQQgIwshAyAEIANVDQACfiAIIB59IgNC//////////8DgyE3IAsgFn0gA0I6h3wiA0L//////////wODISwgGCATfSADQjqHfCIDQv//////////A4MhLSAfICF9IANCOod8IgNC//////////8DgyEuIBkgGn0gA0I6h3wiA0L//////////wODIS8gICAXfSADQjqHfCIDQv//////////A4MhMCAjICJ9IANCOod8ISMCfgJAIAYgFVEEfiAMIBRRBH4gESASUQR+IA0gEFEEfiAKIA5RBH4gByAJUQR+IAUgD1ENBiAFIQQgDwUgByEEIAkLBSAKIQQgDgsFIBAhBCANCwUgESEEIBILBSAUIQQgDAsFIAYhBCAVCyEDIAQgA1UNACAFICQgD318IQQgBiAqIBV9fCEFIAcgJSAJfXwhBiAKICYgDn18IQcgECAnIA19fCEKIBEgKCASfXwhECAUICkgDH18DAELIAUgD30hBCAGIBV9IQUgByAJfSEGIAogDn0hByAQIA19IQogESASfSEQIBQgDH0LIREgBEL//////////wODITEgNwshAyAFIBEgECAKIAcgBiAEQjqHfCIGQjqHfCIHQjqHfCIKQjqHfCIQQjqHfCIRQjqHfCEUIBYhBSAGQv//////////A4MhMiAJIQggEyELIAdC//////////8DgyEzIA4hHyAaIRsgCkL//////////wODITQgDSEgIBchHCAQQv//////////A4MhNSASIR0gEUL//////////wODITYgDCErIBUMAQsgHiAIfSIDQv//////////A4MhHgJ+IBYgC30gA0I6h3wiA0L//////////wODITggEyAYfSADQjqHfCIDQv//////////A4MhEyAhIB99IANCOod8IgNC//////////8DgyEhIBogGX0gA0I6h3wiA0L//////////wODIRsgFyAgfSADQjqHfCIDQv//////////A4MhHCAiICN9IANCOod8ISICQAJAIAYgFVEEQCAMIBRRBEAgESASUQRAIA0gEFEEQCAKIA5RBEAgByAJUQRAIAUgD1IEQCAFIQMgDyEEDAcLBSAHIQMgCSEEDAYLBSAKIQMgDiEEDAULBSAQIQMgDSEEDAQLBSARIQMgEiEEDAMLBSAUIQMgDCEEDAILBSAGIQMgFSEEDAELDAELIAQgA1cEQCAPICR8IQ8gFSAqfCEVIAkgJXwhCSAOICZ8IQ4gDSAnfCENIBIgKHwhEiAMICl8IQwLCyAMIBR9IBIgEX0gDSAQfSAOIAp9IAkgB30gDyAFfSIPQjqHfCIOQjqHfCINQjqHfCISQjqHfCIMQjqHfCEJIAUhMSAPQv//////////A4MhDyAIIQMgCyEsIDgLIQUgByEyIA5C//////////8DgyEIIBghLSATIQsgHyEuIAohMyANQv//////////A4MhHyAZIS8gICEwIBAhNCASQv//////////A4MhICARITUgDEL//////////wODIR0gFCE2IAlC//////////8DgyErIBUgBiIUfSAJQjqHfAshBCAeQgFRBH8gBSALICEgGyAcICKEhISEhEIAUQVBAAsNAiAiIRIgMSEGIB4hFSAUIQcgBCEWICwhBCAFIQkgMiEYIAghEyAtIQogCyEOIC4hECAhIQ0gMyEZIB8hGiAvIREgGyEMIDAhFCA0IRsgICEXIBwhBSA1IRwgHSEIIDYhHSArIQsMAQsLDAELIAAgDzcDACAAIAg3AwggACAfNwMQIAAgIDcDGCAAIB03AyAgACArNwMoIAAgBDcDMA8LIAAgDyAGIBVCAVEEfyAJIA4gDSAMIAUgEoSEhISEQgBRBUEACyIBGzcDACAAIBMgGCABGzcDCCAAIBogGSABGzcDECAAIBcgGyABGzcDGCAAIAggHCABGzcDICAAIAsgHSABGzcDKCAAIBYgByABGzcDMAvAAQECfiAAIAApAwggACkDACIDQjqHfCICQv//////////A4M3AwggACAAKQMQIAJCOod8IgJC//////////8DgzcDECAAIAApAxggAkI6h3wiAkL//////////wODNwMYIAAgACkDICACQjqHfCICQv//////////A4M3AyAgACAAKQMoIAJCOod8IgJC//////////8DgzcDKCAAIAApAzAgAkI6h3w3AzAgACADQv//////////A4MgAax9NwMAC3IAIAAgASkDACACKQMAfDcDACAAIAEpAwggAikDCHw3AwggACABKQMQIAIpAxB8NwMQIAAgASkDGCACKQMYfDcDGCAAIAEpAyAgAikDIHw3AyAgACABKQMoIAIpAyh8NwMoIAAgASkDMCACKQMwfDcDMAt4AQR/IwMhAyMDQYAEaiQDIAIQDSACQYABaiIEEA0gA0GAA2oiBSACIAQQFSAFIAUQLSADQYACaiIGIAUgBBAVIANBgAFqIgQgBSACEBUgAyAGEA4gAxANIAQQDSAAIAEgAxAVIABBgAFqIAFBgAFqIAQQFSADJAML/AIBBn8jAyEDIwNBwCBqJAMgA0GAChALIANB+B5qIgFBwA0QRiADQbgeaiICQYAOEEYgA0G4H2oiBSIEIAEQESAEQUBrIAIQESADQbgYaiIBIAAQbyAAIAAQNiAAIAEQLiABIAAQiAEgACAFEEkgACAFEEkgACABEC4gA0G4EmoiBiAAEKIBIANBuAxqIgEgBiADEEggASABEDYgA0EBECwgA0G4BmoiAiABIAMQSCACIAIQNiADQQEQ0AEgA0E4aiIEIAAQNiABIAQQLiABIAEQNiABIAIQLiACIAEgAxBIIAIgAhA2IAQgAiADEEggBCAEEDYgASABEDYgBCABEC4gASABEDYgASAFEEkgASAFEEkgASAFEEkgAiAFEEkgAiAFEEkgASACEC4gAiAEIAMQSCACIAIQNiACIAYQLiACIAAQLiABIAIQLiACIAQQiAEgAiAFEEkgASACEC4gACABEIgBIAAQNSAAQYACahA1IABBgARqEDUgAyQDC/ADAQt/IwMhBiMDQYAOaiQDIAZBgA1qIQogBkGADGohCCAGQYALaiELIAZBgApqIQkgBkGACWohDCAGQYAIaiENIAZBgAdqIQUgBkGABmohByAGQYAEaiEOIAZBgAJqIQ8gASACRgRAIAwgARAOIA0gAUGAAWoQDiAFIAFBgAJqEA4gByANEA4gByAHIAUQGCAMIAwQPCANIA0QPCAFIAUQPCAHIAdBBBBXIAcgBxAtIAcQDSAMIAxBBhBXIAwgDCADEGwgBSAFQaw1KAIAQQNsEFcgByAHIAQQbCAFEDkgBSAFIAUQFSAHEDkgBxANIAUQDSANIA0gDRAVIAUgBSANEDogBRANIA4gByAFEJoBIA8QayAGIAwQmQEgARBaBSAKIAEQDiAIIAFBgAFqEA4gCyABQYACahAOIAkgCxAOIAsgCyACQYABaiIFEBggCSAJIAIQGCAKIAogCRA6IAoQDSAIIAggCxA6IAgQDSALIAoQDiAKIAogBBBsIAoQOSAKEA0gCyALIAUQGCAJIAgQDiAJIAkgAhAYIAkgCSALEDogCRANIAggCCADEGwgCCAIEC0gCBANIA4gCiAJEJoBIA8QayAGIAgQmQEgASACED0LIAAgDhAmIABBgAJqIA8QJiAAQYAEaiAGECYgBiQDC+cCAQd/IwMhAyMDQcALaiQDIANBgAFqIgRBgAoQCyADQUBrIgcgBBALIAcQCiADIAdBAxCWASADEAogA0H4CmoiCCACEBEgA0G4CmoiCSACQUBrEBEgA0G4B2oiBiABEKABIAAQbSAAQYABahBYIABBgAJqEGsgAEGABGoQayADEGkiAkECTARAIAAgABA2IAMkAw8LIANBuAFqIQUgAkF+aiECA0AgACAAENsBIAUgBiAGIAggCRCBASAAIAUQhwECQAJAAkAgAkE6bSIEQQN0IANqKQMAQgEgAiAEQTpsa62Gg0IAUiACQTptIgRBA3QgB2opAwBCASACIARBOmxrrYaDQgBSa0F/aw4DAQIAAgsgBSAGIAEgCCAJEIEBIAAgBRCHAQwBCyABEJ0BIAUgBiABIAggCRCBASAAIAUQhwEgARCdAQsgAkF/aiEEIAJBAUoEQCAEIQIMAQsLIAAgABA2IAMkAwtFAQJ/IwMhASMDQYACaiQDIAFBgAFqIgJBwAoQRiACQUBrQYALEEYgAUHACxBGIAFBQGtBgAwQRiAAIAIgARCeASABJAMLngEBA38jAyECIwNBwAJqJAMgAkG4AWohAyACQThqIQQgARBZIAFBgAJqEFlxRQRAIAEQhQEgBCABQYABahAOIAMgARAOCyACIAMQKiAAKAIIIAIQICACIANBQGsQKiAAKAIIQTBqIAIQICACIAQQKiAAKAIIQeAAaiACECAgAiAEQUBrECogACgCCEGQAWogAhAgIABBwAE2AgAgAiQDC3UBBH8jAyEBIwNBgAJqJAMgABBZIABBgAJqIgIQWXEEQCABJAMPCyABQYABaiIEEG0gAhDWAQRAIAAQUSAAQYABahBRBSABIAIQmwEgACAAIAEQGCAAQYABaiIDIAMgARAYIAAQUSADEFEgAiAEEA4LIAEkAwudAgEBfyMDIQIjA0FAayQDIAIgASgCCBAfIAAgAhAZIAIgASgCCEEwahAfIABBQGsgAhAZIAIgASgCCEHgAGoQHyAAQYABaiACEBkgAiABKAIIQZABahAfIABBwAFqIAIQGSACIAEoAghBwAFqEB8gAEGAAmogAhAZIAIgASgCCEHwAWoQHyAAQcACaiACEBkgAiABKAIIQaACahAfIABBgANqIAIQGSACIAEoAghB0AJqEB8gAEHAA2ogAhAZIAIgASgCCEGAA2oQHyAAQYAEaiACEBkgAiABKAIIQbADahAfIABBwARqIAIQGSACIAEoAghB4ANqEB8gAEGABWogAhAZIAIgASgCCEGQBGoQHyAAQcAFaiACEBkgAiQDC4gCAQh/IwMhAyMDQYAMaiQDIANBgApqIgggACABECQgA0GAAmoiAiAAIABBgAJqIgYQFCACEBogA0GACGoiBCACIAEQJCACIAYgAEGABGoiBxAUIAIQGiADQYAEaiIFIAIgAUGABWoiCRBqIAUQNCACIAgQViAEIAQgAhAUIAYgBBAmIANBgAZqIgQgAhAmIAIgACAHEBQgAyABIAFBgARqEBQgAhAaIAMQGiACIAMgAhAkIAQgBCACEBQgAiAHIAkQaiACEDQgAyACEFYgAhA0IAcgBCADEBQgBSAFIAMQFCAGIAYgAhAUIAUQGiAFEDQgACAIIAUQFCAAEBogBhAaIAcQGiADJAMLLQAgACABRgRADwsgACABECYgAEGAAmogAUGAAmoQJiAAQYAEaiABQYAEahAmC78DAQd/IwMhCiMDQeAGaiQDIApBzAZqIQkgCkEQaiELQX8gA0HABG0iDkG0BGwgAyAOQcAEbGsbIQwgAEGwEGohDwJAAkAgAEGsEGoiDSgCACIARQ0AIA8oAgAgDEgEQCAAEEsMAQsMAQsgDSAMEFwiADYCACAPIAw2AgALIANBvwRKBEBBACEAA0AgCUHABDYCACAJQcAENgIEIAkgAiAAQcAEbGo2AgggCyAJEIYBIAsgARAuIAkgDSgCACAAQbQEbGo2AgggCUG0BDYCBCAJQbQENgIAIAkgCxDcASAAQQFqIgAgDkcNAAsgDSgCACEACyAJQRA2AgAgCUEQNgIEIAkgBDYCCCAKQcAGaiIBQQw2AgAgAUEMNgIEIAEgBTYCCCAKQbQGaiIEQaA1KQIANwIAIARBqDUoAgA2AgggCkGoBmoiAiAHNgIAIAIgBzYCBCACIAA2AgggCkGcBmoiACAHNgIAIAAgBzYCBCAAIAY2AgggCkGQBmoiA0EQNgIAIANBEDYCBCADIAo2AgggCSABIAQgAiAAIAMQ/wEgCCAKEOsBRQRAIAokA0EADwsgBkF/IAcQShogCiQDQX8LKwAgAEH/AXFBGHQgAEEIdUH/AXFBEHRyIABBEHVB/wFxQQh0ciAAQRh2cgv3EgIUfwF+IwMhDyMDQUBrJAMgD0EoaiEJIA9BMGohGCAPQTxqIRYgD0E4aiILIAE2AgAgAEEARyESIA9BKGoiFSETIA9BJ2ohF0EAIQECQAJAA0ACQANAIAhBf0oEQCABQf////8HIAhrSgR/QbQ/QcsANgIAQX8FIAEgCGoLIQgLIAsoAgAiCiwAACIMRQ0DIAohAQJAAkADQAJAAkAgDEEYdEEYdQ4mAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMACyALIAFBAWoiATYCACABLAAAIQwMAQsLDAELIAEhDANAIAwsAAFBJUcNASABQQFqIQEgCyAMQQJqIgw2AgAgDCwAAEElRg0ACwsgASAKayEBIBIEQCAAIAogARAnCyABDQALIAsgCygCACIBIAsoAgAsAAFBUGpBCk8Ef0F/IQ1BAQUgASwAAkEkRgR/IAEsAAFBUGohDUEBIQVBAwVBfyENQQELC2oiATYCACABLAAAIgZBYGoiDEEfS0EBIAx0QYnRBHFFcgRAQQAhDAVBACEGA0AgBkEBIAx0ciEMIAsgAUEBaiIBNgIAIAEsAAAiBkFgaiIHQR9LQQEgB3RBidEEcUVyRQRAIAwhBiAHIQwMAQsLCyAGQf8BcUEqRgRAIAsCfwJAIAEsAAFBUGpBCk8NACALKAIAIgcsAAJBJEcNACAHLAABQVBqQQJ0IARqQQo2AgAgBywAAUFQakEDdCADaikDAKchAUEBIQYgB0EDagwBCyAFBEBBfyEIDAMLIBIEQCACKAIAQQNqQXxxIgUoAgAhASACIAVBBGo2AgAFQQAhAQtBACEGIAsoAgBBAWoLIgU2AgBBACABayABIAFBAEgiARshECAMQYDAAHIgDCABGyEOIAYhDAUgCxCoASIQQQBIBEBBfyEIDAILIAwhDiAFIQwgCygCACEFCyAFLAAAQS5GBEACQCAFQQFqIQEgBSwAAUEqRwRAIAsgATYCACALEKgBIQEgCygCACEFDAELIAUsAAJBUGpBCkkEQCALKAIAIgUsAANBJEYEQCAFLAACQVBqQQJ0IARqQQo2AgAgBSwAAkFQakEDdCADaikDAKchASALIAVBBGoiBTYCAAwCCwsgDARAQX8hCAwDCyASBEAgAigCAEEDakF8cSIFKAIAIQEgAiAFQQRqNgIABUEAIQELIAsgCygCAEECaiIFNgIACwVBfyEBC0EAIQcDQCAFLAAAQb9/akE5SwRAQX8hCAwCCyALIAVBAWoiBjYCACAFLAAAIAdBOmxqQd8vaiwAACIRQf8BcSIFQX9qQQhJBEAgBSEHIAYhBQwBCwsgEUUEQEF/IQgMAQsgDUF/SiEUAkACQCARQRNGBEAgFARAQX8hCAwECwUCQCAUBEAgDUECdCAEaiAFNgIAIAkgDUEDdCADaikDADcDAAwBCyASRQRAQQAhCAwFCyAJIAUgAhCnASALKAIAIQYMAgsLIBINAEEAIQEMAQsgDkH//3txIg0gDiAOQYDAAHEbIQUCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAZBf2osAAAiBkFfcSAGIAZBD3FBA0YgB0EAR3EbIgZBwQBrDjgJCgcKCQkJCgoKCgoKCgoKCgoICgoKCgsKCgoKCgoKCgkKBQMJCQkKAwoKCgoAAgEKCgYKBAoKCwoLAkACQAJAAkACQAJAAkACQCAHQf8BcUEYdEEYdQ4IAAECAwQHBQYHCyAJKAIAIAg2AgBBACEBDBcLIAkoAgAgCDYCAEEAIQEMFgsgCSgCACAIrDcDAEEAIQEMFQsgCSgCACAIOwEAQQAhAQwUCyAJKAIAIAg6AABBACEBDBMLIAkoAgAgCDYCAEEAIQEMEgsgCSgCACAIrDcDAEEAIQEMEQtBACEBDBALQfgAIQYgAUEIIAFBCEsbIQEgBUEIciEFDAkLQQAhCkG+OiEOIAEgEyAJKQMAIBUQ7gEiB2siBkEBaiAFQQhxRSABIAZKchshAQwLCyAJKQMAIhlCAFMEfyAJQgAgGX0iGTcDAEEBIQpBvjoFIAVBgRBxQQBHIQpBvzpBwDpBvjogBUEBcRsgBUGAEHEbCyEODAgLQQAhCkG+OiEOIAkpAwAhGQwHCyAXIAkpAwA8AAAgFyEGQQAhCkG+OiEOQQEhByANIQUgEyEBDAoLIAkoAgAiBUHIOiAFGyIGIAEQ9AEiEUUhFEEAIQpBvjohDiABIBEgBmsgFBshByANIQUgASAGaiARIBQbIQEMCQsgDyAJKQMAPgIwIA9BADYCNCAJIBg2AgBBfyEKDAULIAEEQCABIQoMBQUgAEEgIBBBACAFEChBACEBDAcLAAsgACAJKwMAIBAgASAFIAZBAxEBACEBDAcLIAohBkEAIQpBvjohDiABIQcgEyEBDAULIAkpAwAgFSAGQSBxEO8BIQdBAEECIAVBCHFFIAkpAwBCAFFyIg0bIQpBvjogBkEEdkG+OmogDRshDgwCCyAZIBUQWyEHDAELIAkoAgAhBkEAIQECQAJAA0AgBigCACIHBEAgFiAHEKYBIgdBAEgiDSAHIAogAWtLcg0CIAZBBGohBiAKIAEgB2oiAUsNAQsLDAELIA0EQEF/IQgMBgsLIABBICAQIAEgBRAoIAEEQCAJKAIAIQZBACEKA0AgBigCACIHRQ0DIAogFiAHEKYBIgdqIgogAUoNAyAGQQRqIQYgACAWIAcQJyAKIAFJDQALBUEAIQELDAELIAcgFSAJKQMAQgBSIg0gAUEAR3IiERshBiABIBMgB2sgDUEBc2oiByABIAdKG0EAIBEbIQcgBUH//3txIAUgAUF/ShshBSATIQEMAQsgAEEgIBAgASAFQYDAAHMQKCAQIAEgECABShshAQwBCyAAQSAgCiABIAZrIg0gByAHIA1IGyIRaiIHIBAgECAHSBsiASAHIAUQKCAAIA4gChAnIABBMCABIAcgBUGAgARzECggAEEwIBEgDUEAECggACAGIA0QJyAAQSAgASAHIAVBgMAAcxAoCyAMIQUMAQsLDAELIABFBEAgBQR/QQEhAANAIABBAnQgBGooAgAiAQRAIABBA3QgA2ogASACEKcBIABBAWoiAEEKSQ0BQQEhCAwECwsDfyAAQQJ0IARqKAIABEBBfyEIDAQLIABBAWoiAEEKSQ0AQQELBUEACyEICwsgDyQDIAgLyw8BGH8jAyEKIwNBIGokAyACQQRtIQUCQAJAIAJBfHFBEGsOEQEAAAAAAAAAAQAAAAAAAAABAAsgCiQDDwsgACAFNgIAIAAgBUEGajYCBCAAIAE2AgggAEIANwDsAyAAQgA3APQDIAFBAEcgBEEAR3EEQCAAIAQsAAA6AOwDIAAgBCwAAToA7QMgACAELAACOgDuAyAAIAQsAAM6AO8DIAAgBCwABDoA8AMgACAELAAFOgDxAyAAIAQsAAY6APIDIAAgBCwABzoA8wMgACAELAAIOgD0AyAAIAQsAAk6APUDIAAgBCwACjoA9gMgACAELAALOgD3AyAAIAQsAAw6APgDIAAgBCwADToA+QMgACAELAAOOgD6AyAAIAQsAA86APsDCyAFQQJ0IQggAkEDSiIHBEBBACEBQQAhBANAIARBAnQgCmogASADaiIGLQADQRh0IAYtAAJBEHRyIAYtAAFBCHRyIAYtAAByNgIAIAFBBGohASAEQQFqIgQgBUcNAAsgBwRAIABBDGogCiAIEFMaCwsgBSAIQRxqIgRIBEAgAkEcSCEHIAJBB0ohCUEAIQIgBSEBA0AgAEEMaiABQQJ0aiABQQJ0IABqKAIIIgNB/wFxQeAXai0AAEEYdCADQQh2Qf8BcUHgF2otAAAgA0EQdkH/AXFB4BdqLQAAQQh0ciADQRh2QeAXai0AAEEQdHJyIAJBAnRB4BlqKAIAIABBDGogASAFa0ECdGooAgBzcyIGNgIAAkAgBwRAIAkEQEEBIQMDQCABIANqIgYgBE4NAyAAQQxqIAZBAnRqIABBDGogBiAFa0ECdGooAgAgBkECdCAAaigCCHM2AgAgA0EBaiIDIAVIDQALCwUgAUEBaiIDIARIBEAgAEEMaiADQQJ0aiAGIABBDGogAyAFa0ECdGooAgBzNgIAIAFBAmoiAyAESARAIABBDGogA0ECdGogAEEMaiADIAVrQQJ0aigCACABQQJ0IABqKAIQczYCACABQQNqIgMgBEgEQCAAQQxqIANBAnRqIABBDGogAyAFa0ECdGooAgAgAUECdCAAaigCFHM2AgALCwsgAUEEaiIDIARIBEAgAEEMaiADQQJ0aiAAQQxqIAMgBWtBAnRqKAIAIAFBAnQgAGooAhgiA0EYdkHgF2otAABBGHQgA0H/AXFB4BdqLQAAIANBCHZB/wFxQeAXai0AAEEIdHIgA0EQdkH/AXFB4BdqLQAAQRB0cnJzNgIAC0EFIQMDQCABIANqIgYgBE4NAiAAQQxqIAZBAnRqIABBDGogBiAFa0ECdGooAgAgBkECdCAAaigCCHM2AgAgA0EBaiIDIAVIDQALCwsgAkEBaiECIAEgBWoiASAESA0ACwsgAEH8AWogCEEYaiIFQQJ0aiAAKAIMNgIAIABB/AFqIAhBGWoiD0ECdGogACgCEDYCACAIQQJ0IABqIAAoAhQ2AuQCIAhBAnQgAGogACgCGDYC6AIgBUEESgRAQQQhAQNAIAUgAWshEEEAIQIDQCAAQQxqIAEgAmpBAnRqKAIAIgNB/wFxRSILBH9BAAUgA0H/AXFBoBpqLQAAQegAakH/AXBBoBxqLAAACyERIANBCHYiBkH/AXFFIgwEf0EABSAGQf8BcUGgGmotAABB7gFqQf8BcEGgHGosAAALIRIgA0EQdiIHQf8BcUUiDQR/QQAFIAdB/wFxQaAaai0AAEHHAWpB/wFwQaAcaiwAAAshEyADQRh2IglFIg4Ef0EABSAJQaAaai0AAEHfAWpB/wFwQaAcaiwAAAshFCALBH9BAAUgA0H/AXFBoBpqLQAAQe4BakH/AXBBoBxqLAAACyEVIAwEf0EABSAGQf8BcUGgGmotAABBxwFqQf8BcEGgHGosAAALIRYgDQR/QQAFIAdB/wFxQaAaai0AAEHfAWpB/wFwQaAcaiwAAAshFyAOBH9BAAUgCUGgGmotAABB6ABqQf8BcEGgHGosAAALIRggCwR/QQAFIANB/wFxQaAaai0AAEHHAWpB/wFwQaAcaiwAAAshGSAMBH9BAAUgBkH/AXFBoBpqLQAAQd8BakH/AXBBoBxqLAAACyEaIA0Ef0EABSAHQf8BcUGgGmotAABB6ABqQf8BcEGgHGosAAALIRsgDgR/QQAFIAlBoBpqLQAAQe4BakH/AXBBoBxqLAAACyEcIAsEf0EABSADQf8BcUGgGmotAABB3wFqQf8BcEGgHGosAAALIQMgDAR/QQAFIAZB/wFxQaAaai0AAEHoAGpB/wFwQaAcaiwAAAshBiANBH9BAAUgB0H/AXFBoBpqLQAAQe4BakH/AXBBoBxqLAAACyEHIABB/AFqIAIgEGpBAnRqIA4Ef0EABSAJQaAaai0AAEHHAWpB/wFwQaAcaiwAAAsgByADIAZzc3NB/wFxIBQgEyARIBJzc3NB/wFxQRh0IBggFyAVIBZzc3NB/wFxQRB0ciAcIBsgGSAac3NzQf8BcUEIdHJyNgIAIAJBAWoiAkEERw0ACyAFIAFBBGoiAUoNAAsLIAUgBE4EQCAKJAMPCyAAIABBDGogBUECdGooAgA2AvwBIAAgAEEMaiAPQQJ0aigCADYCgAIgACAIQQJ0IABqKAJ0NgKEAiAAIAhBAnQgAGooAng2AogCIAokAwudAQEFfyMDIQYjA0HQAGokAyAGQUBrIgVBADYCACAFQcAANgIEIAUgBjYCCCADQQA2AgAgAkF/akEgbSIEQQBIBEAgBiQDDwsgBEEBaiEHQQEhBANAIAAgBCABIAVBABB0IAMoAgBBIGogAkoEQCADIAUoAgggAkEgbxBiBSADIAUQVAsgBEEBaiEIIAQgB0cEQCAIIQQMAQsLIAYkAwuMAQECfyAAKAIEIgJBAEoEQEEAIQIDfyACIAAoAghqQQA6AAAgAkEBaiICIAAoAgQiA0gNACADCyECCyAAQQA2AgAgACACIAEoAgAiAyADIAJKGyICNgIAIAJBAEwEQA8LQQAhAgNAIAIgACgCCGogAiABKAIIaiwAADoAACACQQFqIgIgACgCAEgNAAsLVwEDfyMDIQEjA0HgAWokAyABQcAOEBIgAUEwaiICQbAQEBIgAUHgAGoiAyABIAIQPiABQbABaiICQYAQEBIgACACQYg0KQMAIAMQJSAAQQI2AiggASQDC3EBBH8jAyEBIwNB4ABqJAMgAEHgAGohAiAAEE4EQCACEE4EQCABJAMPCwsgAUEwaiIDEHYgAiADELsBBEAgASQDDwsgASACEIUCIAAgACABEBYgAEEwaiIEIAQgARAWIAQQdyAAEHcgAiADEBcgASQDC44BAQJ+IAAgACkDACIDQv//////////AIM3AwAgACAAKQMIIANCOId8IgJC//////////8AgzcDCCAAIAApAxAgAkI4h3wiAkL//////////wCDNwMQIAAgACkDGCACQjiHfCICQv//////////AIM3AxggACAAKQMgIAJCOId8NwMgIAOnQQEgAXRBf2pxC4YBAQJ+IAAgACkDCCAAKQMAIgNCOId8IgJC//////////8AgzcDCCAAIAApAxAgAkI4h3wiAkL//////////wCDNwMQIAAgACkDGCACQjiHfCICQv//////////AIM3AxggACAAKQMgIAJCOId8NwMgIAAgA0L//////////wCDIAGsfTcDAAuGAQECfiAAIAApAwggACkDACIDQjiHfCICQv//////////AIM3AwggACAAKQMQIAJCOId8IgJC//////////8AgzcDECAAIAApAxggAkI4h3wiAkL//////////wCDNwMYIAAgACkDICACQjiHfDcDICAAIAGsIANC//////////8Ag3w3AwALcAEEfyMDIQEjA0GAAWokAyAAQYABaiECIAAQOwRAIAIQOwRAIAEkAw8LCyABQUBrIgMQXiACIAMQZgRAIAEkAw8LIAEgAhDKASAAIAAgARATIABBQGsiBCAEIAEQEyAEECsgABArIAIgAxARIAEkAwvFBwIHfxR+IwMhAyMDQfAAaiQDIANCADcDACADQgA3AwggA0IANwMQIANCADcDGCADQgA3AyAgA0IANwMoIANCADcDMCADQgA3AzggA0FAa0IANwMAIANCADcDSCADQgA3A1AgA0IANwNYIANCADcDYCADQgA3A2ggA0FAayEJA0AgASABKQMAIgpC//////////8DgyIYNwMAIAEgASkDCCAKQjqHfCIKQv//////////A4MiGTcDCCABIAEpAxAgCkI6h3wiCkL//////////wODIho3AxAgASABKQMYIApCOod8IgpC//////////8DgyIbNwMYIAEgASkDICAKQjqHfCIKQv//////////A4MiHDcDICABIAEpAyggCkI6h3wiCkL//////////wODIh03AyggASABKQMwIApCOod8Igo3AzACQAJAIApCAFEEfyAdQgBRBH8gHEIAUQR/IBtCAFEEfyAaQgBRBH8gGUIAUQR/IBhCAFEEf0EABUEAIQQMBwsFQQEhBAwGCwVBAiEEDAULBUEDIQQMBAsFQQQhBAwDCwVBBSEEDAILBUEGIQQMAQshBQwBCyAEQTpsIQUgBEEDdCABaikDACIKQgBSBEADQCAKQgJ/IRggBUEBaiEFIApCAXxCA1oEQCAYIQoMAQsLCwsgByAFQQF0SARAIAYEfyAIQQF1BSACEHULIQUgAyADKQNoQgGGIBJCOYeENwNoIAMgEkIBhkL+/////////wODIBNCOYeEIhI3A2AgAyATQgGGQv7/////////A4MgFEI5h4QiEzcDWCADIBRCAYZC/v////////8DgyAVQjmHhCIUNwNQIAMgFUIBhkL+/////////wODIBZCOYeEIhU3A0ggCSAWQgGGQv7/////////A4MgF0I5h4QiFjcDACADIBdCAYZC/v////////8DgyALQjmHhCIXNwM4IAMgC0IBhkL+/////////wODIAxCOYeEIgs3AzAgAyAMQgGGQv7/////////A4MgDUI5h4QiDDcDKCADIA1CAYZC/v////////8DgyAOQjmHhCINNwMgIAMgDkIBhkL+/////////wODIA9COYeEIg43AxggAyAPQgGGQv7/////////A4MgEEI5h4QiDzcDECADIBBCAYZC/v////////8DgyARQjmHhCIQNwMIIAMgBUEBca0gEUIBhkL+/////////wODhCIRNwMAIAUhCCAGQQFqQQdxIQYgB0EBaiEHDAELCyAAIAMgARCfAiADJAML5wQBCH4gAqwiA0L/////AYMhBCAAIANCHYciAyABKQMAIgVC/////wGDIgZ+IAQgBUIdhyIFfnwiB0IdhkKAgICA/v///wODIAQgBn58IgZC//////////8DgzcDACAAIAEpAwgiCEL/////AYMiCSADfiAIQh2HIgggBH58IgpCHYZCgICAgP7///8DgyADIAV+IAdCHYd8IAZCOoh8IAQgCX58fCIFQv//////////A4M3AwggACABKQMQIgZC/////wGDIgcgA34gBCAGQh2HIgZ+fCIJQh2GQoCAgID+////A4MgAyAIfiAKQh2HfCAFQjqHfCAEIAd+fHwiBUL//////////wODNwMQIAAgAyABKQMYIgdC/////wGDIgh+IAQgB0IdhyIHfnwiCkIdhkKAgICA/v///wODIAMgBn4gCUIdh3wgBUI6h3wgBCAIfnx8IgVC//////////8DgzcDGCAAIAMgASkDICIGQv////8BgyIIfiAEIAZCHYciBn58IglCHYZCgICAgP7///8DgyADIAd+IApCHYd8IAVCOod8IAQgCH58fCIFQv//////////A4M3AyAgACABKQMoIgdC/////wGDIgggA34gB0IdhyIHIAR+fCIKQh2GQoCAgID+////A4MgAyAGfiAJQh2HfCAFQjqHfCAEIAh+fHwiBUL//////////wODNwMoIAAgASkDMCIGQv////8BgyIIIAN+IAZCHYcgBH58Qh2GQoCAgID+////A4MgAyAHfiAKQh2HfCAFQjqHfCAEIAh+fHxC//////////8DgzcDMAuyAQECfiAAIAApAwAiA0EAIAJrrCIEIAMgASkDAIWDhTcDACAAIAApAwgiAyADIAEpAwiFIASDhTcDCCAAIAApAxAiAyADIAEpAxCFIASDhTcDECAAIAApAxgiAyADIAEpAxiFIASDhTcDGCAAIAApAyAiAyADIAEpAyCFIASDhTcDICAAIAApAygiAyAEIAMgASkDKIWDhTcDKCAAIAApAzAiAyAEIAMgASkDMIWDhTcDMAseACAAIAAQnAEgAEGAAWoiACAAEJwBIAAgASAAEBgLEAAgAEGAAWogARAOIAAQWAsSACAAIAEQDiAAQYABaiACEA4LXgEDfyMDIQMjA0GAAWokAyABEAogAUFAayIEEAogA0FAayICIAEQRSADIAQQRSACIAIgAxAMIAIgAhDKASAAIAEgAhATIAIgAhAwIAIQCiAAQUBrIAQgAhATIAMkAwsaACAAIAEQESAAQUBrIgAgAUFAaxAwIAAQCgsWACAAQYABaiIAEA0gACAAEC0gABANC5wBAQR/IwMhBCMDQcADaiQDIARBOGoiBiACEDwgBEG4AmoiAyABEDwgBEG4AWoiBSADIAEQGCAEQYAIEAsgAyAEEBkgA0FAaxBPIAMQDSADEDkgAxANIAUgAyAFEBUgBRBRIAYgBRDVAQRAIAAgARAOIABBgAFqIAIQDiAAQYACahBtBSAAEFggAEGAAWoQbSAAQYACahBYCyAEJAMLdQEDfyMDIQIjA0HAAmokAyACIAEoAggQHyACQbgBaiIDIAIQGSACIAEoAghBMGoQHyADQUBrIAIQGSACIAEoAghB4ABqEB8gAkE4aiIEIAIQGSACIAEoAghBkAFqEB8gBEFAayACEBkgACADIAQQngEgAiQDCyQAIAAgARAOIABBgAFqIAFBgAFqEA4gAEGAAmogAUGAAmoQDgulAgEBfyMDIQIjA0FAayQDIABBwAQ2AgAgAiABECogACgCCCACECAgAiABQUBrECogACgCCEEwaiACECAgAiABQYABahAqIAAoAghB4ABqIAIQICACIAFBwAFqECogACgCCEGQAWogAhAgIAIgAUGAAmoQKiAAKAIIQcABaiACECAgAiABQcACahAqIAAoAghB8AFqIAIQICACIAFBgANqECogACgCCEGgAmogAhAgIAIgAUHAA2oQKiAAKAIIQdACaiACECAgAiABQYAEahAqIAAoAghBgANqIAIQICACIAFBwARqECogACgCCEGwA2ogAhAgIAIgAUGABWoQKiAAKAIIQeADaiACECAgAiABQcAFahAqIAAoAghBkARqIAIQICACJAML5AEBBX8jAyEDIwNBgAhqJAMgA0GABmoiAiABECYgACABEEAgAyAAIAAQFCAAIAMgABAUIAAQGiACIAIQXyACIAIgAhAUIAAgACACEBQgA0GABGoiAiABQYAEaiIGEEAgAhA0IAMgAiACEBQgAiACIAMQFCACEBogA0GAAmoiBSABQYACaiIEEEAgAyAFIAUQFCAFIAUgAxAUIAUQGiAAQYACaiIBIAQQUCABIAEgARAUIABBgARqIgQgBhBfIAQgBCAEEBQgASACIAEQFCAEIAUgBBAUIAAQNSABEDUgBBA1IAMkAwurAQEDfyMDIQQjA0GAC2okAyAEQYAGaiEDIARB+AdqIQUgACwAAEEERgRAIANBwAE2AgAgA0HAATYCBCADIABBAWo2AgggBSADEJ8BCyAEQbgGaiEAIAEsAABBBEYEQCADIAFBAWoQHyAEIAFBMWoQHyAAIAMgBBB7CyAEIAUgABCCASAEEIABIANBwAQ2AgAgA0HABDYCBCADIAI2AgggAyAEEKEBIAQkA0EAC7MFAQx/IwMhDCMDQcATaiQDIAxBuBNqIQsgBUG0BG0iCiAFIApBtARsa0EAR2oiEUHABGwiCiAHRwRAAn9BtDUoAgAhFCALIAo2AgAgCyAHNgIEIBQLQaw3IAsQqQEgDCQDQX8PCyAMQcAFaiEKIAxBgAVqIQ0gDEHABGohDyAMQfgRaiELIAxB+AtqIRAgDEH4BWohDiAAQbAQaiESAkACQCAAQawQaiITKAIAIgdFDQAgEigCACAFSARAIAcQSwwBCwwBCyATIAUQXCIHNgIAIBIgBTYCAAsgCkEQNgIAIApBEDYCBCAKIAI2AgggDUEMNgIAIA1BDDYCBCANIAM2AgggD0GgNSkCADcCACAPQag1KAIANgIIIAsgBTYCACALIAU2AgQgCyAENgIIIBAgBTYCACAQIAU2AgQgECAHNgIIIA5BEDYCACAOQRA2AgQgDiAINgIIIAogDSAPIAsgECAOEIACIA8gAEGAAWogABCVASABLAAAQQRGBEAgCiABQQFqEB8gDSABQTFqEB8gCyAKIA0QewsgDCEBAn9BACALEDtFDQAaIAtBgAFqEDsLBH9ByzdBLkG0NSgCABBgQX8FIAsgDxDHASAQIABB+AVqIA8QSCARQQBKBEAgEUF/aiEDIABB+AtqIQRBACECA0AgAkG0BGwiByATKAIAaiEAIAIgA0YEQCAFIAdrIgdBtARIBEAgASAEQbQEEFMaIAEgACAHEFMaIAEhAAsLIApBtAQ2AgAgCkG0BDYCBCAKIAA2AgggDiAKEN0BIA4gEBAuIAogBiACQcAEbGo2AgggCkHABDYCBCAKQcAENgIAIAogDhChASACQQFqIgIgEUcNAAsLIAogDSALEMkBIAlBBDoAACAJQQFqIAoQICAJQTFqIA0QIEEACyEVIAwkAyAVC5EBAgF/An4CQAJAIAC9IgNCNIgiBKdB/w9xIgIEQCACQf8PRgRADAMFDAILAAsgASAARAAAAAAAAAAAYgR/IABEAAAAAAAA8EOiIAEQpQEhACABKAIAQUBqBUEACzYCAAwBCyABIASnQf8PcUGCeGo2AgAgA0L/////////h4B/g0KAgICAgICA8D+EvyEACyAACxEAIAAEfyAAIAEQ7QEFQQALC70DAwF/AX4BfCABQRRNBEACQAJAAkACQAJAAkACQAJAAkACQAJAIAFBCWsOCgABAgMEBQYHCAkKCyACKAIAQQNqQXxxIgEoAgAhAyACIAFBBGo2AgAgACADNgIADAkLIAIoAgBBA2pBfHEiASgCACEDIAIgAUEEajYCACAAIAOsNwMADAgLIAIoAgBBA2pBfHEiASgCACEDIAIgAUEEajYCACAAIAOtNwMADAcLIAIoAgBBB2pBeHEiASkDACEEIAIgAUEIajYCACAAIAQ3AwAMBgsgAigCAEEDakF8cSIBKAIAIQMgAiABQQRqNgIAIAAgA0H//wNxQRB0QRB1rDcDAAwFCyACKAIAQQNqQXxxIgEoAgAhAyACIAFBBGo2AgAgACADQf//A3GtNwMADAQLIAIoAgBBA2pBfHEiASgCACEDIAIgAUEEajYCACAAIANB/wFxQRh0QRh1rDcDAAwDCyACKAIAQQNqQXxxIgEoAgAhAyACIAFBBGo2AgAgACADQf8Bca03AwAMAgsgAigCAEEHakF4cSIBKwMAIQUgAiABQQhqNgIAIAAgBTkDAAwBCyAAIAJBCRECAAsLC0YBAn8gACgCACwAAEFQakEKSQRAA0AgACgCACIBLAAAIAJBCmxBUGpqIQIgACABQQFqNgIAIAEsAAFBUGpBCkkNAAsLIAILIwEBfyMDIQMjA0EQaiQDIAMgAjYCACAAIAEgAxDxASADJAML7gEBA38CQAJAIAIoAhAiAw0AIAIQ9QEEf0EABSACKAIQIQMMAQshBAwBCyADIAIoAhQiBGsgAUkEQCACKAIkIQMgAiAAIAEgA0EBcUEEahEAACEEDAELIAFFIAIsAEtBAEhyBEBBACEDBQJAIAEhAwNAIAAgA0F/aiIFaiwAAEEKRwRAIAUEQCAFIQMMAgVBACEDDAMLAAsLIAIoAiQhBCACIAAgAyAEQQFxQQRqEQAAIgQgA0kNAiAAIANqIQAgASADayEBIAIoAhQhBAsLIAQgACABEFMaIAIgASACKAIUajYCFCABIANqIQQLIAQL9gYBIn8gABCtASAAQbQQaiECIAFFBEAgAEGwEGpBAzYCACACEHAPCyACIABBkBBqIhIQNyAAQYAQaiITLAAAIBIsAABzIRQgAEGREGoiAyADLAAAIABBgRBqIhUsAABzOgAAIABBkhBqIgQgAEGCEGoiFiwAACAELAAAczoAACAAQZMQaiIFIABBgxBqIhcsAAAgBSwAAHM6AAAgAEGUEGoiBiAAQYQQaiIYLAAAIAYsAABzOgAAIABBlRBqIgcgAEGFEGoiGSwAACAHLAAAczoAACAAQZYQaiIIIABBhhBqIhosAAAgCCwAAHM6AAAgAEGXEGoiCSAAQYcQaiIbLAAAIAksAABzOgAAIABBmBBqIgogAEGIEGoiHCwAACAKLAAAczoAACAAQZkQaiILIABBiRBqIh0sAAAgCywAAHM6AAAgAEGaEGoiDCAAQYoQaiIeLAAAIAwsAABzOgAAIABBmxBqIg0gAEGLEGoiHywAACANLAAAczoAACAAQZwQaiIOIABBjBBqIiAsAAAgDiwAAHM6AAAgAEGdEGoiDyAAQY0QaiIhLAAAIA8sAABzOgAAIABBnhBqIhAgAEGOEGoiIiwAACAQLAAAczoAACAAQZ8QaiIRIABBjxBqIiMsAAAgESwAAHM6AAAgASAUOgAAIBNBADoAACASQQA6AAAgASADLAAAOgABIBVBADoAACADQQA6AAAgASAELAAAOgACIBZBADoAACAEQQA6AAAgASAFLAAAOgADIBdBADoAACAFQQA6AAAgASAGLAAAOgAEIBhBADoAACAGQQA6AAAgASAHLAAAOgAFIBlBADoAACAHQQA6AAAgASAILAAAOgAGIBpBADoAACAIQQA6AAAgASAJLAAAOgAHIBtBADoAACAJQQA6AAAgASAKLAAAOgAIIBxBADoAACAKQQA6AAAgASALLAAAOgAJIB1BADoAACALQQA6AAAgASAMLAAAOgAKIB5BADoAACAMQQA6AAAgASANLAAAOgALIB9BADoAACANQQA6AAAgASAOLAAAOgAMICBBADoAACAOQQA6AAAgASAPLAAAOgANICFBADoAACAPQQA6AAAgASAQLAAAOgAOICJBADoAACAQQQA6AAAgASARLAAAOgAPICNBADoAACARQQA6AAAgAEGwEGpBAzYCACACEHALrgEBBn8gAEGwEGoiCCgCAARADwsgAkEASgRAIABBpBBqIQYgAEGgEGohBwNAIAMgAkgEQEEAIQQDQCAEIABBgBBqaiIFIAEgA2osAAAgBSwAAHM6AAAgBiAGKAIAQQFqIgU2AgAgBUUEQCAHIAcoAgBBAWo2AgALIANBAWoiAyACSCAEQQFqIgRBEElxDQALCyAAEGEgAyACSA0ACwsgAkEPcUUEQA8LIAhBATYCAAveAwEFfyAAQaQQaigCACEBIABBqBBqKAIAIQUgAEGsEGooAgAhBCAAQYAQaiIDIAMsAAAgAEGgEGooAgAiAkEVdkH/AXFzOgAAIABBgRBqIgMgAywAACACQQ12Qf8BcXM6AAAgAEGCEGoiAyADLAAAIAJBBXZB/wFxczoAACAAQYMQaiIDIAMsAAAgAkEDdCABQR12ckH/AXFzOgAAIABBhBBqIgIgAiwAACABQRV2Qf8BcXM6AAAgAEGFEGoiAiACLAAAIAFBDXZB/wFxczoAACAAQYYQaiICIAIsAAAgAUEFdkH/AXFzOgAAIABBhxBqIgIgAiwAACABQQN0Qf8BcXM6AAAgAEGIEGoiASABLAAAIAVBFXZB/wFxczoAACAAQYkQaiIBIAEsAAAgBUENdkH/AXFzOgAAIABBihBqIgEgASwAACAFQQV2Qf8BcXM6AAAgAEGLEGoiASABLAAAIAVBA3QgBEEddnJB/wFxczoAACAAQYwQaiIBIAEsAAAgBEEVdkH/AXFzOgAAIABBjRBqIgEgASwAACAEQQ12Qf8BcXM6AAAgAEGOEGoiASABLAAAIARBBXZB/wFxczoAACAAQY8QaiIBIAEsAAAgBEEDdEH/AXFzOgAAIAAQYQviCwEKfyMDIQUjA0EQaiQDIAVCADcDACAFQgA3AwggAEGAEGoiC0IANwAAIAtCADcACCAAQbQQaiIGQQAgASACIAQQjAEgBiAFEDcgACAFLQADIAUtAAFBEHQgBS0AAEEYdHIgBS0AAkEIdHJyIgE2AgAgACAFLQAHIAUtAARBGHQgBS0ABUEQdHIgBS0ABkEIdHJyIgI2AgQgACAFLQALIAUtAAhBGHQgBS0ACUEQdHIgBS0ACkEIdHJyIgY2AgggACAFLQAPIAUtAAxBGHQgBS0ADUEQdHIgBS0ADkEIdHJyIgg2AgxBASEHA0AgB0EEdCAAaiINIAFBAXYiDDYCACAHQQR0IABqIAFBH3QgAkEBdnIiCjYCBCAHQQR0IABqIAJBH3QgBkEBdnIiCTYCCCAHQQR0IABqIAZBH3QgCEEBdnIiDjYCDCAMQYCAgIh+cyEBIAhBAXEEQCANIAE2AgAFIAwhAQsgB0EBaiIHQYABRwRAIAohAiAJIQYgDiEIDAELCyAAQaAQaiIGQgA3AgAgBkIANwIIIANBDEYEQCAAQaAUaiIBIAQsAAA6AAAgAEGhFGogBCwAAToAACAAQaIUaiAELAACOgAAIABBoxRqIAQsAAM6AAAgAEGkFGogBCwABDoAACAAQaUUaiAELAAFOgAAIABBphRqIAQsAAY6AAAgAEGnFGogBCwABzoAACAAQagUaiAELAAIOgAAIABBqRRqIAQsAAk6AAAgAEGqFGogBCwACjoAACAAQasUaiAELAALOgAAIABBrxRqQQE6AAAgAEGuFGpBADoAACAAQa0UakEAOgAAIABBrBRqQQA6AAAgAEGQEGoiAiABKQAANwAAIAIgASkACDcACCAAQbAQakEANgIAIAUkAw8LIABBrBBqIQggAEGoEGohByAAQbAQaiIKQQE2AgAgA0EASgRAQQAhAQNAIAEgA0gEQEEAIQIDQCACIABBgBBqaiIJIAEgBGosAAAgCSwAAHM6AAAgCCAIKAIAQQFqIgk2AgAgCUUEQCAHIAcoAgBBAWo2AgALIAFBAWoiASADSCACQQFqIgJBEElxDQALCyAAEGEgASADSA0ACwsgA0EPcQRAIApBAjYCAAsgABCtASAAQaAUaiALLAAAIgE6AAAgAEGQEGogAToAACALQQA6AAAgAEGhFGogAEGBEGoiASwAACICOgAAIABBkRBqIAI6AAAgAUEAOgAAIABBohRqIABBghBqIgEsAAAiAjoAACAAQZIQaiACOgAAIAFBADoAACAAQaMUaiAAQYMQaiIBLAAAIgI6AAAgAEGTEGogAjoAACABQQA6AAAgAEGkFGogAEGEEGoiASwAACICOgAAIABBlBBqIAI6AAAgAUEAOgAAIABBpRRqIABBhRBqIgEsAAAiAjoAACAAQZUQaiACOgAAIAFBADoAACAAQaYUaiAAQYYQaiIBLAAAIgI6AAAgAEGWEGogAjoAACABQQA6AAAgAEGnFGogAEGHEGoiASwAACICOgAAIABBlxBqIAI6AAAgAUEAOgAAIABBqBRqIABBiBBqIgEsAAAiAjoAACAAQZgQaiACOgAAIAFBADoAACAAQakUaiAAQYkQaiIBLAAAIgI6AAAgAEGZEGogAjoAACABQQA6AAAgAEGqFGogAEGKEGoiASwAACICOgAAIABBmhBqIAI6AAAgAUEAOgAAIABBqxRqIABBixBqIgEsAAAiAjoAACAAQZsQaiACOgAAIAFBADoAACAAQawUaiAAQYwQaiIBLAAAIgI6AAAgAEGcEGogAjoAACABQQA6AAAgAEGtFGogAEGNEGoiASwAACICOgAAIABBnRBqIAI6AAAgAUEAOgAAIABBrhRqIABBjhBqIgEsAAAiAjoAACAAQZ4QaiACOgAAIAFBADoAACAAQa8UaiAAQY8QaiIBLAAAIgI6AAAgAEGfEGogAjoAACABQQA6AAAgBkIANwIAIAZCADcCCCAKQQA2AgAgBSQDC6EJAQt/IwMhAiMDQRBqJAMCQAJAAkACQAJAAkACQCAAKAIIIgYOLgABAgIFAgUFBQUFBQUFAwMFAwUFBQMFBQUFBQUFAwQEBQQFBQUEBQUFBQUFBQQFCyAAIAEQsQEMBQsgAiAALADsAzoAACAAIAEsAAA6AOwDIAIgACwA7QM6AAEgACABLAABOgDtAyACIAAsAO4DOgACIAAgASwAAjoA7gMgAiAALADvAzoAAyAAIAEsAAM6AO8DIAIgACwA8AM6AAQgACABLAAEOgDwAyACIAAsAPEDOgAFIAAgASwABToA8QMgAiAALADyAyIDOgAGIAAgASwABjoA8gMgACwA8wMhBCAAIAEsAAc6APMDIAAsAPQDIQUgACABLAAIOgD0AyAALAD1AyEGIAAgASwACToA9QMgACwA9gMhByAAIAEsAAo6APYDIAAsAPcDIQggACABLAALOgD3AyAALAD4AyEJIAAgASwADDoA+AMgACwA+QMhCiAAIAEsAA06APkDIAAsAPoDIQsgACABLAAOOgD6AyAALAD7AyEMIAAgASwADzoA+wMgACABELEBIAEgAiwAACABLAAAczoAACACQQA6AAAgASACLAABIAEsAAFzOgABIAJBADoAASABIAIsAAIgASwAAnM6AAIgAkEAOgACIAEgAiwAAyABLAADczoAAyACQQA6AAMgASACLAAEIAEsAARzOgAEIAJBADoABCABIAIsAAUgASwABXM6AAUgAkEAOgAFIAEgASwABiADczoABiACQQA6AAYgASABLAAHIARzOgAHIAJBADoAByABIAEsAAggBXM6AAggAkEAOgAIIAEgASwACSAGczoACSACQQA6AAkgASABLAAKIAdzOgAKIAJBADoACiABIAEsAAsgCHM6AAsgAkEAOgALIAEgASwADCAJczoADCACQQA6AAwgASABLAANIApzOgANIAJBADoADSABIAEsAA4gC3M6AA4gAkEAOgAOIAEgASwADyAMczoADyACQQA6AA8MBAsgBkF/aiEFA0AgAyAAQewDamosAAAgBEEIdHIhBCADQQFqIgMgBUcNAAsgAiAAKQDsAzcAACACIAApAPQDNwAIIAZBEUgEQCAFIQMDQCAAQewDaiADIAVraiADIABB7ANqaiwAADoAACADQQFqIQQgA0EPSARAIAQhAwwBCwsLIAAgAhA3QREgBmshBkEAIQMDQCADIAZqIABB7ANqaiABIANqIgQsAAA6AAAgBCACIANqLAAAIAQsAABzOgAAIANBAWoiAyAFRw0ACyACJAMPCyAGQXNqIQQgACAAQewDahA3A0AgASADaiIFIAMgAEHsA2pqLAAAIAUsAABzOgAAIANBAWoiAyAERw0ACwwCCyACIAApAOwDNwAAIAIgACkA9AM3AAggBkFjaiEEIAAgAhA3A0AgASADaiIFIAIgA2osAAAgBSwAAHM6AAAgA0EBaiIDIARHDQALQQAhAQNAIAEgAEHsA2pqIgQsAABBAWpBGHRBGHUhAyAEIAM6AAAgA0UgAUEBaiIBQRBJcQ0ACwwBCyACJAMPCyACJAMLxwcBBn8jAyEEIwNBEGokAwJAAkACQAJAAkACQAJAIAAoAggiBg4uAAECAgUCBQUFBQUFBQUDAwUDBQUFAwUFBQUFBQUDBAQFBAUFBQQFBQUFBQUFBAULIAAgARA3DAULIAEgACwA7AMgASwAAHM6AAAgASAALADtAyABLAABczoAASABIAAsAO4DIAEsAAJzOgACIAEgACwA7wMgASwAA3M6AAMgASAALADwAyABLAAEczoABCABIAAsAPEDIAEsAAVzOgAFIAEgACwA8gMgASwABnM6AAYgASAALADzAyABLAAHczoAByABIAAsAPQDIAEsAAhzOgAIIAEgACwA9QMgASwACXM6AAkgASAALAD2AyABLAAKczoACiABIAAsAPcDIAEsAAtzOgALIAEgACwA+AMgASwADHM6AAwgASAALAD5AyABLAANczoADSABIAAsAPoDIAEsAA5zOgAOIAEgACwA+wMgASwAD3M6AA8gACABEDcgACABLAAAOgDsAyAAIAEsAAE6AO0DIAAgASwAAjoA7gMgACABLAADOgDvAyAAIAEsAAQ6APADIAAgASwABToA8QMgACABLAAGOgDyAyAAIAEsAAc6APMDIAAgASwACDoA9AMgACABLAAJOgD1AyAAIAEsAAo6APYDIAAgASwACzoA9wMgACABLAAMOgD4AyAAIAEsAA06APkDIAAgASwADjoA+gMgACABLAAPOgD7AwwECyAGQX9qIQUDQCACIABB7ANqaiwAACADQQh0ciEDIAJBAWoiAiAFRw0ACyAEIAApAOwDNwAAIAQgACkA9AM3AAggBkERSARAIAUhAgNAIABB7ANqIAIgBWtqIAIgAEHsA2pqLAAAOgAAIAJBAWohAyACQQ9IBEAgAyECDAELCwsgACAEEDdBESAGayEGQQAhAgNAIAIgBGosAAAgASACaiIHLAAAcyEDIAcgAzoAACACIAZqIABB7ANqaiADOgAAIAJBAWoiAiAFRw0ACyAEJAMPCyAGQXNqIQMgACAAQewDahA3A0AgASACaiIFIAIgAEHsA2pqLAAAIAUsAABzOgAAIAJBAWoiAiADRw0ACwwCCyAEIAApAOwDNwAAIAQgACkA9AM3AAggBkFjaiEDIAAgBBA3A0AgASACaiIFIAIgBGosAAAgBSwAAHM6AAAgAkEBaiICIANHDQALQQAhAQNAIAEgAEHsA2pqIgMsAABBAWpBGHRBGHUhAiADIAI6AAAgAkUgAUEBaiIBQRBJcQ0ACwwBCyAEJAMPCyAEJAML9AsBE38jAyEQIwNBIGokAyAQIgNBEGoiBCAAKAL8ASABLQAAIAEtAAJBEHQgAS0AA0EYdHIgAS0AAUEIdHJycyIJNgIAIAQgACgCgAIgAS0ABCABLQAHQRh0IAEtAAZBEHRyIAEtAAVBCHRycnMiCjYCBCAEIAAoAoQCIAEtAAggAS0AC0EYdCABLQAKQRB0ciABLQAJQQh0cnJzIgU2AgggBCAAKAKIAiABLQAMIAEtAA9BGHQgAS0ADkEQdHIgAS0ADUEIdHJycyIINgIMIAAoAowCIQ0gCUH/AXEhBiAAKAIEQQFKBH9BBCEHQQEhCwNAIAMgCEEIdkH/AXFBAnRBoCZqKAIAIgJBCHQgAkEYdnIgDSAGQQJ0QaAmaigCAHNzIAVBEHZB/wFxQQJ0QaAmaigCACICQRB0IAJBEHZycyAKQRh2QQJ0QaAmaigCACICQRh0IAJBCHZyczYCACADIAlBCHZB/wFxQQJ0QaAmaigCACICQQh0IAJBGHZyIABB/AFqIAdBAXJBAnRqKAIAIApB/wFxQQJ0QaAmaigCAHNzIAhBEHZB/wFxQQJ0QaAmaigCACICQRB0IAJBEHZycyAFQRh2QQJ0QaAmaigCACICQRh0IAJBCHZycyIGNgIEIAMgCkEIdkH/AXFBAnRBoCZqKAIAIgJBCHQgAkEYdnIgAEH8AWogB0ECckECdGooAgAgBUH/AXFBAnRBoCZqKAIAc3MgCUEQdkH/AXFBAnRBoCZqKAIAIgJBEHQgAkEQdnJzIAhBGHZBAnRBoCZqKAIAIgJBGHQgAkEIdnJzIgw2AgggAyAFQQh2Qf8BcUECdEGgJmooAgAiAkEIdCACQRh2ciAAQfwBaiAHQQNyQQJ0aigCACAIQf8BcUECdEGgJmooAgBzcyAKQRB2Qf8BcUECdEGgJmooAgAiAkEQdCACQRB2cnMgCUEYdkECdEGgJmooAgAiAkEYdCACQQh2cnMiCDYCDCAAQfwBaiAHQQRqIgVBAnRqKAIAIQ0gAygCACIJQf8BcSEOIAtBAWoiCyAAKAIESARAAn8gBCEUIAUhByAMIQUgBiEKIA4hBiADIQQgFAshAwwBCwsgA0EIaiERIANBBGohEiAEIgJBBGohByACQQhqIQsgAkEMaiEPIANBDGohEyAFBSADIQIgBiEOIAQiA0EIaiERIANBBGohEiACQQRqIQcgAkEIaiELIAJBDGohDyADQQxqIRMgBSEMIAohBkEECyEEIAIgDSAOQaAuai0AAHMiBSAIQQh2Qf8BcUGgLmotAABBCHRzIgogDEEQdkH/AXFBoC5qLQAAQRB0cyINIAZBGHZBoC5qLQAAQRh0cyIONgIAIAcgAEH8AWogBEEBckECdGooAgAgBkH/AXFBoC5qLQAAcyAJQQh2Qf8BcUGgLmotAABBCHRzIAhBEHZB/wFxQaAuai0AAEEQdHMgDEEYdkGgLmotAABBGHRzNgIAIAsgAEH8AWogBEECckECdGooAgAgDEH/AXFBoC5qLQAAcyAGQQh2Qf8BcUGgLmotAABBCHRzIAlBEHZB/wFxQaAuai0AAEEQdHMgCEEYdkGgLmotAABBGHRzNgIAIA8gAEH8AWogBEEDckECdGooAgAgCEH/AXFBoC5qLQAAcyAMQQh2Qf8BcUGgLmotAABBCHRzIAZBEHZB/wFxQaAuai0AAEEQdHMgCUEYdkGgLmotAABBGHRzNgIAIAEgBToAACABIApBCHY6AAEgASANQRB2OgACIAEgDkEYdjoAAyACQQA2AgAgA0EANgIAIAEgBygCACIAOgAEIAEgAEEIdjoABSABIABBEHY6AAYgASAAQRh2OgAHIAdBADYCACASQQA2AgAgASALKAIAIgA6AAggASAAQQh2OgAJIAEgAEEQdjoACiABIABBGHY6AAsgC0EANgIAIBFBADYCACABIA8oAgAiADoADCABIABBCHY6AA0gASAAQRB2OgAOIAEgAEEYdjoADyAPQQA2AgAgE0EANgIAIBAkAwv+CgEHfyMDIQQjA0GQBGokAyACELgBIAEoAgBFBEAgBCQDQQEPCyABKAIILAAAIQMgBEEQaiIIQQEgACgCACAAKAIIQQAQjAEgBCADOgAAAn8gASgCACIDQQFKBH8Cf0EAIQBBASEGA38gBCAGIAEoAggiB2osAAA6AAFBASAGQQFqIgUgA04NARogBCAFIAdqLAAAOgACQQEgBkECaiIFIANODQEaIAQgBSAHaiwAADoAA0EBIAZBA2oiBSADTg0BGiAEIAUgB2osAAA6AARBASAGQQRqIgUgA04NARogBCAFIAdqLAAAOgAFQQEgBkEFaiIFIANODQEaIAQgBSAHaiwAADoABkEBIAZBBmoiBSADTg0BGiAEIAUgB2osAAA6AAdBASAGQQdqIgUgA04NARogBCAFIAdqLAAAOgAIQQEgBkEIaiIFIANODQEaIAQgBSAHaiwAADoACUEBIAZBCWoiBSADTg0BGiAEIAUgB2osAAA6AApBASAGQQpqIgUgA04NARogBCAFIAdqLAAAOgALQQEgBkELaiIFIANODQEaIAQgBSAHaiwAADoADEEBIAZBDGoiBSADTg0BGiAEIAUgB2osAAA6AA1BASAGQQ1qIgUgA04NARogBCAFIAdqLAAAOgAOQQEgBkEOaiIFIANODQEaIAQgBSAHaiwAADoAD0EAIAZBD2oiBSADTg0BGiAFIAdqLAAAIQcgCCAEEK8BIAAgAigCBCIDSARAIAAgAigCCGogBCwAADoAACAAQQFqIQAgAigCBCEDCyAAIANIBEAgACACKAIIaiAELAABOgAAIABBAWohACACKAIEIQMLIAAgA0gEQCAAIAIoAghqIAQsAAI6AAAgAEEBaiEAIAIoAgQhAwsgACADSARAIAAgAigCCGogBCwAAzoAACAAQQFqIQAgAigCBCEDCyAAIANIBEAgACACKAIIaiAELAAEOgAAIABBAWohACACKAIEIQMLIAAgA0gEQCAAIAIoAghqIAQsAAU6AAAgAEEBaiEAIAIoAgQhAwsgACADSARAIAAgAigCCGogBCwABjoAACAAQQFqIQAgAigCBCEDCyAAIANIBEAgACACKAIIaiAELAAHOgAAIABBAWohACACKAIEIQMLIAAgA0gEQCAAIAIoAghqIAQsAAg6AAAgAEEBaiEAIAIoAgQhAwsgACADSARAIAAgAigCCGogBCwACToAACAAQQFqIQAgAigCBCEDCyAAIANIBEAgACACKAIIaiAELAAKOgAAIABBAWohACACKAIEIQMLIAAgA0gEQCAAIAIoAghqIAQsAAs6AAAgAEEBaiEAIAIoAgQhAwsgACADSARAIAAgAigCCGogBCwADDoAACAAQQFqIQAgAigCBCEDCyAAIANIBEAgACACKAIIaiAELAANOgAAIABBAWohACACKAIEIQMLIAAgA0gEQCAAIAIoAghqIAQsAA46AAAgAEEBaiEAIAIoAgQhAwsgACADSARAIAAgAigCCGogBCwADzoAACAAQQFqIQALIAQgBzoAACAGQRBqIgYgASgCACIDSA0AQQELCwVBACEAQQELIQkgCCAEEK8BIAgQcCAELAAPIgchCCAJCyAHQX9qQRh0QRh1Qf8BcUEPSnJBAXEhASAHQX5qQRh0QRh1Qf8BcUEPSARAQRAgCGshAwNAIAFBASAHIAMgBGosAABGGyEBIANBAWohBiADQQ9IBEAgBiEDDAELCwsgAUEARyIDRQRAQRAgCGsiBkEASgRAQQAhAQNAIAAgAigCBEgEQCAAIAIoAghqIAEgBGosAAA6AAAgAEEBaiEACyABQQFqIgEgBkcNAAsLCyACIAA2AgAgBCQDIANBAXNBAXELkA4BBn8jAyEDIwNBkARqJAMgAhC4ASABKAIARQRAIAMkAw8LIANBEGoiCEEBIAAoAgAgACgCCEEAEIwBIAEoAgAiBEEASgR/An9BACEAA38gAyAGIAEoAggiB2osAAA6AABBASAGQQFyIgUgBE4NARogAyAFIAdqLAAAOgABQQIgBkECciIFIARODQEaIAMgBSAHaiwAADoAAkEDIAZBA3IiBSAETg0BGiADIAUgB2osAAA6AANBBCAGQQRyIgUgBE4NARogAyAFIAdqLAAAOgAEQQUgBkEFciIFIARODQEaIAMgBSAHaiwAADoABUEGIAZBBnIiBSAETg0BGiADIAUgB2osAAA6AAZBByAGQQdyIgUgBE4NARogAyAFIAdqLAAAOgAHQQggBkEIciIFIARODQEaIAMgBSAHaiwAADoACEEJIAZBCXIiBSAETg0BGiADIAUgB2osAAA6AAlBCiAGQQpyIgUgBE4NARogAyAFIAdqLAAAOgAKQQsgBkELciIFIARODQEaIAMgBSAHaiwAADoAC0EMIAZBDHIiBSAETg0BGiADIAUgB2osAAA6AAxBDSAGQQ1yIgUgBE4NARogAyAFIAdqLAAAOgANQQ4gBkEOciIFIARODQEaIAMgBSAHaiwAADoADkEPIAZBD3IiBSAETg0BGiADIAUgB2osAAA6AA8gCCADELABIAAgAigCBCIESARAIAAgAigCCGogAywAADoAACAAQQFqIQAgAigCBCEECyAAIARIBEAgACACKAIIaiADLAABOgAAIABBAWohACACKAIEIQQLIAAgBEgEQCAAIAIoAghqIAMsAAI6AAAgAEEBaiEAIAIoAgQhBAsgACAESARAIAAgAigCCGogAywAAzoAACAAQQFqIQAgAigCBCEECyAAIARIBEAgACACKAIIaiADLAAEOgAAIABBAWohACACKAIEIQQLIAAgBEgEQCAAIAIoAghqIAMsAAU6AAAgAEEBaiEAIAIoAgQhBAsgACAESARAIAAgAigCCGogAywABjoAACAAQQFqIQAgAigCBCEECyAAIARIBEAgACACKAIIaiADLAAHOgAAIABBAWohACACKAIEIQQLIAAgBEgEQCAAIAIoAghqIAMsAAg6AAAgAEEBaiEAIAIoAgQhBAsgACAESARAIAAgAigCCGogAywACToAACAAQQFqIQAgAigCBCEECyAAIARIBEAgACACKAIIaiADLAAKOgAAIABBAWohACACKAIEIQQLIAAgBEgEQCAAIAIoAghqIAMsAAs6AAAgAEEBaiEAIAIoAgQhBAsgACAESARAIAAgAigCCGogAywADDoAACAAQQFqIQAgAigCBCEECyAAIARIBEAgACACKAIIaiADLAANOgAAIABBAWohACACKAIEIQQLIAAgBEgEQCAAIAIoAghqIAMsAA46AAAgAEEBaiEAIAIoAgQhBAsgACAESARAIAAgAigCCGogAywADzoAACAAQQFqIQALIAZBEGoiBiABKAIAIgRIDQBBAAsLBUEAIQBBAAsiASADakEQIAFrIgFB/wFxIAEQShogCCADELABIAAgAigCBCIBSARAIAAgAigCCGogAywAADoAACAAQQFqIQAgAigCBCEBCyAAIAFIBEAgACACKAIIaiADLAABOgAAIABBAWohACACKAIEIQELIAAgAUgEQCAAIAIoAghqIAMsAAI6AAAgAEEBaiEAIAIoAgQhAQsgACABSARAIAAgAigCCGogAywAAzoAACAAQQFqIQAgAigCBCEBCyAAIAFIBEAgACACKAIIaiADLAAEOgAAIABBAWohACACKAIEIQELIAAgAUgEQCAAIAIoAghqIAMsAAU6AAAgAEEBaiEAIAIoAgQhAQsgACABSARAIAAgAigCCGogAywABjoAACAAQQFqIQAgAigCBCEBCyAAIAFIBEAgACACKAIIaiADLAAHOgAAIABBAWohACACKAIEIQELIAAgAUgEQCAAIAIoAghqIAMsAAg6AAAgAEEBaiEAIAIoAgQhAQsgACABSARAIAAgAigCCGogAywACToAACAAQQFqIQAgAigCBCEBCyAAIAFIBEAgACACKAIIaiADLAAKOgAAIABBAWohACACKAIEIQELIAAgAUgEQCAAIAIoAghqIAMsAAs6AAAgAEEBaiEAIAIoAgQhAQsgACABSARAIAAgAigCCGogAywADDoAACAAQQFqIQAgAigCBCEBCyAAIAFIBEAgACACKAIIaiADLAANOgAAIABBAWohACACKAIEIQELIAAgAUgEQCAAIAIoAghqIAMsAA46AAAgAEEBaiEAIAIoAgQhAQsgACABSARAIAAgAigCCGogAywADzoAACAAQQFqIQALIAgQcCACIAA2AgAgAyQDC8QBAQN/IwMhBSMDQaACaiQDIAVBjAJqIgZBADYCACAGQYABNgIEIAYgBUGAAWo2AgggBUGAAmoiBEEANgIAIARBgAE2AgQgBCAFNgIIIAJBBEgEQCAFJAMPCyABKAIAQcAASgRAIAFBf0EAIARBABB0BSAEIAEQjgELIARBwAAgBCgCAGsQuQEgBEE2ELYBIARBfyAAIAZBABB0IARB6gAQtgEgBEF/IAYgBiACEHQgA0EANgIAIAMgBigCCCACEGIgBSQDCwUAQcEBCzcBAn8gACgCAEEATARADwsDQCACIAAoAghqIgMgASADLQAAczoAACACQQFqIgIgACgCAEgNAAsLfwECfyAAKAIAIgJBCGoiAyAAKAIESgRADwsDQCACIAAoAghqQQA6AAAgAkEBaiICIANIDQALIAAgAzYCACABQQBKIANBAEpxRQRADwsgAyECA0AgAkF/aiIDIAAoAghqIAE6AAAgAUEIdiIBQQBHIAJBAUpxBEAgAyECDAELCws9AQF/IAAoAgRBAEwEQCAAQQA2AgAPCwNAIAEgACgCCGpBADoAACABQQFqIgEgACgCBEgNAAsgAEEANgIAC08BAn8gAUEATARADwsgACgCACECA0AgAiAAKAIESARAIAIgACgCCGpBADoAACAAIAAoAgBBAWo2AgAgAkEBaiECIANBAWoiAyABSA0BCwsLBQBB4QALRwECfyMDIQIjA0EwaiQDIAJBgBAQEiAAIAIQKSAAQQE2AiggAkGAEBASIAEgAhApIAFBATYCKCAAIAEQjgJFIQMgAiQDIAMLOwEBfyMDIQIjA0GAAWokAyACEJICIAIgARCTAiACQdAAaiIBQYAQEBIgACABQYg0KQMAIAIQJSACJAMLywcBDH8jAyEHIwNB0AxqJAMgABBOBEAgAEHgAGoQTgRAIAckAw8LCyABEMQBBEAgAEIANwMAIABCADcDCCAAQgA3AxAgAEIANwMYIABCADcDICAAQQE2AiggAEEwahB2IABCADcDYCAAQgA3A2ggAEIANwNwIABCADcDeCAAQgA3A4ABIABBATYCiAEgByQDDwsgABCQASAHQbgLaiIGIAAQFyAGQTBqIgogAEEwaiILEBcgBkHgAGoiCSAAQeAAaiIMEBcgBhBkIAdB0ABqIgIgABAXIAJBMGoiAyALEBcgAkHgAGoiBCAMEBcgAkGQAWoiBSACEBcgAkHAAWoiCCADEBcgAkHwAWoiAyAEEBcgBSAGEEIgAkGgAmoiBCACQZABahAXIAJB0AJqIgUgCBAXIAJBgANqIgggAxAXIAQgBhBCIAJBsANqIgMgAkGgAmoQFyACQeADaiIEIAUQFyACQZAEaiIFIAgQFyADIAYQQiACQcAEaiIDIAJBsANqEBcgAkHwBGoiCCAEEBcgAkGgBWoiBCAFEBcgAyAGEEIgAkHQBWoiAyACQcAEahAXIAJBgAZqIgUgCBAXIAJBsAZqIgggBBAXIAMgBhBCIAJB4AZqIgMgAkHQBWoQFyACQZAHaiIEIAUQFyACQcAHaiIFIAgQFyADIAYQQiACQfAHaiIDIAJB4AZqEBcgAkGgCGogBBAXIAJB0AhqIAUQFyADIAYQQiAHQdAJaiIEIAEQEiAEKQMAQgKBpyEFIARBARCTASAEEA8gBCkDAEICgachASAHQYAKaiIDIAQQEiADQQEQkwEgAxAPIAQgAyAFEMIBIAYgACABEB0gCiALIAEQHSAJIAwgARAdIAdBqApqIgggBhAXIAhBMGoiBSAKEBcgCEHgAGogCRAXIAQQwwEiDUEDakEEbSEJIARBBRCRASEBIA1Bek4EQEEAIQMDQCADIAdqIAFB8AFqIgE6AAAgBCABQRh0QRh1EJIBIAQQDyAEEMEBIANBAWohCiAEQQUQkQEhASADIAlIBEAgCiEDDAELCwsgCUEBaiAHaiABOgAAIAAgAUEYdEEYdUF/akECbSIBQZABbCACahAXIAsgAUGQAWwgAmpBMGoQFyAMIAFBkAFsIAJqQeAAahAXIA1BeUoEQCAJIQEDQCAGIAIgASAHaiwAABCJAiAAEGQgABBkIAAQZCAAEGQgACAGEEIgAUF/aiEDIAFBAEoEQCADIQEMAQsLCyAFIAUQXSAFEA8gACAIEEIgBSAFEF0gBRAPIAAQkAEgByQDC70BAQJ/IwMhAyMDQeAAaiQDIAMgAhB4IAMgAxBVIAMQdyADQTBqIgQgARB4IAQgBBCKAiADIAQQuwEEfyAAIAEQeCAAQTBqIAIQeCAAQeAAahB2IAMkA0EBBSAAQgA3AwAgAEIANwMIIABCADcDECAAQgA3AxggAEIANwMgIABBATYCKCAAQTBqEHYgAEIANwNgIABCADcDaCAAQgA3A3AgAEIANwN4IABCADcDgAEgAEEBNgKIASADJANBAAsLNAAgAhBOBEAgAkHgAGoQTgRADwsLIAIQkAEgASACQTBqELwBIAEpAwBCAoEaIAAgAhC8AQtSACAAIAEpAwAgAikDAHw3AwAgACABKQMIIAIpAwh8NwMIIAAgASkDECACKQMQfDcDECAAIAEpAxggAikDGHw3AxggACABKQMgIAIpAyB8NwMgC5EBAQJ+IAAgACkDCCIBQjSGQv//////////AIMgACkDAEIEh4Q3AwAgACAAKQMQIgJCNIZC//////////8AgyABQgSHhDcDCCAAIAApAxgiAUI0hkL//////////wCDIAJCBIeENwMQIAAgACkDICICQjSGQv//////////AIMgAUIEh4Q3AxggACACQgSHNwMgC4IBAQJ+IAAgACkDACIDQQAgAmusIgQgAyABKQMAhYOFNwMAIAAgACkDCCIDIAMgASkDCIUgBIOFNwMIIAAgACkDECIDIAMgASkDEIUgBIOFNwMQIAAgACkDGCIDIAMgASkDGIUgBIOFNwMYIAAgACkDICIDIAMgASkDIIUgBIOFNwMgC40CAgJ/BX4gACAAKQMAIgNC//////////8AgyIENwMAIAAgACkDCCADQjiHfCIDQv//////////AIMiBTcDCCAAIAApAxAgA0I4h3wiA0L//////////wCDIgY3AxAgACAAKQMYIANCOId8IgNC//////////8AgyIHNwMYIAAgACkDICADQjiHfCIDNwMgIANCAFEEfyAHQgBRBH8gBkIAUQR/IAVCAFEEfyAEQgBRBH9BAA8FQQALBUEBCwVBAgsFQQMLBUEECyICQThsIQEgAkEDdCAAaikDACIDQgBRBEAgAQ8LIAEhAANAIANCAn8hBCAAQQFqIQAgA0IBfEIDWgRAIAQhAwwBCwsgAAtCACAAKQMAQgBSBEBBAA8LIAApAwhCAFIEQEEADwsgACkDEEIAUgRAQQAPCyAAKQMYQgBRBH8gACkDIEIAUQVBAAsLrgEBA38jAyEDIwNB0AJqJAMgA0HgAGoiBSAAKAIIEHkgA0EwaiIEIAEoAghBAWoQeSADIAEoAghBIWoQeSADQbgBaiIAIAQgAxC+AUUEQCADJANBfQ8LIANBkAFqIgFB8A4QEiAFIAEQKSAAIAUQvQECf0EAIAAQTkUNABogAEHgAGoQTgsEQCADJANBfQ8LIAQgBCAAEL8BIAJBIDYCACACKAIIIAQQeiADJANBAAsvAQJ/IwMhASMDQYABaiQDIAFBQGsiAkGACRALIAFBwAkQCyAAIAIgARB7IAEkAwv8BgEMfyMDIQcjA0HwEGokAyAAEDsEQCAAQYABahA7BEAgByQDDwsLIAEQ0gEEQCAAEE8gAEFAaxBeIABBgAFqEE8gByQDDwsgABCUASAHQagPaiIGIAAQESAGQUBrIgogAEFAayILEBEgBkGAAWoiCSAAQYABaiIMEBEgBhBlIAdB8ABqIgIgABARIAJBQGsiAyALEBEgAkGAAWoiBCAMEBEgAkHAAWoiBSACEBEgAkGAAmoiCCADEBEgAkHAAmoiAyAEEBEgBSAGEEQgAkGAA2oiBCACQcABahARIAJBwANqIgUgCBARIAJBgARqIgggAxARIAQgBhBEIAJBwARqIgMgAkGAA2oQESACQYAFaiIEIAUQESACQcAFaiIFIAgQESADIAYQRCACQYAGaiIDIAJBwARqEBEgAkHABmoiCCAEEBEgAkGAB2oiBCAFEBEgAyAGEEQgAkHAB2oiAyACQYAGahARIAJBgAhqIgUgCBARIAJBwAhqIgggBBARIAMgBhBEIAJBgAlqIgMgAkHAB2oQESACQcAJaiIEIAUQESACQYAKaiIFIAgQESADIAYQRCACQcAKaiIDIAJBgAlqEBEgAkGAC2ogBBARIAJBwAtqIAUQESADIAYQRCAHQfAMaiIEIAEQCyAEKQMAQgKBpyEFIARBARBoIAQQCiAEKQMAQgKBpyEBIAdBsA1qIgMgBBALIANBARBoIAMQCiAEIAMgBRCXASAGIAAgARAbIAogCyABEBsgCSAMIAEQGyAHQegNaiIIIAYQESAIQUBrIgUgChARIAhBgAFqIAkQESAEEGkiDUEDakEEbSEJIARBBRBnIQEgDUF6TgRAQQAhAwNAIAMgB2ogAUHwAWoiAToAACAEIAFBGHRBGHUQfSAEEAogBEEEECwgA0EBaiEKIARBBRBnIQEgAyAJSARAIAohAwwBCwsLIAlBAWogB2ogAToAACAAIAFBGHRBGHVBf2pBAm0iAUHAAWwgAmoQESALIAFBwAFsIAJqQUBrEBEgDCABQcABbCACakGAAWoQESANQXlKBEAgCSEBA0AgBiACIAEgB2osAAAQmQIgABBlIAAQZSAAEGUgABBlIAAgBhBEIAFBf2ohAyABQQBKBEAgAyEBDAELCwsgBSAFEDAgBRAKIAAgCBBEIAUgBRAwIAUQCiAAEJQBIAckAwsEAEEQCzIAIAIQOwRAIAJBgAFqEDsEQA8LCyACEJQBIAEgAkFAaxAqIAEpAwBCAoEaIAAgAhAqCy0BAX8jAyECIwNBQGskAyACQcAMEAsgAkECEH0gAhAKIAAgASACEJsCIAIkAwusAQEFfyMDIQojA0HAEWokAyAKQcADaiEMIApBQGshCyAKQfgPaiENIAogARAfIAIsAABBBEYEQCAMIAJBAWoQHyALIAJBMWoQHyANIAwgCxB7CyAMIAogAEGAAWoQfCALIABB+AJqEKABIAsgDBBuIApB+AlqIgIgCyANEIIBIAIQgAEgCkH4A2oiASACEG8gACABIAYgByADIAQgCCAJIAUQiQEhDiAKJAMgDgvrAQAgACABKQMAIAIpAwB8NwMAIAAgASkDCCACKQMIfDcDCCAAIAEpAxAgAikDEHw3AxAgACABKQMYIAIpAxh8NwMYIAAgASkDICACKQMgfDcDICAAIAEpAyggAikDKHw3AyggACABKQMwIAIpAzB8NwMwIAAgASkDOCACKQM4fDcDOCAAQUBrIAFBQGspAwAgAkFAaykDAHw3AwAgACABKQNIIAIpA0h8NwNIIAAgASkDUCACKQNQfDcDUCAAIAEpA1ggAikDWHw3A1ggACABKQNgIAIpA2B8NwNgIAAgASkDaCACKQNofDcDaAvrAQAgACABKQMAIAIpAwB9NwMAIAAgASkDCCACKQMIfTcDCCAAIAEpAxAgAikDEH03AxAgACABKQMYIAIpAxh9NwMYIAAgASkDICACKQMgfTcDICAAIAEpAyggAikDKH03AyggACABKQMwIAIpAzB9NwMwIAAgASkDOCACKQM4fTcDOCAAQUBrIAFBQGspAwAgAkFAaykDAH03AwAgACABKQNIIAIpA0h9NwNIIAAgASkDUCACKQNQfTcDUCAAIAEpA1ggAikDWH03A1ggACABKQNgIAIpA2B9NwNgIAAgASkDaCACKQNofTcDaAs4ACAAQgE3AwAgAEEIaiIAQgA3AwAgAEIANwMIIABCADcDECAAQgA3AxggAEIANwMgIABCADcDKAuQAwIBfwF+IAAgACkDACICQv//////////A4M3AwAgACAAKQMIIAJCOod8IgJC//////////8DgzcDCCAAIAApAxAgAkI6h3wiAkL//////////wODNwMQIAAgACkDGCACQjqHfCICQv//////////A4M3AxggACAAKQMgIAJCOod8IgJC//////////8DgzcDICAAIAApAyggAkI6h3wiAkL//////////wODNwMoIAAgACkDMCACQjqHfCICQv//////////A4M3AzAgACAAKQM4IAJCOod8IgJC//////////8DgzcDOCAAQUBrIgEpAwAgAkI6h3whAiABIAJC//////////8DgzcDACAAIAApA0ggAkI6h3wiAkL//////////wODNwNIIAAgACkDUCACQjqHfCICQv//////////A4M3A1AgACAAKQNYIAJCOod8IgJC//////////8DgzcDWCAAIAApA2AgAkI6h3wiAkL//////////wODNwNgIAAgACkDaCACQjqHfDcDaAvaAQEDfiAAIAApAzAgAa0iA4YgACkDKCICQTogAWutIgSHhDcDMCAAIAIgA4ZC//////////8DgyAAKQMgIgIgBIeENwMoIAAgAiADhkL//////////wODIAApAxgiAiAEh4Q3AyAgACACIAOGQv//////////A4MgACkDECICIASHhDcDGCAAIAIgA4ZC//////////8DgyAAKQMIIgIgBIeENwMQIAAgAiADhkL//////////wODIAApAwAiAiAEh4Q3AwggACACIAOGQv//////////A4M3AwALMwAgAEIANwMAIABCADcDCCAAQgA3AxAgAEIANwMYIABCADcDICAAQgA3AyggAEIANwMwC14AIAApAwBCAFIEQEEADwsgACkDCEIAUgRAQQAPCyAAKQMQQgBSBEBBAA8LIAApAxhCAFIEQEEADwsgACkDIEIAUgRAQQAPCyAAKQMoQgBRBH8gACkDMEIAUQVBAAsLCAAgAEHfA2oLFgAgAEUEQEEADwsgAEEQbUEEdEEQags1AQJ/IAAQKyAAQUBrIgIQKyABECsgAUFAayIDECsgACABEGYEQCACIAMQZgRAQQEPCwtBAAs9AQJ/IwMhASMDQUBrJAMgARBeIAAQKyAAQUBrIgIQKyAAIAEQZgRAIAIQOwRAIAEkA0EBDwsLIAEkA0EACycBAX8gAUG0BG0iAiABIAJBtARsa0EAR2pBwARsQYEBQeAEIAAbagvwAwEFfyMDIQYjA0GAA2okAyAAIAEgAkEfdkF/aiACIAJBH3UiB3NqQQJtIgVBf2pBH3YiAhAcIABBgAFqIgMgAUGAAWogAhAcIABBgAJqIgQgAUGAAmogAhAcIAAgAUGAA2ogBUEBc0F/akEfdiICEBwgAyABQYAEaiACEBwgBCABQYAFaiACEBwgACABQYAGaiAFQQJzQX9qQR92IgIQHCADIAFBgAdqIAIQHCAEIAFBgAhqIAIQHCAAIAFBgAlqIAVBA3NBf2pBH3YiAhAcIAMgAUGACmogAhAcIAQgAUGAC2ogAhAcIAAgAUGADGogBUEEc0F/akEfdiICEBwgAyABQYANaiACEBwgBCABQYAOaiACEBwgACABQYAPaiAFQQVzQX9qQR92IgIQHCADIAFBgBBqIAIQHCAEIAFBgBFqIAIQHCAAIAFBgBJqIAVBBnNBf2pBH3YiAhAcIAMgAUGAE2ogAhAcIAQgAUGAFGogAhAcIAAgAUGAFWogBUEHc0F/akEfdiICEBwgAyABQYAWaiACEBwgBCABQYAXaiACEBwgBiAAEA4gBkGAAWoiAiADEA4gBkGAAmoiASAEEA4gAhANIAIgAhAtIAIQDSAAIAYgB0EBcSIAEBwgAyACIAAQHCAEIAEgABAcIAYkAwsIACAAQaF8agsdAQF/IABBtARtIgEgACABQbQEbGtBAEdqQcAEbAvgAQEHfyMDIQMjA0GACGokAyADQYAGaiICIAEQQCADQYAEaiIFIAFBgAJqIgcgAUGABGoiCBAkIAUgBSAFEBQgBRAaIANBgAJqIgYgCBBAIAMgASAHECQgAyADIAMQFCAAQYAEaiIEIAEgCBAUIAQgByAEEBQgBBAaIAQgBBBAIAAgAhAmIAIgAiAFEBQgAhAaIAIgAiAGEBQgAiACIAMQFCACEBogAiACEFYgBRA0IAYQNCAAIAAgBRAUIABBgAJqIgEgBiADEBQgBCAEIAIQFCAAEBogARAaIAQQGiADJAML7wkBCH9BLyEIIwMhBCMDQfABaiQDIABBtAQ2AgAgBEFAayIHQcAMEAsgASAHEB4gAUEBNgI4IARBgAFqIgIQMiACIAEQMyAEIAIQLyAAKAIIIQUgBBAKIAIgBBALQS8hAwNAIANBf2oiBiAFaiACKQMAPAAAIAJBCBAsIANBAUoEQCAGIQMMAQsLIAFBQGsiAyAHEB4gAUEBNgJ4IAIQMiACIAMQMyAEIAIQLyAAKAIIQS9qIQUgBBAKIAIgBBALQS8hAwNAIANBf2oiBiAFaiACKQMAPAAAIAJBCBAsIANBAUoEQCAGIQMMAQsLIAFBgAFqIgMgBxAeIAFBATYCuAEgAhAyIAIgAxAzIAQgAhAvIAAoAghB3gBqIQUgBBAKIAIgBBALQS8hAwNAIANBf2oiBiAFaiACKQMAPAAAIAJBCBAsIANBAUoEQCAGIQMMAQsLIAFBwAFqIgMgBxAeIAFBATYC+AEgAhAyIAIgAxAzIAQgAhAvIAAoAghBjQFqIQUgBBAKIAIgBBALQS8hAwNAIANBf2oiBiAFaiACKQMAPAAAIAJBCBAsIANBAUoEQCAGIQMMAQsLIAFBgAJqIgMgBxAeIAFBATYCuAIgAhAyIAIgAxAzIAQgAhAvIAAoAghBvAFqIQUgBBAKIAIgBBALQS8hAwNAIANBf2oiBiAFaiACKQMAPAAAIAJBCBAsIANBAUoEQCAGIQMMAQsLIAFBwAJqIgMgBxAeIAFBATYC+AIgAhAyIAIgAxAzIAQgAhAvIAAoAghB6wFqIQUgBBAKIAIgBBALQS8hAwNAIANBf2oiBiAFaiACKQMAPAAAIAJBCBAsIANBAUoEQCAGIQMMAQsLIAFBgANqIgMgBxAeIAFBATYCuAMgAhAyIAIgAxAzIAQgAhAvIAAoAghBmgJqIQUgBBAKIAIgBBALQS8hAwNAIANBf2oiBiAFaiACKQMAPAAAIAJBCBAsIANBAUoEQCAGIQMMAQsLIAFBwANqIgMgBxAeIAFBATYC+AMgAhAyIAIgAxAzIAQgAhAvIAAoAghByQJqIQUgBBAKIAIgBBALQS8hAwNAIANBf2oiBiAFaiACKQMAPAAAIAJBCBAsIANBAUoEQCAGIQMMAQsLIAFBgARqIgMgBxAeIAFBATYCuAQgAhAyIAIgAxAzIAQgAhAvIAAoAghB+AJqIQUgBBAKIAIgBBALQS8hAwNAIANBf2oiBiAFaiACKQMAPAAAIAJBCBAsIANBAUoEQCAGIQMMAQsLIAFBwARqIgMgBxAeIAFBATYC+AQgAhAyIAIgAxAzIAQgAhAvIAAoAghBpwNqIQUgBBAKIAIgBBALQS8hAwNAIANBf2oiBiAFaiACKQMAPAAAIAJBCBAsIANBAUoEQCAGIQMMAQsLIAFBgAVqIgMgBxAeIAFBATYCuAUgAhAyIAIgAxAzIAQgAhAvIAAoAghB1gNqIQUgBBAKIAIgBBALQS8hAwNAIANBf2oiBiAFaiACKQMAPAAAIAJBCBAsIANBAUoEQCAGIQMMAQsLIAFBwAVqIgMgBxAeIAFBATYC+AUgAhAyIAIgAxAzIAQgAhAvAn8gACgCCCEJIAQQCiACIAQQCyAJC0GFBGohAQNAIAhBf2oiACABaiACKQMAPAAAIAJBCBAsIAhBAUoEQCAAIQgMAQsLIAQkAwvRAgECfyMDIQIjA0FAayQDIAIgASgCCCABKAIAQQxtIgMQOCAAIAIQGSACIAMgASgCCGogAxA4IABBQGsgAhAZIAIgASgCCCADQQF0aiADEDggAEGAAWogAhAZIAIgASgCCCADQQNsaiADEDggAEHAAWogAhAZIAIgASgCCCADQQJ0aiADEDggAEGAAmogAhAZIAIgASgCCCADQQVsaiADEDggAEHAAmogAhAZIAIgASgCCCADQQZsaiADEDggAEGAA2ogAhAZIAIgASgCCCADQQdsaiADEDggAEHAA2ogAhAZIAIgASgCCCADQQN0aiADEDggAEGABGogAhAZIAIgASgCCCADQQlsaiADEDggAEHABGogAhAZIAIgASgCCCADQQpsaiADEDggAEGABWogAhAZIAIgASgCCCADQQtsaiADEDggAEHABWogAhAZIAIkAwuUAQAgAkGBAUgEQEF+DwsgAyABKQAANwAAIAMgASkACDcACCADIAEpABA3ABAgAyABKQAYNwAYIAAgAUEgaiADQSBqEKMBGiAEIAEoABwQigEiAEG0BG0iBCAAIARBtARsa0EAR2pBwARsIgBB4ARqNgIAIABBgQFqIAJKBEBBfg8LIANB4ARqIAFBgQFqIAAQUxpBAAuiAgEFfyMDIQIjA0GAAWokA0G4EBBcIQMgAkHkAGoiBBAAGiAEKAIAIQQgAkHoAGoiBUHkADYCBCAFIAI2AgggAUEAIAAbIQYgBUHkADYCACACIAQ6AAAgAiAEQQh2OgABIAIgBEEQdjoAAiACIARBGHY6AANBACEBA0AgBSgCCCABQQRqaiABIAZIBH8gACABaiwAAAUgAQs6AAAgAUEBaiIBQeAARw0ACyADIAUQYyADQbgBaiIAEMYBIANB+AJqIgEQgwEgA0H4BWoiBCABIAAQggEgBBCAASADQYABakHACBALIAJBtAQ2AgAgAkG0BDYCBCACIANB+AtqNgIIIAMgAhCBAiADQawQakEANgIAIANBsBBqQQA2AgAgAiQDIAMLoAIBB38jAyEEIwNB8AVqJAMgBEHoBGohByAEQegBaiEJIAQQABogBCgCACEIIARBQGsiBkHkADYCBCAGIARBgAFqIgU2AgggAUEAIAAbIQogBkHkADYCACAFIAg6AAAgBSAIQQh2OgABIAUgCEEQdjoAAiAFIAhBGHY6AANBACEBA0AgBigCCCABQQRqaiABIApIBH8gACABaiwAAAUgAQs6AAAgAUEBaiIBQeAARw0ACyAHIAYQYyAJEIMBIAZBwAgQCyAEIAYgBxCVASAJIAQQbiACBEAgAiAEECALIANFBEAgBxBMIAQkA0EADwsgA0EEOgAAIAVBwAE2AgAgBUHAATYCBCAFIANBAWo2AgggBSAJEIQBIAcQTCAEJANBAAv+AQEFfyMDIQQjA0GAAmokAyAEQegAaiEFIARB6AFqEAAaIAQoAugBIQYgBEHsAWoiB0HkADYCBCAHIAQ2AgggAUEAIAAbIQggB0HkADYCACAEIAY6AAAgBCAGQQh2OgABIAQgBkEQdjoAAiAEIAZBGHY6AANBACEBA0AgBygCCCABQQRqaiABIAhIBH8gACABaiwAAAUgAQs6AAAgAUEBaiIBQeAARw0ACyAFIAcQYyAEIAUQngIgAgRAIAIgBCkAADcAACACIAQpAAg3AAgLIANFBEAgBRBMIAQkA0EADwsgAyAEKQAQNwAAIAMgBCgAGDYACCAFEEwgBCQDQQALoAEBBH8jAyEEIwNB0ARqJAMgBEG4BGohAyAEQbgBaiEFIARBgAFqIgYgABAfIAEsAABBBEYEQCADQcABNgIAIANBwAE2AgQgAyABQQFqNgIIIAUgAxCfAQsgBEFAayIAQcAIEAsgBCAGIAAQfCAFIAQQbiACQQQ6AAAgA0HAATYCACADQcABNgIEIAMgAkEBajYCCCADIAUQhAEgBCQDQQALoQIBCH8jAyEEIwNB8ARqJAMgBEHoA2ohByAEQagCaiEJIARBQGsiChAAGiAKKAIAIQggBEGAAWoiBUHkADYCBCAFIARBwAFqIgY2AgggAUEAIAAbIQsgBUHkADYCACAGIAg6AAAgBiAIQQh2OgABIAYgCEEQdjoAAiAGIAhBGHY6AANBACEBA0AgBSgCCCABQQRqaiABIAtIBH8gACABaiwAAAUgAQs6AAAgAUEBaiIBQeAARw0ACyAHIAUQYyAJEMYBIApBwAgQCyAEIAogBxCVASAJIAQQxwEgAgRAIAIgBBAgCyADRQRAIAcQTCAEJANBAA8LIAYgBSAJEMkBIANBBDoAACADQQFqIAYQICADQTFqIAUQICAHEEwgBCQDQQALJAEBfyAAEEwgAEGsEGooAgAiAUUEQCAAEEsPCyABEEsgABBLC1gAIAYgAykAADcAACAGIAMoAAg2AAggBiAFEIoBNgAcIAAgASACIAYgBCAFIAZBgQFqIAVBtARtIgAgBSAAQbQEbGtBAEdqQcAEbCAGQQxqIAZBIGoQpAELBgBBBBABCwgAQQMQAUIACwgAQQIQAUEACwgAQQEQAUEACwgAQQAQAUEAC0oBA39BECECAn8DQCAALAAAIgMgASwAACIERgRAIABBAWohACABQQFqIQFBACACQX9qIgJFDQIaDAELCyADQf8BcSAEQf8BcWsLC7AEAQx/IwMhCSMDQcACaiQDIAIsAABBBEcEQEH6N0EnQbQ1KAIAEGAgCSQDQQEPCyAJQegAaiEKIARFIgsEf0EABSAEQRBtQQR0QRBqCyAGRwRAAn9BtDUoAgAhEyAKIAsEf0EABSAEQRBtQQR0QRBqCzYCACAKIAY2AgQgEwtBojggChCpASAJJANBAQ8LIAlBiAFqIQ8gCUH8AGohDSAJQfAAaiELIAlBlAJqIhBCADcCACAQQQA2AgggCUGIAmoiEUIANwIAIBFBADYCCCAJQaACaiIMEAAaIAwoAgAhDiAJQawCaiIKQeQANgIEIAogCTYCCCABQQAgABshEiAKQeQANgIAIAkgDjoAACAJIA5BCHY6AAEgCSAOQRB2OgACIAkgDkEYdjoAA0EAIQEDQCAKKAIIIAFBBGpqIAEgEkgEfyAAIAFqLAAABSABCzoAACABQQFqIgFB4ABHDQALIA8gChBjIAlBwQA2AgAgCUHBADYCBCAJIAI2AgggCiAENgIAIAogBDYCBCAKIAM2AgggDEEANgIAIAxBBDYCBCAMIAc2AgggDUEANgIAIA1BEDYCBCANIAg2AgggBkEIaiIBEFwhACALQQA2AgAgCyABNgIEIAsgADYCCCAQIBEgDyAJIAogDCALIA0QlwIgBiALKAIARgRAIAUgACAGEFMaCyAAEEsgDxBMIAYgCygCAEYEf0EABUGKOUEpQbQ1KAIAEGBBAQshFCAJJAMgFAuiAgAgAAR/An8gAUGAAUkEQCAAIAE6AABBAQwBC0H0NigCACgCAEUEQCABQYB/cUGAvwNGBEAgACABOgAAQQEMAgVBtD9B1AA2AgBBfwwCCwALIAFBgBBJBEAgACABQQZ2QcABcjoAACAAIAFBP3FBgAFyOgABQQIMAQsgAUGAQHFBgMADRiABQYCwA0lyBEAgACABQQx2QeABcjoAACAAIAFBBnZBP3FBgAFyOgABIAAgAUE/cUGAAXI6AAJBAwwBCyABQYCAfGpBgIDAAEkEfyAAIAFBEnZB8AFyOgAAIAAgAUEMdkE/cUGAAXI6AAEgACABQQZ2QT9xQYABcjoAAiAAIAFBP3FBgAFyOgADQQQFQbQ/QdQANgIAQX8LCwVBAQsLLgAgAEIAUgRAA0AgAUF/aiIBIACnQQdxQTByOgAAIABCA4giAEIAUg0ACwsgAQs1ACAAQgBSBEADQCABQX9qIgEgAiAAp0EPcUHwM2otAAByOgAAIABCBIgiAEIAUg0ACwsgAQtlAQF/IwMhACMDQTBqJAMgAEEYaiIGQRA2AgAgBkEQNgIEIAYgATYCCCAAQQxqIgEgAzYCACABIAM2AgQgASACNgIIIAAgBTYCACAAIAU2AgQgACAENgIIIAYgASAAELMBIAAkAwvAAgEFfyMDIQMjA0HgAWokAyADQaABaiIEQgA3AwAgBEIANwMIIARCADcDECAEQgA3AxggBEIANwMgIANB0AFqIgUgAigCADYCAEEAIAEgBSADQdAAaiICIAQQiwFBAEgEf0F/BSAAKAJMQX9KBH9BAQVBAAsaIAAoAgAhBiAALABKQQFIBEAgACAGQV9xNgIACyAAKAIwBEAgACABIAUgAiAEEIsBGgUgACgCLCEHIAAgAzYCLCAAIAM2AhwgACADNgIUIABB0AA2AjAgACADQdAAajYCECAAIAEgBSACIAQQiwEaIAcEQCAAQQBBACAAKAIkQQFxQQRqEQAAGiAAKAIUGiAAIAc2AiwgAEEANgIwIABBADYCECAAQQA2AhwgAEEANgIUCwsgACAAKAIAIAZBIHFyNgIAQQALGiADJAMLKQIBfwF8IAEoAgBBB2pBeHEiAisDACEDIAEgAkEIajYCACAAIAM5AwALtBcDFH8DfgF8IwMhFCMDQbAEaiQDIBRBmARqIgxBADYCACABvSIaQgBTBH8gAZoiHSEBQc86IRIgHb0hGkEBBUHSOkHVOkHQOiAEQQFxGyAEQYAQcRshEiAEQYEQcUEARwshEyAUQSBqIQYgFCIOIREgDkGcBGoiCkEMaiEPIBpCgICAgICAgPj/AINCgICAgICAgPj/AFEEfyAAQSAgAiATQQNqIgMgBEH//3txECggACASIBMQJyAAQeo6Qe46IAVBIHFBAEciBRtB4jpB5jogBRsgASABYhtBAxAnIABBICACIAMgBEGAwABzECggAwUCfyABIAwQpQFEAAAAAAAAAECiIgFEAAAAAAAAAABiIgcEQCAMIAwoAgBBf2o2AgALIAVBIHIiC0HhAEYEQCASQQlqIBIgBUEgcSIJGyEIQQwgA2siB0UgA0ELS3JFBEBEAAAAAAAAIEAhHQNAIB1EAAAAAAAAMECiIR0gB0F/aiIHDQALIAgsAABBLUYEfCAdIAGaIB2hoJoFIAEgHaAgHaELIQELIA9BACAMKAIAIgZrIAYgBkEASBusIA8QWyIHRgRAIApBC2oiB0EwOgAACyATQQJyIQogB0F/aiAGQR91QQJxQStqOgAAIAdBfmoiByAFQQ9qOgAAIANBAUghDCAEQQhxRSENIA4hBQNAIAUgCSABqiIGQfAzai0AAHI6AAAgASAGt6FEAAAAAAAAMECiIQEgBUEBaiIGIBFrQQFGBH8gDSAMIAFEAAAAAAAAAABhcXEEfyAGBSAGQS46AAAgBUECagsFIAYLIQUgAUQAAAAAAAAAAGINAAsCfwJAIANFDQAgBUF+IBFraiADTg0AIA8gA0ECamogB2shCyAHDAELIAUgDyARayAHa2ohCyAHCyEGIABBICACIAogC2oiAyAEECggACAIIAoQJyAAQTAgAiADIARBgIAEcxAoIAAgDiAFIBFrIgUQJyAAQTAgCyAFIA8gBmsiBmprQQBBABAoIAAgByAGECcgAEEgIAIgAyAEQYDAAHMQKCADDAELIAcEQCAMIAwoAgBBZGoiCDYCACABRAAAAAAAALBBoiEBBSAMKAIAIQgLIAYgBkGgAmogCEEASBsiCiEGA0AgBiABqyIHNgIAIAZBBGohBiABIAe4oUQAAAAAZc3NQaIiAUQAAAAAAAAAAGINAAsgCEEASgRAIAohBwNAIAhBHSAIQR1IGyENIAZBfGoiCCAHTwRAIA2tIRtBACEJA0AgCa0gCCgCAK0gG4Z8IhxCgJTr3AOAIRogCCAcIBpCgJTr3AN+fT4CACAapyEJIAhBfGoiCCAHTw0ACyAJBEAgB0F8aiIHIAk2AgALCyAGIAdLBEACQAN/IAZBfGoiCCgCAA0BIAggB0sEfyAIIQYMAQUgCAsLIQYLCyAMIAwoAgAgDWsiCDYCACAIQQBKDQALBSAKIQcLQQYgAyADQQBIGyENIAhBAEgEQCANQRlqQQltQQFqIRAgC0HmAEYhFSAGIQMDQEEAIAhrIgZBCSAGQQlIGyEJIAogByADSQR/QQEgCXRBf2ohFkGAlOvcAyAJdiEXQQAhCCAHIQYDQCAGIAggBigCACIYIAl2ajYCACAXIBYgGHFsIQggBkEEaiIGIANJDQALIAcgB0EEaiAHKAIAGyEZIAgEfyADIAg2AgAgA0EEagUgAwshBiAZBSADIQYgByAHQQRqIAcoAgAbCyIDIBUbIgcgEEECdGogBiAGIAdrQQJ1IBBKGyEIIAwgCSAMKAIAaiIGNgIAIAZBAEgEQCADIQcgCCEDIAYhCAwBCwsFIAchAyAGIQgLIAohDCADIAhJBEAgDCADa0ECdUEJbCEHIAMoAgAiCkEKTwRAQQohBgNAIAdBAWohByAKIAZBCmwiBk8NAAsLBUEAIQcLIA1BACAHIAtB5gBGG2sgC0HnAEYiFSANQQBHIhZxQR90QR91aiIGIAggDGtBAnVBCWxBd2pIBH8gBkGAyABqIgZBCW0hCSAGIAlBCWxrIgZBCEgEQEEKIQsDQCAGQQFqIQogC0EKbCELIAZBB0gEQCAKIQYMAQsLBUEKIQsLIAlBAnQgDGpBhGBqIgYoAgAiCSALbiEQIAggBkEEakYiFyAJIAsgEGxrIgpFcUUEQEQBAAAAAABAQ0QAAAAAAABAQyAQQQFxGyEBRAAAAAAAAOA/RAAAAAAAAPA/RAAAAAAAAPg/IBcgCiALQQF2IhBGcRsgCiAQSRshHSATBEAgHZogHSASLAAAQS1GIhAbIR0gAZogASAQGyEBCyAGIAkgCmsiCjYCACABIB2gIAFiBEAgBiAKIAtqIgc2AgAgB0H/k+vcA0sEQANAIAZBADYCACAGQXxqIgYgA0kEQCADQXxqIgNBADYCAAsgBiAGKAIAQQFqIgc2AgAgB0H/k+vcA0sNAAsLIAwgA2tBAnVBCWwhByADKAIAIgpBCk8EQEEKIQsDQCAHQQFqIQcgCiALQQpsIgtPDQALCwsLIAchCSAGQQRqIgYgCCAIIAZLGyEGIAMFIAchCSAIIQYgAwshCiAGIApLBH8CfyAGIQMDfyADQXxqIgYoAgAEQCADIQZBAQwCCyAGIApLBH8gBiEDDAEFQQALCwsFQQALIQcgFQR/IBZBAXMgDWoiAyAJSiAJQXtKcQR/IANBf2ogCWshCCAFQX9qBSADQX9qIQggBUF+agshBSAEQQhxBH8gCAUgBwRAIAZBfGooAgAiDQRAIA1BCnAEQEEAIQMFQQAhA0EKIQsDQCADQQFqIQMgDSALQQpsIgtwRQ0ACwsFQQkhAwsFQQkhAwsgBiAMa0ECdUEJbEF3aiENIAVBIHJB5gBGBH8gCCANIANrIgNBACADQQBKGyIDIAggA0gbBSAIIAkgDWogA2siA0EAIANBAEobIgMgCCADSBsLCwUgDQshA0EAIAlrIQggAEEgIAIgBUEgckHmAEYiEAR/QQAhCCAJQQAgCUEAShsFIA8gCCAJIAlBAEgbrCAPEFsiC2tBAkgEQANAIAtBf2oiC0EwOgAAIA8gC2tBAkgNAAsLIAtBf2ogCUEfdUECcUErajoAACALQX5qIgggBToAACAPIAhrCyADIBNBAWpqQQEgBEEDdkEBcSADQQBHIgsbamoiDSAEECggACASIBMQJyAAQTAgAiANIARBgIAEcxAoIBAEQCAOQQlqIgkhDyAOQQhqIQggDCAKIAogDEsbIgohBwNAIAcoAgCtIAkQWyEFIAcgCkYEQCAFIAlGBEAgCEEwOgAAIAghBQsFIAUgDksEQCAOQTAgBSARaxBKGgNAIAVBf2oiBSAOSw0ACwsLIAAgBSAPIAVrECcgB0EEaiIFIAxNBEAgBSEHDAELCyAEQQhxRSALQQFzcUUEQCAAQfI6QQEQJwsgAEEwIAUgBkkgA0EASnEEfwN/IAUoAgCtIAkQWyIHIA5LBEAgDkEwIAcgEWsQShoDQCAHQX9qIgcgDksNAAsLIAAgByADQQkgA0EJSBsQJyADQXdqIQcgBUEEaiIFIAZJIANBCUpxBH8gByEDDAEFIAcLCwUgAwtBCWpBCUEAECgFIABBMCAKIAYgCkEEaiAHGyILSSADQX9KcQR/IARBCHFFIRIgDkEJaiIMIRNBACARayERIA5BCGohCSADIQUgCiEGA38gDCAGKAIArSAMEFsiA0YEQCAJQTA6AAAgCSEDCwJAIAYgCkYEQCADQQFqIQcgACADQQEQJyASIAVBAUhxBEAgByEDDAILIABB8jpBARAnIAchAwUgAyAOTQ0BIA5BMCADIBFqEEoaA0AgA0F/aiIDIA5LDQALCwsgACADIBMgA2siAyAFIAUgA0obECcgBkEEaiIGIAtJIAUgA2siBUF/SnENACAFCwUgAwtBEmpBEkEAECggACAIIA8gCGsQJwsgAEEgIAIgDSAEQYDAAHMQKCANCwshACAUJAMgAiAAIAAgAkgbC9ABAQF/AkACQAJAIAFBAEciAiAAQQNxQQBHcQRAA0AgAC0AAEUNAiABQX9qIgFBAEciAiAAQQFqIgBBA3FBAEdxDQALCyACRQ0BCyAALQAARQRAIAFFDQEMAgsCQAJAIAFBA00NAANAIAAoAgAiAkH//ft3aiACQYCBgoR4cUGAgYKEeHNxRQRAIABBBGohACABQXxqIgFBA0sNAQwCCwsMAQsgAUUNAQsDQCAALQAARQ0CIAFBf2oiAUUNASAAQQFqIQAMAAALAAtBACEACyAAC2EBAX8gACAALABKIgEgAUH/AWpyOgBKIAAoAgAiAUEIcQR/IAAgAUEgcjYCAEF/BSAAQQA2AgggAEEANgIEIAAgACgCLCIBNgIcIAAgATYCFCAAIAEgACgCMGo2AhBBAAsLBQBBtD8LBQBBwAQLfAICfwF+IwMhAyMDQSBqJAMgA0EIaiIEIAAoAjw2AgAgBCABQiCIPgIEIAQgAT4CCCAEIAM2AgwgBCACNgIQQYwBIAQQCSIAQYBgSwR/QbQ/QQAgAGs2AgBBfwUgAAtBAEgEfiADQn83AwBCfwUgAykDAAshBSADJAMgBQubAwEJfyMDIQYjA0EwaiQDIAZBIGohBSAGIgMgACgCHCIENgIAIAMgACgCFCAEayIENgIEIAMgATYCCCADIAI2AgwgA0EQaiIBIAAoAjw2AgAgASADNgIEIAFBAjYCCAJAAkACfyACIARqIgkhCkGSASABEAIiBEGAYEsEQEG0P0EAIARrNgIAQX8hBAsgCgsgBEYNAEECIQcgAyEBIAQhAwNAIANBAE4EQCABQQhqIAEgAyABKAIEIghLIgQbIgEgAyAIQQAgBBtrIgggASgCAGo2AgAgASABKAIEIAhrNgIEIAUgACgCPDYCACAFIAE2AgQgBSAHIARBH3RBH3VqIgc2AggCfyAJIANrIgkhC0GSASAFEAIiA0GAYEsEQEG0P0EAIANrNgIAQX8hAwsgCwsgA0YNAgwBCwsgAEEANgIQIABBADYCHCAAQQA2AhQgACAAKAIAQSByNgIAIAdBAkYEf0EABSACIAEoAgRrCyECDAELIAAgACgCLCIBIAAoAjBqNgIQIAAgATYCHCAAIAE2AhQLIAYkAyACCz0BAX8jAyEBIwNBEGokAyABIAAoAjw2AgBBBiABEAgiAEGAYEsEQEG0P0EAIABrNgIAQX8hAAsgASQDIAALgAMBDn8jAyEFIwNBEGokAwJAAkACQCAAQbAQaiIIKAIADgIAAgELIAhBATYCAAwBCyAFJAMPCyADQQBKBEAgAEG0EGohECAAQawUaiEJIABBrRRqIQogAEGuFGohCyAAQa8UaiEMIABBrBBqIQ0gAEGoEGohDiAAQaAUaiEPA0AgDCAMLQAAIAktAABBGHQgCi0AAEEQdHIgCy0AAEEIdHJyQQFqIgQ6AAAgCyAEQQh2OgAAIAogBEEQdjoAACAJIARBGHY6AAAgBSAPKQAANwAAIAUgDykACDcACCAQIAUQNyAGIANIBEBBACEEA0AgASAGaiACIAZqLAAAIgcgBCAFai0AAHM6AAAgBCAAQYAQamoiESAHIBEtAABzOgAAIA0gDSgCAEEBaiIHNgIAIAdFBEAgDiAOKAIAQQFqNgIACyAGQQFqIgYgA0ggBEEBaiIEQRBJcQ0ACwsgABBhIAYgA0gNAAsLIANBD3FFBEAgBSQDDwsgCEECNgIAIAUkAwuAAwEOfyMDIQUjA0EQaiQDAkACQAJAIABBsBBqIggoAgAOAgACAQsgCEEBNgIADAELIAUkAw8LIANBAEoEQCAAQbQQaiEQIABBrBRqIQkgAEGtFGohCiAAQa4UaiELIABBrxRqIQwgAEGsEGohDSAAQagQaiEOIABBoBRqIQ8DQCAMIAwtAAAgCS0AAEEYdCAKLQAAQRB0ciALLQAAQQh0cnJBAWoiBDoAACALIARBCHY6AAAgCiAEQRB2OgAAIAkgBEEYdjoAACAFIA8pAAA3AAAgBSAPKQAINwAIIBAgBRA3IAYgA0gEQEEAIQQDQCABIAZqIAIgBmosAAAgBCAFaiwAAHMiBzoAACAEIABBgBBqaiIRIAcgESwAAHM6AAAgDSANKAIAQQFqIgc2AgAgB0UEQCAOIA4oAgBBAWo2AgALIAZBAWoiBiADSCAEQQFqIgRBEElxDQALCyAAEGEgBiADSA0ACwsgA0EPcUUEQCAFJAMPCyAIQQI2AgAgBSQDCwUAQeAACwQAQTALawEBfyMDIQYjA0GwFGokAyAGIAAoAgAgACgCCCABKAIAIAEoAggQrgEgBiACKAIIIAIoAgAQrAEgBiAEKAIIIAMoAgggAygCABD7ASAEIAMoAgA2AgAgBiAFKAIIEKsBIAVBEDYCACAGJAMLawEBfyMDIQYjA0GwFGokAyAGIAAoAgAgACgCCCABKAIAIAEoAggQrgEgBiACKAIIIAIoAgAQrAEgBiAEKAIIIAMoAgggAygCABD8ASAEIAMoAgA2AgAgBiAFKAIIEKsBIAVBEDYCACAGJAMLOQECfyABKAIAQQBMBEAPCwNAIAAQdUH/AXEhAyACIAEoAghqIAM6AAAgAkEBaiICIAEoAgBIDQALC14BAn8gACgCACICIAEoAgBHBEBBAA8LIAJBAEwEQEEBDwsgACgCCCEDIAEoAgghAUEAIQADfwJ/QQAgACADaiwAACAAIAFqLAAARw0AGiAAQQFqIgAgAkgNAUEBCwsL/QcBCX8jAyEFIwNBgAZqJAMgBUEgaiEEIABBADYCXCAAQgA3AgAgAEIANwIIIABCADcCECAAQgA3AhggAEIANwIgIABCADcCKCAAQgA3AjAgAEIANwI4IABBQGtCADcCACAAQgA3AkggAEEANgJQIAFBAEoEfyAEEHMDQCAEIAIgA2osAAAQQSADQQFqIgMgAUcNAAsgBCAFEHEgAEHYAGohByAAQdQAaiEGIABBQGshCEEAIQEDfyAFIAFBAnQiAkEDcmotAABBGHQgAiAFai0AACACQQFyIAVqLQAAQQh0ciAFIAJBAnJqLQAAQRB0cnIhAiAHQQA2AgAgBkEANgIAIAAgAiAAKAIAczYCACAAIAAoAiBBAXM2AiAgCCACQX9qIgMgCCgCAHM2AgAgAEECIAJrIgIgACgCDHM2AgwgACADIAJrIgMgACgCLHM2AiwgACACIANrIgIgACgCTHM2AkwgACADIAJrIgMgACgCGHM2AhggACACIANrIgIgACgCOHM2AjggACADIAJrIgMgACgCBHM2AgQgACACIANrIgIgACgCJHM2AiQgACADIAJrIgMgACgCRHM2AkQgACACIANrIgIgACgCEHM2AhAgACADIAJrIgMgACgCMHM2AjAgACACIANrIgIgACgCUHM2AlAgACADIAJrIgMgACgCHHM2AhwgACACIANrIgIgACgCPHM2AjwgACADIAJrIgMgACgCCHM2AgggACACIANrIgIgACgCKHM2AiggACADIAJrIgMgACgCSHM2AkggACACIANrIgIgACgCFHM2AhQgACAAKAI0IAMgAmtzNgI0QQAhBEEAIQIDQCAGIAJBAWo2AgAgAkEUTgRAIAZBADYCAEEAIQJBDyEDA0BBACADIANBFUYbIgpBAnQgAGooAgAiCSACQQJ0IABqIgsoAgBrIAcoAgBrIQMgAyAJRwRAIAcgAyAJSzYCAAsgCyADNgIAIApBAWohAyACQQFqIgJBFUcNAAsLIARBAWoiBEGQzgBHBEAgBigCACECDAELCyABQQFqIgFBCEcNACAACwUgAEHYAGohByAAQdQAaiEGIAALIQEgBUGMA2oiCBBzQQAhBANAIAYgBigCACICQQFqIgM2AgAgCCACQRRIBH8gA0ECdCAAagUgBkEANgIAQQAhAkEPIQMDf0EAIAMgA0EVRhsiCkECdCAAaigCACIJIAJBAnQgAGoiCygCAGsgBygCAGshAyADIAlHBEAgByADIAlLNgIACyALIAM2AgAgCkEBaiEDIAJBAWoiAkEVRw0AIAELCygCABBBIARBAWoiBEGAAUcNAAsgCCAAQeAAahBxIABBADYCXCAFJAML0AcCCn8CfiMDIQUjA0HgCGokAyAFQbAGaiEIIAEQDyACEA8gBSACEBIgBRDDASIJQQNqQQRtIQogCUF6TgRAA0AgBiAIaiAFQQQQkQEiAjoAACAFIAJBGHRBGHUQkgEgBRAPIAUQwQEgBkEBaiECIAYgCkgEQCACIQYMAQsLCyAFQYAHaiIGIgJCATcDACACQgA3AwggAkIANwMQIAJCADcDGCACQgA3AyAgBUGwB2oiAkGwEBASIAVB4AdqIgQgBiACED4gBUGwCGoiA0GAEBASIAVBMGoiByADQYg0KQMAIg0gBBAlIAdBAjYCKCAHQTBqIAEQEiAHIAEoAigiAjYCWEECIQYgAqwhDgNAIAZBf2oiDEEwbCAHaiELIAKsIA5+QoCAgAhVBEAgA0GAEBASIAsgAxApIAxBMGwgB2pBATYCKAsgBCALIAEQPiADQYAQEBIgBkEwbCAHaiADIA0gBBAlIAZBMGwgB2pBAjYCKCAGQQFqIgZBEEcEQCABKAIoIQJCAiEODAELCyAAIAggCmosAAAiAUEwbCAHahASIAAgAUEwbCAHaigCKCIBNgIoAkAgCUEATA0AIAGsIg4gDn5CgICACFYEQCADQYAQEBIgACADECkgAEEBNgIoCyAEIAAQQyADQYAQEBIgACADIA0gBBAlIABBAjYCKCAEIAAQQyADQYAQEBIgACADIA0gBBAlIABBAjYCKCAEIAAQQyADQYAQEBIgACADIA0gBBAlIABBAjYCKCAEIAAQQyADQYAQEBIgACADIA0gBBAlIABBAjYCKCAKQX9qIgEgCGosAAAiAkEwbCAHaigCKEGAgIAESgRAIANBgBAQEiAAIAMQKSAAQQE2AigLIAQgACACQTBsIAdqED4gA0GAEBASIAAgAyANIAQQJSAAQQI2AiggCUEETA0AA0AgBCAAEEMgA0GAEBASIAAgAyANIAQQJSAAQQI2AiggBCAAEEMgA0GAEBASIAAgAyANIAQQJSAAQQI2AiggBCAAEEMgA0GAEBASIAAgAyANIAQQJSAAQQI2AiggBCAAEEMgA0GAEBASIAAgAyANIAQQJSAAQQI2AiggAUF/aiICIAhqLAAAIgZBMGwgB2ooAihBgICABEoEQCADQYAQEBIgACADECkgAEEBNgIoCyAEIAAgBkEwbCAHahA+IANBgBAQEiAAIAMgDSAEECUgAEECNgIoIAFBAUoEQCACIQEMAQsLIANBgBAQEiAAIAMQKSAAQQE2AiggBSQDDwsgA0GAEBASIAAgAxApIABBATYCKCAFJAMLLgEBfyMDIQIjA0EwaiQDIAJBgBAQEiACQQIQkgEgAhAPIAAgASACEIQCIAIkAwsEAEEMCzEBAn8jAyEBIwNB4ABqJAMgAUEwaiICQaAPEBIgAUHQDxASIAAgAiABEL4BGiABJAMLBABBIAvpAwEFfyMDIQYjA0GQAWokAyAAIAEgAkEfdkF/aiACIAJBH3UiB3NqQQJtIgRBf2pBH3YiAxAdIABBMGoiAiABQTBqIAMQHSAAQeAAaiIFIAFB4ABqIAMQHSAAIAFBkAFqIARBAXNBf2pBH3YiAxAdIAIgAUHAAWogAxAdIAUgAUHwAWogAxAdIAAgAUGgAmogBEECc0F/akEfdiIDEB0gAiABQdACaiADEB0gBSABQYADaiADEB0gACABQbADaiAEQQNzQX9qQR92IgMQHSACIAFB4ANqIAMQHSAFIAFBkARqIAMQHSAAIAFBwARqIARBBHNBf2pBH3YiAxAdIAIgAUHwBGogAxAdIAUgAUGgBWogAxAdIAAgAUHQBWogBEEFc0F/akEfdiIDEB0gAiABQYAGaiADEB0gBSABQbAGaiADEB0gACABQeAGaiAEQQZzQX9qQR92IgMQHSACIAFBkAdqIAMQHSAFIAFBwAdqIAMQHSAAIAFB8AdqIARBB3NBf2pBH3YiBBAdIAIgAUGgCGogBBAdIAUgAUHQCGogBBAdIAYgABAXIAZBMGoiASACEBcgBkHgAGoiBCAFEBcgASABEF0gARAPIAAgBiAHQQFxIgAQHSACIAEgABAdIAUgBCAAEB0gBiQDC2MBAX8jAyECIwNBMGokAyACIAEQVSACIAIgARAWQYA7KAIAQX1GBEAgACABEF0gABAPIAAgAEEDEE0gABAPIAAgAiAAEBAFIAAgAhAXCyACEI8BIAAgAiAAEBAgABB3IAIkAwvYBQIHfw9+IwMhAyMDQdAAaiQDIANCADcDACADQgA3AwggA0IANwMQIANCADcDGCADQgA3AyAgA0IANwMoIANCADcDMCADQgA3AzggA0FAa0IANwMAIANCADcDSCADQUBrIQkDQCABIAEpAwAiCkL//////////wCDIhQ3AwAgASABKQMIIApCOId8IgpC//////////8AgyIWNwMIIAEgASkDECAKQjiHfCIKQv//////////AIMiFzcDECABIAEpAxggCkI4h3wiCkL//////////wCDIhg3AxggASABKQMgIApCOId8Igo3AyACQAJAIApCAFEEfyAYQgBRBH8gF0IAUQR/IBZCAFEEfyAUQgBRBH9BAAVBACEFDAULBUEBIQUMBAsFQQIhBQwDCwVBAyEFDAILBUEEIQUMAQshBAwBCyAFQThsIQQgBUEDdCABaikDACIKQgBSBEADQCAKQgJ/IRQgBEEBaiEEIApCAXxCA1oEQCAUIQoMAQsLCwsgByAEQQF0SARAIAYEfyAIQQF1BSACEHULIQQgAyAVQgGGIAtCN4eEIhU3A0ggCSALQgGGQv7/////////AIMgDEI3h4QiCzcDACADIAxCAYZC/v////////8AgyANQjeHhCIMNwM4IAMgDUIBhkL+/////////wCDIA5CN4eEIg03AzAgAyAOQgGGQv7/////////AIMgD0I3h4QiDjcDKCADIA9CAYZC/v////////8AgyAQQjeHhCIPNwMgIAMgEEIBhkL+/////////wCDIBFCN4eEIhA3AxggAyARQgGGQv7/////////AIMgEkI3h4QiETcDECADIBJCAYZC/v////////8AgyATQjeHhCISNwMIIAMgBEEBca0gE0IBhkL+/////////wCDhCITNwMAIAQhCCAGQQFqQQdxIQYgB0EBaiEHDAELCyAAIAMgARCNAiADJAMLBQBBwQALwRICBn8ffgJ/IwMhCCMDQdAAaiQDIAEgASkDACIJQv//////////AIMiHzcDACABIAEpAwggCUI4h3wiCUL//////////wCDIiA3AwggASABKQMQIAlCOId8IglC//////////8AgyIcNwMQIAEgASkDGCAJQjiHfCIJQv//////////AIMiGjcDGCABIAEpAyAgCUI4h3wiCUL//////////wCDIhc3AyAgASABKQMoIAlCOId8IglC//////////8AgyIUNwMoIAEgASkDMCAJQjiHfCILQv//////////AIMiGDcDMCABIAEpAzggC0I4h3wiCkL//////////wCDIhU3AzggAUFAayIGKQMAIApCOId8IglC//////////8AgyEMIAYgDDcDACABIAEpA0ggCUI4h3wiJDcDSCAICyIDIAIpAwAiITcDACADIAIpAwgiDTcDCCADIAIpAxAiDjcDECADIAIpAxgiDzcDGCADIAIpAyAiCUL//////////wCDIhA3AyAgAyAJQjiHIhE3AyggA0IANwMwIANCADcDOCADQgA3A0AgA0IANwNIAn8CQAJAICRCAFEEfyAMQgBSDQIgA0FAayEEIAogC4RC//////////8Ag0IAUg0CIANBOGohAiARIBRRBH8gECAXUQR/IA8gGlEEfyAOIBxRBH8gDSAgUQR/IB8gIVEEfyACIQUgBAUgISEKIB8hCQwHCwUgDSEKICAhCQwGCwUgDiEKIBwhCQwFCwUgDyEKIBohCQwECwUgECEKIBchCQwDCwUgESEKIBQhCQwCCwVCACEKICQhCQwBCwwCCyAJIApVDQAgACAfNwMAIAAgASkDCDcDCCAAIAEpAxA3AxAgACABKQMYNwMYIAAgASkDIDcDICADJAMPCyADQThqIQUgA0FAawshB0EAIQJCACEKQgAhCwNAIApCAYZC/v////////8AgyALQjeHhCEmIAtCAYZC/v////////8AgyASQjeHhCEjIBJCAYZC/v////////8AgyARQjeHhCEiIBFCAYZC/v////////8AgyAQQjeHhCEdIBBCAYZC/v////////8AgyAPQjeHhCEbIA9CAYZC/v////////8AgyAOQjeHhCEZIA5CAYZC/v////////8AgyANQjeHhCEWIA1CAYZC/v////////8AgyAhQjeHhCETICFCAYZC/v////////8AgyEhIAJBAWohAgJAAkAgJCAlQgGGIApCN4eEIiVRBH4gDCAmUQR+IBUgI1EEfiAYICJRBH4gFCAdUQR+IBcgG1EEfiAZIBpRBH4gFiAcUQR+IBMgIFEEfiAfICFRBH5BACEEICAhDSAcIQ4gGiEPIBchECAUIREgGCESIBUhCyAMBSAhIQkgHyEeICAhDSAcIQ4gGiEPIBchECAUIREgGCESIBUhCyAMIQoMCgsFICAhHiATIgkhDSAcIQ4gGiEPIBchECAUIREgGCESIBUhCyAMIQoMCQsFIBwhHiATIQ0gFiIJIQ4gGiEPIBchECAUIREgGCESIBUhCyAMIQoMCAsFIBohHiATIQ0gFiEOIBkiCSEPIBchECAUIREgGCESIBUhCyAMIQoMBwsFIBchHiATIQ0gFiEOIBkhDyAbIgkhECAUIREgGCESIBUhCyAMIQoMBgsFIBQhHiATIQ0gFiEOIBkhDyAbIRAgHSIJIREgGCESIBUhCyAMIQoMBQsFIBghHiATIQ0gFiEOIBkhDyAbIRAgHSERICIiCSESIBUhCyAMIQoMBAsFIBUhHiATIQ0gFiEOIBkhDyAbIRAgHSERICIhEiAjIgkhCyAMIQoMAwsFIAwhHiATIQ0gFiEOIBkhDyAbIRAgHSERICIhEiAjIQsgJiIJIQoMAgsFICUhCSAkIR4gEyENIBYhDiAZIQ8gGyEQIB0hESAiIRIgIyELICYhCgwBCyEKDAELQQFBfyAeIAlVGyEECyAEQX9KDQALIAMgJTcDSCAHICY3AwAgBSAjNwMAIAMgIjcDMCADIB03AyggAyAbNwMgIAMgGTcDGCADIBY3AxAgAyATNwMIIAMgITcDAANAIB9BACAkICVCAYciDX0gDCAlQjeGQoCAgICAgIDAAIMgJkIBh4QiDn0gFSAmQjeGQoCAgICAgIDAAIMgI0IBh4QiD30gGCAjQjeGQoCAgICAgIDAAIMgIkIBh4QiEH0gFCAiQjeGQoCAgICAgIDAAIMgHUIBh4QiEX0gFyAdQjeGQoCAgICAgIDAAIMgG0IBh4QiEn0gGiAbQjeGQoCAgICAgIDAAIMgGUIBh4QiC30gHCAZQjeGQoCAgICAgIDAAIMgFkIBh4QiCn0gICAWQjeGQoCAgICAgIDAAIMgE0IBh4QiCX0gHyATQjeGQoCAgICAgIDAAIMgIUIBh4QiIX0iJkI4h3wiJUI4h3wiI0I4h3wiIkI4h3wiHUI4h3wiG0I4h3wiGUI4h3wiFkI4h3wiE0I4h3wiHkI/iKdBAXNrrCInIB8gJkL//////////wCDhYOFIR8gICAnICAgJUL//////////wCDhYOFISAgHCAnIBwgI0L//////////wCDhYOFIRwgGiAnIBogIkL//////////wCDhYOFIRogFyAnIBcgHUL//////////wCDhYOFIRcgFCAnIBQgG0L//////////wCDhYOFIRQgGCAnIBggGUL//////////wCDhYOFIRggFSAnIBUgFkL//////////wCDhYOFIRUgDCAnIAwgE0L//////////wCDhYOFIQwgJCAnIB4gJIWDhSEkIAJBf2ohBCACQQFKBEAgBCECIAkhEyAKIRYgCyEZIBIhGyARIR0gECEiIA8hIyAOISYgDSElDAELCyADICE3AwAgAyAJNwMIIAMgCjcDECADIAs3AxggAyASNwMgIAMgETcDKCADIBA3AzAgBSAPNwMAIAcgDjcDACADIA03A0ggASAfNwMAIAEgIDcDCCABIBw3AxAgASAaNwMYIAEgFzcDICABIBQ3AyggASAYNwMwIAEgFTcDOCAGIAw3AwAgASAkNwNIIAAgHzcDACAAIAEpAwg3AwggACABKQMQNwMQIAAgASkDGDcDGCAAIAEpAyA3AyAgAyQDC2sBAn4gACkDICICIAEpAyAiA1EEQCABKQMYIgMgACkDGCICUQRAIAApAxAiAiABKQMQIgNRBEAgACkDCCICIAEpAwgiA1EEQCAAKQMAIgIgASkDACIDUQRAQQAPCwsLCwtBAUF/IAIgA1UbC7cDAQh+IAKsIgNC/////wCDIQQgACADQhyHIgMgASkDACIFQv////8AgyIGfiAEIAVCHIciBX58IgdCHIZCgICAgP////8AgyAEIAZ+fCIGQv//////////AIM3AwAgACABKQMIIghC/////wCDIgkgA34gCEIchyIIIAR+fCIKQhyGQoCAgID/////AIMgAyAFfiAHQhyHfCAGQjiIfCAEIAl+fHwiBUL//////////wCDNwMIIAAgASkDECIGQv////8AgyIHIAN+IAQgBkIchyIGfnwiCUIchkKAgICA/////wCDIAMgCH4gCkIch3wgBUI4h3wgBCAHfnx8IgVC//////////8AgzcDECAAIAMgASkDGCIHQv////8AgyIIfiAEIAdCHIciB358IgpCHIZCgICAgP////8AgyADIAZ+IAlCHId8IAVCOId8IAQgCH58fCIFQv//////////AIM3AxggACADIAEpAyAiBkL/////AIMiCH4gBCAGQhyHfnxCHIZCgICAgP////8AgyADIAd+IApCHId8IAVCOId8IAQgCH58fEL//////////wCDNwMgC1IAIAAgASkDACACKQMAfTcDACAAIAEpAwggAikDCH03AwggACABKQMQIAIpAxB9NwMQIAAgASkDGCACKQMYfTcDGCAAIAEpAyAgAikDIH03AyALBABBAAtLACAAQgA3AwAgAEIANwMIIABCADcDECAAQgA3AxggAEIANwMgIABCADcDKCAAQgA3AzAgAEIANwM4IABBQGtCADcDACAAQgA3A0gLaAAgACABKQMANwMAIAAgASkDCDcDCCAAIAEpAxA3AxAgACABKQMYNwMYIAAgASkDIEL//////////wCDNwMgIAAgASkDIEI4hzcDKCAAQgA3AzAgAEIANwM4IABCADcDQCAAQgA3A0gLmgEBA34gACAAKQMgIAGtIgOGIAApAxgiAkE4IAFrrSIEh4Q3AyAgACACIAOGQv//////////AIMgACkDECICIASHhDcDGCAAIAIgA4ZC//////////8AgyAAKQMIIgIgBIeENwMQIAAgAiADhkL//////////wCDIAApAwAiAiAEh4Q3AwggACACIAOGQv//////////AIM3AwALBABBAQvIBQEJfyMDIQcjA0HQAmokAyAHQbgCaiIMQQA2AgAgDEEgNgIEIAwgB0HQAWo2AgggB0GsAmoiCEEANgIAIAhB4QA2AgQgCCAHQeAAajYCCCAHQaACaiIJQQA2AgAgCUEgNgIEIAkgB0FAazYCCCAHQZQCaiIKQQA2AgAgCkEQNgIEIAogB0EwajYCCCAHQYgCaiILQQA2AgAgC0EQNgIEIAsgB0EgajYCCCAHQfwBaiINQQA2AgAgDUEINgIEIA0gB0HIAmo2AgggB0HwAWoiDkEANgIAIA5BIDYCBCAOIAc2AgggBSACIAwQxQEEQCAHJANBAA8LIAggAhCOASAIIAwQVCAIIABBICAJEI0BIAtBEDYCACAKQRA2AgAgByAJKAIIIgAsAAA6ADAgByAALAAQOgAgIAcgACwAAToAMSAHIAAsABE6ACEgByAALAACOgAyIAcgACwAEjoAIiAHIAAsAAM6ADMgByAALAATOgAjIAcgACwABDoANCAHIAAsABQ6ACQgByAALAAFOgA1IAcgACwAFToAJSAHIAAsAAY6ADYgByAALAAWOgAmIAcgACwABzoANyAHIAAsABc6ACcgByAALAAIOgA4IAcgACwAGDoAKCAHIAAsAAk6ADkgByAALAAZOgApIAcgACwACjoAOiAHIAAsABo6ACogByAALAALOgA7IAcgACwAGzoAKyAKKAIIIgIgACwADDoADCALKAIIIgUgACwAHDoADCACIAkoAggiACwADToADSAFIAAsAB06AA0gAiAALAAOOgAOIAUgACwAHjoADiACIAAsAA86AA8gBSAALAAfOgAPIAogAyAGELIBRQRAIAckA0EADwsgDSABKAIAELcBIAMoAgAhACADIAEQVCADIA0QVCADIAsgBCgCACAOELQBIAMgADYCACAEIA4QggJBAEchDyAHJAMgDwuzBQEIfyMDIQgjA0HQAmokAyAIQbgCaiINQQA2AgAgDUEgNgIEIA0gCEHQAWo2AgggCEGsAmoiCUEANgIAIAlB4QA2AgQgCSAIQeAAajYCCCAIQaACaiIKQQA2AgAgCkEgNgIEIAogCEFAazYCCCAIQZQCaiILQQA2AgAgC0EQNgIEIAsgCEEwajYCCCAIQYgCaiIMQQA2AgAgDEEQNgIEIAwgCEEgajYCCCAIQfwBaiIOQQA2AgAgDkEINgIEIA4gCEHIAmo2AgggCEHwAWoiD0EANgIAIA9BIDYCBCAPIAg2AgggAiAPIAUQmAIgDyADIA0QxQEEQCAIJAMPCyAJIAUQjgEgCSANEFQgCSAAQSAgChCNASAMQRA2AgAgC0EQNgIAIAggCigCCCIALAAAOgAwIAggACwAEDoAICAIIAAsAAE6ADEgCCAALAAROgAhIAggACwAAjoAMiAIIAAsABI6ACIgCCAALAADOgAzIAggACwAEzoAIyAIIAAsAAQ6ADQgCCAALAAUOgAkIAggACwABToANSAIIAAsABU6ACUgCCAALAAGOgA2IAggACwAFjoAJiAIIAAsAAc6ADcgCCAALAAXOgAnIAggACwACDoAOCAIIAAsABg6ACggCCAALAAJOgA5IAggACwAGToAKSAIIAAsAAo6ADogCCAALAAaOgAqIAggACwACzoAOyAIIAAsABs6ACsgCygCCCICIAAsAAw6AAwgDCgCCCIDIAAsABw6AAwgAiAKKAIIIgAsAA06AA0gAyAALAAdOgANIAIgACwADjoADiADIAAsAB46AA4gAiAALAAPOgAPIAMgACwAHzoADyALIAQgBhCzASAOIAEoAgAQtwEgBigCACEAIAYgARBUIAYgDhBUIAYgDEEQIAcQtAEgBiAANgIAIAgkAwutAQEEfyMDIQMjA0HQAmokAyADQTBqIQQgA0G4AWoiBhCHAiADQZABaiIFQfAOEBIgAARAIAQgBSAAEIsCIAFBCGohAAUgBCABQQhqIgAoAgAQeSAEIAUQKQsgBiAEEL0BIANB4ABqIgUgAyAGEL8BIAFBIDYCACAAKAIAIAQQeiACQcEANgIAIAIoAghBBDoAACACKAIIQQFqIAUQeiACKAIIQSFqIAMQeiADJAML6QMBBX8jAyEGIwNBwAFqJAMgACABIAJBH3ZBf2ogAiACQR91IgdzakECbSIEQX9qQR92IgMQGyAAQUBrIgIgAUFAayADEBsgAEGAAWoiBSABQYABaiADEBsgACABQcABaiAEQQFzQX9qQR92IgMQGyACIAFBgAJqIAMQGyAFIAFBwAJqIAMQGyAAIAFBgANqIARBAnNBf2pBH3YiAxAbIAIgAUHAA2ogAxAbIAUgAUGABGogAxAbIAAgAUHABGogBEEDc0F/akEfdiIDEBsgAiABQYAFaiADEBsgBSABQcAFaiADEBsgACABQYAGaiAEQQRzQX9qQR92IgMQGyACIAFBwAZqIAMQGyAFIAFBgAdqIAMQGyAAIAFBwAdqIARBBXNBf2pBH3YiAxAbIAIgAUGACGogAxAbIAUgAUHACGogAxAbIAAgAUGACWogBEEGc0F/akEfdiIDEBsgAiABQcAJaiADEBsgBSABQYAKaiADEBsgACABQcAKaiAEQQdzQX9qQR92IgQQGyACIAFBgAtqIAQQGyAFIAFBwAtqIAQQGyAGIAAQESAGQUBrIgEgAhARIAZBgAFqIgQgBRARIAEgARAwIAEQCiAAIAYgB0EBcSIAEBsgAiABIAAQGyAFIAQgABAbIAYkAwtlAQF/IwMhAiMDQUBrJAMgAiABEEUgAiACIAEQE0GAOygCAEF9RgRAIAAgARAwIAAQCiAAIABBAxA/IAAQCiAAIAIgABAMBSAAIAIQEQsgAkGACBBGIAAgAiAAEAwgABArIAIkAwuyBwIKfwJ+IwMhBSMDQeALaiQDIAVBwAhqIQggARAKIAIQCiAFIAIQCyAFEGkiCUEDakEEbSEKIAlBek4EQANAIAYgCGogBUEEEGciAjoAACAFIAJBGHRBGHUQfSAFEAogBUEEECwgBkEBaiECIAYgCkgEQCACIQYMAQsLCyAFQbAJaiIGEM4BIAVB8AlqIgJBgA0QCyAFQbAKaiIEIAYgAhAxIAVBoAtqIgNBwAwQCyAFQUBrIgcgA0GANCkDACINIAQQIyAHQQI2AjggB0FAayABEAsgByABKAI4Igs2AnhBAiEGIAusIQ4DQCAGQX9qIgxBBnQgB2ohAiALrCAOfkKAgIAQVQRAIANBwAwQCyACIAMQHiAMQQZ0IAdqQQE2AjgLIAQgAiABEDEgA0HADBALIAZBBnQgB2ogAyANIAQQIyAGQQZ0IAdqQQI2AjggBkEBaiICQRBHBEAgAiEGIAEoAjghC0ICIQ4MAQsLIAAgCCAKaiwAACIBQQZ0IAdqEAsgACABQQZ0IAdqKAI4IgE2AjgCQCAJQQBMDQAgAawiDiAOfkKAgIAQVgRAIANBwAwQCyAAIAMQHiAAQQE2AjgLIAQgABBHIANBwAwQCyAAIAMgDSAEECMgAEECNgI4IAQgABBHIANBwAwQCyAAIAMgDSAEECMgAEECNgI4IAQgABBHIANBwAwQCyAAIAMgDSAEECMgAEECNgI4IAQgABBHIANBwAwQCyAAIAMgDSAEECMgAEECNgI4IApBf2oiASAIaiwAACICQQZ0IAdqKAI4QYCAgAhKBEAgA0HADBALIAAgAxAeIABBATYCOAsgBCAAIAJBBnQgB2oQMSADQcAMEAsgACADIA0gBBAjIABBAjYCOCAJQQRMDQADQCAEIAAQRyADQcAMEAsgACADIA0gBBAjIABBAjYCOCAEIAAQRyADQcAMEAsgACADIA0gBBAjIABBAjYCOCAEIAAQRyADQcAMEAsgACADIA0gBBAjIABBAjYCOCAEIAAQRyADQcAMEAsgACADIA0gBBAjIABBAjYCOCABQX9qIgIgCGosAAAiBkEGdCAHaigCOEGAgIAISgRAIANBwAwQCyAAIAMQHiAAQQE2AjgLIAQgACAGQQZ0IAdqEDEgA0HADBALIAAgAyANIAQQIyAAQQI2AjggAUEBSgRAIAIhAQwBCwsgA0HADBALIAAgAxAeIABBATYCOCAFJAMPCyADQcAMEAsgACADEB4gAEEBNgI4IAUkAwvMAQEDfyMDIQQjA0HQBGokAyAEQTBqIgZBwAgQCyAEQbQEaiIFIAE2AgAgBSABNgIEIAUgADYCCCAEQagEaiIAQQA2AgAgAEEwNgIEIAAgBDYCCCAFQQBBMCAAEI0BIARB8ABqIgAgBBAfIAAgBhAeIARBqAFqIgEQgwEgASAAEG4gAgRAIAIgABAgCyADRQRAIAQkA0EADwsgA0EEOgAAIARBwARqIgBBwAE2AgAgAEHAATYCBCAAIANBAWo2AgggACABEIQBIAQkA0EAC4IBAQN/IwMhCiMDQYATaiQDIApBQGsiC0HABDYCACALQcAENgIEIAsgAjYCCCAKQfgMaiICIAsQhgEgCyABEB8gCiALIABBgAFqEHwgCkH4BmoiASACIAoQSCAKQfgAaiICIAEQbyAAIAIgBiAHIAMgBCAIIAkgBRCJASEMIAokAyAMC68DAhB/B34gAEIANwMAIABCADcDCCAAQgA3AxAgAEIANwMYIABCADcDICAAQgA3AyggAEIANwMwIABBIGohBCAAQRhqIQUgAEEQaiEGIABBCGohByAAQSBqIQwgAEEYaiENIABBEGohDiAAQQhqIQ8DQAJ/IAMEfyACQQF1IQIgDiEJIA8hCiAMIQsgDQUgARB1IQIgBiEJIAchCiAEIQsgACkDKCEXIAQpAwAhFiAFKQMAIRUgBikDACEUIAcpAwAhEyAAKQMAIRIgACkDMCEYIAULIREgACAYQgGGIBdCOYeEIhg3AzAgACAXQgGGQv7/////////A4MgFkI5h4QiFzcDKCALIBZCAYZC/v////////8DgyAVQjmHhCIWNwMAIBELIBVCAYZC/v////////8DgyAUQjmHhCIVNwMAIAkgFEIBhkL+/////////wODIBNCOYeEIhQ3AwAgCiATQgGGQv7/////////A4MgEkI5h4QiEzcDACAAIAJBAXGtIBJCAYZC/v////////8Dg4QiEjcDACADQQFqQQdxIQMgCEEBaiIIQYADRw0ACwuUGwIIfyt+IwMhAyMDQfAAaiQDIAEgASkDACILQv//////////A4MiMjcDACABIAEpAwggC0I6h3wiC0L//////////wODIjE3AwggASABKQMQIAtCOod8IgtC//////////8DgyItNwMQIAEgASkDGCALQjqHfCILQv//////////A4MiJzcDGCABIAEpAyAgC0I6h3wiC0L//////////wODIiU3AyAgASABKQMoIAtCOod8IgtC//////////8DgyIjNwMoIAEgASkDMCALQjqHfCILQv//////////A4MiIjcDMCABIAEpAzggC0I6h3wiC0L//////////wODIh03AzggAUFAayIJKQMAIAtCOod8IgtC//////////8DgyEeIAkgHjcDACABIAEpA0ggC0I6h3wiDEL//////////wODIh83A0ggASABKQNQIAxCOod8Ig5C//////////8DgyIaNwNQIAEgASkDWCAOQjqHfCIOQv//////////A4MiFTcDWCABIAEpA2AgDkI6h3wiDkL//////////wODIjM3A2AgASABKQNoIA5COod8Ii43A2ggAyACKQMAIio3AwAgAyACKQMIIhE3AwggAyACKQMQIg43AxAgAyACKQMYIg83AxggAyACKQMgIhI3AyAgAyACKQMoIhM3AyggAyACKQMwIhBC//////////8DgyIUNwMwIAMgEEI6hyIQNwM4IANBQGsiBEIANwMAIARCADcDCCAEQgA3AxAgBEIANwMYIARCADcDICAEQgA3AygCQAJAAkAgLkIAUQRAIDNCAFINAiADQeAAaiEFIBVCAFINAiADQdgAaiEGIBpCAFINAiADQdAAaiEHIAsgDIRC//////////8Dg0IAUg0CIANByABqIQggECAdUQRAIBQgIlEEQCATICNRBEAgEiAlUQRAIA8gJ1EEQCAOIC1RBEAgESAxUQRAICogMlIEQCAqIQwgMiELDAkLBSARIQwgMSELDAgLBSAOIQwgLSELDAcLBSAPIQwgJyELDAYLBSASIQwgJSELDAULBSATIQwgIyELDAQLBSAUIQwgIiELDAMLBSAQIQwgHSELDAILBUIAIQwgLiELDAELDAILIAsgDFUNACAAIDI3AwAgACABKQMINwMIIAAgASkDEDcDECAAIAEpAxg3AxggACABKQMgNwMgIAAgASkDKDcDKCAAIAEpAzA3AzAgAyQDDwsgA0HYAGohBiADQdAAaiEHIANByABqIQggA0HgAGohBQtBACECQgAhCyARIQwDQAJAIAtCAYZC/v////////8DgyAWQjmHhCEwIBZCAYZC/v////////8DgyAXQjmHhCEsIBdCAYZC/v////////8DgyAYQjmHhCErIBhCAYZC/v////////8DgyANQjmHhCEpIA1CAYZC/v////////8DgyAQQjmHhCEoIBBCAYZC/v////////8DgyAUQjmHhCEmIBRCAYZC/v////////8DgyATQjmHhCEkIBNCAYZC/v////////8DgyASQjmHhCEgIBJCAYZC/v////////8DgyAPQjmHhCEcIA9CAYZC/v////////8DgyAOQjmHhCEbIA5CAYZC/v////////8DgyAMQjmHhCEZIAxCAYZC/v////////8DgyAqQjmHhCENICpCAYZC/v////////8DgyEqIAJBAWohAgJAAkAgL0IBhiALQjmHhCIvIC5RBH4gMCAzUQR+IBUgLFEEfiAaICtRBH4gHyApUQR+IB4gKFEEfiAdICZRBH4gIiAkUQR+ICAgI1EEfiAcICVRBH4gGyAnUQR+IBkgLVEEfiANIDFRBH4gKiAyUQR+IC0hDiAnIQ8gJSESICMhEyAiIRQgHSEQIB4hESAfIRggGiEXIBUhFiAxBSAqIQsgMiEhIDEhDCAtIQ4gJyEPICUhEiAjIRMgIiEUIB0hECAeIREgHyEYIBohFyAVIRYMDgsFIDEhISANIgshDCAtIQ4gJyEPICUhEiAjIRMgIiEUIB0hECAeIREgHyEYIBohFyAVIRYMDQsFIC0hISANIQwgGSILIQ4gJyEPICUhEiAjIRMgIiEUIB0hECAeIREgHyEYIBohFyAVIRYMDAsFICchISANIQwgGSEOIBsiCyEPICUhEiAjIRMgIiEUIB0hECAeIREgHyEYIBohFyAVIRYMCwsFICUhISANIQwgGSEOIBshDyAcIgshEiAjIRMgIiEUIB0hECAeIREgHyEYIBohFyAVIRYMCgsFICMhISANIQwgGSEOIBshDyAcIRIgICILIRMgIiEUIB0hECAeIREgHyEYIBohFyAVIRYMCQsFICIhISANIQwgGSEOIBshDyAcIRIgICETICQiCyEUIB0hECAeIREgHyEYIBohFyAVIRYMCAsFIB0hISANIQwgGSEOIBshDyAcIRIgICETICQhFCAmIgshECAeIREgHyEYIBohFyAVIRYMBwsFIB4hISANIQwgGSEOIBshDyAcIRIgICETICQhFCAmIRAgKCILIREgHyEYIBohFyAVIRYMBgsFIB8hISANIQwgGSEOIBshDyAcIRIgICETICQhFCAmIRAgKCERICkiCyEYIBohFyAVIRYMBQsFIBohISANIQwgGSEOIBshDyAcIRIgICETICQhFCAmIRAgKCERICkhGCArIgshFyAVIRYMBAsFIBUhISANIQwgGSEOIBshDyAcIRIgICETICQhFCAmIRAgKCERICkhGCArIRcgLCILIRYMAwsFIDAhCyAzISEgDSEMIBkhDiAbIQ8gHCESICAhEyAkIRQgJiEQICghESApIRggKyEXICwhFgwCCwUgLyELIC4hISANIQwgGSEOIBshDyAcIRIgICETICQhFCAmIRAgKCERICkhGCArIRcgLCEWDAELIQwMAQsgISALVw0BCyAwIQsgESENDAELCyADIC83A2ggBSAwNwMAIAYgLDcDACAHICs3AwAgCCApNwMAIAQgKDcDACADICY3AzggAyAkNwMwIAMgIDcDKCADIBw3AyAgAyAbNwMYIAMgGTcDECADIA03AwggAyAqNwMAIAEpAwAhDCABKQMIIQ4gASkDECEPIDMhCwNAIAxBACAuIC9CAYciEn0gCyAvQjmGQoCAgICAgICAAoMgMEIBh4QiE30gFSAwQjmGQoCAgICAgICAAoMgLEIBh4QiFH0gGiAsQjmGQoCAgICAgICAAoMgK0IBh4QiEH0gHyArQjmGQoCAgICAgICAAoMgKUIBh4QiEX0gHiApQjmGQoCAgICAgICAAoMgKEIBh4QiGH0gHSAoQjmGQoCAgICAgICAAoMgJkIBh4QiF30gIiAmQjmGQoCAgICAgICAAoMgJEIBh4QiFn0gIyAkQjmGQoCAgICAgICAAoMgIEIBh4QiIX0gJSAgQjmGQoCAgICAgICAAoMgHEIBh4QiIH0gJyAcQjmGQoCAgICAgICAAoMgG0IBh4QiHH0gDyAbQjmGQoCAgICAgICAAoMgGUIBh4QiG30gDiAZQjmGQoCAgICAgICAAoMgDUIBh4QiGX0gDCANQjmGQoCAgICAgICAAoMgKkIBh4QiKn0iJEI6h3wiJkI6h3wiKEI6h3wiKUI6h3wiK0I6h3wiLUI6h3wiLEI6h3wiMUI6h3wiMEI6h3wiL0I6h3wiMkI6h3wiM0I6h3wiNEI6h3wiNUI/iKdBAXNrrCINIAwgJEL//////////wODhYOFIQwgDiANIA4gJkL//////////wODhYOFIQ4gDyANIA8gKEL//////////wODhYOFIQ8gJyANICcgKUL//////////wODhYOFIScgJSANICUgK0L//////////wODhYOFISUgIyANICMgLUL//////////wODhYOFISMgIiANICIgLEL//////////wODhYOFISIgHSANIB0gMUL//////////wODhYOFIR0gHiANIB4gMEL//////////wODhYOFIR4gHyANIB8gL0L//////////wODhYOFIR8gGiANIBogMkL//////////wODhYOFIRogFSANIBUgM0L//////////wODhYOFIRUgCyANIAsgNEL//////////wODhYOFIQsgLiANIC4gNYWDhSEuIAJBf2ohCiACQQFKBEAgCiECIBkhDSAbIRkgHCEbICAhHCAhISAgFiEkIBchJiAYISggESEpIBAhKyAUISwgEyEwIBIhLwwBCwsgAyAqNwMAIAMgGTcDCCADIBs3AxAgAyAcNwMYIAMgIDcDICADICE3AyggAyAWNwMwIAMgFzcDOCAEIBg3AwAgCCARNwMAIAcgEDcDACAGIBQ3AwAgBSATNwMAIAMgEjcDaCABIAw3AwAgASAONwMIIAEgDzcDECABICc3AxggASAlNwMgIAEgIzcDKCABICI3AzAgASAdNwM4IAkgHjcDACABIB83A0ggASAaNwNQIAEgFTcDWCABIAs3A2AgASAuNwNoIAAgDDcDACAAIAEpAwg3AwggACABKQMQNwMQIAAgASkDGDcDGCAAIAEpAyA3AyAgACABKQMoNwMoIAAgASkDMDcDMCADJAMLjwEBAn4gACkDMCICIAEpAzAiA1EEQCABKQMoIgMgACkDKCICUQRAIAApAyAiAiABKQMgIgNRBEAgACkDGCICIAEpAxgiA1EEQCAAKQMQIgIgASkDECIDUQRAIAApAwgiAiABKQMIIgNRBEAgACkDACICIAEpAwAiA1EEQEEADwsLCwsLCwtBAUF/IAIgA1UbC3IAIAAgASkDACACKQMAfTcDACAAIAEpAwggAikDCH03AwggACABKQMQIAIpAxB9NwMQIAAgASkDGCACKQMYfTcDGCAAIAEpAyAgAikDIH03AyAgACABKQMoIAIpAyh9NwMoIAAgASkDMCACKQMwfTcDMAuRAgEJfyMDIQgjA0GAE2okA0HgBEGBASAARSIPGyIJIAVKBEAgCCQDQX4PCyAHIAQoABwQigEiBzYCACAJIAdBtARtIgAgByAAQbQEbGtBAEdqQcAEbCIKaiAFSgRAIAgkA0F+DwsgCEFAayEAIAhB+AxqIQUgCEH4BmohCyAIQfgAaiEMIARBIGohDSAEQQxqIQ4gBCAJaiEJIA8EfyAAQcAENgIAIABBwAQ2AgQgACANNgIIIAUgABCGASAAIAIQHyAIIAAgAUGAAWoQfCALIAUgCBBIIAwgCxBvIAEgDCAJIAogAyAEIAYgByAOEIkBBSABIAIgDSADIAQgDiAJIAogBiAHEMsBCyEQIAgkAyAQC3wAIABCADcDACAAQgA3AwggAEIANwMQIABCADcDGCAAQgA3AyAgAEIANwMoIABCADcDMCAAIAEpAwA3AzggAEFAayABKQMINwMAIAAgASkDEDcDSCAAIAEpAxg3A1AgACABKQMgNwNYIAAgASkDKDcDYCAAIAEpAzA3A2gLoQIBB38jAyEHIwNB4ABqJAMgBiACSARAQbQ5QcoAQbQ1KAIAEGAgByQDQX8PCyAHQcgAaiIKQgA3AgAgCkEANgIIIAdBPGoiC0IANwIAIAtBADYCCCAHQTBqIghBwQA2AgAgCEHBADYCBCAIIAA2AgggB0EkaiIJQRA2AgAgCUEQNgIEIAkgAzYCCCAHQRhqIgNBIDYCACADQSA2AgQgAyAENgIIIAdBDGoiAEEANgIAIAAgBjYCBCAAIAU2AgggAkEIaiIFEFwiBCABIAIQUxogByACNgIAIAcgBTYCBCAHIAQ2AggCfyAKIAsgCCAHIAkgAyAAEJYCIQwgBBBLIAwLBH8gACgCAAVB/zlBPkG0NSgCABBgQX8LIQ0gByQDIA0LYQEDfyMDIQMjA0GAAmokAyADQYABaiICIAEQPCADIAFBgAFqIgQQPCADEDkgAxANIAIgAiADEDogAiACEJsBIAAgAiABEBggAiACEC0gAhANIABBgAFqIAIgBBAYIAMkAwt9AQJ/IwMhACMDQTBqJAMgAEEYaiIGQRA2AgAgBkEQNgIEIAYgATYCCCAAQQxqIgEgAzYCACABIAM2AgQgASACNgIIIAAgAzYCACAAIAM2AgQgACAENgIIAn8gBiABIAAQsgEhByAFIAAoAgA2AgAgACQDIAcLRUEfdEEfdQsL7ywpAEGACAsBBABBwAgLIwEAAAD///8Dv/+W/78AaQM7VYAdmoCAAefMIPV1pkwBp+1zAEGACQs1u8Yi2wrwOgP+u4Ze/g96AcWGxbpx8aMDOIUW5NJdPgGMaMMPrKlPAONYpQnl9WUAczodfwEAQcAJCzTh58VGKSOqAAO5IqIo0TEDA90+S8CyjAFsA9grQFdXAuD1/OSKHXQBO4wnaDyo6gAeSD+LAEGCCgsHAQAAAAECNABBwAoLNLi9IcHIVoAA9ftuAarJAAO6cBc9rke2AETRCuwA6VMDeuTGURDFLQNJAYJJpMIjAC8rqiQAQYALCzV+KwRdBX2sAflVF+WERDwDNJME9ce9GwJp12rYgmRCA9BrWWVPJ4gA6DRrH9hnnAAFtgI+AQBBwAsLNAEouAiGVJMBeKIo6w5zsgIjyRINFpWmAQq1nU73MqoCm/2tGjUu2gJxczJjhFufAHdSXc4AQYAMCzS+eV/wXwepAmpoBzvXScMB87Oa6XK1KgHSmbyOnRb6ASg+y5mLwisArDSrDDPNqQMCSmxgAEHADAs1q6r//////gHu//9UrP//AupBYg9rDyoBw5z9ShTOEwJLd2TXrEtDAu3pxpKm+V8Cox4RoAEAQYANCzWu977VoTkGAuiT3WJkTCQB0ixuTrUJLQLb5XAxtsQRAZljNvvobYoDvJwf7c8WTwAraqaeAQBBwA0LNbhfI5LtdQcBY0/g+VhPqQNnT5yrS3g9AJHsPX318vQDA9YPHw0sIACtb4zwmcGuAPA7TZABAEGADgs080rcbRKK9wCLsB9bU7BWA4LyxWMfl+wAMrC/zR7bHgJHoVS4nx8jAkB6OqIMOLEBs+LDDwBBwA4LAQcAQfAOCyRBQTbQjF7SAL87oEiv5twArrr+/////wD/////////AP////8AQaAPCySYF/gWW4HyAFnZKM4t2/wAmwIHC4fOlQBioFWsu9z5AH5mvnkAQdAPCyS41BD7j9BHAJwZVIWmSLQAF/2oCBEO/AD7pF1lxKMmAHfaOkgAQYAQCyQv/P///v//AP////////8A/////////wD/////////AP////8AQbYQCwuhAJAOAKIHAAAAAQBB4BAL2B+YL4pCkUQ3cc/7wLWl27XpW8JWOfER8Vmkgj+S1V4cq5iqB9gBW4MSvoUxJMN9DFV0Xb5y/rHegKcG3Jt08ZvBwWmb5IZHvu/GncEPzKEMJG8s6S2qhHRK3KmwXNqI+XZSUT6YbcYxqMgnA7DHf1m/8wvgxkeRp9VRY8oGZykpFIUKtyc4IRsu/G0sTRMNOFNUcwpluwpqdi7JwoGFLHKSoei/oktmGqhwi0vCo1FsxxnoktEkBpnWhTUO9HCgahAWwaQZCGw3Hkx3SCe1vLA0swwcOUqq2E5Pypxb828uaO6Cj3RvY6V4FHjIhAgCx4z6/76Q62xQpPej+b7yeHHGIq4o15gvikLNZe8jkUQ3cS87TezP+8C1vNuJgaXbtek4tUjzW8JWORnQBbbxEfFZm08Zr6SCP5IYgW3a1V4cq0ICA6OYqgfYvm9wRQFbgxKMsuROvoUxJOK0/9XDfQxVb4l78nRdvnKxlhY7/rHegDUSxyWnBtyblCZpz3Txm8HSSvGewWmb5OMlTziGR77vtdWMi8adwQ9lnKx3zKEMJHUCK1lvLOktg+SmbqqEdErU+0G93KmwXLVTEYPaiPl2q99m7lJRPpgQMrQtbcYxqD8h+5jIJwOw5A7vvsd/Wb/Cj6g98wvgxiWnCpNHkafVb4ID4FFjygZwbg4KZykpFPwv0kaFCrcnJskmXDghGy7tKsRa/G0sTd+zlZ0TDThT3mOvi1RzCmWosnc8uwpqduau7UcuycKBOzWCFIUscpJkA/FMoei/ogEwQrxLZhqokZf40HCLS8IwvlQGo1FsxxhS79YZ6JLREKllVSQGmdYqIHFXhTUO9LjRuzJwoGoQyNDSuBbBpBlTq0FRCGw3Hpnrjt9Md0gnqEib4bW8sDRjWsnFswwcOcuKQeNKqthOc+Njd0/KnFujuLLW828uaPyy713ugo90YC8XQ29jpXhyq/ChFHjIhOw5ZBoIAseMKB5jI/r/vpDpvYLe62xQpBV5xrL3o/m+K1Ny4/J4ccacYSbqzj4nygfCwCHHuIbRHuvgzdZ92up40W7uf0999bpvF3KqZ/AGppjIosV9YwquDfm+BJg/ERtHHBM1C3EbhH0EI/V32yiTJMdAe6vKMry+yRUKvp48TA0QnMRnHUO2Qj7LvtTFTCp+ZfycKX9Z7PrWOqtvy18XWEdKjBlEbGN8d3vya2/FMAFnK/7Xq3bKgsl9+llH8K3Uoq+cpHLAt/2TJjY/98w0peXxcdgxFQTHI8MYlgWaBxKA4usnsnUJgywaG25aoFI71rMp4y+EU9EA7SD8sVtqy745SkxYz9DvqvtDTTOFRfkCf1A8n6hRo0CPkp049by22iEQ//PSzQwT7F+XRBfEp349ZF0Zc2CBT9wiKpCIRu64FN5eC9vgMjoKSQYkXMLTrGKRleR558g3bY3VTqlsVvTqZXquCLp4JS4cprTG6N10H0u9i4pwPrVmSAP2DmE1V7mGwR2e4fiYEWnZjpSbHofpzlUo34yhiQ2/5kJoQZktD7BUuxYBAAAAAgAAAAQAAAAIAAAAEAAAACAAAABAAAAAgAAAABsAAAA2AAAAbAAAANgAAACrAAAATQAAAJoAAAAvAAAAAP8ZATICGsZLxxtoM+7fA2QE4A40jYHvTHEIyPhpHMF9wh21+bknak3kpnKayQl4ZS+KBSEP4SQS8IJFNZPajpaP27020M6UE1zS8UBGgzhm3f0wvwaLYrMl4pgiiJEQfm5Iw6O2HkI6ayhU+oU9uit5ChWbn17KTtSs5fNzp1evWKhQ9OrWdE+u6dXn5q3oLNd1eusWC/VZy1+wnKlRoH8M9m8XxEns2EMfLaR2e7fMuz5a+2CxhjtSoWyqVSmdl7KHkGG+3Py8lc/NNz9b0VM5hDxBom1HFCqeXVby06tEEZLZIyAuibR8uCZ3meOlZ0rt3sUx/hgNY4yAwPdwBwEDBQ8RM1X/Gi5ylqH4EzVf4ThI2HOVpPcCBgoeImaq5TRc5DdZ6yZqvtlwkKvmMVP1BAwUPETMT9FouNNuss1M1Gep4DtN12Km8QgYKHiIg5650Gu93H+BmLPOSdt2mrXEV/kQMFDwCx0nabvWYaP+GSt9h5Kt7C9xk67pIGCg+xY6TtJtt8Jd5zJW+hU/QcNe4j1HyUDAW+0sdJy/2nWfutVkrO8qfoKdvN96jomAm7bBWOgjZa/qJW+xyEPFVPwfIWOl9AcJGy13mbDLRspFz0reeYuGkajjPkLGUfMOEjZa7il7jYyPioWUp/INFzlL3XyEl6L9HCRstMdS9gHGY2Ol+Hx8hO53d5n2e3uN//LyDdZra73eb2+xkcXFVGAwMFACAQEDzmdnqVYrK33n/v4ZtdfXYk2rq+bsdnaaj8rKRR+Cgp2JyclA+n19h+/6+hWyWVnrjkdHyfvw8AtBra3ss9TUZ1+iov1Fr6/qI5ycv1OkpPfkcnKWm8DAW3W3t8Lh/f0cPZOTrkwmJmpsNjZafj8/QfX39wKDzMxPaDQ0XFGlpfTR5eU0+fHxCOJxcZOr2NhzYjExUyoVFT8IBAQMlcfHUkYjI2Wdw8NeMBgYKDeWlqEKBQUPL5qatQ4HBwkkEhI2G4CAm9/i4j3N6+smTicnaX+yss3qdXWfEgkJGx2Dg55YLCx0NBoaLjYbGy3cbm6ytFpa7lugoPukUlL2djs7TbfW1mF9s7POUikpe93j4z5eLy9xE4SEl6ZTU/W50dFoAAAAAMHt7SxAICBg4/z8H3mxsci2W1vt1Gpqvo3Ly0Znvr7Zcjk5S5RKSt6YTEzUsFhY6IXPz0q70NBrxe/vKk+qquXt+/sWhkNDxZpNTddmMzNVEYWFlIpFRc/p+fkQBAICBv5/f4GgUFDweDw8RCWfn7pLqKjjolFR812jo/6AQEDABY+Pij+Skq0hnZ28cDg4SPH19QRjvLzfd7a2wa/a2nVCISFjIBAQMOX//xr98/MOv9LSbYHNzUwYDAwUJhMTNcPs7C++X1/hNZeXoohERMwuFxc5k8TEV1Wnp/L8fn6Cej09R8hkZKy6XV3nMhkZK+Zzc5XAYGCgGYGBmJ5PT9Gj3Nx/RCIiZlQqKn47kJCrC4iIg4xGRsrH7u4pa7i40ygUFDyn3t55vF5e4hYLCx2t29t22+DgO2QyMlZ0OjpOFAoKHpJJSdsMBgYKSCQkbLhcXOSfwsJdvdPTbkOsrO/EYmKmOZGRqDGVlaTT5OQ38nl5i9Xn5zKLyMhDbjc3WdptbbcBjY2MsdXVZJxOTtJJqang2GxstKxWVvrz9PQHz+rqJcplZa/0enqOR66u6RAICBhvurrV8Hh4iEolJW9cLi5yOBwcJFempvFztLTHl8bGUcvo6COh3d186HR0nD4fHyGWS0vdYb293A2Li4YPioqF4HBwkHw+PkJxtbXEzGZmqpBISNgGAwMF9/b2ARwODhLCYWGjajU1X65XV/lpubnQF4aGkZnBwVg6HR0nJ56eudnh4Tjr+PgTK5iYsyIRETPSaWm7qdnZcAeOjokzlJSnLZubtjweHiIVh4eSyenpIIfOzkmqVVX/UCgoeKXf33oDjIyPWaGh+AmJiYAaDQ0XZb+/2tfm5jGEQkLG0GhouIJBQcMpmZmwWi0tdx4PDxF7sLDLqFRU/G27u9YsFhY6UfSnUH5BZVMaF6TDOideljura8sfnUXxrPpYq0vjA5MgMPpVrXZt9ojMdpH1AkwlT+XX/MUqy9cmNUSAtWKjj96xWkkluhtnReoOmF3+wOHDL3UCgUzwEo1Gl6Nr0/nGA49f5xWSnJW/bXrrlVJZ2tS+gy1YdCHTSeBpKY7JyER1wolq9I55eJlYPmsnuXHdvuFPtvCIrRfJIKxmfc46tGPfShjlGjGCl1EzYGJTf0WxZHfgu2uuhP6BoBz5CCuUcEhoWI9F/RmU3myHUnv4t6tz0yNySwLi4x+PV2ZVqyqy6ygHL7XCA4bFe5rTNwilMCiH8iO/pbICA2q67RaCXIrPHCunebSS8wfy8E5p4qFl2vTNBgW+1dE0Yh/Epv6KNC5TnaLzVaAFiuEypPbrdQuD7DlAYO+qXnGfBr1uEFE+IYr5lt0GPd0+Ba5N5r1GkVSNtXHEXQUEBtRvYFAV/xmY+yTWvemXiUBDzGfZnnew6EK9B4mLiOcZWzh5yO7boXwKR3xCD+n4hB7JAAAAAAmAhoMyK+1IHhFwrGxack79Dv/7D4U4Vj2u1R42LTknCg/ZZGhcpiGbW1TRJDYuOgwKZ7GTV+cPtO6W0hubkZ6AwMVPYdwgolp3S2kcEhoW4pO6CsCgKuU8IuBDEhsXHQ4JDQvyi8etLbaouRQeqchX8RmFr3UHTO6Z3bujf2D99wEmn1xy9bxEZjvFW/t+NItDKXbLI8bctu38aLjk8WPXMdzKQmOFEBOXIkCExhEghUokfdK7Pfiu+TIRxymhbR2eL0vcsjDzDYZS7HfB49ArsxZsqXC5mRGUSPpH6WQiqPyMxKDwPxpWfSzYIjOQ74dJTsfZONHBjMqi/pjUCzam9YHPpXreKNq3jiY/rb+kLDqd5FB4kg1qX8ybVH5GYvaNE8KQ2LjoLjn3XoLDr/WfXYC+adCTfG/VLanPJRKzyKyZOxAYfafonGNu2zu7e80meAluWRj07Jq3AYNPmqjmlW5lqv/mfiG8zwjvFejmuueb2UpvNs7qnwnUKbB81jGksq8qPyMxxqWUMDWiZsB0Trw3/ILKpuCQ0LAzp9gV8QSYSkHs2vd/zVAOF5H2L3ZN1o1D77BNzKpNVOSWBN+e0bXjTGqIG8EsH7hGZVF/nV7qBAGMNV36h3Rz+wtBLrNnHVqS29JS6RBWM23WRxOa12GMN6EMeln4FI7rEzyJzqkn7rdhyTXhHOXtekexPJzS31lV8nM/GBTOeXPHN79T983qX/2qW989bxR4RNuGyq/zgbloxD44JDQswqNAXxYdw3K84iUMKDxJi/8NlUE5qAFxCAyz3ti05JxkVsGQe8uEYdUytnBIbFx00LhXQlIJatUwNqU4v0CjnoHz1/t84zmCmy//hzSOQ0TE3unLVHuUMqbCIz3uTJULQvrDTgguoWYo2SSydluiSW2L0SVy+PZkhmiYFtSkXMxdZbaSbHBIUP3tudpeFUZXp42dhJDYqwCMvNMK9+RYBbizRQbQLB6Pyj8PAsGvvQMBE4prOpERQU9n3OqX8s/O8LTmc5asdCLnrTWF4vk36Bx1325H8RpxHSnFiW+3Yg6qGL4b/FY+S8bSeSCa28D+eM1a9B/dqDOIB8cxsRIQWSeA7F9gUX+pGbVKDS3lep+TyZzvoOA7Ta4q9bDI67s8g1OZYRcrBH66d9Ym4WkUY1UhDH0RAAoAERERAAAAAAUAAAAAAAAJAAAAAAsAQcAwCyERAA8KERERAwoHAAETCQsLAAAJBgsAAAsABhEAAAAREREAQfEwCwELAEH6MAsYEQAKChEREQAKAAACAAkLAAAACQALAAALAEGrMQsBDABBtzELFQwAAAAADAAAAAAJDAAAAAAADAAADABB5TELAQ4AQfExCxUNAAAABA0AAAAACQ4AAAAAAA4AAA4AQZ8yCwEQAEGrMgseDwAAAAAPAAAAAAkQAAAAAAAQAAAQAAASAAAAEhISAEHiMgsOEgAAABISEgAAAAAAAAkAQZMzCwELAEGfMwsVCgAAAAAKAAAAAAkLAAAAAAALAAALAEHNMwsBDABB2TMLOAwAAAAADAAAAAAJDAAAAAAADAAADAAAMDEyMzQ1Njc4OUFCQ0RFRv3//P/8//MBMTUl0h0JOAAFAEGcNAsBAQBBtDQLCgEAAAABAAAAwR8AQcw0CwECAEHbNAsF//////8AQag1Cw64HwAABAAAAAcAAAAQGgBB9DYLApwfAEGsNwvHAyV1IGJ5dGVzIG91dCByZXF1aXJlZCwgbm90ICV1CgBwcm92aWRlZCBwcmltYXJ5IHB1YmxpYyBrZXkgYnl0ZXMgYXJlIGludmFsaWQKAGludmFsaWQgZm9ybWF0IGZvciBwcm92aWRlZCBwdWJsaWMga2V5CgBpbnZhbGlkIGVuY3J5cHRlZCBvdXRwdXQgYnVmZmVyIHNpemUgLSBwbGVhc2UgY2FsbCBDYWxjRW5jRUNJRVNCeXRlQ291bnQgZm9yIHNpemUuIGV4cGVjdGVkICV1LCBnb3QgJXUKAGVuY3J5cHRpb24gZmFpbGVkIHdpdGggdW5zcGVjaWZpZWQgZXJyb3IKAGlucHV0IGNsZWFyIGJ5dGUgYnVmZmVyIG11c3QgYmUgYXQgbGVhc3QgdGhlIHNhbWUgc2l6ZSBhcyBlbmNyeXB0ZWQgYnl0ZXMKAGRlY3J5cHRpb24gZmFpbGVkIHdpdGggdW5zcGVjaWZpZWQgZXJyb3IgLSBsaWtlbHkgdGFnIGZhaWx1cmUKAC0rICAgMFgweAAobnVsbCkALTBYKzBYIDBYLTB4KzB4IDB4AGluZgBJTkYAbmFuAE5BTgAu"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(0),i=n(1),a=function(){function t(e,n,a){o(this,t);var s=new r.a(e);this.wasm=e,this.utils=s,this.context=e._NewCryptoContext(null,0),this.scratchBuf=new i.a(e),this.sk=n,this.skBuf=s.arrayToBuf(n),this.symKey=a,this.symKeyBuf=s.arrayToBuf(a)}return c(t,[{key:"clearBuf",value:function(){this.scratchBuf.clear()}},{key:"free",value:function(){if(this.context){var t=this.wasm;t._FreeCryptoContext(this.context),this.scratchBuf.free(),t._free(this.skBuf.ptr),t._free(this.symKeyBuf.ptr),this.context=null,this.scratchBuf=null,this.sk=null,this.skBuf=null,this.symKey=null,this.symKeyBuf=null,this.utils=null,this.wasm=null}}}]),t}()},function(t,e,n){"use strict";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=n(15),e.createHash=e.Hash=n(16),e.createHmac=e.Hmac=n(17);var r=n(18),i=Object.keys(r),a=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);e.getHashes=function(){return a};var s=n(19);e.pbkdf2=s.pbkdf2,e.pbkdf2Sync=s.pbkdf2Sync;var o=n(20);e.Cipher=o.Cipher,e.createCipher=o.createCipher,e.Cipheriv=o.Cipheriv,e.createCipheriv=o.createCipheriv,e.Decipher=o.Decipher,e.createDecipher=o.createDecipher,e.Decipheriv=o.Decipheriv,e.createDecipheriv=o.createDecipheriv,e.getCiphers=o.getCiphers,e.listCiphers=o.listCiphers;var u=n(21);e.DiffieHellmanGroup=u.DiffieHellmanGroup,e.createDiffieHellmanGroup=u.createDiffieHellmanGroup,e.getDiffieHellman=u.getDiffieHellman,e.createDiffieHellman=u.createDiffieHellman,e.DiffieHellman=u.DiffieHellman;var c=n(22);e.createSign=c.createSign,e.Sign=c.Sign,e.createVerify=c.createVerify,e.Verify=c.Verify,e.createECDH=n(23);var A=n(24);e.publicEncrypt=A.publicEncrypt,e.privateEncrypt=A.privateEncrypt,e.publicDecrypt=A.publicDecrypt,e.privateDecrypt=A.privateDecrypt;var d=n(25);e.randomFill=d.randomFill,e.randomFillSync=d.randomFillSync,e.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(0),i=n(1),a=function(){function t(e,n,a,s,u){o(this,t);var c=new r.a(e),A=r.a.randomBytes(e._EMS_SEED_SIZE_()),d=c.arrayToSmartBuf(A);this.wasm=e,this.utils=c,this.context=e._NewCryptoContext(d.ptr,d.len),this.iv=u,this.pk=n,this.pkBuf=c.arrayToBuf(n),this.scratchBuf=new i.a(e),this.sk=a,this.skBuf=c.arrayToBuf(a),this.symKey=s,this.symKeyBuf=c.arrayToBuf(s)}return c(t,[{key:"clearBuf",value:function(){this.scratchBuf.clear()}},{key:"free",value:function(){if(this.context){var t=this.wasm;t._FreeCryptoContext(this.context),t._free(this.pkBuf.ptr),this.scratchBuf.free(),t._free(this.symKeyBuf.ptr),this.context=null,this.iv=null,this.pk=null,this.pkBuf=null,this.scratchBuf=null,this.sk=null,this.skBuf=null,this.symKey=null,this.symKeyBuf=null,this.wasm=null,this.utils=null}}},{key:"generateNextBlockIV",value:function(){for(var t=r.a.randomBytes(this.iv.length),e=0;e<this.iv.length;e++)t[e]^=this.iv[e];return t}}]),t}()},function(t,e,n){"use strict";(function(t,r){var i,a=(i="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e){var a,s=void 0!==(e=e||{})?e:{},o={};for(a in s)s.hasOwnProperty(a)&&(o[a]=s[a]);s.arguments=[],s.thisProgram="./this.program",s.quit=function(t,e){throw e},s.preRun=[],s.postRun=[];var u=!1,c=!1,d=!1,p=!1;u="object"==("undefined"==typeof window?"undefined":A(window)),c="function"==typeof importScripts,d="object"==A(t)&&!u&&!c,p=!u&&!d&&!c;var f,l,h="";function y(t){return s.locateFile?s.locateFile(t,h):h+t}d?(h=r+"/",s.read=function(t,e){var r;return f||(f=n(26)),l||(l=n(27)),t=l.normalize(t),r=f.readFileSync(t),e?r:r.toString()},s.readBinary=function(t){var e=s.read(t,!0);return e.buffer||(e=new Uint8Array(e)),E(e.buffer),e},t.argv.length>1&&(s.thisProgram=t.argv[1].replace(/\\/g,"/")),s.arguments=t.argv.slice(2),t.on("uncaughtException",(function(t){if(!(t instanceof Bt))throw t})),t.on("unhandledRejection",Mt),s.quit=function(e){t.exit(e)},s.inspect=function(){return"[Emscripten Module object]"}):p?("undefined"!=typeof read&&(s.read=function(t){return read(t)}),s.readBinary=function(t){var e;return"function"==typeof readbuffer?new Uint8Array(readbuffer(t)):(E("object"==A(e=read(t,"binary"))),e)},"undefined"!=typeof scriptArgs?s.arguments=scriptArgs:void 0!==arguments&&(s.arguments=arguments),"function"==typeof quit&&(s.quit=function(t){quit(t)})):(u||c)&&(c?h=self.location.href:document.currentScript&&(h=document.currentScript.src),i&&(h=i),h=0!==h.indexOf("blob:")?h.substr(0,h.lastIndexOf("/")+1):"",s.read=function(t){var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},c&&(s.readBinary=function(t){var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),s.readAsync=function(t,e,n){var r=new XMLHttpRequest;r.open("GET",t,!0),r.responseType="arraybuffer",r.onload=function(){200==r.status||0==r.status&&r.response?e(r.response):n()},r.onerror=n,r.send(null)},s.setWindowTitle=function(t){document.title=t});var g=s.print||("undefined"!=typeof console?console.log.bind(console):"undefined"!=typeof print?print:null),m=s.printErr||("undefined"!=typeof printErr?printErr:"undefined"!=typeof console&&console.warn.bind(console)||g);for(a in o)o.hasOwnProperty(a)&&(s[a]=o[a]);o=void 0;var b,I={"f64-rem":function(t,e){return t%e},debugger:function(){}};function C(t,e,n){switch("*"===(e=e||"i8").charAt(e.length-1)&&(e="i32"),e){case"i1":case"i8":return _[t>>0];case"i16":return S[t>>1];case"i32":case"i64":return D[t>>2];case"float":return R[t>>2];case"double":return T[t>>3];default:Mt("invalid type for getValue: "+e)}return null}new Array(0),"object"!=("undefined"==typeof WebAssembly?"undefined":A(WebAssembly))&&m("no native wasm support detected");var v=!1;function E(t,e){t||Mt("Assertion failed: "+e)}var w="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function B(t,e,n){for(var r=e+n,i=e;t[i]&&!(i>=r);)++i;if(i-e>16&&t.subarray&&w)return w.decode(t.subarray(e,i));for(var a="";e<i;){var s=t[e++];if(128&s){var o=63&t[e++];if(192!=(224&s)){var u=63&t[e++];if((s=224==(240&s)?(15&s)<<12|o<<6|u:(7&s)<<18|o<<12|u<<6|63&t[e++])<65536)a+=String.fromCharCode(s);else{var c=s-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&s)<<6|o)}else a+=String.fromCharCode(s)}return a}function Q(t,e){return t?B(x,t,e):""}function M(t,e){_.set(t,e)}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var k,_,x,S,D,R,T,N=65536;function O(t,e){return t%e>0&&(t+=e-t%e),t}function H(){s.HEAP8=_=new Int8Array(k),s.HEAP16=S=new Int16Array(k),s.HEAP32=D=new Int32Array(k),s.HEAPU8=x=new Uint8Array(k),s.HEAPU16=new Uint16Array(k),s.HEAPU32=new Uint32Array(k),s.HEAPF32=R=new Float32Array(k),s.HEAPF64=T=new Float64Array(k)}var L=5252256,U=9344,F=5242880,j=s.TOTAL_MEMORY||16777216;function P(t){for(;t.length>0;){var e=t.shift();if("function"!=typeof e){var n=e.func;"number"==typeof n?void 0===e.arg?s.dynCall_v(n):s.dynCall_vi(n,e.arg):n(void 0===e.arg?null:e.arg)}else e()}}j<F&&m("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+j+"! (TOTAL_STACK="+F+")"),s.buffer?k=s.buffer:"object"==("undefined"==typeof WebAssembly?"undefined":A(WebAssembly))&&"function"==typeof WebAssembly.Memory?(b=new WebAssembly.Memory({initial:j/N}),k=b.buffer):k=new ArrayBuffer(j),H(),D[U>>2]=L;var G=[],q=[],Y=[],K=[],z=!1;function J(){if(s.preRun)for("function"==typeof s.preRun&&(s.preRun=[s.preRun]);s.preRun.length;)X(s.preRun.shift());P(G)}function V(){z||(z=!0,P(q))}function W(){P(Y)}function Z(){if(s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;)$(s.postRun.shift());P(K)}function X(t){G.unshift(t)}function $(t){K.unshift(t)}var tt=0,et=null,nt=null;function rt(t){tt++,s.monitorRunDependencies&&s.monitorRunDependencies(tt)}function it(t){if(tt--,s.monitorRunDependencies&&s.monitorRunDependencies(tt),0==tt&&(null!==et&&(clearInterval(et),et=null),nt)){var e=nt;nt=null,e()}}s.preloadedImages={},s.preloadedAudios={};var at="data:application/octet-stream;base64,";function st(t){return String.prototype.startsWith?t.startsWith(at):0===t.indexOf(at)}var ot="elv-crypto.wasm";function ut(){try{if(s.wasmBinary)return new Uint8Array(s.wasmBinary);if(s.readBinary)return s.readBinary(ot);throw"both async and sync fetching of the wasm failed"}catch(t){Mt(t)}}function ct(){return s.wasmBinary||!u&&!c||"function"!=typeof fetch?new Promise((function(t,e){t(ut())})):fetch(ot,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+ot+"'";return t.arrayBuffer()})).catch((function(){return ut()}))}function At(t){var e={env:t,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:I};function n(t,e){var n=t.exports;s.asm=n,it()}if(rt(),s.instantiateWasm)try{return s.instantiateWasm(e,n)}catch(t){return m("Module.instantiateWasm callback failed with error: "+t),!1}function r(t){n(t.instance)}function i(t){ct().then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(t){m("failed to asynchronously prepare wasm: "+t),Mt(t)}))}return s.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||st(ot)||"function"!=typeof fetch?i(r):WebAssembly.instantiateStreaming(fetch(ot,{credentials:"same-origin"}),e).then(r,(function(t){m("wasm streaming compile failed: "+t),m("falling back to ArrayBuffer instantiation"),i(r)})),{}}st(ot)||(ot=y(ot)),s.asm=function(t,e,n){return e.memory=b,e.table=new WebAssembly.Table({initial:10,maximum:10,element:"anyfunc"}),e.__memory_base=1024,e.__table_base=0,At(e)};var dt={buffers:[null,[],[]],printChar:function(t,e){var n=dt.buffers[t];0===e||10===e?((1===t?g:m)(B(n,0)),n.length=0):n.push(e)},varargs:0,get:function(t){return dt.varargs+=4,D[dt.varargs-4>>2]},getStr:function(){return Q(dt.get())},get64:function(){var t=dt.get();return dt.get(),t},getZero:function(){dt.get()}};function pt(t,e){dt.varargs=e;try{return dt.getStreamFromFD(),dt.get(),dt.get(),dt.get(),dt.get(),0}catch(t){return"undefined"!=typeof FS&&t instanceof FS.ErrnoError||Mt(t),-t.errno}}function ft(t,e){dt.varargs=e;try{for(var n=dt.get(),r=dt.get(),i=dt.get(),a=0,s=0;s<i;s++){for(var o=D[r+8*s>>2],u=D[r+(8*s+4)>>2],c=0;c<u;c++)dt.printChar(n,x[o+c]);a+=u}return a}catch(t){return"undefined"!=typeof FS&&t instanceof FS.ErrnoError||Mt(t),-t.errno}}function lt(t,e){dt.varargs=e;try{return dt.getStreamFromFD(),0}catch(t){return"undefined"!=typeof FS&&t instanceof FS.ErrnoError||Mt(t),-t.errno}}function ht(){return _.length}function yt(t){Mt("OOM")}function gt(t){t=O(t,65536);var e=k.byteLength;try{return-1!==b.grow((t-e)/65536)&&(k=b.buffer,!0)}catch(t){return!1}}function mt(t){var e=ht();if(t>2147418112)return!1;for(var n=Math.max(e,16777216);n<t;)n=n<=536870912?O(2*n,65536):Math.min(O((3*n+2147483648)/4,65536),2147418112);return!!gt(n)&&(H(),!0)}function bt(t,e,n){x.set(x.subarray(e,e+n),t)}function It(t){return s.___errno_location&&(D[s.___errno_location()>>2]=t),t}function Ct(t){var e=Date.now()/1e3|0;return t&&(D[t>>2]=e),e}var vt={},Et={c:Mt,e:It,k:pt,d:ft,j:lt,i:ht,h:bt,g:mt,b:Ct,f:yt,a:U},wt=s.asm(vt,Et,k);function Bt(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function Qt(t){function e(){s.calledRun||(s.calledRun=!0,v||(V(),W(),s.onRuntimeInitialized&&s.onRuntimeInitialized(),Z()))}t=t||s.arguments,tt>0||(J(),tt>0||s.calledRun||(s.setStatus?(s.setStatus("Running..."),setTimeout((function(){setTimeout((function(){s.setStatus("")}),1),e()}),1)):e()))}function Mt(t){throw s.onAbort&&s.onAbort(t),void 0!==t?(g(t),m(t),t=JSON.stringify(t)):t="",v=!0,"abort("+t+"). Build with -s ASSERTIONS=1 for more info."}if(s.asm=wt,s._CalcEncByteCount=function(){return s.asm.l.apply(null,arguments)},s._CalcEncByteCountFromTargetH=function(){return s.asm.m.apply(null,arguments)},s._CalcEncByteCountH=function(){return s.asm.n.apply(null,arguments)},s._CalcEncECIESByteCount=function(){return s.asm.o.apply(null,arguments)},s._CalcTargetByteCountH=function(){return s.asm.p.apply(null,arguments)},s._DecryptAES=function(){return s.asm.q.apply(null,arguments)},s._DecryptECIES=function(){return s.asm.r.apply(null,arguments)},s._DecryptH=function(){return s.asm.s.apply(null,arguments)},s._DecryptPrimary=function(){return s.asm.t.apply(null,arguments)},s._DecryptTarget=function(){return s.asm.u.apply(null,arguments)},s._DeriveTargetKeys=function(){return s.asm.v.apply(null,arguments)},s._EMS_AES_KEY_SIZE_=function(){return s.asm.w.apply(null,arguments)},s._EMS_CRYPTO_TYPE_PRIMARY_=function(){return s.asm.x.apply(null,arguments)},s._EMS_CRYPTO_TYPE_TARGET_=function(){return s.asm.y.apply(null,arguments)},s._EMS_ECIES_PK_KEY_SIZE_=function(){return s.asm.z.apply(null,arguments)},s._EMS_ECIES_SK_KEY_SIZE_=function(){return s.asm.A.apply(null,arguments)},s._EMS_IV_SIZE_=function(){return s.asm.B.apply(null,arguments)},s._EMS_PRIMARY_BLOCK_KEY_SIZE_=function(){return s.asm.C.apply(null,arguments)},s._EMS_PRIMARY_PK_KEY_SIZE_=function(){return s.asm.D.apply(null,arguments)},s._EMS_RE_ENCRYPTION_KEY_SIZE_=function(){return s.asm.E.apply(null,arguments)},s._EMS_SECRET_KEY_SIZE_=function(){return s.asm.F.apply(null,arguments)},s._EMS_SEED_SIZE_=function(){return s.asm.G.apply(null,arguments)},s._EMS_TAG_SIZE_=function(){return s.asm.H.apply(null,arguments)},s._EMS_TARGET_BLOCK_KEY_SIZE_=function(){return s.asm.I.apply(null,arguments)},s._EMS_TARGET_PK_KEY_SIZE_=function(){return s.asm.J.apply(null,arguments)},s._EncryptAES=function(){return s.asm.K.apply(null,arguments)},s._EncryptECIES=function(){return s.asm.L.apply(null,arguments)},s._EncryptPrimary=function(){return s.asm.M.apply(null,arguments)},s._EncryptPrimaryH=function(){return s.asm.N.apply(null,arguments)},s._FreeCryptoContext=function(){return s.asm.O.apply(null,arguments)},s._GeneratePrimaryKeys=function(){return s.asm.P.apply(null,arguments)},s._GenerateReEncryptionKey=function(){return s.asm.Q.apply(null,arguments)},s._GenerateSymmetricKeys=function(){return s.asm.R.apply(null,arguments)},s._GenerateTargetKeys=function(){return s.asm.S.apply(null,arguments)},s._NewCryptoContext=function(){return s.asm.T.apply(null,arguments)},s._ReEncryptBlockKey=function(){return s.asm.U.apply(null,arguments)},s._ReEncryptH=function(){return s.asm.V.apply(null,arguments)},s.___errno_location=function(){return s.asm.W.apply(null,arguments)},s._free=function(){return s.asm.X.apply(null,arguments)},s._malloc=function(){return s.asm.Y.apply(null,arguments)},s.asm=wt,s.getValue=C,s.writeArrayToMemory=M,s.then=function(t){if(s.calledRun)t(s);else{var e=s.onRuntimeInitialized;s.onRuntimeInitialized=function(){e&&e(),t(s)}}return s},Bt.prototype=new Error,Bt.prototype.constructor=Bt,nt=function t(){s.calledRun||Qt(),s.calledRun||(nt=t)},s.run=Qt,s.abort=Mt,s.preInit)for("function"==typeof s.preInit&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();return s.noExitRuntime=!0,Qt(),e});e.a=a}).call(this,n(4),"/")},function(t,e,n){"use strict";n.r(e),function(t){n.d(e,"default",(function(){return f}));var r=n(5),i=n(6),a=n(8),s=n(0),u=n(9),A=n(2),d=n.n(A),p=n(1),f=function(){function e(){o(this,e),this.initResolve=null,this.utils=null,this.wasm=null}return c(e,[{key:"init",value:function(){var e=this,n=r.a["ElvCrypto.wasm"];return Object(u.a)({locateFile:function(t){return t.endsWith(".wasm")?"data:application/octet-stream;base64,"+n:t},readBinary:function(e){return t.from(n,"base64")}}).then((function(t){e.wasm=t,e.utils=new s.a(t),e.AES_KEY_SIZE=t._EMS_AES_KEY_SIZE_(),e.CRYPTO_TYPE_TARGET=t._EMS_CRYPTO_TYPE_TARGET_(),e.CRYPTO_TYPE_PRIMARY=t._EMS_CRYPTO_TYPE_PRIMARY_(),e.TARGET_BLOCK_KEY_SIZE=t._EMS_TARGET_BLOCK_KEY_SIZE_(),e.TARGET_PK_KEY_SIZE=t._EMS_TARGET_PK_KEY_SIZE_(),e.ECIES_PK_KEY_SIZE=t._EMS_ECIES_PK_KEY_SIZE_(),e.ECIES_SK_KEY_SIZE=t._EMS_ECIES_SK_KEY_SIZE_(),e.IV_SIZE=t._EMS_IV_SIZE_(),e.PRIMARY_BLOCK_KEY_SIZE=t._EMS_PRIMARY_BLOCK_KEY_SIZE_(),e.PRIMARY_PK_KEY_SIZE=t._EMS_PRIMARY_PK_KEY_SIZE_(),e.RE_ENCRYPTION_KEY_SIZE=t._EMS_RE_ENCRYPTION_KEY_SIZE_(),e.SECRET_KEY_SIZE=t._EMS_SECRET_KEY_SIZE_(),e.SEED_SIZE=t._EMS_SEED_SIZE_(),e.TAG_SIZE=t._EMS_TAG_SIZE_(),e.ELV_E_INCOMPLETE_BLOCK=-2,e.initResolve&&e.initResolve(e)})),new Promise((function(t){e.wasm?t(e):e.initResolve=t}))}},{key:"calcEncByteCount",value:function(t){return this.wasm._CalcEncByteCount(t)}},{key:"calcEncByteCountH",value:function(t,e){return this.wasm._CalcEncByteCountH(t,e)}},{key:"calcEncByteCountFromTargetH",value:function(t){return this.wasm._CalcEncByteCountFromTargetH(t)}},{key:"calcTargetByteCountH",value:function(t){return this.wasm._CalcTargetByteCountH(t)}},{key:"calcEncECIESByteCount",value:function(t){return this.wasm._CalcEncECIESByteCount(t)}},{key:"encryptECIES",value:function(t,e){if(e.length!==this.ECIES_PK_KEY_SIZE)throw new Error("encryptECIES() failed: Expected publicKey length\n ".concat(this.ECIES_PK_KEY_SIZE,", not ").concat(e.length));var n=this.wasm,r=this.utils,i=s.a.randomBytes(this.SEED_SIZE),a=r.arrayToSmartBuf(t),o=r.arrayToSmartBuf(e),u=r.arrayToSmartBuf(i),c=this.calcEncECIESByteCount(a.len),A=r.smartMalloc(c),d=r.smartMalloc(this.ECIES_PK_KEY_SIZE),p=r.smartMalloc(this.TAG_SIZE),f=n._EncryptECIES(u.ptr,u.len,o.ptr,a.ptr,a.len,A,c,d,p);if(0!==f)throw new Error("_EncryptECIES failed with error code "+f);return{data:new Uint8Array(n.HEAPU8.buffer,A,c),ephemeralKey:new Uint8Array(n.HEAPU8.buffer,d,this.ECIES_PK_KEY_SIZE).slice(0),tag:new Uint8Array(n.HEAPU8.buffer,p,this.TAG_SIZE).slice(0)}}},{key:"decryptECIES",value:function(t,e,n,r){if(e.length!==this.ECIES_SK_KEY_SIZE)throw new Error("decryptECIES() failed: Expected secretKey length\n ".concat(this.ECIES_SK_KEY_SIZE,", not ").concat(e.length));if(n.length!==this.ECIES_PK_KEY_SIZE)throw new Error("decryptECIES() failed: Expected ephemeralKey length\n ".concat(this.ECIES_PK_KEY_SIZE,", not ").concat(n.length));if(r.length!==this.TAG_SIZE)throw new Error("decryptECIES() failed: Expected tag length\n ".concat(this.TAG_SIZE,", not ").concat(r.length));var i=this.wasm,a=this.utils,s=a.arrayToSmartBuf(t),o=a.arrayToSmartBuf(e),u=a.arrayToSmartBuf(n),c=a.arrayToSmartBuf(r),A=s.len,d=a.smartMalloc(A),p=i._DecryptECIES(u.ptr,s.ptr,s.len,c.ptr,o.ptr,d,A);if(-1===p)throw new Error("_DecryptECIES failed");return new Uint8Array(i.HEAPU8.buffer,d,p)}},{key:"generateTargetKeys",value:function(){var t=this.wasm,e=this.utils,n=s.a.randomBytes(this.SEED_SIZE),r=e.arrayToSmartBuf(n),i=e.smartMalloc(this.SECRET_KEY_SIZE),a=e.smartMalloc(this.TARGET_PK_KEY_SIZE),o=t._GenerateTargetKeys(r.ptr,r.len,i,a);if(0!==o)throw new Error("_GenerateTargetKeys failed with error code "+o);return{secretKey:new Uint8Array(t.HEAPU8.buffer,i,this.SECRET_KEY_SIZE).slice(0),publicKey:new Uint8Array(t.HEAPU8.buffer,a,this.TARGET_PK_KEY_SIZE).slice(0)}}},{key:"generatePrimaryKeys",value:function(){var t=this.wasm,e=this.utils,n=s.a.randomBytes(this.SEED_SIZE),r=e.arrayToSmartBuf(n),i=e.smartMalloc(this.SECRET_KEY_SIZE),a=e.smartMalloc(this.PRIMARY_PK_KEY_SIZE),o=t._GeneratePrimaryKeys(r.ptr,r.len,i,a);if(0!==o)throw new Error("_GeneratePrimaryKeys failed with error code "+o);return{secretKey:new Uint8Array(t.HEAPU8.buffer,i,this.SECRET_KEY_SIZE).slice(0),publicKey:new Uint8Array(t.HEAPU8.buffer,a,this.PRIMARY_PK_KEY_SIZE).slice(0)}}},{key:"generateReEncryptionKey",value:function(t,e){if(t.length!==this.SECRET_KEY_SIZE)throw new Error("generateReEncryptionKey() failed: Expected primarySK\n length ".concat(this.SECRET_KEY_SIZE,", not ").concat(t.length));if(e.length!==this.TARGET_PK_KEY_SIZE)throw new Error("generateReEncryptionKey() failed: Expected targetPK\n length ".concat(this.TARGET_PK_KEY_SIZE,", not ").concat(e.length));var n=this.wasm,r=this.utils,i=r.arrayToSmartBuf(t),a=r.arrayToSmartBuf(e),s=r.smartMalloc(this.RE_ENCRYPTION_KEY_SIZE),o=n._GenerateReEncryptionKey(i.ptr,a.ptr,s);if(0!==o)throw new Error("_GenerateReEncryptionKey failed with error code "+o);return new Uint8Array(n.HEAPU8.buffer,s,this.RE_ENCRYPTION_KEY_SIZE).slice(0)}},{key:"generateSymmetricKey",value:function(){var t=this.wasm,e=this.utils,n=s.a.randomBytes(this.SEED_SIZE),r=e.arrayToSmartBuf(n),i=e.smartMalloc(this.AES_KEY_SIZE),a=e.smartMalloc(this.IV_SIZE),o=t._GenerateSymmetricKeys(r.ptr,r.len,i,a);if(0!==o)throw new Error("_GenerateSymmetricKeys failed with error code "+o);return{key:new Uint8Array(t.HEAPU8.buffer,i,this.AES_KEY_SIZE).slice(0),iv:new Uint8Array(t.HEAPU8.buffer,a,this.IV_SIZE).slice(0)}}},{key:"newPrimaryContext",value:function(t,e,n){if(t&&t.length!==this.PRIMARY_PK_KEY_SIZE)throw new Error("newPrimaryContext() failed: Expected publicKey\n length ".concat(this.PRIMARY_PK_KEY_SIZE,", not ").concat(t.length));if(e&&e.length!==this.SECRET_KEY_SIZE)throw new Error("newPrimaryContext() failed: Expected secretKey\n length ".concat(this.SECRET_KEY_SIZE,", not ").concat(e.length));if(n.length!==this.AES_KEY_SIZE)throw new Error("newPrimaryContext() failed: Expected\n symmetricKey length ".concat(this.AES_KEY_SIZE,", not ").concat(n.length));var r=this.generateSymmetricKey();return new a.a(this.wasm,t,e,n,r.iv)}},{key:"encryptPrimary",value:function(t,e,n){if(n.length!==this.IV_SIZE)throw new Error("encryptPrimary() failed: Expected iv\n length ".concat(this.IV_SIZE,", not ").concat(n.length));if(0!==t.scratchBuf.len)throw new Error("encryptPrimary() failed: Scratch buffer is not empty");var r=this.wasm,i=this.utils,a=i.arrayToSmartBuf(n),s=i.arrayToSmartBuf(e),o=this.calcEncByteCount(s.len);t.scratchBuf.ensureSize(o);var u=i.smartMalloc(this.TAG_SIZE),c=i.smartMalloc(this.PRIMARY_BLOCK_KEY_SIZE),A=r._EncryptPrimary(t.context,t.pkBuf.ptr,t.symKeyBuf.ptr,a.ptr,s.ptr,s.len,t.scratchBuf.ptr,o,u,c);if(0!==A)throw new Error("_EncryptPrimary failed with error code "+A);return{blockKey:new Uint8Array(r.HEAPU8.buffer,c,this.PRIMARY_BLOCK_KEY_SIZE).slice(0),data:new Uint8Array(r.HEAPU8.buffer,t.scratchBuf.ptr,o),tag:new Uint8Array(r.HEAPU8.buffer,u,this.TAG_SIZE).slice(0)}}},{key:"encryptPrimaryH",value:function(t,e){if(0!==t.scratchBuf.len)throw new Error("encryptPrimaryH() failed: Scratch buffer is not empty");var n=this.wasm,r=this.utils,i=t.generateNextBlockIV(),a=r.arrayToSmartBuf(i),s=r.arrayToSmartBuf(e),o=this.calcEncByteCountH(this.CRYPTO_TYPE_PRIMARY,s.len);t.scratchBuf.ensureSize(o);var u=n._EncryptPrimaryH(t.context,t.pkBuf.ptr,t.symKeyBuf.ptr,a.ptr,s.ptr,s.len,t.scratchBuf.ptr);if(0!==u)throw new Error("_EncryptPrimaryH failed with error code "+u);return new Uint8Array(n.HEAPU8.buffer,t.scratchBuf.ptr,o)}},{key:"decryptPrimary",value:function(t,e,n,r,i,a){if(n.length!==this.TAG_SIZE)throw new Error("decryptPrimary() failed: Expected tag\n length ".concat(this.TAG_SIZE,", not ").concat(n.length));if(r.length!==this.PRIMARY_BLOCK_KEY_SIZE)throw new Error("decryptPrimary() failed: Expected blockKey\n length ".concat(this.PRIMARY_BLOCK_KEY_SIZE,", not ").concat(r.length));if(i.length!==this.IV_SIZE)throw new Error("decryptPrimary() failed: Expected iv\n length ".concat(this.IV_SIZE,", not ").concat(i.length));if(0!==t.scratchBuf.len)throw new Error("decryptPrimary() failed: Scratch buffer is not empty");var s=this.wasm,o=this.utils,u=o.arrayToSmartBuf(e),c=o.arrayToSmartBuf(r),A=o.arrayToSmartBuf(i),d=o.arrayToSmartBuf(n);t.scratchBuf.ensureSize(a);var p=s._DecryptPrimary(t.context,t.skBuf.ptr,c.ptr,t.symKeyBuf.ptr,A.ptr,d.ptr,u.ptr,u.len,t.scratchBuf.ptr,a);if(0!==p)throw new Error("_DecryptPrimary failed with error code "+p);return new Uint8Array(s.HEAPU8.buffer,t.scratchBuf.ptr,a)}},{key:"reEncryptH",value:function(t,e,n){if(e.length!==this.RE_ENCRYPTION_KEY_SIZE)throw new Error("reEncryptBlockKey() failed: Expected reEncKey\n length ".concat(this.RE_ENCRYPTION_KEY_SIZE,", not ").concat(e.length));var r=this.wasm,i=this.utils,a=i.arrayToSmartBuf(e),s=i.arrayToSmartBuf(n);t.ensureSize(this.calcTargetByteCountH(s.len));var o=i.smartMalloc(4),u=r._ReEncryptH(a.ptr,s.ptr,s.len,t.ptr,o);if(u===this.ELV_E_INCOMPLETE_BLOCK)throw new Error("ELV_E_INCOMPLETE_BLOCK");if(0!==u)throw new Error("_ReEncryptH failed with error code "+u);var c=r.getValue(o,"i32");return new Uint8Array(r.HEAPU8.buffer,t.ptr,c)}},{key:"decryptH",value:function(t,e,n){if(t!==this.CRYPTO_TYPE_TARGET&&t!==this.CRYPTO_TYPE_PRIMARY)throw new Error("decryptH() failed: Invalid type "+t);if(0!==e.scratchBuf.len)throw new Error("decryptH() failed: Scratch buffer is not empty");var r=this.wasm,i=this.utils,a=i.arrayToSmartBuf(n);e.scratchBuf.ensureSize(a.len);var s=i.smartMalloc(4),o=r._DecryptH(t,e.context,e.skBuf.ptr,e.symKeyBuf.ptr,a.ptr,a.len,e.scratchBuf.ptr,s);if(o===this.ELV_E_INCOMPLETE_BLOCK)throw new Error("ELV_E_INCOMPLETE_BLOCK");if(0!==o)throw new Error("_DecryptH failed with error code "+o);var u=r.getValue(s,"i32");return new Uint8Array(r.HEAPU8.buffer,e.scratchBuf.ptr,u)}},{key:"reEncryptBlockKey",value:function(t,e){if(t.length!==this.RE_ENCRYPTION_KEY_SIZE)throw new Error("reEncryptBlockKey() failed: Expected reEncKey\n length ".concat(this.RE_ENCRYPTION_KEY_SIZE,", not ").concat(t.length));if(e.length!==this.PRIMARY_BLOCK_KEY_SIZE)throw new Error("reEncryptBlockKey() failed: Expected blockKey\n length ".concat(this.PRIMARY_BLOCK_KEY_SIZE,", not ").concat(e.length));var n=this.wasm,r=this.utils,i=r.arrayToSmartBuf(t),a=r.arrayToSmartBuf(e),s=r.smartMalloc(this.TARGET_BLOCK_KEY_SIZE),o=n._ReEncryptBlockKey(i.ptr,a.ptr,s);if(0!==o)throw new Error("_ReEncryptBlockKey failed with error code "+o);return new Uint8Array(n.HEAPU8.buffer,s,this.TARGET_BLOCK_KEY_SIZE).slice(0)}},{key:"newTargetDecryptionContext",value:function(t,e){if(t.length!==this.SECRET_KEY_SIZE)throw new Error("newTargetDecryptionContext() failed: Expected\n secretKey length ".concat(this.SECRET_KEY_SIZE,", not ").concat(t.length));if(e.length!==this.AES_KEY_SIZE)throw new Error("newTargetDecryptionContext() failed: Expected\n symmetricKey length ".concat(this.AES_KEY_SIZE,", not ").concat(e.length));return new i.a(this.wasm,t,e)}},{key:"decryptTarget",value:function(t,e,n,r,i,a){if(n.length!==this.TAG_SIZE)throw new Error("decryptTarget() failed: Expected tag\n length ".concat(this.TAG_SIZE,", not ").concat(n.length));if(r.length!==this.TARGET_BLOCK_KEY_SIZE)throw new Error("decryptTarget() failed: Expected blockKey\n length ".concat(this.TARGET_BLOCK_KEY_SIZE,", not ").concat(r.length));if(i.length!==this.IV_SIZE)throw new Error("decryptTarget() failed: Expected iv\n length ".concat(this.IV_SIZE,", not ").concat(i.length));if(0!==t.scratchBuf.len)throw new Error("decryptTarget() failed: Scratch buffer is not empty");var s=this.wasm,o=this.utils,u=o.arrayToSmartBuf(e),c=o.arrayToSmartBuf(r),A=o.arrayToSmartBuf(i),d=o.arrayToSmartBuf(n);t.scratchBuf.ensureSize(a);var p=s._DecryptTarget(t.context,t.skBuf.ptr,c.ptr,t.symKeyBuf.ptr,A.ptr,d.ptr,u.ptr,u.len,t.scratchBuf.ptr,a);if(0!==p)throw new Error("_DecryptTarget failed with error code "+p);return new Uint8Array(s.HEAPU8.buffer,t.scratchBuf.ptr,a)}},{key:"createCipher",value:function(t){var e=this;return d()((function(n,r,i){this.push(e.encryptPrimaryH(t,n)),t.clearBuf(),i()}))}},{key:"createDecipher",value:function(e,n){var r=this,i=t.alloc(0);return d()((function(a,s,o){var u=0;for(i=t.concat([i,a]);u<i.length;)try{n.clearBuf();var c=r.decryptH(e,n,i.slice(u));this.push(c),u+=r.calcEncByteCountH(e,c.length)}catch(e){return"ELV_E_INCOMPLETE_BLOCK"===e.message?(i=i.slice(u),void o()):(i=t.alloc(0),void o(e))}i=t.alloc(0),o()}),(function(t){i.length>0&&this.destroy(new Error("Decipher stream ended before all data was decrypted. The source may be invalid.")),t()}))}},{key:"createRecipher",value:function(e){var n=this,r=new p.a(n.wasm),i=t.alloc(0),a=d()((function(a,s,o){var u=0;for(i=t.concat([i,a]);u<i.length;)try{r.clear();var c=n.reEncryptH(r,e,i.slice(u));this.push(c),u+=n.calcEncByteCountFromTargetH(c.length)}catch(e){return"ELV_E_INCOMPLETE_BLOCK"===e.message?(i=i.slice(u),void o()):(i=t.alloc(0),void o(e))}i=t.alloc(0),o()}),(function(t){i.length>0&&this.destroy(new Error("Recipher stream ended before all data was decrypted. The source may be invalid.")),t()}));return a.on("finish",(function(){r.free()})),a}}]),e}()}.call(this,n(3).Buffer)},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==("undefined"==typeof window?"undefined":A(window))&&(n=window)}t.exports=n},function(t,e){t.exports=n(82)},function(t,e){t.exports=n(83)},function(t,e){t.exports=n(51)},function(t,e){t.exports=n(23)},function(t,e){t.exports=n(27)},function(t,e){t.exports=n(66)},function(t,e){t.exports=n(124)},function(t,e){t.exports=n(67)},function(t,e){t.exports=n(130)},function(t,e){t.exports=n(138)},function(t,e){t.exports=n(141)},function(t,e){t.exports=n(153)},function(t,e){t.exports=n(154)},function(t,e){t.exports=n(158)},function(t,e){},function(t,e,n){(function(t){function n(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}e.resolve=function(){for(var e="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var s=a>=0?arguments[a]:t.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(e=s+"/"+e,i="/"===s.charAt(0))}return(i?"/":"")+(e=n(r(e.split("/"),(function(t){return!!t})),!i).join("/"))||"."},e.normalize=function(t){var a=e.isAbsolute(t),s="/"===i(t,-1);return(t=n(r(t.split("/"),(function(t){return!!t})),!a).join("/"))||a||(t="."),t&&s&&(t+="/"),(a?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(r(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,n){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var i=r(t.split("/")),a=r(n.split("/")),s=Math.min(i.length,a.length),o=s,u=0;u<s;u++)if(i[u]!==a[u]){o=u;break}var c=[];for(u=o;u<i.length;u++)c.push("..");return(c=c.concat(a.slice(o))).join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,r=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!i){r=a;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":t.slice(0,r)},e.basename=function(t,e){var n=function(t){"string"!=typeof t&&(t+="");var e,n=0,r=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){n=e+1;break}}else-1===r&&(i=!1,r=e+1);return-1===r?"":t.slice(n,r)}(t);return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},e.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,n=0,r=-1,i=!0,a=0,s=t.length-1;s>=0;--s){var o=t.charCodeAt(s);if(47!==o)-1===r&&(i=!1,r=s+1),46===o?-1===e?e=s:1!==a&&(a=1):-1!==e&&(a=-1);else if(!i){n=s+1;break}}return-1===e||-1===r||0===a||1===a&&e===r-1&&e===n+1?"":t.slice(e,r)};var i="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,n(4))}])},"object"==A(e)&&"object"==A(t)?t.exports=s():(i=[],void 0===(a="function"==typeof(r=s)?r.apply(e,i):r)||(t.exports=a))}).call(this,n(13)(t))},function(t,e,n){var r=n(3),i=n(4),a=n(7),s=n(50);function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var c=n(9),A=function(t){if(!t)return"";if(!(t=t.toString()).includes("/"))return t;var e=t.split("/"),n=s(e,2),r=n[0],i=n[1],a=100*parseInt(r)/parseInt(i);return a=a<1?a.toFixed(2):a.toFixed(1).toString().replace(".0","")},d=function(t){var e=!!t.id,n=(e?t.nft:t.meta)||{},r=e?t.info:t,i={USDCAccepted:!!(t.accepts||[]).find((function(t){return"sol"===t.type})),USDCOnly:((t.accepts||[]).find((function(t){return"sol"===t.type}))||{}).preferred,TenantId:t.tenant||t.tenant_id,ContractAddr:r.contract_addr,ContractId:"ictr".concat(c.AddressToHash(r.contract_addr)),ContractName:r.contract_name,Cap:r.cap,TokenIdStr:r.token_id_str,TokenUri:r.token_uri,TokenOrdinal:r.ordinal,TokenHold:r.hold,TokenHoldDate:r.hold?new Date(1e3*parseInt(r.hold)):void 0,TokenOwner:r.token_owner?c.FormatAddress(r.token_owner):"",VersionHash:(r.token_uri||"").split("/").find((function(t){return(t||"").startsWith("hq__")}))};return e&&(i=u(u({},i),{},{ListingId:t.id,CreatedAt:1e3*t.created,UpdatedAt:1e3*t.updated,CheckoutLockedUntil:t.checkout?1e3*t.checkout:void 0,SellerAddress:c.FormatAddress(t.seller),Price:t.price,Fee:t.fee})),{metadata:n,details:i}};e.FormatNFTDetails=d;var p=function(t){t.formatted=!0,t.contractAddress=t.details.ContractAddr,t.contractId=t.details.ContractId,t.tokenId=t.details.TokenIdStr,t.name=t.metadata.display_name,t.details.ListingId&&(t.listingId=t.details.ListingId);var e=["Content Fabric Hash","Creator","Total Minted Supply"];return t.metadata.attributes=(t.metadata.attributes||[]).filter((function(t){return t&&!e.includes(t.trait_type)})).map((function(t){return u(u({},t),{},{name:t.trait_type,rarity_percent:A(t.rarity)})})),t.metadata.additional_media&&(t.metadata.additional_media=t.metadata.additional_media.map((function(t){try{var e=(t.media_type||"").toLowerCase();if("image"===e)return u(u({},t),{},{embed_url:t.media_file.url});var n=new URL("https://embed.v3.contentfabric.io");return n.searchParams.set("p",""),n.searchParams.set("net","demo"===rootStore.network?"demo":"main"),n.searchParams.set("ath",rootStore.authToken),"video"===e?(n.searchParams.set("vid",LinkTargetHash(t.media_link)),n.searchParams.set("ct","h"),n.searchParams.set("ap","")):"ebook"===e&&(n.searchParams.set("type","ebook"),n.searchParams.set("vid",t.media_file["."].container),n.searchParams.set("murl",btoa(t.media_file.url))),u(u({},t),{},{embed_url:n.toString()})}catch(e){return t}}))),["open_animation","open_animation__mobile","reveal_animation","reveal_animation_mobile"].forEach((function(e){try{if(t.metadata.pack_options&&t.metadata.pack_options[e]){var n=new URL("https://embed.v3.contentfabric.io");n.searchParams.set("p",""),n.searchParams.set("net","demo"===rootStore.network?"demo":"main"),n.searchParams.set("ath",rootStore.authToken||rootStore.staticToken),n.searchParams.set("vid",LinkTargetHash(t.metadata.pack_options[e])),n.searchParams.set("ap",""),e.startsWith("reveal")||(n.searchParams.set("m",""),n.searchParams.set("lp","")),t.metadata.pack_options["".concat(e,"_embed_url")]=n.toString()}}catch(t){}})),t};e.FormatNFTMetadata=p,e.FormatNFT=function(t){return p(d(t))},e.LinkTargetHash=function(t){if(t)return t["."]&&t["."].source?t["."].source:t["/"]&&t["/"].startsWith("/qfab/")?t["/"].split("/").find((function(t){return t.startsWith("hq__")})):t["."]&&t["."].container?t["."].container:void 0};var f=function(t){var e=t.url,n=t.title,r=t.w,i=t.h,a=window.screenLeft||window.screenX,s=window.screenTop||window.screenY,o=window.innerWidth||document.documentElement.clientWidth||screen.width,u=window.innerHeight||document.documentElement.clientHeight||screen.height,c=o/window.screen.availWidth,A=(o-r)/2/c+a,d=(u-i)/2/c+s,p=window.open(e,n,"\n width=".concat(r/c,",\n height=").concat(i/c,",\n top=").concat(d,",\n left=").concat(A,"\n "));return window.focus&&p.focus(),p};e.ActionPopup=function(){var t=i(r.mark((function t(e){var n,a,s,o,u;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.mode,a=void 0===n?"tab":n,s=e.url,o=e.onMessage,u=e.onCancel,t.next=3,new Promise((function(t){var e="popup"===a?f({url:s,title:"Eluvio Media Wallet",w:500,h:850}):window.open(s),n=setInterval(i(r.mark((function i(){return r.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!e.closed){r.next=6;break}if(clearInterval(n),!u){r.next=5;break}return r.next=5,u();case 5:t();case 6:case"end":return r.stop()}}),i)}))),1e3);window.addEventListener("message",function(){var a=i(r.mark((function i(a){return r.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,o(a,(function(){clearInterval(n),e.close(),t()}));case 2:case"end":return r.stop()}}),i)})));return function(t){return a.apply(this,arguments)}}())}));case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},function(t,e,n){var r=n(17),i=n(50),a=n(7),s=n(3),o=n(4),u=n(14),c=n(15);function A(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?A(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var p=n(166).ElvClient,f=n(357),l=n(160),h=l.LinkTargetHash,y=l.FormatNFT,g=l.ActionPopup,m=n(12),b=n(9),I=function(){"use strict";function t(e){var n=e.client,r=e.network,i=e.mode,a=e.marketplaceInfo,s=e.storeAuthToken;u(this,t),this.client=n,this.loggedIn=!1,this.network=r,this.mode=i,this.purchaseMode=f[r][i].purchaseMode,this.mainSiteId=f[r][i].siteId,this.appUrl=f[r][i].appUrl,this.publicStaticToken=n.staticToken,this.storeAuthToken=s,this.selectedMarketplaceInfo=a,this.availableMarketplaces={},this.availableMarketplacesById={},this.marketplaceHashes={},this.cachedMarketplaces={},this.cachedCSS={},this.utils=n.utils}var e,n,a,A,l,I,C,v,E,w,B;return c(t,[{key:"Log",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e?console.error("Eluvio Wallet Client:",t):console.log("Eluvio Wallet Client:",t)}},{key:"LogIn",value:(B=o(s.mark((function t(e){var n,r,i,a,u,c,A,d,p,f,l,h=this;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.method,r=void 0===n?"redirect":n,i=e.provider,a=e.mode,u=void 0===a?"login":a,c=e.callbackUrl,A=e.marketplaceParams,d=e.clearLogin,p=void 0!==d&&d,f=e.callback,(l=new URL(this.appUrl)).hash="/login",l.searchParams.set("origin",window.location.origin),l.searchParams.set("action","login"),i&&l.searchParams.set("provider",i),u&&l.searchParams.set("mode",u),!A){t.next=15;break}return t.t0=l.searchParams,t.next=11,this.MarketplaceInfo({marketplaceParams:A});case 11:t.t1=t.sent.marketplaceHash,t.t0.set.call(t.t0,"mid",t.t1),t.next=16;break;case 15:(this.selectedMarketplaceInfo||{}).marketplaceHash&&l.searchParams.set("mid",this.selectedMarketplaceInfo.marketplaceHash);case 16:if(p&&l.searchParams.set("clear",""),"redirect"!==r){t.next=24;break}l.searchParams.set("response","redirect"),l.searchParams.set("source","origin"),l.searchParams.set("redirect",c),window.location=l,t.next=28;break;case 24:return l.searchParams.set("response","message"),l.searchParams.set("source","parent"),t.next=28,new Promise(function(){var t=o(s.mark((function t(e,n){return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,g({mode:"tab",url:l.toString(),onCancel:function(){return n("User cancelled login")},onMessage:function(){var t=o(s.mark((function t(r,i){return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r&&r.data&&"LoginResponse"===r.data.type){t.next=2;break}return t.abrupt("return");case 2:if(t.prev=2,!f){t.next=8;break}return t.next=6,f(r.data.params);case 6:t.next=10;break;case 8:return t.next=10,h.Authenticate({token:r.data.params.clientSigningToken||r.data.params.clientAuthToken});case 10:e(),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(2),n(t.t0);case 16:return t.prev=16,i(),t.finish(16);case 19:case"end":return t.stop()}}),t,null,[[2,13,16,19]])})));return function(e,n){return t.apply(this,arguments)}}()});case 2:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}());case 28:case"end":return t.stop()}}),t,this)}))),function(t){return B.apply(this,arguments)})},{key:"LogOut",value:function(){if(this.__authorization={},this.loggedIn=!1,this.cachedMarketplaces={},"undefined"!=typeof localStorage)try{localStorage.removeItem("__elv-token-".concat(this.network))}catch(t){}}},{key:"Authenticate",value:(w=o(s.mark((function t(e){var n,r;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.token,t.prev=1,r=JSON.parse(this.utils.FromB58ToStr(n))||{},t.next=8;break;case 5:throw t.prev=5,t.t0=t.catch(1),new Error("Invalid authorization token "+n);case 8:if(r.expiresAt&&!(Date.now()>r.expiresAt)){t.next=10;break}throw Error("ElvWalletClient: Provided authorization token has expired");case 10:if(!r.clusterToken){t.next=13;break}return t.next=13,this.client.SetRemoteSigner({authToken:r.clusterToken});case 13:return this.client.SetStaticToken({token:r.fabricToken}),t.abrupt("return",this.SetAuthorization(r));case 15:case"end":return t.stop()}}),t,this,[[1,5]])}))),function(t){return w.apply(this,arguments)})},{key:"AuthenticateOAuth",value:(E=o(s.mark((function t(e){var n,r,i,a,o,u,c,A,d,p,f;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.idToken,r=e.tenantId,i=e.email,a=e.shareEmail,o=void 0!==a&&a,u=e.tokenDuration,c=void 0===u?24:u,r||!this.selectedMarketplaceInfo){t.next=5;break}return t.next=4,this.AvailableMarketplaces();case 4:r=this.selectedMarketplaceInfo.tenantId;case 5:return t.next=7,this.client.SetRemoteSigner({idToken:n,tenantId:r,extraData:{share_email:o},unsignedPublicAuth:!0});case 7:return A=Date.now()+60*c*60*1e3,t.next=10,this.client.CreateFabricToken({duration:60*c*60*1e3});case 10:if(d=t.sent,p=this.client.utils.FormatAddress(this.client.CurrentAccountAddress()),i){t.next=21;break}t.prev=13,f=JSON.parse(this.utils.FromB64URL(n.split(".")[1])),i=f.email,t.next=21;break;case 18:throw t.prev=18,t.t0=t.catch(13),Error("Failed to decode ID token");case 21:return this.client.SetStaticToken({token:d}),t.abrupt("return",{authToken:this.SetAuthorization({fabricToken:d,tenantId:r,address:p,email:i,expiresAt:A,walletType:"Custodial",walletName:"Eluvio"}),signingToken:this.SetAuthorization({clusterToken:this.client.signer.authToken,fabricToken:d,tenantId:r,address:p,email:i,expiresAt:A,walletType:"Custodial",walletName:"Eluvio"})});case 23:case"end":return t.stop()}}),t,this,[[13,18]])}))),function(t){return E.apply(this,arguments)})},{key:"AuthenticateExternalWallet",value:(v=o(s.mark((function t(e){var n,r,i,a,u,c,A,d,p=this;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.address,r=e.tokenDuration,i=void 0===r?24:r,a=e.walletName,u=void 0===a?"Metamask":a,c=e.Sign,n||(n=window.ethereum.selectedAddress),n=this.utils.FormatAddress(n),c||(c=function(){var t=o(s.mark((function t(e){return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p.SignMetamask({message:e,address:n}));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),A=Date.now()+60*i*60*1e3,t.next=7,this.client.CreateFabricToken({address:n,duration:60*i*60*1e3,Sign:c,addEthereumPrefix:!1});case 7:return d=t.sent,t.abrupt("return",this.SetAuthorization({fabricToken:d,address:n,expiresAt:A,walletType:"External",walletName:u}));case 9:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"ClientAuthToken",value:function(){return this.loggedIn?this.utils.B58(JSON.stringify(this.__authorization)):""}},{key:"AuthToken",value:function(){return this.loggedIn?this.__authorization.fabricToken:this.publicStaticToken}},{key:"SetAuthorization",value:function(t){var e=t.clusterToken,n=t.fabricToken,r=t.tenantId,i=t.address,a=t.email,s=t.expiresAt,o=t.walletType,u=t.walletName;i=this.client.utils.FormatAddress(i),this.__authorization={fabricToken:n,tenantId:r,address:i,email:a,expiresAt:s,walletType:o,walletName:u},e&&(this.__authorization.clusterToken=e),this.loggedIn=!0,this.cachedMarketplaces={};var c=this.ClientAuthToken();if(this.storeAuthToken&&"undefined"!=typeof localStorage)try{localStorage.setItem("__elv-token-".concat(this.network),c)}catch(t){}return c}},{key:"SignMetamask",value:(C=o(s.mark((function t(e){var n,r,i;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.message,r=e.address,window.ethereum){t.next=3;break}throw Error("ElvWalletClient: Unable to initialize - Metamask not available");case 3:return t.next=5,window.ethereum.request({method:"eth_requestAccounts"});case 5:return i=r||window.ethereum.selectedAddress,t.next=8,window.ethereum.request({method:"personal_sign",params:[n,i,""]});case 8:return t.abrupt("return",t.sent);case 9:case"end":return t.stop()}}),t)}))),function(t){return C.apply(this,arguments)})},{key:"LoadAvailableMarketplaces",value:(I=o(s.mark((function t(){var e,n,r,i,a=this,o=arguments;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o.length>0&&void 0!==o[0]&&o[0]||!(Object.keys(this.availableMarketplaces)>0)){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,this.client.LatestVersionHash({objectId:this.mainSiteId});case 5:return e=t.sent,t.next=8,this.client.ContentObjectMetadata({versionHash:e,metadataSubtree:"public/asset_metadata/tenants",resolveLinks:!0,linkDepthLimit:2,resolveIncludeSource:!0,resolveIgnoreErrors:!0,produceLinkUrls:!0,authorizationToken:this.publicStaticToken,noAuth:!0,select:["*/.","*/marketplaces/*/.","*/marketplaces/*/info/tenant_id","*/marketplaces/*/info/tenant_name","*/marketplaces/*/info/branding"],remove:["*/marketplaces/*/info/branding/custom_css"]});case 8:n=t.sent,r=d({},this.availableMarketplaces||{}),i=d({},this.availableMarketplacesById||{}),Object.keys(n||{}).forEach((function(t){try{r[t]={versionHash:n[t]["."].source},Object.keys(n[t].marketplaces||{}).forEach((function(e){try{var s=n[t].marketplaces[e]["."].source,o=a.utils.DecodeVersionHash(s).objectId;r[t][e]=d(d({},n[t].marketplaces[e].info||{}),{},{tenantName:n[t].marketplaces[e].info.tenant_name,tenantId:n[t].marketplaces[e].info.tenant_id,tenantSlug:t,marketplaceSlug:e,marketplaceId:o,marketplaceHash:s,order:f.__MARKETPLACE_ORDER.findIndex((function(t){return t===e}))}),i[o]=r[t][e],a.marketplaceHashes[o]=s,a.selectedMarketplaceInfo&&(a.selectedMarketplaceInfo.tenantSlug===t&&a.selectedMarketplaceInfo.marketplaceSlug===e||a.selectedMarketplaceInfo.marketplaceId===o)&&(a.selectedMarketplaceInfo=r[t][e])}catch(n){a.Log("Eluvio Wallet Client: Unable to load info for marketplace ".concat(t,"/").concat(e),!0)}}))}catch(e){a.Log("Eluvio Wallet Client: Failed to load tenant info ".concat(t),!0),a.Log(e,!0)}})),this.availableMarketplaces=r,this.availableMarketplacesById=i;case 14:case"end":return t.stop()}}),t,this)}))),function(){return I.apply(this,arguments)})},{key:"LatestMarketplaceHash",value:(l=o(s.mark((function t(e){var n,r,i,a;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.tenantSlug,r=e.marketplaceSlug,t.next=3,this.client.LatestVersionHash({objectId:this.mainSiteId});case 3:return i=t.sent,t.next=6,this.client.ContentObjectMetadata({versionHash:i,metadataSubtree:m("/public","asset_metadata","tenants",n,"marketplaces",r),resolveLinks:!1});case 6:return a=t.sent,t.abrupt("return",h(a));case 8:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"LoadMarketplace",value:(A=o(s.mark((function t(e){var n,r,i,a,u=this;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.MarketplaceInfo({marketplaceParams:e}),r=n.marketplaceId,t.next=4,this.LatestMarketplaceHash({tenantSlug:n.tenantSlug,marketplaceSlug:n.marketplaceSlug});case 4:if(i=t.sent,this.cachedMarketplaces[r]&&this.cachedMarketplaces[r].versionHash!==i&&delete this.cachedMarketplaces[r],this.cachedMarketplaces[r]){t.next=19;break}return t.next=9,this.client.ContentObjectMetadata({versionHash:i,metadataSubtree:"public/asset_metadata/info",linkDepthLimit:2,resolveLinks:!0,resolveIgnoreErrors:!0,resolveIncludeSource:!0,produceLinkUrls:!0,authorizationToken:this.publicStaticToken});case 9:return a=t.sent,t.next=12,Promise.all(a.items.map(function(){var t=o(s.mark((function t(e,n){return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.requires_permissions){t.next=14;break}if(u.loggedIn){t.next=5;break}e.authorized=!1,t.next=14;break;case 5:return t.prev=5,t.next=8,u.client.ContentObjectMetadata({versionHash:h(e.nft_template),metadataSubtree:"permissioned"});case 8:e.authorized=!0,t.next=14;break;case 11:t.prev=11,t.t0=t.catch(5),e.authorized=!1;case 14:return e.nftTemplateMetadata=(e.nft_template||{}).nft||{},e.itemIndex=n,t.abrupt("return",e);case 17:case"end":return t.stop()}}),t,null,[[5,11]])})));return function(e,n){return t.apply(this,arguments)}}()));case 12:a.items=t.sent,a.collections=(a.collections||[]).map((function(t,e){return d(d({},t),{},{collectionIndex:e})})),a.retrievedAt=Date.now(),a.marketplaceId=r,a.versionHash=i,["purchase_animation","purchase_animation__mobile","reveal_animation","reveal_animation_mobile"].forEach((function(t){try{if(a.storefront[t]){var e=new URL("https://embed.v3.contentfabric.io"),n=h(a.storefront[t]);e.searchParams.set("p",""),e.searchParams.set("net","main"===u.network?"main":"demo"),e.searchParams.set("ath",(u.__authorization||{}).authToken||u.publicStaticToken),e.searchParams.set("vid",n),e.searchParams.set("ap",""),t.startsWith("reveal")||(e.searchParams.set("m",""),e.searchParams.set("lp","")),a.storefront["".concat(t,"_embed_url")]=e.toString()}}catch(t){}})),this.cachedMarketplaces[r]=a;case 19:return t.abrupt("return",this.cachedMarketplaces[r]);case 20:case"end":return t.stop()}}),t,this)}))),function(t){return A.apply(this,arguments)})},{key:"FilteredQuery",value:(a=o(s.mark((function t(){var e,n,r,i,a,o,u,c,A,d,p,f,l,h,g,I,C,v,E,w,B,Q,M,k,_,x,S,D,R,T,N,O,H=arguments;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=H.length>0&&void 0!==H[0]?H[0]:{},n=e.mode,r=void 0===n?"listings":n,i=e.sortBy,a=void 0===i?"created":i,o=e.sortDesc,u=void 0!==o&&o,c=e.filter,A=e.editionFilter,d=e.attributeFilters,p=e.contractAddress,f=e.tokenId,l=e.currency,h=e.marketplaceParams,g=e.tenantId,I=e.collectionIndex,C=void 0===I?-1:I,v=e.sellerAddress,E=e.lastNDays,w=void 0===E?-1:E,B=e.start,Q=void 0===B?0:B,M=e.limit,k=void 0===M?50:M,C=parseInt(C),_={sort_by:a,sort_descending:u,start:Q,limit:k},!h){t.next=11;break}return t.next=6,this.MarketplaceInfo({marketplaceParams:h});case 6:if(x=t.sent,!(C>=0)){t.next=11;break}return t.next=10,this.Marketplace({marketplaceParams:h});case 10:S=t.sent;case 11:if(t.prev=11,D=[],v&&D.push("seller:eq:".concat(this.client.utils.FormatAddress(v))),!(S&&C>=0)){t.next=25;break}if(S.collections[C].items.forEach((function(t){if(t){var e=S.items.find((function(e){return e.sku===t}));if(e){var n=b.SafeTraverse(e,"nft_template","nft","address");n&&D.push("".concat("owned"===r?"contract_addr":"contract",":eq:").concat(b.FormatAddress(n)))}}})),0!==D.length){t.next=23;break}if(!r.includes("stats")){t.next=22;break}return t.abrupt("return",{});case 22:return t.abrupt("return",{paging:{start:_.start,limit:_.limit,total:0,more:!1},results:[]});case 23:t.next=26;break;case 25:("owned"!==r&&x||g)&&D.push("tenant:eq:".concat(x?x.tenantId:g));case 26:p?("owned"===r?D.push("contract_addr:eq:".concat(b.FormatAddress(p))):D.push("contract:eq:".concat(b.FormatAddress(p))),f&&D.push("token:eq:".concat(f))):c&&(r.includes("listing")?D.push("nft/display_name:eq:".concat(c)):"owned"===r?(D.push('meta:@>:{"display_name":"'.concat(c,'"}')),_.exact=!1):D.push("name:eq:".concat(c))),A&&(r.includes("listing")?D.push("nft/edition_name:eq:".concat(A)):"owned"===r?(D.push('meta:@>:{"edition_name":"'.concat(A,'"}')),_.exact=!1):D.push("edition:eq:".concat(A))),d&&d.map((function(t){var e=t.name,n=t.value;e&&n&&D.push("nft/attributes/".concat(e,":eq:").concat(n))})),l&&D.push("link_type:eq:sol"),w&&w>0&&D.push("created:gt:".concat((Date.now()/1e3-24*w*60*60).toFixed(0))),t.t0=r,t.next="owned"===t.t0?34:"listings"===t.t0?37:"sales"===t.t0?39:"listing-stats"===t.t0?42:"sales-stats"===t.t0?44:46;break;case 34:return R=m("as","wlt","nfts"),x&&(R=m("as","wlt","nfts",x.tenantId)),t.abrupt("break",46);case 37:return R=m("as","mkt","f"),t.abrupt("break",46);case 39:return R=m("as","mkt","hst","f"),D.push("action:eq:SOLD"),t.abrupt("break",46);case 42:return R=m("as","mkt","stats","listed"),t.abrupt("break",46);case 44:return R=m("as","mkt","stats","sold"),t.abrupt("break",46);case 46:if(D.length>0&&(_.filter=D),!r.includes("stats")){t.next=51;break}return t.next=50,b.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({path:R,method:"GET",queryParams:_}));case 50:return t.abrupt("return",t.sent);case 51:return t.t2=b,t.next=54,this.client.authClient.MakeAuthServiceRequest({path:R,method:"GET",queryParams:_,headers:"owned"===r?{Authorization:"Bearer ".concat(this.AuthToken())}:{}});case 54:return t.t3=t.sent,t.next=57,t.t2.ResponseToJson.call(t.t2,t.t3);case 57:if(t.t1=t.sent,t.t1){t.next=60;break}t.t1=[];case 60:return T=t.t1,N=T.contents,O=T.paging,t.abrupt("return",{paging:{start:_.start,limit:_.limit,total:O.total,more:O.total>Q+k},results:(N||[]).map((function(t){return["owned","listings"].includes(r)?y(t):t}))});case 66:if(t.prev=66,t.t4=t.catch(11),!t.t4.status||"404"!==t.t4.status.toString()){t.next=70;break}return t.abrupt("return",{paging:{start:_.start,limit:_.limit,total:0,more:!1},results:[]});case 70:throw t.t4;case 71:case"end":return t.stop()}}),t,this,[[11,66]])}))),function(){return a.apply(this,arguments)})},{key:"MintingStatus",value:(n=o(s.mark((function t(e){var n,a,o,u;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.marketplaceParams,a=e.tenantId){t.next=6;break}return t.next=4,this.MarketplaceInfo({marketplaceParams:n||this.selectedMarketplaceInfo});case 4:o=t.sent,a=o.tenantId;case 6:return t.prev=6,t.next=9,b.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({path:m("as","wlt","status","act",a),method:"GET",headers:{Authorization:"Bearer ".concat(this.AuthToken())}}));case 9:return u=t.sent,t.abrupt("return",u.map((function(t){var e,n,a=t.op.split(":"),s=i(a,3),o=s[0],u=s[1],c=s[2];return u=u.startsWith("0x")?b.FormatAddress(u):u,"nft-buy"===o?e=c:"nft-claim"===o?(e=c,t.marketplaceId=u,t.extra&&t.extra[0]&&(u=t.extra.token_addr,n=t.extra.token_id_str)):"nft-redeem"===o?e=t.op.split(":").slice(-1)[0]:n=c,"nft-transfer"===o&&(e=t.extra&&t.extra.trans_id),d(d({},t),{},{timestamp:new Date(t.ts),state:t.state&&"object"===r(t.state)?Object.values(t.state):t.state,extra:t.extra&&"object"===r(t.extra)?Object.values(t.extra):t.extra,confirmationId:e,op:o,address:u,tokenId:n})})).sort((function(t,e){return t.ts<e.ts?1:-1})));case 13:return t.prev=13,t.t0=t.catch(6),this.Log("Failed to retrieve minting status",!0),this.Log(t.t0),t.abrupt("return",[]);case 18:case"end":return t.stop()}}),t,this,[[6,13]])}))),function(t){return n.apply(this,arguments)})}],[{key:"Initialize",value:(e=o(s.mark((function e(n){var r,i,a,o,u,c,A,d,l,h,y,g,m,b,I,C;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.network,i=void 0===r?"main":r,a=n.mode,o=void 0===a?"production":a,u=n.marketplaceParams,c=n.storeAuthToken,A=void 0===c||c,l=(d=u||{}).tenantSlug,h=d.marketplaceSlug,y=d.marketplaceId,g=d.marketplaceHash,f[i]){e.next=6;break}throw Error("ElvWalletClient: Invalid network ".concat(i));case 6:if(f[i][o]){e.next=8;break}throw Error("ElvWalletClient: Invalid mode ".concat(o));case 8:return e.next=10,p.FromNetworkName({networkName:i,assumeV3:!0});case 10:if(m=e.sent,b=new t({client:m,network:i,mode:o,marketplaceInfo:{tenantSlug:l,marketplaceSlug:h,marketplaceId:g?m.utils.DecodeVersionHash(g).objectId:y,marketplaceHash:g},storeAuthToken:A}),!(window&&window.location&&window.location.href)){e.next=31;break}if(!(I=new URL(window.location.href)).searchParams.get("elvToken")){e.next=21;break}return e.next=17,b.Authenticate({token:I.searchParams.get("elvToken")});case 17:I.searchParams.delete("elvToken"),window.history.replaceState("","",I),e.next=31;break;case 21:if(!A||"undefined"==typeof localStorage){e.next=31;break}if(e.prev=22,!(C=localStorage.getItem("__elv-token-".concat(i)))){e.next=27;break}return e.next=27,b.Authenticate({token:C});case 27:e.next=31;break;case 29:e.prev=29,e.t0=e.catch(22);case 31:return e.next=33,b.LoadAvailableMarketplaces();case 33:return e.abrupt("return",b);case 34:case"end":return e.stop()}}),e,null,[[22,29]])}))),function(t){return e.apply(this,arguments)})}]),t}();Object.assign(I.prototype,n(358)),e.ElvWalletClient=I},function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,a=[],s=!0,o=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);s=!0);}catch(t){o=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(o)throw i}}return a}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=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.")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){(function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n=function(t){"use strict";var n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",o=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),s=new w(r||[]);return a._invoke=function(t,e,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return Q()}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var o=C(s,n);if(o){if(o===d)continue;return o}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=A(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,s),a}function A(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var d={};function p(){}function f(){}function l(){}var h={};u(h,a,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(B([])));g&&g!==n&&r.call(g,a)&&(h=g);var m=l.prototype=p.prototype=Object.create(h);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,n){var i;this._invoke=function(a,s){function o(){return new n((function(i,o){!function i(a,s,o,u){var c=A(t[a],t,s);if("throw"!==c.type){var d=c.arg,p=d.value;return p&&"object"===e(p)&&r.call(p,"__await")?n.resolve(p.__await).then((function(t){i("next",t,o,u)}),(function(t){i("throw",t,o,u)})):n.resolve(p).then((function(t){d.value=t,o(d)}),(function(t){return i("throw",t,o,u)}))}u(c.arg)}(a,s,i,o)}))}return i=i?i.then(o,o):o()}}function C(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,C(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=A(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,d;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function v(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(v,this),this.reset(!0)}function B(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:Q}}function Q(){return{value:void 0,done:!0}}return f.prototype=l,u(m,"constructor",l),u(l,"constructor",f),f.displayName=u(l,o,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,u(t,o,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(I.prototype),u(I.prototype,s,(function(){return this})),t.AsyncIterator=I,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var s=new I(c(e,n,r,i),a);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(m),u(m,o,"Generator"),u(m,a,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=B,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var o=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(o&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(o){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=t,s.arg=e,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:B(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}("object"===e(t)?t.exports:{});try{regeneratorRuntime=n}catch(t){"object"===("undefined"==typeof globalThis?"undefined":e(globalThis))?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}).call(this,n(13)(t))},function(t,e,n){(function(t,r){var i=n(24),a=n(17),s=n(7),o=n(3),u=n(4),c=n(14),A=n(15);function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}void 0===t&&(t=n(2).Buffer);var f=n(52),l=n(18),h=n(170),y=n(193),g=n(194),m=n(196),b=n(25),I=n(266),C=n(9),v=n(272),E=n(31).LogMessage,w=n(89),B=n(19).ValidatePresence,Q={main:"https://main.net955305.contentfabric.io",demo:"https://demov3.net955210.contentfabric.io",demov3:"https://demov3.net955210.contentfabric.io",test:"https://test.net955203.contentfabric.io"};C.Platform()===C.PLATFORM_NODE&&(r.Response=n(53).Response);var M=function(){"use strict";function e(t){var n=t.contentSpaceId,r=t.networkId,i=t.networkName,a=t.fabricVersion,s=t.fabricURIs,o=t.ethereumURIs,u=t.authServiceURIs,A=t.ethereumContractTimeout,d=void 0===A?10:A,p=t.trustAuthorityId,f=t.staticToken,l=t.noCache,h=void 0!==l&&l,y=t.noAuth,g=void 0!==y&&y,m=t.assumeV3,b=void 0!==m&&m;c(this,e),this.utils=C,this.contentSpaceId=n,this.contentSpaceAddress=this.utils.HashToAddress(n),this.contentSpaceLibraryId=this.utils.AddressToLibraryId(this.contentSpaceAddress),this.contentSpaceObjectId=this.utils.AddressToObjectId(this.contentSpaceAddress),this.networkId=r,this.networkName=i,this.fabricVersion=a,this.fabricURIs=s,this.authServiceURIs=u,this.ethereumURIs=o,this.ethereumContractTimeout=d,this.trustAuthorityId=p,this.noCache=h,this.noAuth=g,this.assumeV3=b,this.debug=!1,this.InitializeClients({staticToken:f})}var n,r,s,d,M,k,_,x,S,D,R,T,N,O,H,L,U,F,j,P;return A(e,[{key:"Log",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];E(this,t,e)}},{key:"ToggleLogging",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(n){n&&(n.debug=t,n.debugOptions=e)};[this,this.authClient,this.ethClient,this.HttpClient,this.userProfileClient].forEach(n),t&&this.Log("Debug Logging Enabled:\n Content Space: ".concat(this.contentSpaceId,"\n Fabric URLs: [\n\t\t").concat(this.fabricURIs.join(", \n\t\t"),"\n\t]\n Ethereum URLs: [\n\t\t").concat(this.ethereumURIs.join(", \n\t\t"),"\n\t]\n Auth Service URLs: [\n\t\t").concat(this.authServiceURIs.join(", \n\t\t"),"\n\t]\n "))}},{key:"EnableMethodLogging",value:function(){var t;t=this,Object.getOwnPropertyNames(Object.getPrototypeOf(t)).filter((function(e){return"function"==typeof t[e]})).forEach((function(e){var n=t[e].bind(t);"AsyncFunction"===n.constructor.name?t[e]=u(o.mark((function t(){var r,i,a,s,u,c=arguments;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(r=Date.now(),i=c.length,a=new Array(i),s=0;s<i;s++)a[s]=c[s];return t.next=4,n.apply(void 0,a);case 4:return u=t.sent,console.log(e,Date.now()-r,"ms",JSON.stringify(a)),t.abrupt("return",u);case 7:case"end":return t.stop()}}),t)}))):t[e]=function(){for(var t=Date.now(),r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var s=n.apply(void 0,i);return console.log(e,Date.now()-t,"ms",JSON.stringify(i)),s}}))}},{key:"InitializeClients",value:(P=u(o.mark((function t(){var e,n,r,i,a=arguments;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=a.length>0&&void 0!==a[0]?a[0]:{},n=e.staticToken,this.contentTypes={},this.encryptionConks={},this.stateChannelAccess={},this.objectTenantIds={},this.objectLibraryIds={},this.objectImageUrls={},this.visibilityInfo={},this.inaccessibleLibraries={},this.HttpClient=new b({uris:this.fabricURIs,debug:this.debug}),this.AuthHttpClient=new b({uris:this.authServiceURIs,debug:this.debug}),this.ethClient=new g({client:this,uris:this.ethereumURIs,networkId:this.networkId,debug:this.debug,timeout:this.ethereumContractTimeout}),this.signer||(r=this.GenerateWallet(),i=r.AddAccountFromMnemonic({mnemonic:r.GenerateMnemonic()}),this.SetSigner({signer:i,reset:!1}),this.SetStaticToken({token:n})),this.authClient=new h({client:this,contentSpaceId:this.contentSpaceId,signer:this.signer,noCache:this.noCache,noAuth:this.noAuth,debug:this.debug}),this.userProfileClient=new m({client:this,debug:this.debug}),this.Crypto=v,this.Crypto.ElvCrypto();case 17:case"end":return t.stop()}}),t,this)}))),function(){return P.apply(this,arguments)})},{key:"ConfigUrl",value:function(){return this.configUrl}},{key:"SetAuth",value:function(t){this.noAuth=!t,this.authClient.noAuth=!t}},{key:"UseRegion",value:(j=u(o.mark((function t(n){var r,i,a,s,u;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.region,this.configUrl){t.next=3;break}throw Error("Unable to change region: Configuration URL not set");case 3:return t.next=5,e.Configuration({configUrl:this.configUrl,region:r});case 5:return i=t.sent,a=i.fabricURIs,s=i.ethereumURIs,u=i.authServiceURIs,this.authServiceURIs=u,this.fabricURIs=a,this.ethereumURIs=s,this.HttpClient.uris=a,this.HttpClient.uriIndex=0,this.ethClient.ethereumURIs=s,this.ethClient.ethereumURIIndex=0,t.abrupt("return",{fabricURIs:a,ethereumURIs:s});case 17:case"end":return t.stop()}}),t,this)}))),function(t){return j.apply(this,arguments)})},{key:"ResetRegion",value:(F=u(o.mark((function t(){return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.configUrl){t.next=2;break}throw Error("Unable to change region: Configuration URL not set");case 2:return t.next=4,this.UseRegion({region:""});case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)}))),function(){return F.apply(this,arguments)})},{key:"NodeId",value:(U=u(o.mark((function t(n){var r,i,a;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.region,t.next=3,e.Configuration({configUrl:this.configUrl,region:r});case 3:return i=t.sent,a=i.nodeId,t.abrupt("return",a);case 6:case"end":return t.stop()}}),t,this)}))),function(t){return U.apply(this,arguments)})},{key:"Nodes",value:function(){return{fabricURIs:this.fabricURIs,ethereumURIs:this.ethereumURIs,authServiceURIs:this.authServiceURIs}}},{key:"SetNodes",value:function(t){var e=t.fabricURIs,n=t.ethereumURIs,r=t.authServiceURIs;e&&(this.fabricURIs=e,this.HttpClient.uris=e,this.HttpClient.uriIndex=0),n&&(this.ethereumURIs=n,this.ethClient.ethereumURIs=n,this.ethClient.ethereumURIIndex=0),r&&(this.authServiceURIs=r,this.AuthHttpClient.uris=r,this.AuthHttpClient.uriIndex=0)}},{key:"NetworkInfo",value:function(){return{name:this.networkName,id:this.networkId,configUrl:this.configUrl}}},{key:"GenerateWallet",value:function(){return new y(this.ethClient.Provider())}},{key:"ClearSigner",value:function(){this.signer=void 0,this.InitializeClients()}},{key:"ClearCache",value:function(){this.authClient.ClearCache()}},{key:"SetSigner",value:function(t){var e=t.signer,n=t.reset,r=void 0===n||n;this.staticToken=void 0,e.connect(this.ethClient.Provider()),e.provider.pollingInterval=500,this.signer=e,r&&this.InitializeClients()}},{key:"SetRemoteSigner",value:(L=u(o.mark((function t(e){var n,r,i,a,s,u;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.idToken,r=e.authToken,i=e.tenantId,a=e.extraData,s=e.unsignedPublicAuth,u=new I({rpcUris:this.authServiceURIs,idToken:n,authToken:r,tenantId:i,provider:this.ethClient.provider,extraData:a,unsignedPublicAuth:s}),t.next=4,u.Initialize();case 4:this.SetSigner({signer:u});case 5:case"end":return t.stop()}}),t,this)}))),function(t){return L.apply(this,arguments)})},{key:"SetSignerFromWeb3Provider",value:(H=u(o.mark((function t(e){var n,r;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.provider,this.staticToken=void 0,(r=new l.providers.Web3Provider(n)).pollingInterval=250,this.signer=r.getSigner(),t.next=7,this.signer.getAddress();case 7:return this.signer.address=t.sent,t.next=10,this.InitializeClients();case 10:case"end":return t.stop()}}),t,this)}))),function(t){return H.apply(this,arguments)})},{key:"CreateAccount",value:(O=u(o.mark((function t(e){var n,r,i,a,s,u,c;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.tenantId,r=e.fundingToken,i=e.funds,a=void 0===i?.5:i,s=e.groupToken,this.signer||(u=this.GenerateWallet(),c=u.AddAccountFromMnemonic({mnemonic:u.GenerateMnemonic()}),this.SetSigner({signer:c})),t.next=4,this.authClient.MakeKMSRequest({method:"POST",path:"/ks/otp/fnd/".concat(n),body:{toAddr:this.signer.address,amtStr:this.utils.EtherToWei(a)},headers:{Authorization:"Bearer ".concat(r)}});case 4:return t.next=6,this.userProfileClient.CreateWallet();case 6:return t.next=8,this.userProfileClient.ReplaceUserMetadata({metadataSubtree:"tenantContractId",metadata:n});case 8:if(!s){t.next=11;break}return t.next=11,this.authClient.MakeKMSRequest({method:"POST",path:"/ks/otp/grp/".concat(n),body:{addAddr:this.signer.address},headers:{Authorization:"Bearer ".concat(s)}});case 11:return t.abrupt("return",this.utils.FormatAddress(this.signer.address));case 12:case"end":return t.stop()}}),t,this)}))),function(t){return O.apply(this,arguments)})},{key:"CreateFabricToken",value:(N=u(o.mark((function e(){var n,r,i,a,s,c,A,d,f,h,y,g,m,b=this,I=arguments;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=I.length>0&&void 0!==I[0]?I[0]:{},r=n.duration,i=void 0===r?864e5:r,a=n.spec,s=void 0===a?{}:a,c=n.address,A=n.Sign,d=n.addEthereumPrefix,f=void 0===d||d,c=c||this.CurrentAccountAddress(),e.t0=p,e.t1=p({},s),e.t2={},e.t3="iusr".concat(C.AddressToHash(c)),e.t4=t.from(c.replace(/^0x/,""),"hex").toString("base64"),e.next=9,this.ContentSpaceId();case 9:return e.t5=e.sent,e.t6=Date.now(),e.t7=Date.now()+i,e.t8={sub:e.t3,adr:e.t4,spc:e.t5,iat:e.t6,exp:e.t7},h=(0,e.t0)(e.t1,e.t2,e.t8),A||(A=function(){var t=u(o.mark((function t(e){return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",b.authClient.Sign(e));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),y="Eluvio Content Fabric Access Token 1.0\n".concat(JSON.stringify(h)),f&&(y=l.utils.keccak256(t.from("Ethereum Signed Message:\n".concat(y.length).concat(y),"utf-8"))),e.next=19,A(y);case 19:return g=e.sent,m=w.deflateRaw(t.from(JSON.stringify(h),"utf-8")),e.abrupt("return","acspjc".concat(this.utils.B58(t.concat([t.from(g.replace(/^0x/,""),"hex"),t.from(m)]))));case 22:case"end":return e.stop()}}),e,this)}))),function(){return N.apply(this,arguments)})},{key:"CreateSignedToken",value:(T=u(o.mark((function e(n){var r,i,a,s,u,c,A,d,p,f,h,y,g,m,b,I;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.libraryId,i=n.objectId,a=n.versionHash,s=n.policyId,u=n.subject,c=n.grantType,A=void 0===c?"read":c,d=n.allowDecryption,p=void 0!==d&&d,f=n.duration,h=n.context,y=void 0===h?{}:h,u){e.next=9;break}return e.t0="iusr",e.t1=this.utils,e.next=6,this.CurrentAccountAddress();case 6:e.t2=e.sent,e.t3=e.t1.AddressToHash.call(e.t1,e.t2),u=e.t0.concat.call(e.t0,e.t3);case 9:return s&&(y["elv:delegation-id"]=s),e.t4=t,e.next=13,this.CurrentAccountAddress().replace(/^0x/,"");case 13:return e.t5=e.sent,e.t6=e.t4.from.call(e.t4,e.t5,"hex").toString("base64"),e.t7=u,e.next=18,this.ContentSpaceId();case 18:if(e.t8=e.sent,e.t9=Date.now(),e.t10=Date.now()+f,e.t11=A,e.t12=y,g={adr:e.t6,sub:e.t7,spc:e.t8,iat:e.t9,exp:e.t10,gra:e.t11,ctx:e.t12},a&&(i=this.utils.DecodeVersionHash(a).objectId),!i){e.next=31;break}if(g.qid=i,r){e.next=31;break}return e.next=30,this.ContentObjectLibraryId({objectId:i});case 30:r=e.sent;case 31:if(r&&(g.lib=r),!p){e.next=37;break}return e.next=35,this.authClient.ReEncryptionConk({libraryId:r,objectId:i});case 35:m=e.sent,g.apk=m.public_key;case 37:return b=w.deflateRaw(t.from(JSON.stringify(g),"utf-8")),e.next=40,this.authClient.Sign(l.utils.keccak256(b));case 40:return I=e.sent,e.abrupt("return","aessjc".concat(this.utils.B58(t.concat([t.from(I.replace(/^0x/,""),"hex"),t.from(b)]))));case 42:case"end":return e.stop()}}),e,this)}))),function(t){return T.apply(this,arguments)})},{key:"CurrentAccountAddress",value:function(){return this.signer?this.utils.FormatAddress(this.signer.address):""}},{key:"SetOauthToken",value:(R=u(o.mark((function t(e){var n,r,i;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.token,this.oauthToken=n,r=this.GenerateWallet(),i=r.AddAccountFromMnemonic({mnemonic:r.GenerateMnemonic()}),this.SetSigner({signer:i});case 5:case"end":return t.stop()}}),t,this)}))),function(t){return R.apply(this,arguments)})},{key:"SetSignerFromOauthToken",value:(D=u(o.mark((function t(n){var r,i,a,s,u,c,A,d;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.token,this.trustAuthorityId){t.next=3;break}throw Error("Unable to authorize with OAuth token: No trust authority ID set");case 3:if(i=this.GenerateWallet(),t.prev=4,this.kmsURIs){t.next=17;break}return t.next=8,e.FromConfigurationUrl({configUrl:this.configUrl});case 8:return(a=t.sent).SetSigner({signer:i.AddAccountFromMnemonic({mnemonic:i.GenerateMnemonic()})}),t.next=12,a.authClient.KMSInfo({kmsId:this.trustAuthorityId});case 12:if(s=t.sent,(u=s.urls)&&0!==u.length){t.next=16;break}throw Error("Unable to authorize with OAuth token: No KMS URLs set");case 16:this.kmsURIs=u;case 17:return this.oauthToken=r,c=new b({uris:this.kmsURIs,debug:this.debug}),t.next=22,this.utils.ResponseToJson(c.Request({headers:{Authorization:"Bearer ".concat(r)},method:"PUT",path:"/ks/jwt/wlt",forceFailover:!0}));case 22:return A=t.sent,d=A.UserSKHex,this.SetSigner({signer:i.AddAccount({privateKey:d})}),t.next=27,this.userProfileClient.WalletAddress();case 27:t.next=36;break;case 29:return t.prev=29,t.t0=t.catch(4),this.Log("Failed to set signer from OAuth token:",!0),this.Log(t.t0,!0),t.next=35,this.ClearSigner();case 35:throw t.t0;case 36:case"end":return t.stop()}}),t,this,[[4,29]])}))),function(t){return D.apply(this,arguments)})},{key:"SetStaticToken",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.token;e||(e=this.utils.B64(JSON.stringify({qspace_id:this.contentSpaceId}))),this.staticToken=e}},{key:"ClearStaticToken",value:function(){this.staticToken=void 0}},{key:"SetPolicyAuthorization",value:(S=u(o.mark((function t(e){var n;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.objectId,t.t0=this,t.next=4,this.GenerateStateChannelToken({objectId:n});case 4:t.t1=t.sent,t.t2={token:t.t1},t.t0.SetStaticToken.call(t.t0,t.t2);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return S.apply(this,arguments)})},{key:"Sign",value:(x=u(o.mark((function t(e){var n;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.authClient.Sign(l.utils.keccak256(l.utils.toUtf8Bytes(e)));case 2:return n=t.sent,t.abrupt("return",this.utils.FormatSignature(n));case 4:case"end":return t.stop()}}),t,this)}))),function(t){return x.apply(this,arguments)})},{key:"EncryptECIES",value:(_=u(o.mark((function t(e){var n,r;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.message,r=e.publicKey,this.signer){t.next=3;break}throw"Signer not set";case 3:return B("message",n),t.next=6,this.Crypto.EncryptConk(n,r||this.signer.signingKey.keyPair.publicKey);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return _.apply(this,arguments)})},{key:"DecryptECIES",value:(k=u(o.mark((function t(e){var n;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.message,this.signer){t.next=3;break}throw"Signer not set";case 3:return B("message",n),t.next=6,this.Crypto.DecryptCap(n,this.signer.signingKey.privateKey);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return k.apply(this,arguments)})},{key:"Request",value:(M=u(o.mark((function t(e){var n,r,i,a,s,u,c,A;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.url,r=e.format,i=void 0===r?"json":r,a=e.method,s=void 0===a?"GET":a,u=e.headers,c=void 0===u?{}:u,A=e.body,t.abrupt("return",this.utils.ResponseToFormat(i,b.Fetch(n,{method:s,headers:c,body:A})));case 2:case"end":return t.stop()}}),t,this)}))),function(t){return M.apply(this,arguments)})},{key:"FrameAllowedMethods",value:function(){var t=this,e=["constructor","AccessGroupMembershipMethod","CallFromFrameMessage","ClearSigner","CreateAccount","EnableMethodLogging","FormatBlockNumbers","FrameAllowedMethods","FromConfigurationUrl","GenerateWallet","InitializeClients","Log","SetRemoteSigner","SetSigner","SetSignerFromWeb3Provider","Sign","ToggleLogging"];return Object.getOwnPropertyNames(Object.getPrototypeOf(this)).filter((function(n){return"function"==typeof t[n]&&!e.includes(n)}))}},{key:"CallFromFrameMessage",value:(d=u(o.mark((function t(e,n){var r,i,s,u,c=this;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("ElvFrameRequest"===e.type){t.next=2;break}return t.abrupt("return");case 2:if(e.callbackId&&(r=function(t){n(c.utils.MakeClonable({type:"ElvFrameResponse",requestId:e.callbackId,response:t}))},e.args.callback=r),t.prev=3,i=e.calledMethod,"userProfileClient"!==e.module){t.next=13;break}if(this.userProfileClient.FrameAllowedMethods().includes(i)){t.next=8;break}throw Error("Invalid user profile method: "+i);case 8:return t.next=10,this.userProfileClient[i](e.args);case 10:s=t.sent,t.next=18;break;case 13:if(this.FrameAllowedMethods().includes(i)){t.next=15;break}throw Error("Invalid method: "+i);case 15:return t.next=17,this[i](e.args);case 17:s=t.sent;case 18:n(this.utils.MakeClonable({type:"ElvFrameResponse",requestId:e.requestId,response:s})),t.next=27;break;case 21:t.prev=21,t.t0=t.catch(3),this.Log("Frame Message Error:\n Method: ".concat(e.calledMethod,"\n Arguments: ").concat(JSON.stringify(e.args,null,2),"\n Error: ").concat("object"===a(t.t0)?JSON.stringify(t.t0,null,2):t.t0),!0),console.error(t.t0),u=t.t0 instanceof Error?t.t0.message:t.t0,n(this.utils.MakeClonable({type:"ElvFrameResponse",requestId:e.requestId,error:u}));case 27:case"end":return t.stop()}}),t,this,[[3,21]])}))),function(t,e){return d.apply(this,arguments)})}],[{key:"Configuration",value:(s=u(o.mark((function t(e){var n,r,a,s,u,c,A,d,p,l,h;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.configUrl,r=e.kmsUrls,a=void 0===r?[]:r,s=e.region,t.prev=1,(u=new f(n)).pathname("/config"),s&&u.addSearch("elvgeo",s),t.next=7,C.ResponseToJson(b.Fetch(u.toString()));case 7:return c=t.sent,A=function(t){return t.toLowerCase().startsWith("https")},(d=c.network.services.fabric_api).find(A)&&(d=d.filter(A)),(p=c.network.services.ethereum_api).find(A)&&(p=p.filter(A)),(l=c.network.services.authority_service||[]).find(A)&&(l=l.filter(A)),h=Math.max.apply(Math,i(c.network.api_versions||[2])),t.abrupt("return",{nodeId:c.node_id,contentSpaceId:c.qspace.id,networkId:(c.qspace.ethereum||{}).network_id,networkName:((c.qspace||{}).names||[])[0],fabricURIs:d,ethereumURIs:p,authServiceURIs:l,kmsURIs:a,fabricVersion:h});case 19:throw t.prev=19,t.t0=t.catch(1),console.error("Error retrieving fabric configuration:"),console.error(t.t0),t.t0;case 24:case"end":return t.stop()}}),t,null,[[1,19]])}))),function(t){return s.apply(this,arguments)})},{key:"FromNetworkName",value:(r=u(o.mark((function t(e){var n,r,i,a,s,u,c,A,d,p,f,l;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.networkName,r=e.region,i=e.trustAuthorityId,a=e.staticToken,s=e.ethereumContractTimeout,u=void 0===s?10:s,c=e.noCache,A=void 0!==c&&c,d=e.noAuth,p=void 0!==d&&d,f=e.assumeV3,l=Q[n]){t.next=4;break}throw Error("Invalid network name: "+n);case 4:return t.next=6,this.FromConfigurationUrl({configUrl:l,region:r,trustAuthorityId:i,staticToken:a,ethereumContractTimeout:u,noCache:A,noAuth:p,assumeV3:f});case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"FromConfigurationUrl",value:(n=u(o.mark((function t(n){var r,i,a,s,u,c,A,d,p,f,l,h,y,g,m,b,I,C,v,E,w;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.configUrl,i=n.region,a=n.trustAuthorityId,s=n.staticToken,u=n.ethereumContractTimeout,c=void 0===u?10:u,A=n.noCache,d=void 0!==A&&A,p=n.noAuth,f=void 0!==p&&p,l=n.assumeV3,h=void 0!==l&&l,t.next=3,e.Configuration({configUrl:r,region:i});case 3:return y=t.sent,g=y.contentSpaceId,m=y.networkId,b=y.networkName,I=y.fabricURIs,C=y.ethereumURIs,v=y.authServiceURIs,E=y.fabricVersion,(w=new e({contentSpaceId:g,networkId:m,networkName:b,fabricVersion:E,fabricURIs:I,ethereumURIs:C,authServiceURIs:v,ethereumContractTimeout:c,trustAuthorityId:a,staticToken:s,noCache:d,noAuth:f,assumeV3:h})).configUrl=r,t.abrupt("return",w);case 14:case"end":return t.stop()}}),t)}))),function(t){return n.apply(this,arguments)})}]),e}();Object.assign(M.prototype,n(347)),Object.assign(M.prototype,n(91)),Object.assign(M.prototype,n(348)),Object.assign(M.prototype,n(349)),Object.assign(M.prototype,n(351)),Object.assign(M.prototype,n(352)),Object.assign(M.prototype,n(355)),Object.assign(M.prototype,n(356)),e.ElvClient=M}).call(this,n(2).Buffer,n(6))},function(t,e,n){var r=n(81);t.exports=function(t){if(Array.isArray(t))return r(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var r,i,a=n(3),s=n(4),o=n(14),u=n(15),c=n(7);function A(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var d=n(25),p=n(18),f=n(9),l=n(12),h=n(31).LogMessage,y={SPACE:"space",LIBRARY:"library",TYPE:"type",OBJECT:"object",WALLET:"wallet",GROUP:"group",ACCESSIBLE:"accessible",EDITABLE:"editable",TENANT:"tenant",OTHER:"other"},g={v2:(r={},c(r,y.SPACE,n(177)),c(r,y.LIBRARY,n(178)),c(r,y.TYPE,n(179)),c(r,y.OBJECT,n(180)),c(r,y.WALLET,n(181)),c(r,y.GROUP,n(182)),c(r,y.ACCESSIBLE,n(183)),c(r,y.EDITABLE,n(184)),r),v3:(i={},c(i,y.SPACE,n(185)),c(i,y.LIBRARY,n(186)),c(i,y.TYPE,n(187)),c(i,y.OBJECT,n(188)),c(i,y.WALLET,n(189)),c(i,y.GROUP,n(190)),c(i,y.ACCESSIBLE,n(90)),c(i,y.EDITABLE,n(191)),c(i,y.TENANT,n(192)),i)},m=function(){"use strict";function t(e){var n=e.client,r=e.contentSpaceId,i=e.debug,a=void 0!==i&&i,s=e.noCache,u=void 0!==s&&s,c=e.noAuth,A=void 0!==c&&c;o(this,t),this.ACCESS_TYPES=y,this.CONTRACTS=g,this.client=n,this.contentSpaceId=r,this.noCache=u,this.noAuth=A,this.debug=a,this.accessTransactions={},this.modifyTransactions={},this.transactionLocks={},this.methodAvailability={},this.accessVersions={},this.accessTypes={},this.channelContentTokens={},this.encryptionKeys={},this.reencryptionKeys={},this.requestIds={},this.providers={}}var e,n,r,i,m,b,I,C,v,E,w,B,Q,M,k,_,x,S,D,R,T,N,O,H,L,U,F,j,P,G,q,Y,K;return u(t,[{key:"Log",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];h(this,t,e)}},{key:"CreateStaticToken",value:function(t){var e=t.libraryId,n={qspace_id:this.client.contentSpaceId};return e&&(n.qlib_id=e),f.B64(JSON.stringify(n))}},{key:"AuthorizationHeader",value:(K=s(a.mark((function t(e){var n,r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.AuthorizationToken(e);case 2:return n=t.sent,r={Authorization:"Bearer "+n},e.encryption&&"none"!==e.encryption&&(r["X-Content-Fabric-Encryption-Scheme"]=e.encryption),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(t){return K.apply(this,arguments)})},{key:"AuthorizationToken",value:(Y=s(a.mark((function t(e){var n,r,i,s,o,u,c,A,d,p,f,l,h,y,g,m,b,I,C;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,i=e.versionHash,s=e.partHash,o=e.encryption,u=e.audienceData,c=e.context,A=e.update,d=void 0!==A&&A,p=e.channelAuth,f=void 0!==p&&p,l=e.oauthToken,h=e.noCache,y=void 0!==h&&h,g=e.noAuth,m=void 0!==g&&g,i&&(r=this.client.utils.DecodeVersionHash(i).objectId),t.t0=r&&this.client.signer,!t.t0){t.next=10;break}return t.t1=this.client.utils,t.next=7,this.client.userProfileClient.WalletAddress(!1);case 7:t.t2=t.sent,t.t3=this.client.utils.HashToAddress(r),t.t0=t.t1.EqualAddress.call(t.t1,t.t2,t.t3);case 10:if(b=t.t0,!this.client.staticToken||b){t.next=13;break}return t.abrupt("return",this.client.staticToken);case 13:if(I=this.noCache,t.prev=14,y&&!this.noCache&&(this.noCache=!0),f&&this.client.signer&&this.client.signer.remoteSigner&&(m=!0,f=!1),!f){t.next=23;break}return t.next=20,this.GenerateChannelContentToken({objectId:r,versionHash:i,audienceData:u,context:c,oauthToken:l});case 20:C=t.sent,t.next=28;break;case 23:if(!(m&&this.client.signer&&this.client.signer.remoteSigner&&this.client.signer.unsignedPublicAuth)){t.next=25;break}return t.abrupt("return",this.CreateStaticToken({libraryId:n}));case 25:return t.next=27,this.GenerateAuthorizationToken({libraryId:n,objectId:r,versionHash:i,partHash:s,encryption:o,update:d,noAuth:m});case 27:C=t.sent;case 28:return t.abrupt("return",C);case 31:throw t.prev=31,t.t4=t.catch(14),t.t4;case 34:return t.prev=34,this.noCache=I,t.finish(34);case 37:case"end":return t.stop()}}),t,this,[[14,31,34,37]])}))),function(t){return Y.apply(this,arguments)})},{key:"GenerateAuthorizationToken",value:(q=s(a.mark((function t(e){var n,r,i,s,o,u,c,A,d,l,h,g,m,b,I,C,v,E,w;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,i=e.versionHash,s=e.partHash,o=e.encryption,u=e.update,c=void 0!==u&&u,A=e.noAuth,d=void 0!==A&&A,i&&(r=f.DecodeVersionHash(i).objectId),t.t0=o&&"none"!==o&&r,!t.t0){t.next=9;break}return t.next=6,this.AccessType(r);case 6:t.t1=t.sent,t.t2=y.OBJECT,t.t0=t.t1===t.t2;case 9:if(!t.t0){t.next=22;break}return t.next=12,this.Owner({id:r});case 12:return h=t.sent,g="eluv.caps.iusr".concat(f.AddressToHash(this.client.signer.address)),t.next=16,this.client.ContentObjectMetadata({libraryId:n,objectId:r,metadataSubtree:g});case 16:if(m=t.sent,f.EqualAddress(h,this.client.signer.address)||m){t.next=22;break}return t.next=20,this.ReEncryptionConk({libraryId:n,objectId:r});case 20:b=t.sent,l=b.public_key;case 22:if(I={qspace_id:this.contentSpaceId,addr:f.FormatAddress(this.client.signer&&this.client.signer.address||"")},this.noAuth||d){t.next=29;break}return t.next=26,this.MakeAccessRequest({libraryId:n,objectId:r,versionHash:i,update:c,publicKey:l,noCache:this.noCache,noAuth:this.noAuth||d});case 26:C=t.sent,(v=C.transactionHash)&&(I.tx_id=v);case 29:return n&&(I.qlib_id=n),s&&(I.qphash=s),l&&(I.afgh_pk=l),I=f.B64(JSON.stringify(I)),t.next=35,this.Sign(p.utils.keccak256(p.utils.toUtf8Bytes(I)));case 35:return E=t.sent,w=f.FormatSignature(E),t.abrupt("return","".concat(I,".").concat(f.B64(w)));case 38:case"end":return t.stop()}}),t,this)}))),function(t){return q.apply(this,arguments)})},{key:"MakeAccessRequest",value:(G=s(a.mark((function t(e){var n,r,i,s,o,u,c,A,d,p,l,h,y,g,m,b,I,C,v,E,w,B,Q,M,k,_,x,S=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,i=e.versionHash,s=e.args,o=void 0===s?[]:s,u=e.publicKey,c=void 0===u?"":u,A=e.update,d=void 0!==A&&A,p=e.skipCache,l=void 0!==p&&p,h=e.noCache,y=void 0!==h&&h,g=e.cacheOnly,this.client.signer){t.next=3;break}return t.abrupt("return",{transactionHash:""});case 3:return t.next=5,this.client.userProfileClient.UserWalletAddress({address:this.client.signer.address});case 5:if(t.sent){t.next=12;break}return t.next=9,this.client.userProfileClient.WalletAddress();case 9:if(t.sent){t.next=12;break}throw Error("User wallet contract is required to make access requests");case 12:return i&&(r=f.DecodeVersionHash(i).objectId),m=r||n||this.contentSpaceId,t.next=16,this.ContractInfo({id:m});case 16:if(b=t.sent,I=b.isV3,C=b.accessType,v=b.abi,void 0!==C){t.next=22;break}throw Error("Unable to determine contract info for ".concat(m," (").concat(this.client.utils.HashToAddress(m),") - Wrong network?"));case 22:return t.next=24,this.AccessInfo({accessType:C,publicKey:c,update:d,args:o,isV3:I});case 24:E=t.sent,w=E.accessArgs,B=E.checkAccessCharge,Q=f.HashToAddress(m),M=0;case 29:if(!this.transactionLocks[m]){t.next=36;break}return t.next=32,new Promise((function(t){return setTimeout(t,100)}));case 32:(M+=100)>15e3&&(this.Log("Lock never released for ".concat(m," - releasing lock")),delete this.transactionLocks[m]),t.next=29;break;case 36:if(t.prev=36,this.transactionLocks[m]=!0,y||l){t.next=46;break}if(!(k=d?this.modifyTransactions:this.accessTransactions)[Q]){t.next=46;break}if(!(k[Q].issuedAt>Date.now()-432e5)){t.next=45;break}return t.abrupt("return",k[Q]);case 45:delete k[Q];case 46:if(!g){t.next=48;break}return t.abrupt("return");case 48:if(!d){t.next=55;break}return this.Log("Making update request on ".concat(C," ").concat(m)),t.next=52,this.UpdateRequest({id:m,abi:v});case 52:_=t.sent,t.next=59;break;case 55:return this.Log("Making access request on ".concat(C," ").concat(m)),t.next=58,this.AccessRequest({id:m,args:w,checkAccessCharge:B});case 58:_=t.sent;case 59:return x=d?this.modifyTransactions:this.accessTransactions,t.prev=60,y||(x[Q]={issuedAt:Date.now(),transactionHash:_.transactionHash},_.logs.some((function(t){if(t.values&&(t.values.requestID||t.values.requestNonce))return S.requestIds[Q]=(t.values.requestID||t.values.requestNonce||"").toString().replace(/^0x/,""),!0}))),t.abrupt("return",_);case 65:throw t.prev=65,t.t0=t.catch(60),y||delete x[Q],t.t0;case 69:return t.prev=69,delete this.transactionLocks[m],t.finish(69);case 72:case"end":return t.stop()}}),t,this,[[36,,69,72],[60,65]])}))),function(t){return G.apply(this,arguments)})},{key:"AccessRequest",value:(P=s(a.mark((function t(e){var n,r,i,s,o,u,c,A,d,p,l,h,g,m,b;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.id,r=e.args,i=void 0===r?[]:r,s=e.checkAccessCharge,o=void 0!==s&&s,t.next=3,this.ContractInfo({id:n});case 3:if(u=t.sent,c=u.isV3,A=u.accessType,d=u.abi,p=0,!o||A!==y.OBJECT){t.next=26;break}return t.next=11,this.Owner({id:n,abi:d});case 11:if(l=t.sent,f.EqualAddress(this.client.signer.address,l)){t.next=26;break}return t.prev=13,h=c?[0,[],[]]:[i[0],i[3],i[4]],t.t0=f,t.next=18,this.GetAccessCharge({objectId:n,args:h});case 18:t.t1=t.sent,p=t.t0.WeiToEther.call(t.t0,t.t1),t.next=26;break;case 22:t.prev=22,t.t2=t.catch(13),this.Log("Failed to get access charge for",n),this.Log(t.t2);case 26:return p>0&&this.Log("Access charge: ".concat(p)),b=f.HashToAddress(n),m=c?"accessRequestV3":"accessRequest",t.next=31,this.ContractHasMethod({contractAddress:b,abi:d,methodName:m});case 31:if(t.sent){t.next=34;break}return this.Log("".concat(A," ").concat(n," has no ").concat(m," method. Skipping")),t.abrupt("return",{transactionHash:"",logs:[]});case 34:return t.next=36,this.client.CallContractMethodAndWait({contractAddress:b,abi:d,methodName:m,methodArgs:i,value:p});case 36:if(0!==(g=t.sent).logs.length){t.next=39;break}throw Error("Access denied (".concat(n,")"));case 39:return t.abrupt("return",g);case 40:case"end":return t.stop()}}),t,this,[[13,22]])}))),function(t){return P.apply(this,arguments)})},{key:"UpdateRequest",value:(j=s(a.mark((function t(e){var n,r,i,s;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.id,r=e.abi,t.next=3,this.client.CallContractMethodAndWait({contractAddress:f.HashToAddress(n),abi:r,methodName:"updateRequest",methodArgs:[]});case 3:if(i=t.sent,s=this.client.ExtractEventFromLogs({abi:r,event:i,eventName:"UpdateRequest"}),0!==i.logs.length&&s){t.next=7;break}throw Error("Update request denied for ".concat(n));case 7:return t.abrupt("return",i);case 8:case"end":return t.stop()}}),t,this)}))),function(t){return j.apply(this,arguments)})},{key:"AudienceData",value:function(t){var e=t.objectId,n=t.versionHash,r=t.protocols,i=void 0===r?[]:r,a=t.drms,s=void 0===a?[]:a,o=t.context;if(this.Log("Retrieving audience data: ".concat(e)),o=o||this.client.authContext||{},Object.values(o).find((function(t){return"string"!=typeof t})))throw Error("Context must be a map of string->string");var u=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?A(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({user_address:f.FormatAddress(this.client.signer.address),content_id:e||f.DecodeVersionHash(n).id,content_hash:n,hostname:this.client.HttpClient.BaseURI().hostname(),access_time:Math.round((new Date).getTime()).toString(),format:i.join(","),drm:s.join(",")},o);return"undefined"!=typeof window&&window.navigator&&(u.user_string=window.navigator.userAgent,u.language=window.navigator.language),this.Log(u),u}},{key:"GenerateChannelContentToken",value:(F=s(a.mark((function t(e){var n,r,i,s,o,u,c,A,d,h,y,g,m,b,I,C,v;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.objectId,r=e.versionHash,i=e.issuer,s=e.code,o=e.email,u=e.audienceData,c=e.context,A=e.oauthToken,d=e.value,h=void 0===d?0:d,!A){t.next=5;break}return t.next=4,this.GenerateOauthChannelToken({objectId:n,token:A});case 4:return t.abrupt("return",t.sent);case 5:if(this.noCache||!this.channelContentTokens[n]){t.next=11;break}if(!(this.channelContentTokens[n].issuedAt>Date.now()-432e5)){t.next=10;break}return t.abrupt("return",this.channelContentTokens[n].token);case 10:delete this.channelContentTokens[n];case 11:if(this.Log("Making state channel access request: ".concat(n)),!i){t.next=43;break}return g=i.replace(/^\//,"").split("/")[2],t.prev=14,t.next=17,this.client.CallContractMethod({contractAddress:f.HashToAddress(g),methodName:"addressKMS"});case 17:if(m=t.sent){t.next=20;break}throw"";case 20:t.next=27;break;case 22:return t.prev=22,t.t0=t.catch(14),t.next=26,this.client.DefaultKMSAddress();case 26:m=t.sent;case 27:return t.prev=27,t.next=30,f.ResponseToFormat("text",this.MakeAuthServiceRequest({kmsId:"ikms"+f.AddressToHash(m),method:"POST",path:l("as",i),body:{_PASSWORD:s,_EMAIL:o}}));case 30:y=t.sent,t.next=40;break;case 33:return t.prev=33,t.t1=t.catch(27),this.Log("/as token redemption failed:",!0),this.Log(t.t1,!0),t.next=39,f.ResponseToFormat("text",this.MakeKMSRequest({kmsId:"ikms"+f.AddressToHash(m),method:"POST",path:l("ks",i),body:{_PASSWORD:s,_EMAIL:o}}));case 39:y=t.sent;case 40:n=JSON.parse(f.FromB64(y)).qid,t.next=54;break;case 43:return u||(u=this.AudienceData({objectId:n,versionHash:r,context:c})),b=[JSON.stringify(u)],t.next=48,this.MakeKMSCall({objectId:n,methodName:"elv_channelContentRequestContext",paramTypes:["address","address","uint","uint"],params:[this.client.signer.address,f.HashToAddress(n),h,Date.now()],additionalParams:b});case 48:return I=t.sent,t.next=51,this.Sign(p.utils.keccak256(p.utils.toUtf8Bytes(I)));case 51:C=t.sent,v=f.FormatSignature(C),y="".concat(I,".").concat(f.B64(v));case 54:return this.noCache||(this.channelContentTokens[n]={token:y,issuedAt:Date.now()}),t.abrupt("return",y);case 56:case"end":return t.stop()}}),t,this,[[14,22],[27,33]])}))),function(t){return F.apply(this,arguments)})},{key:"ChannelContentFinalize",value:(U=s(a.mark((function t(e){var n,r,i,s,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.objectId,r=e.versionHash,i=e.percent,s=void 0===i?0:i,this.Log("Making state channel finalize request: ".concat(n)),t.next=4,this.MakeKMSCall({objectId:n,methodName:"elv_channelContentFinalizeContext",paramTypes:["address","address","uint","uint"],params:[this.client.signer.address,f.HashToAddress(n),s,Date.now()],additionalParams:[JSON.stringify(this.AudienceData({objectId:n,versionHash:r}))]});case 4:return o=t.sent,this.channelContentTokens[n]=void 0,t.abrupt("return",o);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return U.apply(this,arguments)})},{key:"GenerateOauthChannelToken",value:(L=s(a.mark((function t(e){var n,r,i,s;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.objectId,r=e.versionHash,i=e.token,r&&(n=f.DecodeVersionHash(r).objectId),this.noCache||!this.channelContentTokens[n]){t.next=6;break}if(!(this.channelContentTokens[n].issuedAt>Date.now()-432e5)){t.next=5;break}return t.abrupt("return",this.channelContentTokens[n].token);case 5:this.channelContentTokens[n]=void 0;case 6:return t.next=8,this.MakeKMSRequest({objectId:n,versionHash:r,method:"GET",path:l("ks","jwt","q",n),bodyType:"NONE",headers:{Authorization:"Bearer ".concat(i)}});case 8:return t.next=10,t.sent.text();case 10:return s=t.sent,this.noCache||(this.channelContentTokens[n]={token:s,issuedAt:Date.now()}),t.abrupt("return",s);case 13:case"end":return t.stop()}}),t,this)}))),function(t){return L.apply(this,arguments)})},{key:"IsV3",value:(H=s(a.mark((function t(e){var n,r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.id,!this.client.assumeV3){t.next=3;break}return t.abrupt("return",!0);case 3:return t.next=5,this.client.ethClient.ContractName(f.HashToAddress(n),!0);case 5:return r=t.sent,this.accessVersions[r]||(this.accessVersions[r]=this.ContractHasMethod({contractAddress:this.client.utils.HashToAddress(n),abi:this.CONTRACTS.v3[this.ACCESS_TYPES.ACCESSIBLE].abi,methodName:"accessRequestV3"})),t.next=9,this.accessVersions[r];case 9:return t.abrupt("return",t.sent);case 10:case"end":return t.stop()}}),t,this)}))),function(t){return H.apply(this,arguments)})},{key:"AccessInfo",value:(O=s(a.mark((function t(e){var n,r,i,s,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.accessType,r=e.publicKey,i=e.args,s=e.isV3,o=!1,n===y.OBJECT&&(o=!0,s||(i&&i.length>0?i[1]=this.client.signer.signingKey?this.client.signer.signingKey.publicKey:"":i=[0,this.client.signer.signingKey?this.client.signer.signingKey.publicKey:"",r,[],[]])),!s||i&&0!==i.length||(i=[[],[]]),t.abrupt("return",{accessArgs:i,checkAccessCharge:o});case 5:case"end":return t.stop()}}),t,this)}))),function(t){return O.apply(this,arguments)})},{key:"AccessType",value:(N=s(a.mark((function t(e){var n,r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.ethClient.ContractName(f.HashToAddress(e));case 2:if(n=t.sent,this.accessTypes[e]){t.next=23;break}t.t0=n,t.next="BaseContentSpace"===t.t0?7:"BaseLibrary"===t.t0?9:"BaseContentType"===t.t0?11:"BsAccessWallet"===t.t0?13:"BsAccessCtrlGrp"===t.t0?15:"BaseContent"===t.t0?17:"BaseTenantSpace"===t.t0?19:21;break;case 7:return r=y.SPACE,t.abrupt("break",22);case 9:return r=y.LIBRARY,t.abrupt("break",22);case 11:return r=y.TYPE,t.abrupt("break",22);case 13:return r=y.WALLET,t.abrupt("break",22);case 15:return r=y.GROUP,t.abrupt("break",22);case 17:return r=y.OBJECT,t.abrupt("break",22);case 19:return r=y.TENANT,t.abrupt("break",22);case 21:r=y.OTHER;case 22:this.accessTypes[e]=r;case 23:return t.abrupt("return",this.accessTypes[e]);case 24:case"end":return t.stop()}}),t,this)}))),function(t){return N.apply(this,arguments)})},{key:"AccessComplete",value:(T=s(a.mark((function t(e){var n,r,i,s,o,u,c,A;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.id,r=e.score,this.Log("Calling access complete on ".concat(n," with score ").concat(r)),t.next=4,this.ContractInfo({id:n});case 4:if(i=t.sent,s=i.abi,o=i.isV3,u=f.HashToAddress(n),c=this.requestIds[u]){t.next=11;break}throw Error("Unknown request ID for "+n);case 11:if(!o){t.next=17;break}return t.next=14,this.client.CallContractMethodAndWait({contractAddress:u,abi:s,methodName:"accessCompleteV3",methodArgs:[c,[],[]]});case 14:A=t.sent,t.next=20;break;case 17:return t.next=19,this.client.CallContractMethodAndWait({contractAddress:u,abi:s,methodName:o?"accessCompleteV3":"accessComplete",methodArgs:[c,r,""]});case 19:A=t.sent;case 20:return delete this.requestIds[u],delete this.accessTransactions[u],t.abrupt("return",A);case 23:case"end":return t.stop()}}),t,this)}))),function(t){return T.apply(this,arguments)})},{key:"ContractInfo",value:(R=s(a.mark((function t(e){var n,r,i,s,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.id,(r=e.address)||(r=f.HashToAddress(n)),n||(n=f.AddressToObjectId(r)),t.next=5,this.IsV3({id:n});case 5:return i=t.sent,s=i?"v3":"v2",t.next=9,this.AccessType(n);case 9:if((o=t.sent)!==this.ACCESS_TYPES.OTHER){t.next=12;break}return t.abrupt("return",{});case 12:return t.abrupt("return",{isV3:i,accessType:o,abi:this.CONTRACTS[s][o].abi});case 13:case"end":return t.stop()}}),t,this)}))),function(t){return R.apply(this,arguments)})},{key:"GetAccessCharge",value:(D=s(a.mark((function t(e){var n,r,i,s,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.objectId,r=e.args,t.next=3,this.ContractInfo({id:n});case 3:return i=t.sent,s=i.abi,t.next=7,this.client.CallContractMethod({contractAddress:f.HashToAddress(n),abi:s,methodName:"getAccessInfo",methodArgs:r});case 7:return o=t.sent,t.abrupt("return",0===o[1]?0:o[2]);case 9:case"end":return t.stop()}}),t,this)}))),function(t){return D.apply(this,arguments)})},{key:"Owner",value:(S=s(a.mark((function t(e){var n,r,i;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.id,r=e.address,this.client.signer){t.next=3;break}return t.abrupt("return",!1);case 3:return n&&(r=f.HashToAddress(n)),t.next=6,this.client.CallContractMethod({contractAddress:r,methodName:"owner",methodArgs:[]});case 6:return i=t.sent,t.abrupt("return",f.FormatAddress(i));case 8:case"end":return t.stop()}}),t,this)}))),function(t){return S.apply(this,arguments)})},{key:"Sign",value:(x=s(a.mark((function t(e){return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.t0=p.utils,!this.client.signer.signDigest){t.next=7;break}return t.next=4,this.client.signer.signDigest(e);case 4:t.t1=t.sent,t.next=10;break;case 7:return t.next=9,this.client.signer.signingKey.signDigest(e);case 9:t.t1=t.sent;case 10:return t.t2=t.t1,t.next=13,t.t0.joinSignature.call(t.t0,t.t2);case 13:return t.abrupt("return",t.sent);case 14:case"end":return t.stop()}}),t,this)}))),function(t){return x.apply(this,arguments)})},{key:"KMSAddress",value:(_=s(a.mark((function t(e){var n,r,i,s;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.objectId,(r=e.versionHash)&&(n=f.DecodeVersionHash(r).objectId),t.next=4,this.ContractInfo({id:n});case 4:if(i=t.sent,s=i.abi){t.next=8;break}throw Error("Unable to determine contract info for ".concat(n," - wrong network?"));case 8:return t.next=10,this.client.CallContractMethod({contractAddress:f.HashToAddress(n),abi:s,methodName:"addressKMS"});case 10:return t.abrupt("return",t.sent);case 11:case"end":return t.stop()}}),t,this)}))),function(t){return _.apply(this,arguments)})},{key:"KMSInfo",value:(k=s(a.mark((function t(e){var n,r,i,s,o,u,c,A,d;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.objectId,r=e.versionHash,!(i=e.kmsId)){t.next=11;break}return t.next=4,this.ContractInfo({address:this.client.contentSpaceAddress});case 4:return o=t.sent,u=o.abi,t.next=8,this.client.CallContractMethod({contractAddress:this.client.contentSpaceAddress,abi:u,methodName:"getKMSInfo",methodArgs:[i,[]],formatArguments:!1});case 8:s=t.sent,t.next=19;break;case 11:return r&&(n=f.DecodeVersionHash(r).objectId),t.next=14,this.ContractInfo({id:n});case 14:return c=t.sent,A=c.abi,t.next=18,this.client.CallContractMethod({contractAddress:f.HashToAddress(n),abi:A,methodName:"getKMSInfo",methodArgs:[[]],formatArguments:!1});case 18:s=t.sent;case 19:return d=p.utils.computePublicKey(f.HashToAddress(s[1]),!1),t.abrupt("return",{urls:s[0].split(","),publicKey:d});case 21:case"end":return t.stop()}}),t,this)}))),function(t){return k.apply(this,arguments)})},{key:"RetrieveConk",value:(M=s(a.mark((function t(e){var n,r,i,s,o,u;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,n){t.next=5;break}return t.next=4,this.client.ContentObjectLibraryId({objectId:r});case 4:n=t.sent;case 5:return t.next=7,this.KMSAddress({objectId:r});case 7:return i=t.sent,s="eluv.caps.ikms".concat(f.AddressToHash(i)),t.next=11,this.client.ContentObjectMetadata({libraryId:n,objectId:r,metadataSubtree:s});case 11:if(o=t.sent){t.next=14;break}throw Error("No KMS key set for this object");case 14:return t.next=16,this.MakeKMSCall({objectId:r,methodName:"elv_getEncryptionKey",paramTypes:["string","string","string","string","string"],params:[this.client.contentSpaceId,n,r,o||"",""]});case 16:return u=t.sent,t.abrupt("return",JSON.parse(f.FromB58(u.replace(/^kp__/,"")).toString("utf-8")));case 18:case"end":return t.stop()}}),t,this)}))),function(t){return M.apply(this,arguments)})},{key:"RetrieveReencryptionSymmetricKey",value:(Q=s(a.mark((function t(e){var n,r,i,s,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,n){t.next=5;break}return t.next=4,this.client.ContentObjectLibraryId({objectId:r});case 4:n=t.sent;case 5:return t.next=7,this.KMSAddress({objectId:r});case 7:return i=t.sent,s="eluv.caps.ikms".concat(f.AddressToHash(i)),t.next=11,this.client.ContentObjectMetadata({libraryId:n,objectId:r,metadataSubtree:s});case 11:if(o=t.sent){t.next=14;break}throw Error("No KMS key set for this object");case 14:return t.next=16,this.MakeKMSCall({objectId:r,methodName:"elv_getSymmetricKeyAuth",paramTypes:["string","string","string","string","string"],params:[this.client.contentSpaceId,n,r,o||"",""]});case 16:return t.abrupt("return",t.sent);case 17:case"end":return t.stop()}}),t,this)}))),function(t){return Q.apply(this,arguments)})},{key:"MakeKMSCall",value:(B=s(a.mark((function t(e){var n,r,i,s,o,u,c,A,d,l,h,y,g,m,b;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.kmsId,r=e.tenantId,i=e.objectId,s=e.versionHash,o=e.methodName,u=e.params,c=e.paramTypes,A=e.additionalParams,d=void 0===A?[]:A,l=e.signature,h=void 0===l||l,s&&(i=f.DecodeVersionHash(s).objectId),i){t.next=10;break}return t.t0="ikms",t.t1=f,t.next=7,this.client.DefaultKMSAddress({tenantId:r});case 7:t.t2=t.sent,t.t3=t.t1.AddressToHash.call(t.t1,t.t2),n=t.t0.concat.call(t.t0,t.t3);case 10:if(!h){t.next=17;break}return y=p.utils.solidityKeccak256(c,u),t.t4=u,t.next=15,this.Sign(y);case 15:t.t5=t.sent,t.t4.push.call(t.t4,t.t5);case 17:return u=u.concat(d),t.next=20,this.KMSInfo({kmsId:n,objectId:i,versionHash:s});case 20:g=t.sent.urls,m=0;case 22:if(!(m<g.length)){t.next=40;break}return t.prev=23,this.Log("Making KMS request:\n URL: ".concat(g[m],"\n Method: ").concat(o,"\n Params: ").concat(u.join(", "))),b=g[m],this.providers[b]||(this.providers[b]=new p.providers.JsonRpcProvider(b,this.client.networkId)),t.next=29,this.providers[b].send(o,u);case 29:return t.abrupt("return",t.sent);case 32:if(t.prev=32,t.t6=t.catch(23),this.Log("KMS Call Error: ".concat(t.t6),!0),m!==g.length-1){t.next=37;break}throw t.t6;case 37:m++,t.next=22;break;case 40:case"end":return t.stop()}}),t,this,[[23,32]])}))),function(t){return B.apply(this,arguments)})},{key:"MakeAuthServiceRequest",value:(w=s(a.mark((function t(e){var n,r,i,s,o,u,c,A,d,p,f,l;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.kmsId,r=e.objectId,i=e.versionHash,s=e.method,o=void 0===s?"GET":s,u=e.path,c=e.bodyType,A=e.body,d=void 0===A?{}:A,p=e.queryParams,f=void 0===p?{}:p,l=e.headers,0!==this.client.authServiceURIs.length){t.next=5;break}return t.next=4,this.MakeKMSRequest({kmsId:n,objectId:r,versionHash:i,method:o,path:u,bodyType:c,body:d,queryParams:f,headers:l});case 4:return t.abrupt("return",t.sent);case 5:return t.next=7,this.client.AuthHttpClient.Request({method:o,path:u,bodyType:c,body:d,headers:l,queryParams:f});case 7:return t.abrupt("return",t.sent);case 8:case"end":return t.stop()}}),t,this)}))),function(t){return w.apply(this,arguments)})},{key:"MakeKMSRequest",value:(E=s(a.mark((function t(e){var n,r,i,s,o,u,c,A,p,l,h,y,g,m;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.kmsId,r=e.objectId,i=e.versionHash,s=e.method,o=void 0===s?"GET":s,u=e.path,c=e.bodyType,A=e.body,p=void 0===A?{}:A,l=e.queryParams,h=void 0===l?{}:l,y=e.headers,i&&(r=f.DecodeVersionHash(i).objectId),r||n){t.next=10;break}return t.t0="ikms",t.t1=f,t.next=7,this.client.DefaultKMSAddress();case 7:t.t2=t.sent,t.t3=t.t1.AddressToHash.call(t.t1,t.t2),n=t.t0.concat.call(t.t0,t.t3);case 10:return t.next=12,this.KMSInfo({kmsId:n,objectId:r,versionHash:i});case 12:if((g=t.sent.urls)&&g[0]){t.next=15;break}throw Error("No KMS info set for ".concat(i||r||"default KMS"));case 15:return m=new d({uris:g}),t.next=18,m.Request({method:o,path:u,bodyType:c,body:p,headers:y,queryParams:h});case 18:return t.abrupt("return",t.sent);case 19:case"end":return t.stop()}}),t,this)}))),function(t){return E.apply(this,arguments)})},{key:"ContractHasMethod",value:(v=s(a.mark((function t(e){var n,r,i,s,o,u,c;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.contractAddress,r=e.abi,i=e.methodName,n=f.FormatAddress(n),s="".concat(n,"-").concat(i),void 0!==this.methodAvailability[s]){t.next=19;break}if(this.Log("Checking method availability: ".concat(n," ").concat(i)),r){t.next=9;break}return t.next=8,this.ContractInfo({address:n});case 8:r=t.sent.abi;case 9:if(r){t.next=11;break}throw Error("No ABI for contract ".concat(n," - Wrong network or deleted item?"));case 11:if(o=r.find((function(t){return t.name===i}))){t.next=14;break}return t.abrupt("return",!1);case 14:return u="".concat(o.name,"(").concat(o.inputs.map((function(t){return t.type})).join(","),")"),c=p.utils.keccak256(p.utils.toUtf8Bytes(u)).replace("0x","").slice(0,8),t.next=18,this.MakeElvMasterCall({methodName:"elv_deployedContractHasMethod",params:[n,c]});case 18:this.methodAvailability[s]=t.sent;case 19:return t.abrupt("return",this.methodAvailability[s]);case 20:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"MakeElvMasterCall",value:(C=s(a.mark((function t(e){var n,r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.methodName,r=e.params,t.next=3,this.client.ethClient.MakeProviderCall({methodName:"send",args:[n,r]});case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return C.apply(this,arguments)})},{key:"ReEncryptionConk",value:(I=s(a.mark((function t(e){var n,r,i,s;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,(i=e.versionHash)&&(r=f.DecodeVersionHash(i).objectId),this.reencryptionKeys[r]){t.next=10;break}return t.next=5,this.client.Crypto.GenerateTargetConk();case 5:return s=t.sent,t.next=8,this.RetrieveReencryptionSymmetricKey({libraryId:n,objectId:r});case 8:s.symm_key=t.sent,this.reencryptionKeys[r]=s;case 10:return t.abrupt("return",this.reencryptionKeys[r]);case 11:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"EncryptionConk",value:(b=s(a.mark((function t(e){var n,r,i,s,o,u;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,(i=e.versionHash)&&(r=f.DecodeVersionHash(i).objectId),n){t.next=6;break}return t.next=5,this.client.ContentObjectLibraryId({objectId:r});case 5:n=t.sent;case 6:if(this.encryptionKeys[r]){t.next=16;break}return t.next=9,this.RetrieveConk({libraryId:n,objectId:r});case 9:return s=t.sent,t.next=12,this.client.Crypto.GeneratePrimaryConk({objectId:r});case 12:o=t.sent,u=o.secret_key,s.secret_key=u,this.encryptionKeys[r]=s;case 16:return t.abrupt("return",this.encryptionKeys[r]);case 17:case"end":return t.stop()}}),t,this)}))),function(t){return b.apply(this,arguments)})},{key:"RecordTags",value:(m=s(a.mark((function t(e){var n,r,i,s,o,u,c;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.accessType,r=e.libraryId,i=e.objectId,s=e.versionHash,n===y.OBJECT){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,this.ContractInfo({id:i});case 5:return o=t.sent,u=o.abi,t.next=9,this.Owner({id:i,abi:u});case 9:if(c=t.sent,f.EqualAddress(c,this.client.signer.address)){t.next=13;break}return t.next=13,this.client.userProfileClient.RecordTags({libraryId:r,objectId:i,versionHash:s});case 13:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"CreateAccessGroup",value:(i=s(a.mark((function t(){var e,n,r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.ethClient.DeployAccessGroupContract({contentSpaceAddress:f.HashToAddress(this.contentSpaceId),signer:this.client.signer});case 2:return e=t.sent,n=e.contractAddress,r=e.transactionHash,t.abrupt("return",{contractAddress:n,transactionHash:r});case 6:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"CreateContentType",value:(r=s(a.mark((function t(){var e,n,r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.ethClient.DeployTypeContract({contentSpaceAddress:f.HashToAddress(this.contentSpaceId),signer:this.client.signer});case 2:return e=t.sent,n=e.contractAddress,r=e.transactionHash,t.abrupt("return",{contractAddress:n,transactionHash:r});case 6:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"CreateContentLibrary",value:(n=s(a.mark((function t(e){var n,r,i,s;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.kmsId,t.next=3,this.client.ethClient.DeployLibraryContract({contentSpaceAddress:f.HashToAddress(this.contentSpaceId),kmsId:n,signer:this.client.signer});case 3:return r=t.sent,i=r.contractAddress,s=r.transactionHash,t.abrupt("return",{contractAddress:i,transactionHash:s});case 7:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"CreateContentObject",value:(e=s(a.mark((function t(e){var n,r,i,s,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.typeId,t.next=3,this.client.ethClient.DeployContentContract({contentLibraryAddress:f.HashToAddress(n),typeAddress:r?f.HashToAddress(r):f.nullAddress,signer:this.client.signer});case 3:return i=t.sent,s=i.contractAddress,o=i.transactionHash,t.abrupt("return",{contractAddress:s,transactionHash:o});case 7:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"ClearCache",value:function(){this.accessTransactions={},this.modifyTransactions={},this.channelContentTokens={}}}]),t}();t.exports=m},function(t,e,n){"use strict";var r=n(1).Buffer;t.exports=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),n=0;n<e.length;n++)e[n]=255;for(var i=0;i<t.length;i++){var a=t.charAt(i),s=a.charCodeAt(0);if(255!==e[s])throw new TypeError(a+" is ambiguous");e[s]=i}var o=t.length,u=t.charAt(0),c=Math.log(o)/Math.log(256),A=Math.log(256)/Math.log(o);function d(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return r.alloc(0);for(var n=0,i=0,a=0;t[n]===u;)i++,n++;for(var s=(t.length-n)*c+1>>>0,A=new Uint8Array(s);t[n];){var d=e[t.charCodeAt(n)];if(255===d)return;for(var p=0,f=s-1;(0!==d||p<a)&&-1!==f;f--,p++)d+=o*A[f]>>>0,A[f]=d%256>>>0,d=d/256>>>0;if(0!==d)throw new Error("Non-zero carry");a=p,n++}for(var l=s-a;l!==s&&0===A[l];)l++;var h=r.allocUnsafe(i+(s-l));h.fill(0,0,i);for(var y=i;l!==s;)h[y++]=A[l++];return h}return{encode:function(e){if((Array.isArray(e)||e instanceof Uint8Array)&&(e=r.from(e)),!r.isBuffer(e))throw new TypeError("Expected Buffer");if(0===e.length)return"";for(var n=0,i=0,a=0,s=e.length;a!==s&&0===e[a];)a++,n++;for(var c=(s-a)*A+1>>>0,d=new Uint8Array(c);a!==s;){for(var p=e[a],f=0,l=c-1;(0!==p||f<i)&&-1!==l;l--,f++)p+=256*d[l]>>>0,d[l]=p%o>>>0,p=p/o>>>0;if(0!==p)throw new Error("Non-zero carry");i=f,a++}for(var h=c-i;h!==c&&0===d[h];)h++;for(var y=u.repeat(n);h<c;++h)y+=t.charAt(d[h]);return y},decodeUnsafe:d,decode:function(t){var e=d(t);if(e)return e;throw new Error("Non-base"+o+" character")}}}},function(t,e,n){var r;function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(a){"use strict";var s,o=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,u="function"==typeof Symbol&&"symbol"==i(Symbol.iterator),c=Math.ceil,A=Math.floor,d="[BigNumber Error] ",p=d+"Number primitive has more than 15 significant digits: ",f=1e14,l=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],h=1e9;function y(t){var e=0|t;return t>0||t===e?e:e-1}function g(t){for(var e,n,r=1,i=t.length,a=t[0]+"";r<i;){for(n=14-(e=t[r++]+"").length;n--;e="0"+e);a+=e}for(i=a.length;48===a.charCodeAt(--i););return a.slice(0,i+1||1)}function m(t,e){var n,r,i=t.c,a=e.c,s=t.s,o=e.s,u=t.e,c=e.e;if(!s||!o)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-o:s;if(s!=o)return s;if(n=s<0,r=u==c,!i||!a)return r?0:!i^n?1:-1;if(!r)return u>c^n?1:-1;for(o=(u=i.length)<(c=a.length)?u:c,s=0;s<o;s++)if(i[s]!=a[s])return i[s]>a[s]^n?1:-1;return u==c?0:u>c^n?1:-1}function b(t,e,n,r){if(t<e||t>n||t!==A(t))throw Error(d+(r||"Argument")+("number"==typeof t?t<e||t>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function I(t){var e=t.c.length-1;return y(t.e/14)==e&&t.c[e]%2!=0}function C(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function v(t,e,n){var r,i;if(e<0){for(i=n+".";++e;i+=n);t=i+t}else if(++e>(r=t.length)){for(i=n,e-=r;--e;i+=n);t+=i}else e<r&&(t=t.slice(0,e)+"."+t.slice(e));return t}(s=function t(e){var n,r,a,s,E,w,B,Q,M,k=j.prototype={constructor:j,toString:null,valueOf:null},_=new j(1),x=20,S=4,D=-7,R=21,T=-1e7,N=1e7,O=!1,H=1,L=0,U={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},F="0123456789abcdefghijklmnopqrstuvwxyz";function j(t,e){var n,i,s,u,c,d,f,l,h=this;if(!(h instanceof j))return new j(t,e);if(null==e){if(t&&!0===t._isBigNumber)return h.s=t.s,void(!t.c||t.e>N?h.c=h.e=null:t.e<T?h.c=[h.e=0]:(h.e=t.e,h.c=t.c.slice()));if((d="number"==typeof t)&&0*t==0){if(h.s=1/t<0?(t=-t,-1):1,t===~~t){for(u=0,c=t;c>=10;c/=10,u++);return void(u>N?h.c=h.e=null:(h.e=u,h.c=[t]))}l=String(t)}else{if(!o.test(l=String(t)))return a(h,l,d);h.s=45==l.charCodeAt(0)?(l=l.slice(1),-1):1}(u=l.indexOf("."))>-1&&(l=l.replace(".","")),(c=l.search(/e/i))>0?(u<0&&(u=c),u+=+l.slice(c+1),l=l.substring(0,c)):u<0&&(u=l.length)}else{if(b(e,2,F.length,"Base"),10==e)return Y(h=new j(t),x+h.e+1,S);if(l=String(t),d="number"==typeof t){if(0*t!=0)return a(h,l,d,e);if(h.s=1/t<0?(l=l.slice(1),-1):1,j.DEBUG&&l.replace(/^0\.0*|\./,"").length>15)throw Error(p+t)}else h.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1;for(n=F.slice(0,e),u=c=0,f=l.length;c<f;c++)if(n.indexOf(i=l.charAt(c))<0){if("."==i){if(c>u){u=f;continue}}else if(!s&&(l==l.toUpperCase()&&(l=l.toLowerCase())||l==l.toLowerCase()&&(l=l.toUpperCase()))){s=!0,c=-1,u=0;continue}return a(h,String(t),d,e)}d=!1,(u=(l=r(l,e,10,h.s)).indexOf("."))>-1?l=l.replace(".",""):u=l.length}for(c=0;48===l.charCodeAt(c);c++);for(f=l.length;48===l.charCodeAt(--f););if(l=l.slice(c,++f)){if(f-=c,d&&j.DEBUG&&f>15&&(t>9007199254740991||t!==A(t)))throw Error(p+h.s*t);if((u=u-c-1)>N)h.c=h.e=null;else if(u<T)h.c=[h.e=0];else{if(h.e=u,h.c=[],c=(u+1)%14,u<0&&(c+=14),c<f){for(c&&h.c.push(+l.slice(0,c)),f-=14;c<f;)h.c.push(+l.slice(c,c+=14));c=14-(l=l.slice(c)).length}else c-=f;for(;c--;l+="0");h.c.push(+l)}}else h.c=[h.e=0]}function P(t,e,n,r){var i,a,s,o,u;if(null==n?n=S:b(n,0,8),!t.c)return t.toString();if(i=t.c[0],s=t.e,null==e)u=g(t.c),u=1==r||2==r&&(s<=D||s>=R)?C(u,s):v(u,s,"0");else if(a=(t=Y(new j(t),e,n)).e,o=(u=g(t.c)).length,1==r||2==r&&(e<=a||a<=D)){for(;o<e;u+="0",o++);u=C(u,a)}else if(e-=s,u=v(u,a,"0"),a+1>o){if(--e>0)for(u+=".";e--;u+="0");}else if((e+=a-o)>0)for(a+1==o&&(u+=".");e--;u+="0");return t.s<0&&i?"-"+u:u}function G(t,e){for(var n,r=1,i=new j(t[0]);r<t.length;r++){if(!(n=new j(t[r])).s){i=n;break}e.call(i,n)&&(i=n)}return i}function q(t,e,n){for(var r=1,i=e.length;!e[--i];e.pop());for(i=e[0];i>=10;i/=10,r++);return(n=r+14*n-1)>N?t.c=t.e=null:n<T?t.c=[t.e=0]:(t.e=n,t.c=e),t}function Y(t,e,n,r){var i,a,s,o,u,d,p,h=t.c,y=l;if(h){t:{for(i=1,o=h[0];o>=10;o/=10,i++);if((a=e-i)<0)a+=14,s=e,p=(u=h[d=0])/y[i-s-1]%10|0;else if((d=c((a+1)/14))>=h.length){if(!r)break t;for(;h.length<=d;h.push(0));u=p=0,i=1,s=(a%=14)-14+1}else{for(u=o=h[d],i=1;o>=10;o/=10,i++);p=(s=(a%=14)-14+i)<0?0:u/y[i-s-1]%10|0}if(r=r||e<0||null!=h[d+1]||(s<0?u:u%y[i-s-1]),r=n<4?(p||r)&&(0==n||n==(t.s<0?3:2)):p>5||5==p&&(4==n||r||6==n&&(a>0?s>0?u/y[i-s]:0:h[d-1])%10&1||n==(t.s<0?8:7)),e<1||!h[0])return h.length=0,r?(e-=t.e+1,h[0]=y[(14-e%14)%14],t.e=-e||0):h[0]=t.e=0,t;if(0==a?(h.length=d,o=1,d--):(h.length=d+1,o=y[14-a],h[d]=s>0?A(u/y[i-s]%y[s])*o:0),r)for(;;){if(0==d){for(a=1,s=h[0];s>=10;s/=10,a++);for(s=h[0]+=o,o=1;s>=10;s/=10,o++);a!=o&&(t.e++,h[0]==f&&(h[0]=1));break}if(h[d]+=o,h[d]!=f)break;h[d--]=0,o=1}for(a=h.length;0===h[--a];h.pop());}t.e>N?t.c=t.e=null:t.e<T&&(t.c=[t.e=0])}return t}function K(t){var e,n=t.e;return null===n?t.toString():(e=g(t.c),e=n<=D||n>=R?C(e,n):v(e,n,"0"),t.s<0?"-"+e:e)}return j.clone=t,j.ROUND_UP=0,j.ROUND_DOWN=1,j.ROUND_CEIL=2,j.ROUND_FLOOR=3,j.ROUND_HALF_UP=4,j.ROUND_HALF_DOWN=5,j.ROUND_HALF_EVEN=6,j.ROUND_HALF_CEIL=7,j.ROUND_HALF_FLOOR=8,j.EUCLID=9,j.config=j.set=function(t){var e,n;if(null!=t){if("object"!=i(t))throw Error(d+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(b(n=t[e],0,h,e),x=n),t.hasOwnProperty(e="ROUNDING_MODE")&&(b(n=t[e],0,8,e),S=n),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((n=t[e])&&n.pop?(b(n[0],-h,0,e),b(n[1],0,h,e),D=n[0],R=n[1]):(b(n,-h,h,e),D=-(R=n<0?-n:n))),t.hasOwnProperty(e="RANGE"))if((n=t[e])&&n.pop)b(n[0],-h,-1,e),b(n[1],1,h,e),T=n[0],N=n[1];else{if(b(n,-h,h,e),!n)throw Error(d+e+" cannot be zero: "+n);T=-(N=n<0?-n:n)}if(t.hasOwnProperty(e="CRYPTO")){if((n=t[e])!==!!n)throw Error(d+e+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw O=!n,Error(d+"crypto unavailable");O=n}else O=n}if(t.hasOwnProperty(e="MODULO_MODE")&&(b(n=t[e],0,9,e),H=n),t.hasOwnProperty(e="POW_PRECISION")&&(b(n=t[e],0,h,e),L=n),t.hasOwnProperty(e="FORMAT")){if("object"!=i(n=t[e]))throw Error(d+e+" not an object: "+n);U=n}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(n=t[e])||/^.$|[+-.\s]|(.).*\1/.test(n))throw Error(d+e+" invalid: "+n);F=n}}return{DECIMAL_PLACES:x,ROUNDING_MODE:S,EXPONENTIAL_AT:[D,R],RANGE:[T,N],CRYPTO:O,MODULO_MODE:H,POW_PRECISION:L,FORMAT:U,ALPHABET:F}},j.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!j.DEBUG)return!0;var e,n,r=t.c,i=t.e,a=t.s;t:if("[object Array]"=={}.toString.call(r)){if((1===a||-1===a)&&i>=-h&&i<=h&&i===A(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break t}if((e=(i+1)%14)<1&&(e+=14),String(r[0]).length==e){for(e=0;e<r.length;e++)if((n=r[e])<0||n>=f||n!==A(n))break t;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===a||1===a||-1===a))return!0;throw Error(d+"Invalid BigNumber: "+t)},j.maximum=j.max=function(){return G(arguments,k.lt)},j.minimum=j.min=function(){return G(arguments,k.gt)},j.random=(s=9007199254740992*Math.random()&2097151?function(){return A(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,n,r,i,a,o=0,u=[],p=new j(_);if(null==t?t=x:b(t,0,h),i=c(t/14),O)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(i*=2));o<i;)(a=131072*e[o]+(e[o+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),e[o]=n[0],e[o+1]=n[1]):(u.push(a%1e14),o+=2);o=i/2}else{if(!crypto.randomBytes)throw O=!1,Error(d+"crypto unavailable");for(e=crypto.randomBytes(i*=7);o<i;)(a=281474976710656*(31&e[o])+1099511627776*e[o+1]+4294967296*e[o+2]+16777216*e[o+3]+(e[o+4]<<16)+(e[o+5]<<8)+e[o+6])>=9e15?crypto.randomBytes(7).copy(e,o):(u.push(a%1e14),o+=7);o=i/7}if(!O)for(;o<i;)(a=s())<9e15&&(u[o++]=a%1e14);for(t%=14,(i=u[--o])&&t&&(a=l[14-t],u[o]=A(i/a)*a);0===u[o];u.pop(),o--);if(o<0)u=[r=0];else{for(r=-1;0===u[0];u.splice(0,1),r-=14);for(o=1,a=u[0];a>=10;a/=10,o++);o<14&&(r-=14-o)}return p.e=r,p.c=u,p}),j.sum=function(){for(var t=1,e=arguments,n=new j(e[0]);t<e.length;)n=n.plus(e[t++]);return n},r=function(){function t(t,e,n,r){for(var i,a,s=[0],o=0,u=t.length;o<u;){for(a=s.length;a--;s[a]*=e);for(s[0]+=r.indexOf(t.charAt(o++)),i=0;i<s.length;i++)s[i]>n-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/n|0,s[i]%=n)}return s.reverse()}return function(e,r,i,a,s){var o,u,c,A,d,p,f,l,h=e.indexOf("."),y=x,m=S;for(h>=0&&(A=L,L=0,e=e.replace(".",""),p=(l=new j(r)).pow(e.length-h),L=A,l.c=t(v(g(p.c),p.e,"0"),10,i,"0123456789"),l.e=l.c.length),c=A=(f=t(e,r,i,s?(o=F,"0123456789"):(o="0123456789",F))).length;0==f[--A];f.pop());if(!f[0])return o.charAt(0);if(h<0?--c:(p.c=f,p.e=c,p.s=a,f=(p=n(p,l,y,m,i)).c,d=p.r,c=p.e),h=f[u=c+y+1],A=i/2,d=d||u<0||null!=f[u+1],d=m<4?(null!=h||d)&&(0==m||m==(p.s<0?3:2)):h>A||h==A&&(4==m||d||6==m&&1&f[u-1]||m==(p.s<0?8:7)),u<1||!f[0])e=d?v(o.charAt(1),-y,o.charAt(0)):o.charAt(0);else{if(f.length=u,d)for(--i;++f[--u]>i;)f[u]=0,u||(++c,f=[1].concat(f));for(A=f.length;!f[--A];);for(h=0,e="";h<=A;e+=o.charAt(f[h++]));e=v(e,c,o.charAt(0))}return e}}(),n=function(){function t(t,e,n){var r,i,a,s,o=0,u=t.length,c=e%1e7,A=e/1e7|0;for(t=t.slice();u--;)o=((i=c*(a=t[u]%1e7)+(r=A*a+(s=t[u]/1e7|0)*c)%1e7*1e7+o)/n|0)+(r/1e7|0)+A*s,t[u]=i%n;return o&&(t=[o].concat(t)),t}function e(t,e,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(t[i]!=e[i]){a=t[i]>e[i]?1:-1;break}return a}function n(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]<e[n]?1:0,t[n]=i*r+t[n]-e[n];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(r,i,a,s,o){var u,c,d,p,l,h,g,m,b,I,C,v,E,w,B,Q,M,k=r.s==i.s?1:-1,_=r.c,x=i.c;if(!(_&&_[0]&&x&&x[0]))return new j(r.s&&i.s&&(_?!x||_[0]!=x[0]:x)?_&&0==_[0]||!x?0*k:k/0:NaN);for(b=(m=new j(k)).c=[],k=a+(c=r.e-i.e)+1,o||(o=f,c=y(r.e/14)-y(i.e/14),k=k/14|0),d=0;x[d]==(_[d]||0);d++);if(x[d]>(_[d]||0)&&c--,k<0)b.push(1),p=!0;else{for(w=_.length,Q=x.length,d=0,k+=2,(l=A(o/(x[0]+1)))>1&&(x=t(x,l,o),_=t(_,l,o),Q=x.length,w=_.length),E=Q,C=(I=_.slice(0,Q)).length;C<Q;I[C++]=0);M=x.slice(),M=[0].concat(M),B=x[0],x[1]>=o/2&&B++;do{if(l=0,(u=e(x,I,Q,C))<0){if(v=I[0],Q!=C&&(v=v*o+(I[1]||0)),(l=A(v/B))>1)for(l>=o&&(l=o-1),g=(h=t(x,l,o)).length,C=I.length;1==e(h,I,g,C);)l--,n(h,Q<g?M:x,g,o),g=h.length,u=1;else 0==l&&(u=l=1),g=(h=x.slice()).length;if(g<C&&(h=[0].concat(h)),n(I,h,C,o),C=I.length,-1==u)for(;e(x,I,Q,C)<1;)l++,n(I,Q<C?M:x,C,o),C=I.length}else 0===u&&(l++,I=[0]);b[d++]=l,I[0]?I[C++]=_[E]||0:(I=[_[E]],C=1)}while((E++<w||null!=I[0])&&k--);p=null!=I[0],b[0]||b.splice(0,1)}if(o==f){for(d=1,k=b[0];k>=10;k/=10,d++);Y(m,a+(m.e=d+14*c-1)+1,s,p)}else m.e=c,m.r=+p;return m}}(),E=/^(-?)0([xbo])(?=\w[\w.]*$)/i,w=/^([^.]+)\.$/,B=/^\.([^.]+)$/,Q=/^-?(Infinity|NaN)$/,M=/^\s*\+(?=[\w.])|^\s+|\s+$/g,a=function(t,e,n,r){var i,a=n?e:e.replace(M,"");if(Q.test(a))t.s=isNaN(a)?null:a<0?-1:1;else{if(!n&&(a=a.replace(E,(function(t,e,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?t:e})),r&&(i=r,a=a.replace(w,"$1").replace(B,"0.$1")),e!=a))return new j(a,i);if(j.DEBUG)throw Error(d+"Not a"+(r?" base "+r:"")+" number: "+e);t.s=null}t.c=t.e=null},k.absoluteValue=k.abs=function(){var t=new j(this);return t.s<0&&(t.s=1),t},k.comparedTo=function(t,e){return m(this,new j(t,e))},k.decimalPlaces=k.dp=function(t,e){var n,r,i,a=this;if(null!=t)return b(t,0,h),null==e?e=S:b(e,0,8),Y(new j(a),t+a.e+1,e);if(!(n=a.c))return null;if(r=14*((i=n.length-1)-y(this.e/14)),i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},k.dividedBy=k.div=function(t,e){return n(this,new j(t,e),x,S)},k.dividedToIntegerBy=k.idiv=function(t,e){return n(this,new j(t,e),0,1)},k.exponentiatedBy=k.pow=function(t,e){var n,r,i,a,s,o,u,p,f=this;if((t=new j(t)).c&&!t.isInteger())throw Error(d+"Exponent not an integer: "+K(t));if(null!=e&&(e=new j(e)),s=t.e>14,!f.c||!f.c[0]||1==f.c[0]&&!f.e&&1==f.c.length||!t.c||!t.c[0])return p=new j(Math.pow(+K(f),s?2-I(t):+K(t))),e?p.mod(e):p;if(o=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new j(NaN);(r=!o&&f.isInteger()&&e.isInteger())&&(f=f.mod(e))}else{if(t.e>9&&(f.e>0||f.e<-1||(0==f.e?f.c[0]>1||s&&f.c[1]>=24e7:f.c[0]<8e13||s&&f.c[0]<=9999975e7)))return a=f.s<0&&I(t)?-0:0,f.e>-1&&(a=1/a),new j(o?1/a:a);L&&(a=c(L/14+2))}for(s?(n=new j(.5),o&&(t.s=1),u=I(t)):u=(i=Math.abs(+K(t)))%2,p=new j(_);;){if(u){if(!(p=p.times(f)).c)break;a?p.c.length>a&&(p.c.length=a):r&&(p=p.mod(e))}if(i){if(0===(i=A(i/2)))break;u=i%2}else if(Y(t=t.times(n),t.e+1,1),t.e>14)u=I(t);else{if(0===(i=+K(t)))break;u=i%2}f=f.times(f),a?f.c&&f.c.length>a&&(f.c.length=a):r&&(f=f.mod(e))}return r?p:(o&&(p=_.div(p)),e?p.mod(e):a?Y(p,L,S,void 0):p)},k.integerValue=function(t){var e=new j(this);return null==t?t=S:b(t,0,8),Y(e,e.e+1,t)},k.isEqualTo=k.eq=function(t,e){return 0===m(this,new j(t,e))},k.isFinite=function(){return!!this.c},k.isGreaterThan=k.gt=function(t,e){return m(this,new j(t,e))>0},k.isGreaterThanOrEqualTo=k.gte=function(t,e){return 1===(e=m(this,new j(t,e)))||0===e},k.isInteger=function(){return!!this.c&&y(this.e/14)>this.c.length-2},k.isLessThan=k.lt=function(t,e){return m(this,new j(t,e))<0},k.isLessThanOrEqualTo=k.lte=function(t,e){return-1===(e=m(this,new j(t,e)))||0===e},k.isNaN=function(){return!this.s},k.isNegative=function(){return this.s<0},k.isPositive=function(){return this.s>0},k.isZero=function(){return!!this.c&&0==this.c[0]},k.minus=function(t,e){var n,r,i,a,s=this,o=s.s;if(e=(t=new j(t,e)).s,!o||!e)return new j(NaN);if(o!=e)return t.s=-e,s.plus(t);var u=s.e/14,c=t.e/14,A=s.c,d=t.c;if(!u||!c){if(!A||!d)return A?(t.s=-e,t):new j(d?s:NaN);if(!A[0]||!d[0])return d[0]?(t.s=-e,t):new j(A[0]?s:3==S?-0:0)}if(u=y(u),c=y(c),A=A.slice(),o=u-c){for((a=o<0)?(o=-o,i=A):(c=u,i=d),i.reverse(),e=o;e--;i.push(0));i.reverse()}else for(r=(a=(o=A.length)<(e=d.length))?o:e,o=e=0;e<r;e++)if(A[e]!=d[e]){a=A[e]<d[e];break}if(a&&(i=A,A=d,d=i,t.s=-t.s),(e=(r=d.length)-(n=A.length))>0)for(;e--;A[n++]=0);for(e=f-1;r>o;){if(A[--r]<d[r]){for(n=r;n&&!A[--n];A[n]=e);--A[n],A[r]+=f}A[r]-=d[r]}for(;0==A[0];A.splice(0,1),--c);return A[0]?q(t,A,c):(t.s=3==S?-1:1,t.c=[t.e=0],t)},k.modulo=k.mod=function(t,e){var r,i,a=this;return t=new j(t,e),!a.c||!t.s||t.c&&!t.c[0]?new j(NaN):!t.c||a.c&&!a.c[0]?new j(a):(9==H?(i=t.s,t.s=1,r=n(a,t,0,3),t.s=i,r.s*=i):r=n(a,t,0,H),(t=a.minus(r.times(t))).c[0]||1!=H||(t.s=a.s),t)},k.multipliedBy=k.times=function(t,e){var n,r,i,a,s,o,u,c,A,d,p,l,h,g,m=this,b=m.c,I=(t=new j(t,e)).c;if(!(b&&I&&b[0]&&I[0]))return!m.s||!t.s||b&&!b[0]&&!I||I&&!I[0]&&!b?t.c=t.e=t.s=null:(t.s*=m.s,b&&I?(t.c=[0],t.e=0):t.c=t.e=null),t;for(r=y(m.e/14)+y(t.e/14),t.s*=m.s,(u=b.length)<(d=I.length)&&(h=b,b=I,I=h,i=u,u=d,d=i),i=u+d,h=[];i--;h.push(0));for(g=f,1e7,i=d;--i>=0;){for(n=0,p=I[i]%1e7,l=I[i]/1e7|0,a=i+(s=u);a>i;)n=((c=p*(c=b[--s]%1e7)+(o=l*c+(A=b[s]/1e7|0)*p)%1e7*1e7+h[a]+n)/g|0)+(o/1e7|0)+l*A,h[a--]=c%g;h[a]=n}return n?++r:h.splice(0,1),q(t,h,r)},k.negated=function(){var t=new j(this);return t.s=-t.s||null,t},k.plus=function(t,e){var n,r=this,i=r.s;if(e=(t=new j(t,e)).s,!i||!e)return new j(NaN);if(i!=e)return t.s=-e,r.minus(t);var a=r.e/14,s=t.e/14,o=r.c,u=t.c;if(!a||!s){if(!o||!u)return new j(i/0);if(!o[0]||!u[0])return u[0]?t:new j(o[0]?r:0*i)}if(a=y(a),s=y(s),o=o.slice(),i=a-s){for(i>0?(s=a,n=u):(i=-i,n=o),n.reverse();i--;n.push(0));n.reverse()}for((i=o.length)-(e=u.length)<0&&(n=u,u=o,o=n,e=i),i=0;e;)i=(o[--e]=o[e]+u[e]+i)/f|0,o[e]=f===o[e]?0:o[e]%f;return i&&(o=[i].concat(o),++s),q(t,o,s)},k.precision=k.sd=function(t,e){var n,r,i,a=this;if(null!=t&&t!==!!t)return b(t,1,h),null==e?e=S:b(e,0,8),Y(new j(a),t,e);if(!(n=a.c))return null;if(r=14*(i=n.length-1)+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return t&&a.e+1>r&&(r=a.e+1),r},k.shiftedBy=function(t){return b(t,-9007199254740991,9007199254740991),this.times("1e"+t)},k.squareRoot=k.sqrt=function(){var t,e,r,i,a,s=this,o=s.c,u=s.s,c=s.e,A=x+4,d=new j("0.5");if(1!==u||!o||!o[0])return new j(!u||u<0&&(!o||o[0])?NaN:o?s:1/0);if(0==(u=Math.sqrt(+K(s)))||u==1/0?(((e=g(o)).length+c)%2==0&&(e+="0"),u=Math.sqrt(+e),c=y((c+1)/2)-(c<0||c%2),r=new j(e=u==1/0?"1e"+c:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+c)):r=new j(u+""),r.c[0])for((u=(c=r.e)+A)<3&&(u=0);;)if(a=r,r=d.times(a.plus(n(s,a,A,1))),g(a.c).slice(0,u)===(e=g(r.c)).slice(0,u)){if(r.e<c&&--u,"9999"!=(e=e.slice(u-3,u+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(Y(r,r.e+x+2,1),t=!r.times(r).eq(s));break}if(!i&&(Y(a,a.e+x+2,0),a.times(a).eq(s))){r=a;break}A+=4,u+=4,i=1}return Y(r,r.e+x+1,S,t)},k.toExponential=function(t,e){return null!=t&&(b(t,0,h),t++),P(this,t,e,1)},k.toFixed=function(t,e){return null!=t&&(b(t,0,h),t=t+this.e+1),P(this,t,e)},k.toFormat=function(t,e,n){var r,a=this;if(null==n)null!=t&&e&&"object"==i(e)?(n=e,e=null):t&&"object"==i(t)?(n=t,t=e=null):n=U;else if("object"!=i(n))throw Error(d+"Argument not an object: "+n);if(r=a.toFixed(t,e),a.c){var s,o=r.split("."),u=+n.groupSize,c=+n.secondaryGroupSize,A=n.groupSeparator||"",p=o[0],f=o[1],l=a.s<0,h=l?p.slice(1):p,y=h.length;if(c&&(s=u,u=c,c=s,y-=s),u>0&&y>0){for(s=y%u||u,p=h.substr(0,s);s<y;s+=u)p+=A+h.substr(s,u);c>0&&(p+=A+h.slice(s)),l&&(p="-"+p)}r=f?p+(n.decimalSeparator||"")+((c=+n.fractionGroupSize)?f.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):f):p}return(n.prefix||"")+r+(n.suffix||"")},k.toFraction=function(t){var e,r,i,a,s,o,u,c,A,p,f,h,y=this,m=y.c;if(null!=t&&(!(u=new j(t)).isInteger()&&(u.c||1!==u.s)||u.lt(_)))throw Error(d+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+K(u));if(!m)return new j(y);for(e=new j(_),A=r=new j(_),i=c=new j(_),h=g(m),s=e.e=h.length-y.e-1,e.c[0]=l[(o=s%14)<0?14+o:o],t=!t||u.comparedTo(e)>0?s>0?e:A:u,o=N,N=1/0,u=new j(h),c.c[0]=0;p=n(u,e,0,1),1!=(a=r.plus(p.times(i))).comparedTo(t);)r=i,i=a,A=c.plus(p.times(a=A)),c=a,e=u.minus(p.times(a=e)),u=a;return a=n(t.minus(r),i,0,1),c=c.plus(a.times(A)),r=r.plus(a.times(i)),c.s=A.s=y.s,f=n(A,i,s*=2,S).minus(y).abs().comparedTo(n(c,r,s,S).minus(y).abs())<1?[A,i]:[c,r],N=o,f},k.toNumber=function(){return+K(this)},k.toPrecision=function(t,e){return null!=t&&b(t,1,h),P(this,t,e,2)},k.toString=function(t){var e,n=this,i=n.s,a=n.e;return null===a?i?(e="Infinity",i<0&&(e="-"+e)):e="NaN":(null==t?e=a<=D||a>=R?C(g(n.c),a):v(g(n.c),a,"0"):10===t?e=v(g((n=Y(new j(n),x+a+1,S)).c),n.e,"0"):(b(t,2,F.length,"Base"),e=r(v(g(n.c),a,"0"),10,t,i,!0)),i<0&&n.c[0]&&(e="-"+e)),e},k.valueOf=k.toJSON=function(){return K(this)},k._isBigNumber=!0,u&&(k[Symbol.toStringTag]="BigNumber",k[Symbol.for("nodejs.util.inspect.custom")]=k.valueOf),null!=e&&j.set(e),j}()).default=s.BigNumber=s,void 0===(r=function(){return s}.call(e,n,e,t))||(t.exports=r)}()},function(t,e,n){t.exports={encode:n(174),decode:n(175),encodingLength:n(176)}},function(t,e){t.exports=function t(e,r,i){r=r||[];var a=i=i||0;for(;e>=n;)r[i++]=255&e|128,e/=128;for(;-128&e;)r[i++]=255&e|128,e>>>=7;return r[i]=0|e,t.bytes=i-a+1,r};var n=Math.pow(2,31)},function(t,e){t.exports=function t(e,n){var r,i=0,a=0,s=n=n||0,o=e.length;do{if(s>=o)throw t.bytes=0,new RangeError("Could not decode varint");r=e[s++],i+=a<28?(127&r)<<a:(127&r)*Math.pow(2,a),a+=7}while(r>=128);return t.bytes=s-n,i}},function(t,e){var n=Math.pow(2,7),r=Math.pow(2,14),i=Math.pow(2,21),a=Math.pow(2,28),s=Math.pow(2,35),o=Math.pow(2,42),u=Math.pow(2,49),c=Math.pow(2,56),A=Math.pow(2,63);t.exports=function(t){return t<n?1:t<r?2:t<i?3:t<a?4:t<s?5:t<o?6:t<u?7:t<c?8:t<A?9:10}},function(t,e){t.exports={abi:[{constant:!0,inputs:[],name:"parentAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"creator",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"canContribute",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"content_type",type:"address"},{name:"content_contract",type:"address"}],name:"addContentType",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canConfirm",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_locator",type:"bytes"}],name:"submitNode",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"contentTypeContracts",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"typeHash",type:"bytes32"}],name:"findTypeByHash",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"}],name:"canNodePublish",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_kmsID",type:"string"},{name:"prefix",type:"bytes"}],name:"getKMSInfo",outputs:[{name:"",type:"string"},{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"canReview",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"content_type",type:"address"}],name:"validType",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"contentObj",type:"address"}],name:"publish",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"registerSpaceNode",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"addressKMS",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"countVersionHashes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"commitPending",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"requiresReview",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"address_KMS",type:"address"}],name:"createLibrary",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"kill",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"numActiveNodes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"libraryFactory",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"confirmCommit",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"activeNodeLocators",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"activeNodeAddresses",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"createGroup",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_kmsAddr",type:"address"}],name:"getKMSID",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"new_factory",type:"address"}],name:"setFactory",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"clearPending",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"pendingHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_userAddr",type:"address"}],name:"userWallets",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_nodeAddr",type:"address"},{name:"_locator",type:"bytes"}],name:"addNode",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_kmsID",type:"string"},{name:"_locator",type:"bytes"}],name:"addKMSLocator",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"pendingNodeLocators",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"pendingNodeAddresses",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newCreator",type:"address"}],name:"transferCreatorship",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canCommit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"description",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"createAccessWallet",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionHashes",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"new_factory",type:"address"}],name:"setWalletFactory",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canEdit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"new_factory",type:"address"}],name:"setGroupFactory",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"new_factory",type:"address"}],name:"setContentFactory",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_kmsIdStr",type:"string"}],name:"checkKMS",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentFactory",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"content_space_description",type:"string"}],name:"setDescription",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"hasAccess",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_objectHash",type:"string"}],name:"commit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"contentTypes",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"canPublish",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"content_type",type:"address"}],name:"whitelistedType",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"new_factory",type:"address"}],name:"setLibraryFactory",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"getAccessWallet",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_kmsID",type:"string"},{name:"_pubKey",type:"string"}],name:"setKMSPublicKey",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"unregisterSpaceNode",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"key",type:"bytes"}],name:"getMeta",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentSpace",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"groupFactory",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_nodeAddr",type:"address"}],name:"removeNode",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"createContentType",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"lib",type:"address"},{name:"content_type",type:"address"}],name:"createContent",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"updateRequest",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"factory",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"walletFactory",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentTypesLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"engageAccountLibrary",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"address_KMS",type:"address"}],name:"setAddressKMS",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_kmsAddr",type:"address"}],name:"checkKMSAddr",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_nodeAddr",type:"address"}],name:"approveNode",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"objectHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_versionHash",type:"string"}],name:"deleteVersion",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"key",type:"bytes"},{name:"value",type:"bytes"}],name:"putMeta",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_v",type:"uint8[]"},{name:"_r",type:"bytes32[]"},{name:"_s",type:"bytes32[]"},{name:"_from",type:"address[]"},{name:"_dest",type:"address[]"},{name:"_value",type:"uint256[]"},{name:"_ts",type:"uint256[]"}],name:"executeBatch",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"accessRequest",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"numPendingNodes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"nodeMapping",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"content_type",type:"address"}],name:"removeContentType",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_kmsID",type:"string"},{name:"_locator",type:"bytes"}],name:"removeKMSLocator",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{inputs:[{name:"content_space_name",type:"string"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!1,name:"contentTypeAddress",type:"address"}],name:"CreateContentType",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"libraryAddress",type:"address"}],name:"CreateLibrary",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"groupAddress",type:"address"}],name:"CreateGroup",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentAddress",type:"address"}],name:"CreateContent",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"wallet",type:"address"}],name:"CreateAccessWallet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"wallet",type:"address"},{indexed:!1,name:"userAddr",type:"address"}],name:"BindUserWallet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"accountAddress",type:"address"}],name:"EngageAccountLibrary",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"factory",type:"address"}],name:"SetFactory",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"nodeObjAddr",type:"address"}],name:"RegisterNode",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"nodeObjAddr",type:"address"}],name:"UnregisterNode",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"sender",type:"address"},{indexed:!1,name:"status",type:"uint256"}],name:"AddKMSLocator",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"sender",type:"address"},{indexed:!1,name:"status",type:"uint256"}],name:"RemoveKMSLocator",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"version",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"CreateSpace",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"walletAddress",type:"address"}],name:"GetAccessWallet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"addr",type:"address"},{indexed:!1,name:"locator",type:"bytes"}],name:"NodeSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"addr",type:"address"},{indexed:!1,name:"locator",type:"bytes"}],name:"NodeApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"ownerAddr",type:"address"},{indexed:!1,name:"nodeAddr",type:"address"}],name:"AddNode",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"ownerAddr",type:"address"},{indexed:!1,name:"nodeAddr",type:"address"}],name:"RemoveNode",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentType",type:"address"},{indexed:!1,name:"contentContract",type:"address"}],name:"ContentTypeAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentType",type:"address"}],name:"ContentTypeRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"CommitPending",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"objectHash",type:"string"}],name:"UpdateRequest",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"VersionConfirm",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"versionHash",type:"string"},{indexed:!1,name:"index",type:"int256"}],name:"VersionDelete",type:"event"},{anonymous:!1,inputs:[],name:"AccessRequest",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"key",type:"bytes"}],name:"ObjectMetaChanged",type:"event"}]}},function(t,e){t.exports={abi:[{constant:!0,inputs:[],name:"parentAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"address_KMS",type:"address"}],name:"updateAddressKMS",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"creator",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"canContribute",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"content_type",type:"address"},{name:"content_contract",type:"address"}],name:"addContentType",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"stakeholder",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canConfirm",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"approvalRequestsLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"}],name:"removeReviewerGroup",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"contentTypeContracts",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"}],name:"addAccessorGroup",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"content_type",type:"address"}],name:"createContent",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"typeHash",type:"bytes32"}],name:"findTypeByHash",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"reviewerGroupsLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setGroupRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"contributorGroups",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"canReview",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"content_type",type:"address"}],name:"validType",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"accessorGroups",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"contentObj",type:"address"}],name:"publish",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"addressKMS",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"countVersionHashes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"commitPending",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"}],name:"removeContributorGroup",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"requiresReview",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"kill",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"confirmCommit",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[],name:"contributorGroupsLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"submitApprovalRequest",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"clearPending",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"pendingHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"index",type:"uint256"}],name:"getPendingApprovalRequest",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"}],name:"addContributorGroup",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"newCreator",type:"address"}],name:"transferCreatorship",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canCommit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionHashes",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canEdit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"content_contract",type:"address"},{name:"approved",type:"bool"},{name:"note",type:"string"}],name:"approveContent",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_contentAddr",type:"address"}],name:"deleteContent",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"approvalRequests",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"reviewerGroups",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"hasAccess",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_objectHash",type:"string"}],name:"commit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"contentTypes",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"canPublish",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"content_type",type:"address"}],name:"whitelistedType",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"key",type:"bytes"}],name:"getMeta",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentSpace",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"updateRequest",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"contentTypesLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"address_KMS",type:"address"}],name:"setAddressKMS",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canPublish",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"}],name:"addReviewerGroup",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"objectHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_versionHash",type:"string"}],name:"deleteVersion",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"key",type:"bytes"},{name:"value",type:"bytes"}],name:"putMeta",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"accessorGroupsLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"}],name:"removeAccessorGroup",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"accessRequest",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"content_type",type:"address"}],name:"removeContentType",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{inputs:[{name:"address_KMS",type:"address"},{name:"content_space",type:"address"}],payable:!0,stateMutability:"payable",type:"constructor"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!1,name:"contentAddress",type:"address"},{indexed:!1,name:"content_type",type:"address"},{indexed:!1,name:"spaceAddress",type:"address"}],name:"ContentObjectCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentAddress",type:"address"},{indexed:!1,name:"spaceAddress",type:"address"}],name:"ContentObjectDeleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"group",type:"address"}],name:"ContributorGroupAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"group",type:"address"}],name:"ContributorGroupRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"group",type:"address"}],name:"ReviewerGroupAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"group",type:"address"}],name:"ReviewerGroupRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"group",type:"address"}],name:"AccessorGroupAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"group",type:"address"}],name:"AccessorGroupRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"operationCode",type:"uint256"},{indexed:!1,name:"candidate",type:"address"}],name:"UnauthorizedOperation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentAddress",type:"address"},{indexed:!1,name:"submitter",type:"address"}],name:"ApproveContentRequest",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentAddress",type:"address"},{indexed:!1,name:"approved",type:"bool"},{indexed:!1,name:"note",type:"string"}],name:"ApproveContent",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"addressKms",type:"address"}],name:"UpdateKmsAddress",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentType",type:"address"},{indexed:!1,name:"contentContract",type:"address"}],name:"ContentTypeAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentType",type:"address"}],name:"ContentTypeRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"CommitPending",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"objectHash",type:"string"}],name:"UpdateRequest",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"VersionConfirm",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"versionHash",type:"string"},{indexed:!1,name:"index",type:"int256"}],name:"VersionDelete",type:"event"},{anonymous:!1,inputs:[],name:"AccessRequest",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"key",type:"bytes"}],name:"ObjectMetaChanged",type:"event"}]}},function(t,e){t.exports={abi:[{constant:!0,inputs:[],name:"parentAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"creator",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"stakeholder",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canConfirm",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setGroupRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"countVersionHashes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"commitPending",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"kill",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"confirmCommit",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"clearPending",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"pendingHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newCreator",type:"address"}],name:"transferCreatorship",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canCommit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionHashes",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canEdit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_objectHash",type:"string"}],name:"commit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"contentSpace",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"updateRequest",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"objectHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_versionHash",type:"string"}],name:"deleteVersion",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"accessRequest",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{inputs:[{name:"content_space",type:"address"}],payable:!0,stateMutability:"payable",type:"constructor"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"CommitPending",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"objectHash",type:"string"}],name:"UpdateRequest",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"VersionConfirm",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"versionHash",type:"string"},{indexed:!1,name:"index",type:"int256"}],name:"VersionDelete",type:"event"},{anonymous:!1,inputs:[],name:"AccessRequest",type:"event"}]}},function(t,e){t.exports={abi:[{constant:!0,inputs:[],name:"STATUS_PUBLISHED",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"parentAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"creator",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"publish",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!1,inputs:[{name:"request_ID",type:"uint256"},{name:"payee",type:"address"},{name:"label",type:"string"},{name:"amount",type:"uint256"}],name:"processRequestPayment",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"stakeholder",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"CAN_SEE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canConfirm",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"requestMap",outputs:[{name:"originator",type:"address"},{name:"amountPaid",type:"uint256"},{name:"status",type:"int8"},{name:"settled",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setGroupRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"contentContractAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"statusCode",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"visibility",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"addressKMS",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"countVersionHashes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentType",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"commitPending",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"status_code",type:"int256"}],name:"statusCodeDescription",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"level",type:"uint8"},{name:"custom_values",type:"bytes32[]"},{name:"stakeholders",type:"address[]"}],name:"getAccessInfo",outputs:[{name:"",type:"uint8"},{name:"",type:"uint8"},{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"level",type:"uint8"},{name:"custom_values",type:"bytes32[]"},{name:"stakeholders",type:"address[]"}],name:"getCustomInfo",outputs:[{name:"",type:"uint8"},{name:"",type:"uint8"},{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"kill",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"confirmCommit",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[],name:"STATUS_DRAFT",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"status_code",type:"int256"}],name:"setStatusCode",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"request_ID",type:"uint256"},{name:"score_pct",type:"uint256"},{name:"ml_out_hash",type:"bytes32"}],name:"accessComplete",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!1,inputs:[],name:"clearPending",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"pendingHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"accessCharge",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newCreator",type:"address"}],name:"transferCreatorship",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canCommit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionHashes",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canEdit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"status_code",type:"int256"}],name:"updateStatus",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"requestID",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CAN_ACCESS",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_objectHash",type:"string"}],name:"commit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"level",type:"uint8"},{name:"pke_requestor",type:"string"},{name:"pke_AFGH",type:"string"},{name:"custom_values",type:"bytes32[]"},{name:"stakeholders",type:"address[]"}],name:"accessRequest",outputs:[{name:"",type:"uint256"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"prefix",type:"bytes"}],name:"getKMSInfo",outputs:[{name:"",type:"string"},{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"visibility_code",type:"uint8"}],name:"setVisibility",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"key",type:"bytes"}],name:"getMeta",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentSpace",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"libraryAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"updateRequest",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"address_KMS",type:"address"}],name:"setAddressKMS",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canPublish",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"STATUS_REVIEW",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"objectHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_versionHash",type:"string"}],name:"deleteVersion",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"addr",type:"address"}],name:"setContentContractAddress",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"key",type:"bytes"},{name:"value",type:"bytes"}],name:"putMeta",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"request_ID",type:"uint256"},{name:"access_granted",type:"bool"},{name:"re_key",type:"string"},{name:"encrypted_AES_key",type:"string"}],name:"accessGrant",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"CAN_EDIT",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"charge",type:"uint256"}],name:"setAccessCharge",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"statusDescription",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[{name:"content_space",type:"address"},{name:"lib",type:"address"},{name:"content_type",type:"address"}],payable:!0,stateMutability:"payable",type:"constructor"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!1,name:"containingLibrary",type:"address"}],name:"ContentObjectCreate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentType",type:"address"},{indexed:!1,name:"contentContractAddress",type:"address"}],name:"SetContentType",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"requestID",type:"uint256"},{indexed:!1,name:"level",type:"uint8"},{indexed:!1,name:"contentHash",type:"string"},{indexed:!1,name:"pkeRequestor",type:"string"},{indexed:!1,name:"pkeAFGH",type:"string"}],name:"AccessRequest",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"requestID",type:"uint256"},{indexed:!1,name:"label",type:"string"},{indexed:!1,name:"payee",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"LogPayment",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"requestID",type:"uint256"},{indexed:!1,name:"access_granted",type:"bool"},{indexed:!1,name:"reKey",type:"string"},{indexed:!1,name:"encryptedAESKey",type:"string"}],name:"AccessGrant",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"customValue",type:"bytes32"}],name:"AccessRequestValue",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"stakeholder",type:"address"}],name:"AccessRequestStakeholder",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"requestID",type:"uint256"},{indexed:!1,name:"scorePct",type:"uint256"},{indexed:!1,name:"customContractResult",type:"bool"}],name:"AccessComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentContractAddress",type:"address"}],name:"SetContentContract",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"accessCharge",type:"uint256"}],name:"SetAccessCharge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"level",type:"uint8"},{indexed:!1,name:"accessCharge",type:"uint256"}],name:"GetAccessCharge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"accessCharge",type:"uint256"},{indexed:!1,name:"amountProvided",type:"uint256"}],name:"InsufficientFunds",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"statusCode",type:"int256"}],name:"SetStatusCode",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"requestStatus",type:"bool"},{indexed:!1,name:"statusCode",type:"int256"},{indexed:!1,name:"objectHash",type:"string"}],name:"Publish",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"custom_contract",type:"address"}],name:"InvokeCustomPreHook",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"custom_contract",type:"address"},{indexed:!1,name:"result",type:"uint256"}],name:"ReturnCustomHook",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"custom_contract",type:"address"}],name:"InvokeCustomPostHook",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"CommitPending",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"objectHash",type:"string"}],name:"UpdateRequest",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"VersionConfirm",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"versionHash",type:"string"},{indexed:!1,name:"index",type:"int256"}],name:"VersionDelete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"key",type:"bytes"}],name:"ObjectMetaChanged",type:"event"}]}},function(t,e){t.exports={abi:[{constant:!0,inputs:[],name:"parentAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"creator",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"cleanUpContentObjects",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"execStatusNonceFail",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"content_space",type:"address"}],name:"setContentSpace",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"execStatusSendFail",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"obj",type:"address"}],name:"getContractRights",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CATEGORY_CONTENT_OBJECT",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"content_address",type:"address"},{name:"",type:"bytes"},{name:"level",type:"uint8"},{name:"pke_requestor",type:"string"},{name:"pke_AFGH",type:"string"},{name:"custom_values",type:"bytes32[]"},{name:"stakeholders",type:"address[]"}],name:"contentAccessRequest",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getAccessGroupsLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"canContribute",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"content_type",type:"address"},{name:"content_contract",type:"address"}],name:"addContentType",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"CATEGORY_GROUP",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canConfirm",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"group",type:"address"},{name:"access_type",type:"uint8"}],name:"checkAccessGroupRights",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CATEGORY_LIBRARY",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"ACCESS_CONFIRMED",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"contentTypeContracts",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"currentTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"typeHash",type:"bytes32"}],name:"findTypeByHash",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"obj",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setContractRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"canReview",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"content_type",type:"address"}],name:"validType",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"contentObj",type:"address"}],name:"publish",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"position",type:"uint256"}],name:"getAccessGroup",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"cleanUpAll",outputs:[{name:"",type:"uint256"},{name:"",type:"uint256"},{name:"",type:"uint256"},{name:"",type:"uint256"},{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"group",type:"address"}],name:"getAccessGroupRights",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"accessGroups",outputs:[{name:"category",type:"uint8"},{name:"length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"addressKMS",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"countVersionHashes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"commitPending",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"content_address",type:"address"},{name:"",type:"bytes"},{name:"request_ID",type:"uint256"},{name:"score_pct",type:"uint256"},{name:"ml_out_hash",type:"bytes32"}],name:"contentAccessComplete",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[],name:"requiresReview",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"obj",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setContentObjectRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"kill",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"}],name:"hasManagerAccess",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"confirmCommit",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[],name:"ACCESS_TENTATIVE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_guarantor",type:"address"},{name:"_v",type:"uint8"},{name:"_r",type:"bytes32"},{name:"_s",type:"bytes32"},{name:"_dest",type:"address"},{name:"_value",type:"uint256"},{name:"_ts",type:"uint256"}],name:"execute",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getContentTypesLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"TYPE_EDIT",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"clearPending",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"obj",type:"address"},{name:"access_type",type:"uint8"}],name:"checkContentObjectRights",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"pendingHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CATEGORY_CONTRACT",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"lib",type:"address"},{name:"access_type",type:"uint8"}],name:"checkLibraryRights",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CATEGORY_CONTENT_TYPE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"obj",type:"address"}],name:"getContentObjectRights",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contracts",outputs:[{name:"category",type:"uint8"},{name:"length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newCreator",type:"address"}],name:"transferCreatorship",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canCommit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"position",type:"uint256"}],name:"getContract",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_v",type:"uint8"},{name:"_r",type:"bytes32"},{name:"_s",type:"bytes32"},{name:"_dest",type:"address"},{name:"_value",type:"uint256"},{name:"_ts",type:"uint256"}],name:"validateTransaction",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"addr",type:"address"}],name:"contractExists",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionHashes",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"lib",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setLibraryRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"index_type",type:"uint8"},{name:"obj",type:"address"},{name:"access_type",type:"uint8"}],name:"checkRights",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canEdit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"ACCESS_NONE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"cleanUpContentTypes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"obj",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setContentTypeRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"cleanUpLibraries",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"execStatusBalanceFail",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"content_address",type:"address"},{name:"level",type:"uint8"},{name:"pke_requestor",type:"string"},{name:"pke_AFGH",type:"string"},{name:"custom_values",type:"bytes32[]"},{name:"stakeholders",type:"address[]"}],name:"accessRequestMsg",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"pure",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"hasAccess",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"execStatusOk",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"TYPE_SEE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"content_address",type:"address"},{name:"request_ID",type:"uint256"},{name:"score_pct",type:"uint256"},{name:"ml_out_hash",type:"bytes32"}],name:"accessCompleteMsg",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"pure",type:"function"},{constant:!1,inputs:[{name:"_objectHash",type:"string"}],name:"commit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"contentTypes",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"canPublish",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"content_type",type:"address"}],name:"whitelistedType",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentTypes",outputs:[{name:"category",type:"uint8"},{name:"length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"index_type",type:"uint8"},{name:"obj",type:"address"},{name:"access_type",type:"uint8"}],name:"checkDirectRights",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"obj",type:"address"}],name:"getContentTypeRights",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"obj",type:"address"},{name:"access_type",type:"uint8"}],name:"checkContractRights",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentObjects",outputs:[{name:"category",type:"uint8"},{name:"length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"position",type:"uint256"}],name:"getContentType",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"key",type:"bytes"}],name:"getMeta",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentSpace",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"setAccessRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"updateRequest",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"libraries",outputs:[{name:"category",type:"uint8"},{name:"length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentTypesLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"address_KMS",type:"address"}],name:"setAddressKMS",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getLibrariesLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"position",type:"uint256"}],name:"getContentObject",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"position",type:"uint256"}],name:"getLibrary",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"TYPE_ACCESS",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"cleanUpAccessGroups",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"objectHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_versionHash",type:"string"}],name:"deleteVersion",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"key",type:"bytes"},{name:"value",type:"bytes"}],name:"putMeta",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"execStatusSigFail",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getContentObjectsLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"accessRequest",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setAccessGroupRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_ts",type:"uint256"}],name:"validateTimestamp",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"lib",type:"address"}],name:"getLibraryRights",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getContractsLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"content_type",type:"address"}],name:"removeContentType",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"obj",type:"address"},{name:"access_type",type:"uint8"}],name:"checkContentTypeRights",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[{name:"content_space",type:"address"}],payable:!0,stateMutability:"payable",type:"constructor"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!1,name:"guarantor",type:"address"},{indexed:!1,name:"code",type:"int256"}],name:"ExecStatus",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"principal",type:"address"},{indexed:!1,name:"entity",type:"address"},{indexed:!1,name:"aggregate",type:"uint8"}],name:"RightsChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"label",type:"string"},{indexed:!1,name:"index",type:"uint256"},{indexed:!1,name:"a",type:"address"}],name:"dbgAddress",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentType",type:"address"},{indexed:!1,name:"contentContract",type:"address"}],name:"ContentTypeAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentType",type:"address"}],name:"ContentTypeRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"CommitPending",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"objectHash",type:"string"}],name:"UpdateRequest",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"VersionConfirm",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"versionHash",type:"string"},{indexed:!1,name:"index",type:"int256"}],name:"VersionDelete",type:"event"},{anonymous:!1,inputs:[],name:"AccessRequest",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"key",type:"bytes"}],name:"ObjectMetaChanged",type:"event"}]}},function(t,e){t.exports={abi:[{constant:!0,inputs:[],name:"parentAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"creator",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"cleanUpContentObjects",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"content_space",type:"address"}],name:"setContentSpace",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"obj",type:"address"}],name:"getContractRights",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CATEGORY_CONTENT_OBJECT",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"candidate",type:"address"}],name:"grantAccess",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getAccessGroupsLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CATEGORY_GROUP",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"oauthEnabled",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"membersList",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canConfirm",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"group",type:"address"},{name:"access_type",type:"uint8"}],name:"checkAccessGroupRights",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CATEGORY_LIBRARY",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"ACCESS_CONFIRMED",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"managersList",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"obj",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setContractRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"position",type:"uint256"}],name:"getAccessGroup",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"cleanUpAll",outputs:[{name:"",type:"uint256"},{name:"",type:"uint256"},{name:"",type:"uint256"},{name:"",type:"uint256"},{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"group",type:"address"}],name:"getAccessGroupRights",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"accessGroups",outputs:[{name:"category",type:"uint8"},{name:"length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"countVersionHashes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"commitPending",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"obj",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setContentObjectRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"kill",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"}],name:"hasManagerAccess",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"confirmCommit",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[],name:"ACCESS_TENTATIVE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"membersNum",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getContentTypesLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"TYPE_EDIT",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"clearPending",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"obj",type:"address"},{name:"access_type",type:"uint8"}],name:"checkContentObjectRights",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"pendingHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CATEGORY_CONTRACT",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"managersNum",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"lib",type:"address"},{name:"access_type",type:"uint8"}],name:"checkLibraryRights",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CATEGORY_CONTENT_TYPE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"obj",type:"address"}],name:"getContentObjectRights",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contracts",outputs:[{name:"category",type:"uint8"},{name:"length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newCreator",type:"address"}],name:"transferCreatorship",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canCommit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"position",type:"uint256"}],name:"getContract",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"manager",type:"address"}],name:"grantManagerAccess",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"addr",type:"address"}],name:"contractExists",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionHashes",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"lib",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setLibraryRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"index_type",type:"uint8"},{name:"obj",type:"address"},{name:"access_type",type:"uint8"}],name:"checkRights",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canEdit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"ACCESS_NONE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"cleanUpContentTypes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"candidate",type:"address"}],name:"revokeAccess",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"obj",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setContentTypeRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"cleanUpLibraries",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"}],name:"hasAccess",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"TYPE_SEE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_objectHash",type:"string"}],name:"commit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"contentTypes",outputs:[{name:"category",type:"uint8"},{name:"length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"index_type",type:"uint8"},{name:"obj",type:"address"},{name:"access_type",type:"uint8"}],name:"checkDirectRights",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"obj",type:"address"}],name:"getContentTypeRights",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"obj",type:"address"},{name:"access_type",type:"uint8"}],name:"checkContractRights",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentObjects",outputs:[{name:"category",type:"uint8"},{name:"length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"position",type:"uint256"}],name:"getContentType",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentSpace",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"setAccessRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"updateRequest",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"libraries",outputs:[{name:"category",type:"uint8"},{name:"length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getLibrariesLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"manager",type:"address"}],name:"revokeManagerAccess",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"position",type:"uint256"}],name:"getContentObject",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"position",type:"uint256"}],name:"getLibrary",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"TYPE_ACCESS",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"cleanUpAccessGroups",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"},{name:"mgr",type:"bool"}],name:"hasAccessRight",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"objectHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_versionHash",type:"string"}],name:"deleteVersion",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getContentObjectsLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setAccessGroupRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"lib",type:"address"}],name:"getLibraryRights",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_enabled",type:"bool"}],name:"setOAuthEnabled",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getContractsLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"obj",type:"address"},{name:"access_type",type:"uint8"}],name:"checkContentTypeRights",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[{name:"content_space",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!1,name:"candidate",type:"address"}],name:"MemberAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"candidate",type:"address"}],name:"ManagerAccessGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"candidate",type:"address"}],name:"MemberRevoked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"candidate",type:"address"}],name:"ManagerAccessRevoked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"operationCode",type:"uint256"},{indexed:!1,name:"candidate",type:"address"}],name:"UnauthorizedOperation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"enabled",type:"bool"}],name:"OAuthStatusChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"CommitPending",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"objectHash",type:"string"}],name:"UpdateRequest",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"VersionConfirm",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"versionHash",type:"string"},{indexed:!1,name:"index",type:"int256"}],name:"VersionDelete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"principal",type:"address"},{indexed:!1,name:"entity",type:"address"},{indexed:!1,name:"aggregate",type:"uint8"}],name:"RightsChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"label",type:"string"},{indexed:!1,name:"index",type:"uint256"},{indexed:!1,name:"a",type:"address"}],name:"dbgAddress",type:"event"}]}},function(t,e){t.exports={abi:[{constant:!0,inputs:[],name:"version",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"accessRequest",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[],name:"AccessRequest",type:"event"}]}},function(t,e){t.exports={abi:[{constant:!0,inputs:[],name:"parentAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"creator",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canConfirm",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"countVersionHashes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"commitPending",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"kill",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"confirmCommit",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"clearPending",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"pendingHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newCreator",type:"address"}],name:"transferCreatorship",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canCommit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionHashes",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canEdit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_objectHash",type:"string"}],name:"commit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"contentSpace",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"updateRequest",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"objectHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_versionHash",type:"string"}],name:"deleteVersion",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"CommitPending",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"objectHash",type:"string"}],name:"UpdateRequest",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"VersionConfirm",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"versionHash",type:"string"},{indexed:!1,name:"index",type:"int256"}],name:"VersionDelete",type:"event"}]}},function(t,e){t.exports={abi:[{constant:!0,inputs:[],name:"parentAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"creator",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"canContribute",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"content_type",type:"address"},{name:"content_contract",type:"address"}],name:"addContentType",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"stakeholder",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"CAN_SEE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canConfirm",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_locator",type:"bytes"}],name:"submitNode",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"customValues",type:"bytes32[]"},{name:"stakeholders",type:"address[]"}],name:"accessRequestV3",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"contentTypeContracts",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"typeHash",type:"bytes32"}],name:"findTypeByHash",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setGroupRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"isAdmin",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"}],name:"canNodePublish",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_kmsID",type:"string"},{name:"prefix",type:"bytes"}],name:"getKMSInfo",outputs:[{name:"",type:"string"},{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"visibility",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"canReview",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"content_type",type:"address"}],name:"validType",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"contentObj",type:"address"}],name:"publish",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"addressKMS",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"countVersionHashes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"commitPending",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"requiresReview",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"objectTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"address_KMS",type:"address"}],name:"createLibrary",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"kill",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"numActiveNodes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"libraryFactory",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"confirmCommit",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"activeNodeLocators",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"activeNodeAddresses",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"createGroup",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_kmsAddr",type:"address"}],name:"getKMSID",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"new_factory",type:"address"}],name:"setFactory",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"versionAPI",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"clearPending",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"pendingHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"indexCategory",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_userAddr",type:"address"}],name:"userWallets",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_nodeAddr",type:"address"},{name:"_locator",type:"bytes"}],name:"addNode",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_kmsID",type:"string"},{name:"_locator",type:"bytes"}],name:"addKMSLocator",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"}],name:"hasEditorRight",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"pendingNodeLocators",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"pendingNodeAddresses",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newCreator",type:"address"}],name:"transferCreatorship",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canCommit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"description",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"createAccessWallet",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_user",type:"address"}],name:"createUserWalletInternal",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionHashes",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"new_factory",type:"address"}],name:"setWalletFactory",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canEdit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"new_factory",type:"address"}],name:"setGroupFactory",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"new_factory",type:"address"}],name:"setContentFactory",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_kmsIdStr",type:"string"}],name:"checkKMS",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentFactory",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"content_space_description",type:"string"}],name:"setDescription",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"}],name:"hasAccess",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CAN_ACCESS",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_objectHash",type:"string"}],name:"commit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"contentTypes",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"canPublish",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"content_type",type:"address"}],name:"whitelistedType",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"new_factory",type:"address"}],name:"setLibraryFactory",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"getAccessWallet",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_kmsID",type:"string"},{name:"_pubKey",type:"string"}],name:"setKMSPublicKey",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_visibility_code",type:"uint8"}],name:"setVisibility",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"key",type:"bytes"}],name:"getMeta",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentSpace",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"groupFactory",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_nodeAddr",type:"address"}],name:"removeNode",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"createContentType",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"lib",type:"address"},{name:"content_type",type:"address"}],name:"createContent",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"updateRequest",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"factory",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"walletFactory",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentTypesLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"address_KMS",type:"address"}],name:"setAddressKMS",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_kmsAddr",type:"address"}],name:"checkKMSAddr",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_nodeAddr",type:"address"}],name:"approveNode",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"objectHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_versionHash",type:"string"}],name:"deleteVersion",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"key",type:"bytes"},{name:"value",type:"bytes"}],name:"putMeta",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_user",type:"address"}],name:"createUserWallet",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"CAN_EDIT",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"numPendingNodes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"nodeMapping",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"content_type",type:"address"}],name:"removeContentType",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_kmsID",type:"string"},{name:"_locator",type:"bytes"}],name:"removeKMSLocator",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{inputs:[{name:"content_space_name",type:"string"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!1,name:"contentTypeAddress",type:"address"}],name:"CreateContentType",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"libraryAddress",type:"address"}],name:"CreateLibrary",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"groupAddress",type:"address"}],name:"CreateGroup",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentAddress",type:"address"}],name:"CreateContent",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"wallet",type:"address"}],name:"CreateAccessWallet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"wallet",type:"address"},{indexed:!1,name:"userAddr",type:"address"}],name:"BindUserWallet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"accountAddress",type:"address"}],name:"EngageAccountLibrary",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"factory",type:"address"}],name:"SetFactory",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"nodeObjAddr",type:"address"}],name:"RegisterNode",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"nodeObjAddr",type:"address"}],name:"UnregisterNode",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"sender",type:"address"},{indexed:!1,name:"status",type:"uint256"}],name:"AddKMSLocator",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"sender",type:"address"},{indexed:!1,name:"status",type:"uint256"}],name:"RemoveKMSLocator",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"version",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"CreateSpace",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"walletAddress",type:"address"}],name:"GetAccessWallet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"addr",type:"address"},{indexed:!1,name:"locator",type:"bytes"}],name:"NodeSubmitted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"addr",type:"address"},{indexed:!1,name:"locator",type:"bytes"}],name:"NodeApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"ownerAddr",type:"address"},{indexed:!1,name:"nodeAddr",type:"address"}],name:"AddNode",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"ownerAddr",type:"address"},{indexed:!1,name:"nodeAddr",type:"address"}],name:"RemoveNode",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentType",type:"address"},{indexed:!1,name:"contentContract",type:"address"}],name:"ContentTypeAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentType",type:"address"}],name:"ContentTypeRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"CommitPending",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"objectHash",type:"string"}],name:"UpdateRequest",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"VersionConfirm",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"versionHash",type:"string"},{indexed:!1,name:"index",type:"int256"}],name:"VersionDelete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"requestNonce",type:"uint256"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"contextHash",type:"bytes32"},{indexed:!1,name:"accessor",type:"address"},{indexed:!1,name:"requestTimestamp",type:"uint256"}],name:"AccessRequestV3",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentSpace",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"visibility",type:"uint8"}],name:"VisibilityChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"key",type:"bytes"}],name:"ObjectMetaChanged",type:"event"}]}},function(t,e){t.exports={abi:[{constant:!0,inputs:[],name:"parentAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"address_KMS",type:"address"}],name:"updateAddressKMS",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"creator",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"canContribute",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"content_type",type:"address"},{name:"content_contract",type:"address"}],name:"addContentType",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"stakeholder",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"CAN_SEE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canConfirm",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"approvalRequestsLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"}],name:"removeReviewerGroup",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"customValues",type:"bytes32[]"},{name:"stakeholders",type:"address[]"}],name:"accessRequestV3",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"contentTypeContracts",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"}],name:"addAccessorGroup",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"content_type",type:"address"}],name:"createContent",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"typeHash",type:"bytes32"}],name:"findTypeByHash",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"reviewerGroupsLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setGroupRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"contributorGroups",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"isAdmin",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"visibility",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"canReview",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"content_type",type:"address"}],name:"validType",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"accessorGroups",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"contentObj",type:"address"}],name:"publish",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"addressKMS",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"countVersionHashes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"commitPending",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"}],name:"removeContributorGroup",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"requiresReview",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"objectTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"kill",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"confirmCommit",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[],name:"contributorGroupsLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"submitApprovalRequest",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"versionAPI",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"clearPending",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"pendingHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"indexCategory",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"index",type:"uint256"}],name:"getPendingApprovalRequest",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"}],name:"addContributorGroup",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"}],name:"hasEditorRight",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newCreator",type:"address"}],name:"transferCreatorship",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canCommit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionHashes",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canEdit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"content_contract",type:"address"},{name:"approved",type:"bool"},{name:"note",type:"string"}],name:"approveContent",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_contentAddr",type:"address"}],name:"deleteContent",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"approvalRequests",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"reviewerGroups",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"}],name:"hasAccess",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CAN_ACCESS",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_objectHash",type:"string"}],name:"commit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"contentTypes",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"canPublish",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"content_type",type:"address"}],name:"whitelistedType",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_visibility_code",type:"uint8"}],name:"setVisibility",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"key",type:"bytes"}],name:"getMeta",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentSpace",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"updateRequest",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"contentTypesLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"address_KMS",type:"address"}],name:"setAddressKMS",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canPublish",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"}],name:"addReviewerGroup",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"objectHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_versionHash",type:"string"}],name:"deleteVersion",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"key",type:"bytes"},{name:"value",type:"bytes"}],name:"putMeta",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"accessorGroupsLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"}],name:"removeAccessorGroup",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"CAN_EDIT",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"content_type",type:"address"}],name:"removeContentType",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{inputs:[{name:"address_KMS",type:"address"},{name:"content_space",type:"address"}],payable:!0,stateMutability:"payable",type:"constructor"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!1,name:"contentAddress",type:"address"},{indexed:!1,name:"content_type",type:"address"},{indexed:!1,name:"spaceAddress",type:"address"}],name:"ContentObjectCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentAddress",type:"address"},{indexed:!1,name:"spaceAddress",type:"address"}],name:"ContentObjectDeleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"group",type:"address"}],name:"ContributorGroupAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"group",type:"address"}],name:"ContributorGroupRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"group",type:"address"}],name:"ReviewerGroupAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"group",type:"address"}],name:"ReviewerGroupRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"group",type:"address"}],name:"AccessorGroupAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"group",type:"address"}],name:"AccessorGroupRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"operationCode",type:"uint256"},{indexed:!1,name:"candidate",type:"address"}],name:"UnauthorizedOperation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentAddress",type:"address"},{indexed:!1,name:"submitter",type:"address"}],name:"ApproveContentRequest",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentAddress",type:"address"},{indexed:!1,name:"approved",type:"bool"},{indexed:!1,name:"note",type:"string"}],name:"ApproveContent",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"addressKms",type:"address"}],name:"UpdateKmsAddress",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentType",type:"address"},{indexed:!1,name:"contentContract",type:"address"}],name:"ContentTypeAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentType",type:"address"}],name:"ContentTypeRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"CommitPending",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"objectHash",type:"string"}],name:"UpdateRequest",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"VersionConfirm",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"versionHash",type:"string"},{indexed:!1,name:"index",type:"int256"}],name:"VersionDelete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"requestNonce",type:"uint256"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"contextHash",type:"bytes32"},{indexed:!1,name:"accessor",type:"address"},{indexed:!1,name:"requestTimestamp",type:"uint256"}],name:"AccessRequestV3",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentSpace",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"visibility",type:"uint8"}],name:"VisibilityChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"key",type:"bytes"}],name:"ObjectMetaChanged",type:"event"}]}},function(t,e){t.exports={abi:[{constant:!0,inputs:[],name:"parentAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"creator",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"stakeholder",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"CAN_SEE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canConfirm",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"customValues",type:"bytes32[]"},{name:"stakeholders",type:"address[]"}],name:"accessRequestV3",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setGroupRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"visibility",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"countVersionHashes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"commitPending",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"objectTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"kill",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"confirmCommit",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"versionAPI",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"clearPending",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"pendingHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"indexCategory",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"}],name:"hasEditorRight",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newCreator",type:"address"}],name:"transferCreatorship",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canCommit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionHashes",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canEdit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"}],name:"hasAccess",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CAN_ACCESS",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_objectHash",type:"string"}],name:"commit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_visibility_code",type:"uint8"}],name:"setVisibility",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"contentSpace",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"updateRequest",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"objectHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_versionHash",type:"string"}],name:"deleteVersion",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"CAN_EDIT",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{inputs:[{name:"content_space",type:"address"}],payable:!0,stateMutability:"payable",type:"constructor"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"CommitPending",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"objectHash",type:"string"}],name:"UpdateRequest",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"VersionConfirm",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"versionHash",type:"string"},{indexed:!1,name:"index",type:"int256"}],name:"VersionDelete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"requestNonce",type:"uint256"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"contextHash",type:"bytes32"},{indexed:!1,name:"accessor",type:"address"},{indexed:!1,name:"requestTimestamp",type:"uint256"}],name:"AccessRequestV3",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentSpace",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"visibility",type:"uint8"}],name:"VisibilityChanged",type:"event"}]}},function(t,e){t.exports={abi:[{constant:!0,inputs:[],name:"STATUS_PUBLISHED",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"parentAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"creator",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"request_ID",type:"uint256"},{name:"score_pct",type:"uint256"},{name:"",type:"uint256"}],name:"accessComplete",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!1,inputs:[],name:"publish",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!1,inputs:[{name:"requestNonce",type:"uint256"},{name:"payee",type:"address"},{name:"label",type:"string"},{name:"amount",type:"uint256"}],name:"processRequestPayment",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"stakeholder",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"CAN_SEE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canConfirm",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"requestMap",outputs:[{name:"originator",type:"address"},{name:"amountPaid",type:"uint256"},{name:"status",type:"int8"},{name:"settled",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"customValues",type:"bytes32[]"},{name:"stakeholders",type:"address[]"}],name:"accessRequestV3",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setGroupRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"contentContractAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"isAdmin",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"statusCode",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"visibility",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"addressKMS",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"countVersionHashes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentType",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"commitPending",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"status_code",type:"int256"}],name:"statusCodeDescription",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"level",type:"uint8"},{name:"customValues",type:"bytes32[]"},{name:"stakeholders",type:"address[]"}],name:"getAccessInfo",outputs:[{name:"",type:"uint8"},{name:"",type:"uint8"},{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"objectTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"kill",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"confirmCommit",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!1,inputs:[{name:"requestNonce",type:"uint256"},{name:"customValues",type:"bytes32[]"},{name:"stakeholders",type:"address[]"}],name:"accessCompleteV3",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!1,inputs:[{name:"requestNonce",type:"uint256"},{name:"customValues",type:"bytes32[]"},{name:"stakeholders",type:"address[]"}],name:"accessCompleteInternal",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[],name:"STATUS_DRAFT",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"status_code",type:"int256"}],name:"setStatusCode",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"versionAPI",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"clearPending",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"pendingHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"indexCategory",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"accessCharge",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"}],name:"hasEditorRight",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newCreator",type:"address"}],name:"transferCreatorship",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canCommit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"requestNonce",type:"uint256"},{name:"contextHash",type:"bytes32"},{name:"accessor",type:"address"},{name:"request_timestamp",type:"uint256"}],name:"accessRequestContext",outputs:[{name:"",type:"uint256"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionHashes",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"accessor",type:"address"},{name:"customValues",type:"bytes32[]"},{name:"stakeholders",type:"address[]"}],name:"getAccessInfoV3",outputs:[{name:"",type:"uint8"},{name:"",type:"uint8"},{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canEdit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"status_code",type:"int256"}],name:"updateStatus",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"reqId",type:"uint256"}],name:"makeNonce",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"requestID",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"}],name:"hasAccess",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CAN_ACCESS",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_objectHash",type:"string"}],name:"commit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"level",type:"uint8"},{name:"pkeRequestor",type:"string"},{name:"pkeAFGH",type:"string"},{name:"customValues",type:"bytes32[]"},{name:"stakeholders",type:"address[]"}],name:"accessRequest",outputs:[{name:"",type:"uint256"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"prefix",type:"bytes"}],name:"getKMSInfo",outputs:[{name:"",type:"string"},{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_visibility_code",type:"uint8"}],name:"setVisibility",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"key",type:"bytes"}],name:"getMeta",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentSpace",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"libraryAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_requestNonce",type:"uint256"},{name:"_contextHash",type:"bytes32"},{name:"_accessor",type:"address"},{name:"_request_timestamp",type:"uint256"}],name:"accessCompleteContext",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"accessor",type:"address"},{name:"customValues",type:"bytes32[]"},{name:"stakeholders",type:"address[]"}],name:"getCustomInfo",outputs:[{name:"",type:"uint8"},{name:"",type:"uint8"},{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"updateRequest",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"address_KMS",type:"address"}],name:"setAddressKMS",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canPublish",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"STATUS_REVIEW",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"objectHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_versionHash",type:"string"}],name:"deleteVersion",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"addr",type:"address"}],name:"setContentContractAddress",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"key",type:"bytes"},{name:"value",type:"bytes"}],name:"putMeta",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"CAN_EDIT",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"charge",type:"uint256"}],name:"setAccessCharge",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"statusDescription",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[{name:"content_space",type:"address"},{name:"lib",type:"address"},{name:"content_type",type:"address"}],payable:!0,stateMutability:"payable",type:"constructor"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!1,name:"containingLibrary",type:"address"}],name:"ContentObjectCreate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentType",type:"address"},{indexed:!1,name:"contentContractAddress",type:"address"}],name:"SetContentType",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"requestNonce",type:"uint256"},{indexed:!1,name:"label",type:"string"},{indexed:!1,name:"payee",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"LogPayment",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"customValue",type:"bytes32"}],name:"AccessRequestValue",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"stakeholder",type:"address"}],name:"AccessRequestStakeholder",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"requestID",type:"uint256"},{indexed:!1,name:"level",type:"uint8"},{indexed:!1,name:"contentHash",type:"string"},{indexed:!1,name:"pkeRequestor",type:"string"},{indexed:!1,name:"pkeAFGH",type:"string"}],name:"AccessRequest",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"requestID",type:"uint256"},{indexed:!1,name:"scorePct",type:"uint256"},{indexed:!1,name:"customContractResult",type:"bool"}],name:"AccessComplete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"requestNonce",type:"uint256"},{indexed:!1,name:"customContractResult",type:"bool"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"contextHash",type:"bytes32"},{indexed:!1,name:"accessor",type:"address"},{indexed:!1,name:"request_timestamp",type:"uint256"}],name:"AccessCompleteV3",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentContractAddress",type:"address"}],name:"SetContentContract",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"accessCharge",type:"uint256"}],name:"SetAccessCharge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"accessCharge",type:"uint256"},{indexed:!1,name:"amountProvided",type:"uint256"}],name:"InsufficientFunds",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"statusCode",type:"int256"}],name:"SetStatusCode",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"requestStatus",type:"bool"},{indexed:!1,name:"statusCode",type:"int256"},{indexed:!1,name:"objectHash",type:"string"}],name:"Publish",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"custom_contract",type:"address"}],name:"InvokeCustomPreHook",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"custom_contract",type:"address"},{indexed:!1,name:"result",type:"uint256"}],name:"ReturnCustomHook",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"custom_contract",type:"address"}],name:"InvokeCustomPostHook",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"CommitPending",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"objectHash",type:"string"}],name:"UpdateRequest",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"VersionConfirm",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"versionHash",type:"string"},{indexed:!1,name:"index",type:"int256"}],name:"VersionDelete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"requestNonce",type:"uint256"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"contextHash",type:"bytes32"},{indexed:!1,name:"accessor",type:"address"},{indexed:!1,name:"requestTimestamp",type:"uint256"}],name:"AccessRequestV3",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentSpace",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"visibility",type:"uint8"}],name:"VisibilityChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"key",type:"bytes"}],name:"ObjectMetaChanged",type:"event"}]}},function(t,e){t.exports={abi:[{constant:!0,inputs:[],name:"parentAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"creator",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"cleanUpContentObjects",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"execStatusNonceFail",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"content_space",type:"address"}],name:"setContentSpace",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"execStatusSendFail",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"obj",type:"address"}],name:"getContractRights",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CATEGORY_CONTENT_OBJECT",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getAccessGroupsLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"canContribute",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"content_type",type:"address"},{name:"content_contract",type:"address"}],name:"addContentType",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"stakeholder",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"CAN_SEE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CATEGORY_GROUP",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canConfirm",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CATEGORY_LIBRARY",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"ACCESS_CONFIRMED",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"customValues",type:"bytes32[]"},{name:"stakeholders",type:"address[]"}],name:"accessRequestV3",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"contentTypeContracts",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"currentTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"typeHash",type:"bytes32"}],name:"findTypeByHash",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"obj",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setContractRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setGroupRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"isAdmin",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"visibility",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"canReview",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"content_type",type:"address"}],name:"validType",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"contentObj",type:"address"}],name:"publish",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"position",type:"uint256"}],name:"getAccessGroup",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"cleanUpAll",outputs:[{name:"",type:"uint256"},{name:"",type:"uint256"},{name:"",type:"uint256"},{name:"",type:"uint256"},{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"group",type:"address"}],name:"getAccessGroupRights",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"accessGroups",outputs:[{name:"category",type:"uint8"},{name:"length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"addressKMS",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"countVersionHashes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"commitPending",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"requiresReview",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"obj",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setContentObjectRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"objectTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"kill",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"}],name:"hasManagerAccess",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"confirmCommit",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[],name:"ACCESS_TENTATIVE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_guarantor",type:"address"},{name:"_v",type:"uint8"},{name:"_r",type:"bytes32"},{name:"_s",type:"bytes32"},{name:"_dest",type:"address"},{name:"_value",type:"uint256"},{name:"_ts",type:"uint256"}],name:"execute",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"others",outputs:[{name:"category",type:"uint8"},{name:"length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getContentTypesLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"indexType",type:"uint8"},{name:"obj",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setEntityRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"TYPE_EDIT",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"versionAPI",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"clearPending",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"pendingHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CATEGORY_CONTRACT",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"indexCategory",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"}],name:"hasEditorRight",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CATEGORY_CONTENT_TYPE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"obj",type:"address"}],name:"getContentObjectRights",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contracts",outputs:[{name:"category",type:"uint8"},{name:"length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newCreator",type:"address"}],name:"transferCreatorship",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canCommit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"position",type:"uint256"}],name:"getContract",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_v",type:"uint8"},{name:"_r",type:"bytes32"},{name:"_s",type:"bytes32"},{name:"_dest",type:"address"},{name:"_value",type:"uint256"},{name:"_ts",type:"uint256"}],name:"validateTransaction",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"addr",type:"address"}],name:"contractExists",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionHashes",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"lib",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setLibraryRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"index_type",type:"uint8"},{name:"obj",type:"address"},{name:"access_type",type:"uint8"}],name:"checkRights",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canEdit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"ACCESS_NONE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"cleanUpContentTypes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"obj",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setContentTypeRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"cleanUpLibraries",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"execStatusBalanceFail",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"}],name:"hasAccess",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"execStatusOk",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"TYPE_SEE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CAN_ACCESS",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_objectHash",type:"string"}],name:"commit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"contentTypes",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"canPublish",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"content_type",type:"address"}],name:"whitelistedType",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentTypes",outputs:[{name:"category",type:"uint8"},{name:"length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"index_type",type:"uint8"},{name:"obj",type:"address"},{name:"access_type",type:"uint8"}],name:"checkDirectRights",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"obj",type:"address"}],name:"getContentTypeRights",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentObjects",outputs:[{name:"category",type:"uint8"},{name:"length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_visibility_code",type:"uint8"}],name:"setVisibility",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"position",type:"uint256"}],name:"getContentType",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"key",type:"bytes"}],name:"getMeta",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentSpace",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"setAccessRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"updateRequest",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"libraries",outputs:[{name:"category",type:"uint8"},{name:"length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentTypesLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"address_KMS",type:"address"}],name:"setAddressKMS",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getLibrariesLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"position",type:"uint256"}],name:"getContentObject",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"position",type:"uint256"}],name:"getLibrary",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"TYPE_ACCESS",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"cleanUpAccessGroups",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"objectHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_versionHash",type:"string"}],name:"deleteVersion",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"key",type:"bytes"},{name:"value",type:"bytes"}],name:"putMeta",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"execStatusSigFail",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getContentObjectsLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CAN_EDIT",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setAccessGroupRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_ts",type:"uint256"}],name:"validateTimestamp",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"lib",type:"address"}],name:"getLibraryRights",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getContractsLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"content_type",type:"address"}],name:"removeContentType",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{inputs:[{name:"content_space",type:"address"}],payable:!0,stateMutability:"payable",type:"constructor"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!1,name:"guarantor",type:"address"},{indexed:!1,name:"code",type:"int256"}],name:"ExecStatus",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"principal",type:"address"},{indexed:!1,name:"entity",type:"address"},{indexed:!1,name:"aggregate",type:"uint8"}],name:"RightsChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentType",type:"address"},{indexed:!1,name:"contentContract",type:"address"}],name:"ContentTypeAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentType",type:"address"}],name:"ContentTypeRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"CommitPending",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"objectHash",type:"string"}],name:"UpdateRequest",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"VersionConfirm",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"versionHash",type:"string"},{indexed:!1,name:"index",type:"int256"}],name:"VersionDelete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"requestNonce",type:"uint256"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"contextHash",type:"bytes32"},{indexed:!1,name:"accessor",type:"address"},{indexed:!1,name:"requestTimestamp",type:"uint256"}],name:"AccessRequestV3",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentSpace",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"visibility",type:"uint8"}],name:"VisibilityChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"key",type:"bytes"}],name:"ObjectMetaChanged",type:"event"}]}},function(t,e){t.exports={abi:[{constant:!0,inputs:[],name:"parentAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"creator",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"cleanUpContentObjects",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"content_space",type:"address"}],name:"setContentSpace",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"obj",type:"address"}],name:"getContractRights",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CATEGORY_CONTENT_OBJECT",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"candidate",type:"address"}],name:"grantAccess",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getAccessGroupsLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"stakeholder",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"CAN_SEE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CATEGORY_GROUP",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"oauthEnabled",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"membersList",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canConfirm",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CATEGORY_LIBRARY",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"ACCESS_CONFIRMED",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"customValues",type:"bytes32[]"},{name:"stakeholders",type:"address[]"}],name:"accessRequestV3",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"managersList",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"obj",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setContractRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setGroupRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"isAdmin",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_ident",type:"bytes32"},{name:"_ord",type:"uint8"}],name:"setAndGetBit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"visibility",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"position",type:"uint256"}],name:"getAccessGroup",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_tenantAddr",type:"address"}],name:"setTenant",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"cleanUpAll",outputs:[{name:"",type:"uint256"},{name:"",type:"uint256"},{name:"",type:"uint256"},{name:"",type:"uint256"},{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"group",type:"address"}],name:"getAccessGroupRights",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"accessGroups",outputs:[{name:"category",type:"uint8"},{name:"length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_ident",type:"bytes32"},{name:"_ord",type:"uint8"}],name:"getBit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"countVersionHashes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_ident",type:"bytes32"},{name:"_ord",type:"uint8"}],name:"setAndGetBitInternal",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"commitPending",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"obj",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setContentObjectRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"objectTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"kill",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"hasManagerAccess",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"confirmCommit",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[],name:"ACCESS_TENTATIVE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"others",outputs:[{name:"category",type:"uint8"},{name:"length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"membersNum",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getContentTypesLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"indexType",type:"uint8"},{name:"obj",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setEntityRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"TYPE_EDIT",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"versionAPI",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"clearPending",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"pendingHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CATEGORY_CONTRACT",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"indexCategory",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"managersNum",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"hasEditorRight",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CATEGORY_CONTENT_TYPE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"obj",type:"address"}],name:"getContentObjectRights",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contracts",outputs:[{name:"category",type:"uint8"},{name:"length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newCreator",type:"address"}],name:"transferCreatorship",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canCommit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"position",type:"uint256"}],name:"getContract",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_ident",type:"bytes32"},{name:"_ord",type:"uint8"}],name:"incrementCounter",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"manager",type:"address"}],name:"grantManagerAccess",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"addr",type:"address"}],name:"contractExists",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionHashes",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"lib",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setLibraryRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"index_type",type:"uint8"},{name:"obj",type:"address"},{name:"access_type",type:"uint8"}],name:"checkRights",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canEdit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"ACCESS_NONE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"cleanUpContentTypes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"candidate",type:"address"}],name:"revokeAccess",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"obj",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setContentTypeRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"cleanUpLibraries",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"}],name:"hasAccess",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"TYPE_SEE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CAN_ACCESS",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_objectHash",type:"string"}],name:"commit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"contentTypes",outputs:[{name:"category",type:"uint8"},{name:"length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"index_type",type:"uint8"},{name:"obj",type:"address"},{name:"access_type",type:"uint8"}],name:"checkDirectRights",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"obj",type:"address"}],name:"getContentTypeRights",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentObjects",outputs:[{name:"category",type:"uint8"},{name:"length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_visibility_code",type:"uint8"}],name:"setVisibility",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"position",type:"uint256"}],name:"getContentType",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"key",type:"bytes"}],name:"getMeta",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"tenant",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentSpace",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"setAccessRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"updateRequest",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"libraries",outputs:[{name:"category",type:"uint8"},{name:"length",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getLibrariesLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"manager",type:"address"}],name:"revokeManagerAccess",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"position",type:"uint256"}],name:"getContentObject",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"position",type:"uint256"}],name:"getLibrary",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"TYPE_ACCESS",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"cleanUpAccessGroups",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"},{name:"mgr",type:"bool"}],name:"hasAccessRight",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"objectHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_ident",type:"bytes32"},{name:"_ord",type:"uint8"}],name:"getCounter",outputs:[{name:"",type:"uint32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_versionHash",type:"string"}],name:"deleteVersion",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"key",type:"bytes"},{name:"value",type:"bytes"}],name:"putMeta",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_ident",type:"bytes32"}],name:"deleteGroup",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getContentObjectsLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CAN_EDIT",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setAccessGroupRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"lib",type:"address"}],name:"getLibraryRights",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_enabled",type:"bool"}],name:"setOAuthEnabled",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"getContractsLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[{name:"_contentSpace",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!1,name:"candidate",type:"address"}],name:"MemberAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"candidate",type:"address"}],name:"ManagerAccessGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"candidate",type:"address"}],name:"MemberRevoked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"candidate",type:"address"}],name:"ManagerAccessRevoked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"operationCode",type:"uint256"},{indexed:!1,name:"candidate",type:"address"}],name:"UnauthorizedOperation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"enabled",type:"bool"}],name:"OAuthStatusChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"CommitPending",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"objectHash",type:"string"}],name:"UpdateRequest",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"VersionConfirm",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"versionHash",type:"string"},{indexed:!1,name:"index",type:"int256"}],name:"VersionDelete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"requestNonce",type:"uint256"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"contextHash",type:"bytes32"},{indexed:!1,name:"accessor",type:"address"},{indexed:!1,name:"requestTimestamp",type:"uint256"}],name:"AccessRequestV3",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentSpace",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"visibility",type:"uint8"}],name:"VisibilityChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"principal",type:"address"},{indexed:!1,name:"entity",type:"address"},{indexed:!1,name:"aggregate",type:"uint8"}],name:"RightsChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"ident",type:"bytes32"},{indexed:!1,name:"slot",type:"uint8"},{indexed:!1,name:"val",type:"uint32"}],name:"CounterIncremented",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"ident",type:"bytes32"},{indexed:!1,name:"ord",type:"uint8"},{indexed:!1,name:"prev",type:"bool"}],name:"BitSetAndGet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"ident",type:"bytes32"}],name:"WordGroupDeleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"key",type:"bytes"}],name:"ObjectMetaChanged",type:"event"}]}},function(t,e){t.exports={abi:[{constant:!0,inputs:[],name:"parentAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"creator",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"stakeholder",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"CAN_SEE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canConfirm",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"customValues",type:"bytes32[]"},{name:"stakeholders",type:"address[]"}],name:"accessRequestV3",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setGroupRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"visibility",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"countVersionHashes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"commitPending",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"objectTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"kill",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"confirmCommit",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"versionAPI",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"clearPending",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"pendingHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"indexCategory",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"}],name:"hasEditorRight",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newCreator",type:"address"}],name:"transferCreatorship",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canCommit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionHashes",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canEdit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"}],name:"hasAccess",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CAN_ACCESS",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_objectHash",type:"string"}],name:"commit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_visibility_code",type:"uint8"}],name:"setVisibility",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"contentSpace",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"updateRequest",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"objectHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_versionHash",type:"string"}],name:"deleteVersion",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"CAN_EDIT",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"CommitPending",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"objectHash",type:"string"}],name:"UpdateRequest",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"VersionConfirm",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"versionHash",type:"string"},{indexed:!1,name:"index",type:"int256"}],name:"VersionDelete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"requestNonce",type:"uint256"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"contextHash",type:"bytes32"},{indexed:!1,name:"accessor",type:"address"},{indexed:!1,name:"requestTimestamp",type:"uint256"}],name:"AccessRequestV3",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentSpace",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"visibility",type:"uint8"}],name:"VisibilityChanged",type:"event"}]}},function(t,e){t.exports={abi:[{constant:!0,inputs:[],name:"parentAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"creator",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"factoryManager",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_func4Bytes",type:"bytes4[]"},{name:"_funcAddr",type:"address"}],name:"addFuncs",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"canContribute",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"content_type",type:"address"},{name:"content_contract",type:"address"}],name:"addContentType",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"stakeholder",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"CAN_SEE",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"listKey",type:"bytes32"}],name:"listLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_nodeMan",type:"address"}],name:"setNodeManager",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canConfirm",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"customValues",type:"bytes32[]"},{name:"stakeholders",type:"address[]"}],name:"accessRequestV3",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"contentTypeContracts",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"typeHash",type:"bytes32"}],name:"findTypeByHash",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"listKey",type:"bytes32"},{name:"itemOrd",type:"uint256"}],name:"removeListOrd",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"group",type:"address"},{name:"access_type",type:"uint8"},{name:"access",type:"uint8"}],name:"setGroupRights",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"isAdmin",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_ident",type:"bytes32"},{name:"_ord",type:"uint8"}],name:"setAndGetBit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"canNodePublish",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_kmsID",type:"string"},{name:"_prefix",type:"bytes"}],name:"getKMSInfo",outputs:[{name:"",type:"string"},{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"visibility",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"canReview",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"content_type",type:"address"}],name:"validType",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"contentObj",type:"address"}],name:"publish",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_ident",type:"bytes32"},{name:"_ord",type:"uint8"}],name:"getBit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"addressKMS",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"countVersionHashes",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_ident",type:"bytes32"},{name:"_ord",type:"uint8"}],name:"setAndGetBitInternal",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_id",type:"bytes32"}],name:"checkIdsRemove",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"commitPending",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"requiresReview",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getTenantID",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"groupIds",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"objectTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_kmsAddress",type:"address"}],name:"createLibrary",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"kill",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_factMan",type:"address"}],name:"setFactoryManager",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"confirmCommit",outputs:[{name:"",type:"bool"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"bytes32"},{name:"",type:"uint256"}],name:"listsMapping",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"createGroup",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_kmsAddr",type:"address"}],name:"getKMSID",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"GROUP_ID_ADMIN",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"userManager",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"versionAPI",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"clearPending",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"pendingHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"indexCategory",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_userAddr",type:"address"}],name:"userWallets",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_id",type:"bytes32"},{name:"_groupAddr",type:"address"}],name:"addGroup",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"}],name:"hasEditorRight",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newCreator",type:"address"}],name:"transferCreatorship",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"canCommit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"description",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"listKey",type:"bytes32"},{name:"itemVal",type:"string"}],name:"addListItem",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_ident",type:"bytes32"},{name:"_ord",type:"uint8"}],name:"incrementCounter",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionTimestamp",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"versionHashes",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"canEdit",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_kmsMan",type:"address"}],name:"setKmsManager",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_desc",type:"string"}],name:"setDescription",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"address"}],name:"hasAccess",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CAN_ACCESS",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_userMan",type:"address"}],name:"setUserManager",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_objectHash",type:"string"}],name:"commit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"contentTypes",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_candidate",type:"address"}],name:"canPublish",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"nodeManager",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_func4Bytes",type:"bytes4"},{name:"_p1",type:"uint256"},{name:"_p2",type:"address"},{name:"_encAuthToken",type:"bytes"},{name:"_v",type:"uint8"},{name:"_r",type:"bytes32"},{name:"_s",type:"bytes32"}],name:"callFuncUintAddr",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"content_type",type:"address"}],name:"whitelistedType",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_amount",type:"uint256"}],name:"transfer",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_visibility_code",type:"uint8"}],name:"setVisibility",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"key",type:"bytes"}],name:"getMeta",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"kmsManager",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentSpace",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"createContentType",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_lib",type:"address"},{name:"_contentType",type:"address"}],name:"createContent",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"updateRequest",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"bytes4"}],name:"funcMapping",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contentTypesLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"address_KMS",type:"address"}],name:"setAddressKMS",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_id",type:"bytes32"},{name:"_groupAddr",type:"address"}],name:"removeGroup",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"defLeewaySecs",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_kmsAddr",type:"address"}],name:"checkKMSAddr",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"objectHash",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_ident",type:"bytes32"},{name:"_ord",type:"uint8"}],name:"getCounter",outputs:[{name:"",type:"uint32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_versionHash",type:"string"}],name:"deleteVersion",outputs:[{name:"",type:"int256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"key",type:"bytes"},{name:"value",type:"bytes"}],name:"putMeta",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_ident",type:"bytes32"}],name:"deleteGroup",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_userAddr",type:"address"}],name:"createUserWallet",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"",type:"bytes32"},{name:"",type:"uint256"}],name:"groupsMapping",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_func4Bytes",type:"bytes4"},{name:"_encAuthToken",type:"bytes"},{name:"_v",type:"uint8"},{name:"_r",type:"bytes32"},{name:"_s",type:"bytes32"}],name:"checkCallFunc",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"CAN_EDIT",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"defTokenExpSecs",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"content_type",type:"address"}],name:"removeContentType",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{inputs:[{name:"_contentSpace",type:"address"},{name:"_tenantName",type:"string"},{name:"_kmsAddr",type:"address"}],payable:!0,stateMutability:"payable",type:"constructor"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!1,name:"version",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"CreateTenant",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"walletAddress",type:"address"}],name:"GetAccessWallet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"func4Bytes",type:"bytes4[]"},{indexed:!1,name:"funcAddr",type:"address"}],name:"FunctionsAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"groupId",type:"bytes32"},{indexed:!1,name:"groupAddr",type:"address"}],name:"AddTenantGroup",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"groupId",type:"bytes32"},{indexed:!1,name:"groupAddr",type:"address"}],name:"RemoveTenantGroup",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"newManager",type:"address"},{indexed:!1,name:"prevManager",type:"address"}],name:"SetUserManager",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"newManager",type:"address"},{indexed:!1,name:"prevManager",type:"address"}],name:"SetNodeManager",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"newManager",type:"address"},{indexed:!1,name:"prevManager",type:"address"}],name:"SetFactoryManager",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"newManager",type:"address"},{indexed:!1,name:"prevManager",type:"address"}],name:"SetKmsManager",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentType",type:"address"},{indexed:!1,name:"contentContract",type:"address"}],name:"ContentTypeAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentType",type:"address"}],name:"ContentTypeRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"CommitPending",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"objectHash",type:"string"}],name:"UpdateRequest",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"VersionConfirm",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"versionHash",type:"string"},{indexed:!1,name:"index",type:"int256"}],name:"VersionDelete",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"requestNonce",type:"uint256"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"contextHash",type:"bytes32"},{indexed:!1,name:"accessor",type:"address"},{indexed:!1,name:"requestTimestamp",type:"uint256"}],name:"AccessRequestV3",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"contentSpace",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"visibility",type:"uint8"}],name:"VisibilityChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"ident",type:"bytes32"},{indexed:!1,name:"slot",type:"uint8"},{indexed:!1,name:"val",type:"uint32"}],name:"CounterIncremented",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"ident",type:"bytes32"},{indexed:!1,name:"ord",type:"uint8"},{indexed:!1,name:"prev",type:"bool"}],name:"BitSetAndGet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"ident",type:"bytes32"}],name:"WordGroupDeleted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"key",type:"bytes"}],name:"ObjectMetaChanged",type:"event"}]}},function(t,e,n){var r=n(3),i=n(17),a=n(4),s=n(14),o=n(15),u=n(18),c=function(){"use strict";function t(e){s(this,t),this.provider=e,this.signers={}}var e,n,c;return o(t,[{key:"GenerateMnemonic",value:function(){return u.utils.HDNode.entropyToMnemonic(u.utils.randomBytes(16))}},{key:"AddAccountFromMnemonic",value:function(t){var e=t.accountName,n=t.mnemonic,r=u.Wallet.fromMnemonic(n);return this.AddAccount({accountName:e,privateKey:r.privateKey})}},{key:"AddAccountFromEncryptedPK",value:(c=a(r.mark((function t(e){var n,a,s,o;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.accountName,a=e.encryptedPrivateKey,s=e.password,"object"===i(a)&&(a=JSON.stringify(a)),t.next=4,u.Wallet.fromEncryptedJson(a,s);case 4:return o=t.sent,t.abrupt("return",this.AddAccount({accountName:n,privateKey:o.privateKey}));case 6:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"AddAccount",value:function(t){var e=t.accountName,n=t.privateKey;try{var r=new u.Wallet(n);return r=r.connect(this.provider),e&&(this.signers[e]=r),r}catch(t){throw Error("Invalid private key")}}},{key:"GetAccountBalance",value:(n=a(r.mark((function t(e){var n,i,a;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.accountName,i=e.signer,a=i||this.GetAccount({accountName:n})){t.next=4;break}throw Error("Unknown account: "+n);case 4:return t.t0=u.utils,t.next=7,a.getBalance();case 7:return t.t1=t.sent,t.abrupt("return",t.t0.formatEther.call(t.t0,t.t1));case 9:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"GenerateEncryptedPrivateKey",value:(e=a(r.mark((function t(e){var n,i,a,s,o;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.accountName,i=e.signer,a=e.password,s=e.options,o=i||this.GetAccount({accountName:n})){t.next=4;break}throw Error("Unknown account: "+n);case 4:return t.next=6,o.encrypt(a,s);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"GetAccount",value:function(t){var e=t.accountName;return this.signers[e]}},{key:"RemoveAccount",value:function(t){var e=t.accountName;delete this.signers[e]}}]),t}();t.exports=c},function(t,e,n){var r=n(7),i=n(17),a=n(24),s=n(3),o=n(4),u=n(14),c=n(15);function A(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){o=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var l=n(18),h=n(25),y=n(90),g=n(9),m=n(31).LogMessage,b=n(195),I=function(){"use strict";function t(e){var n=e.client,r=e.uris,i=e.networkId,a=e.debug,s=e.timeout,o=void 0===s?10:s;u(this,t),this.client=n,this.networkId=i,this.ethereumURIs=r,this.ethereumURIIndex=0,this.locked=!1,this.debug=a,this.timeout=Math.floor(1e3*o),this.cachedContracts={},this.contractNames={},this.HttpClient=new h({uris:this.ethereumURIs,debug:this.debug}),l.errors.setLogLevel("error")}var e,n,r,d,p,I,C,v,E,w,B,Q,M,k,_,x;return c(t,[{key:"Log",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];m(this,t,e)}},{key:"SetEthereumURIs",value:function(t){this.ethereumURIs=t,this.ethereumURIIndex=0,this.HttpClient=new h({uris:this.ethereumURIs,debug:this.debug})}},{key:"Provider",value:function(){return this.provider||(this.provider=new l.providers.JsonRpcProvider(this.ethereumURIs[this.ethereumURIIndex],this.networkId),this.provider.getCode=o(s.mark((function t(){return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return","0x123");case 1:case"end":return t.stop()}}),t)}))),this.provider.pollingInterval=500),this.provider}},{key:"ContractName",value:(x=o(s.mark((function t(e){var n,r,i,a=this,u=arguments;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=u.length>1&&void 0!==u[1]&&u[1],r=new l.Contract(e,y.abi,this.Provider()),this.contractNames[e]||(this.contractNames[e]=new Promise(function(){var t=o(s.mark((function t(e){var n,i;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,a.CallContractMethod({contract:r,abi:y.abi,methodName:"version",cacheContract:!1});case 3:n=t.sent,i=l.utils.parseBytes32String(n.slice(0,-2)+"00"),e(i),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),e("Unknown");case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e){return t.apply(this,arguments)}}())),t.next=5,this.contractNames[e];case 5:if(i=t.sent,!n){t.next=10;break}return t.abrupt("return",i);case 10:return t.abrupt("return",i.split(/\d+/)[0]);case 11:case"end":return t.stop()}}),t,this)}))),function(t){return x.apply(this,arguments)})},{key:"Contract",value:function(t){var e,n=t.contractAddress,r=t.abi,i=t.cacheContract;if(t.overrideCachedContract||(e=this.cachedContracts[n]),!r)throw Error("No ABI for contract ".concat(n," - Wrong network or deleted item?"));return e||(e=(e=new l.Contract(n,r,this.Provider())).connect(this.client.signer),i&&(this.cachedContracts[n]=e)),e}},{key:"MakeProviderCall",value:(_=o(s.mark((function t(e){var n,r,i,o,u,c;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.methodName,r=e.args,i=void 0===r?[]:r,o=e.attempts,u=void 0===o?0:o,t.prev=1,c=this.Provider(),t.next=5,this.provider.getNetwork();case 5:return this.Log("ETH ".concat(c.connection.url," ").concat(n," [").concat(i.join(", "),"]")),t.next=8,c[n].apply(c,a(i));case 8:return t.abrupt("return",t.sent);case 11:if(t.prev=11,t.t0=t.catch(1),console.error(t.t0),!(u<this.ethereumURIs.length)){t.next=19;break}return this.Log("EthClient failing over: ".concat(u+1," attempts"),!0),this.provider=void 0,this.ethereumURIIndex=(this.ethereumURIIndex+1)%this.ethereumURIs.length,t.abrupt("return",this.MakeProviderCall({methodName:n,args:i,attempts:u+1}));case 19:return t.abrupt("return",{});case 20:case"end":return t.stop()}}),t,this,[[1,11]])}))),function(t){return _.apply(this,arguments)})},{key:"FormatContractArgument",value:function(t){var e=this,n=t.type,r=t.value;if(n.endsWith("[]")){if("string"==typeof r){if(""===r.trim())return[];r=r.split(",").map((function(t){return t.trim()}))}var i=n.replace("[]","");return r.map((function(t){return e.FormatContractArgument({type:i,value:t})}))}switch(n.toLowerCase()){case"bytes32":return l.utils.formatBytes32String(r);case"bytes":return l.utils.toUtf8Bytes(r);case"address":return g.FormatAddress(r);default:return r}}},{key:"FormatContractArguments",value:function(t){var e=this,n=t.abi,r=t.methodName,i=t.args,a=n.find((function(t){return t.name===r||t.type===r}));if(void 0===a)throw Error("Unknown method: "+r);return i.map((function(t,n){return e.FormatContractArgument({type:a.inputs[n].type,value:t})}))}},{key:"ValidateSigner",value:function(t){if(!t)throw Error("Signer not set")}},{key:"DeployContract",value:(k=o(s.mark((function t(e){var n,r,i,o,u,c,A,d,p,f;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.abi,r=e.bytecode,i=e.constructorArgs,o=void 0===i?[]:i,u=e.overrides,c=void 0===u?{}:u,this.Log("Deploying contract with args [".concat(o.join(", "),"]")),(A=this.Provider()).getNetwork(),d=this.client.signer.connect(A),this.ValidateSigner(d),p=new l.ContractFactory(n,r,d),t.next=9,p.deploy.apply(p,a(o).concat([c]));case 9:return f=t.sent,t.next=12,f.deployed();case 12:return this.Log("Deployed: ".concat(f.address)),t.abrupt("return",{contractAddress:g.FormatAddress(f.address),transactionHash:f.deployTransaction.hash});case 14:case"end":return t.stop()}}),t,this)}))),function(t){return k.apply(this,arguments)})},{key:"CallContractMethod",value:(M=o(s.mark((function t(e){var n,r,o,u,c,A,d,p,f,l,h,y,m,b,I,C,v,E,w,B;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.contract,r=e.contractAddress,o=e.abi,u=e.methodName,c=e.methodArgs,A=void 0===c?[]:c,d=e.value,p=e.overrides,f=void 0===p?{}:p,l=e.formatArguments,h=void 0===l||l,y=e.cacheContract,m=void 0===y||y,b=e.overrideCachedContract,I=void 0!==b&&b,o){t.next=5;break}return t.next=4,this.client.ContractAbi({contractAddress:r});case 4:o=t.sent;case 5:if(n=n||this.Contract({contractAddress:r,abi:o,cacheContract:m,overrideCachedContract:I}),o=n.interface.abi,h&&(A=this.FormatContractArguments({abi:o,methodName:u,args:A})),d&&(f.value="0x"+g.EtherToWei(d.toString()).toString(16)),void 0!==n.functions[u]){t.next=11;break}throw Error("Unknown method: "+u);case 11:if(this.Log("Calling contract method:\n Provider: ".concat(this.Provider().connection.url,"\n Address: ").concat(n.address,"\n Method: ").concat(u,"\n Args: [").concat(A.join(", "),"]")),(C=n.interface.abi.find((function(t){return t.name===u})))&&C.constant){t.next=20;break}case 14:if(!this.locked){t.next=19;break}return t.next=17,new Promise((function(t){return setTimeout(t,100)}));case 17:t.next=14;break;case 19:this.locked=!0;case 20:t.prev=20,E=!1;case 22:if(E){t.next=49;break}return t.prev=23,t.next=26,(w=n.functions)[u].apply(w,a(A).concat([f]));case 26:v=t.sent,E=!0,t.next=47;break;case 30:if(t.prev=30,t.t0=t.catch(23),-32e3!==t.t0.code&&"REPLACEMENT_UNDERPRICED"!==t.t0.code){t.next=40;break}return t.next=35,this.MakeProviderCall({methodName:"getBlock",args:["latest"]});case 35:B=t.sent,f.gasLimit=B.gasLimit,f.gasPrice=f.gasPrice?1.5*f.gasPrice:8e9,t.next=47;break;case 40:if("NONCE_EXPIRED"!==t.t0.code||"nonce has already been used"!==t.t0.reason){t.next=44;break}this.Log("Retrying method call ".concat(u)),t.next=47;break;case 44:if((t.t0.message||t.t0).includes("invalid response")){t.next=47;break}throw this.Log("object"===i(t.t0)?JSON.stringify(t.t0,null,2):t.t0,!0),t.t0;case 47:t.next=22;break;case 49:return t.abrupt("return",v);case 50:return t.prev=50,C&&C.constant||(this.locked=!1),t.finish(50);case 53:case"end":return t.stop()}}),t,this,[[20,,50,53],[23,30]])}))),function(t){return M.apply(this,arguments)})},{key:"CallContractMethodAndWait",value:(Q=o(s.mark((function t(e){var n,r,i,a,o,u,c,A,d,p,l,h,y,g,m,b,I;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.contractAddress,r=e.abi,i=e.methodName,a=e.methodArgs,o=e.value,u=e.timeout,c=e.formatArguments,A=void 0===c||c,d=e.cacheContract,p=void 0===d||d,l=e.overrideCachedContract,h=void 0!==l&&l,u=u||this.timeout||1e4,r){t.next=6;break}return t.next=5,this.client.ContractAbi({contractAddress:n});case 5:r=t.sent;case 6:return y=this.Contract({contractAddress:n,abi:r,cacheContract:p,overrideCachedContract:h}),t.next=9,this.CallContractMethod({contract:y,abi:r,methodName:i,methodArgs:a,value:o,formatArguments:A,cacheContract:p});case 9:g=t.sent,this.Log("Awaiting transaction completion: ".concat(g.hash)),m=this.Provider().pollingInterval,b=0;case 13:if(!(b<u)){t.next=25;break}return t.next=16,this.MakeProviderCall({methodName:"getTransactionReceipt",args:[g.hash]});case 16:if(!(I=t.sent)){t.next=20;break}return I.logs=I.logs.map((function(t){return f(f({},t),y.interface.parseLog(t))})),t.abrupt("break",25);case 20:return b+=m,t.next=23,new Promise((function(t){return setTimeout(t,m)}));case 23:t.next=13;break;case 25:if(I){t.next=27;break}throw Error("Timed out waiting for completion of ".concat(i,". TXID: ").concat(g.hash));case 27:return t.abrupt("return",I);case 28:case"end":return t.stop()}}),t,this)}))),function(t){return Q.apply(this,arguments)})},{key:"AwaitEvent",value:(B=o(s.mark((function t(e){var n,r,i,a;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.contractAddress,r=e.abi,i=e.eventName,a=this.Contract({contractAddress:n,abi:r}),t.next=4,new Promise((function(t){a.on(i,(function(e,n,r){a.removeAllListeners(i),t(r)}))}));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return B.apply(this,arguments)})},{key:"ExtractEventFromLogs",value:function(t){var e,n=t.abi,r=t.event,i=t.eventName,a=new l.utils.Interface(n),s=A(r.logs);try{for(s.s();!(e=s.n()).done;){var o=e.value,u=a.parseLog(o);if(u&&u.name===i)return u}}catch(t){s.e(t)}finally{s.f()}}},{key:"DeployDependentContract",value:(w=o(s.mark((function t(e){var n,r,i,a,o,u,c,A,d,p;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.contractAddress,r=e.methodName,i=e.args,a=void 0===i?[]:i,o=e.eventName,u=e.eventValue,t.next=3,this.client.ContractAbi({contractAddress:n});case 3:return c=t.sent,t.next=6,this.CallContractMethodAndWait({contractAddress:n,abi:c,methodName:r,methodArgs:a});case 6:if(A=t.sent,d=this.ExtractEventFromLogs({abi:c,event:A,eventName:o,eventValue:u})){t.next=10;break}throw Error("".concat(r," failed - Log not present in transaction"));case 10:return p=d.values[u],t.abrupt("return",{contractAddress:g.FormatAddress(p),transactionHash:A.transactionHash});case 12:case"end":return t.stop()}}),t,this)}))),function(t){return w.apply(this,arguments)})},{key:"DeployAccessGroupContract",value:(E=o(s.mark((function t(e){var n;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.contentSpaceAddress,t.abrupt("return",this.DeployDependentContract({contractAddress:n,methodName:"createGroup",args:[],eventName:"CreateGroup",eventValue:"groupAddress"}));case 2:case"end":return t.stop()}}),t,this)}))),function(t){return E.apply(this,arguments)})},{key:"DeployTypeContract",value:(v=o(s.mark((function t(e){var n;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.contentSpaceAddress,t.abrupt("return",this.DeployDependentContract({contractAddress:n,methodName:"createContentType",args:[],eventName:"CreateContentType",eventValue:"contentTypeAddress"}));case 2:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"DeployLibraryContract",value:(C=o(s.mark((function t(e){var n,r,i;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.contentSpaceAddress,r=e.kmsId,i=g.HashToAddress(r),t.abrupt("return",this.DeployDependentContract({contractAddress:n,methodName:"createLibrary",args:[i],eventName:"CreateLibrary",eventValue:"libraryAddress"}));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return C.apply(this,arguments)})},{key:"DeployContentContract",value:(I=o(s.mark((function t(e){var n,r;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.contentLibraryAddress,r=(r=e.typeAddress)||g.nullAddress,t.abrupt("return",this.DeployDependentContract({contractAddress:n,methodName:"createContent",args:[r],eventName:"ContentObjectCreated",eventValue:"contentAddress"}));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"CommitContent",value:(p=o(s.mark((function t(e){var n,r;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.contentObjectAddress,r=e.versionHash,t.next=3,this.CallContractMethodAndWait({contractAddress:n,methodName:"commit",methodArgs:[r],eventName:"CommitPending"});case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"EngageAccountLibrary",value:(d=o(s.mark((function t(e){var n;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.contentSpaceAddress,t.abrupt("return",this.CallContractMethodAndWait({contractAddress:n,methodName:"engageAccountLibrary",args:[]}));case 2:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"SetCustomContentContract",value:(r=o(s.mark((function t(e){var n,r,i,a;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.contentContractAddress,r=e.customContractAddress,i=e.overrides,a=void 0===i?{}:i,t.next=3,this.CallContractMethodAndWait({contractAddress:n,methodName:"setContentContractAddress",methodArgs:[r],overrides:a});case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"ContractEvents",value:(n=o(s.mark((function t(e){var n,r,i,a,u,c,A,d,p,h,y,m=this;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.contractAddress,r=e.abi,i=e.fromBlock,a=void 0===i?0:i,u=e.toBlock,c=e.topics,A=e.includeTransaction,d=void 0!==A&&A,p={address:n,fromBlock:a,toBlock:u},c&&(p.topics=c),t.next=5,this.MakeProviderCall({methodName:"getLogs",args:[p]});case 5:if(t.t0=t.sent,t.t0){t.next=8;break}t.t0=[];case 8:if(h=t.t0,Array.isArray(h)){t.next=11;break}return t.abrupt("return",[]);case 11:return y={},t.next=14,g.LimitedMap(5,h,function(){var t=o(s.mark((function t(e){var n,i;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=new l.utils.Interface(r),i=f(f({},e),n.parseLog(e)),!d){t.next=9;break}return t.t0=f,t.t1=f({},i),t.next=7,m.MakeProviderCall({methodName:"getTransaction",args:[e.transactionHash]});case 7:t.t2=t.sent,i=(0,t.t0)(t.t1,t.t2);case 9:y[e.blockNumber]=[i].concat(y[e.blockNumber]||[]);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 14:return t.abrupt("return",Object.values(y).sort((function(t,e){return t[0].blockNumber<e[0].blockNumber?1:-1})));case 15:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"ParseUnknownLog",value:function(t){var e=t.log;if(e.topics&&e.topics.length>0){var n=e.topics[0],r=b[n];if(r){var i=new l.utils.Interface(r.abi);i&&(e=f(f(f({},e),i.parseLog(e)),{},{contract:r.contract}))}}return e}},{key:"Events",value:(e=o(s.mark((function t(e){var n,r,i,u,c,A,d,p,l,h=this;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.toBlock,r=e.fromBlock,i=e.includeTransaction,u=void 0!==i&&i,c=[],A=r;case 3:if(!(A<n)){t.next=11;break}return t.next=6,this.MakeProviderCall({methodName:"getLogs",args:[{fromBlock:A,toBlock:Math.min(n,A+100)}]});case 6:d=t.sent,c=c.concat(d||[]);case 8:A+=101,t.next=3;break;case 11:return p={},c.forEach((function(t){p[t.blockNumber]=[h.ParseUnknownLog({log:t})].concat(p[t.blockNumber]||[])})),l=[],t.next=16,g.LimitedMap(3,a(Array(n-r+1).keys()),function(){var t=o(s.mark((function t(e){var r,i,a;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=p[r=n-e]){t.next=8;break}return t.next=5,h.MakeProviderCall({methodName:"getBlock",args:[r]});case 5:i=(i=t.sent).transactions.map((function(t){return f(f({blockNumber:i.number,blockHash:i.hash},i),{},{transactionHash:t})})),p[r]=i;case 8:if(!u){t.next=13;break}return a={},t.next=12,Promise.all(i.map(function(){var t=o(s.mark((function t(e){return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a[e.transactionHash]){t.next=12;break}return t.t0=f,t.t1=f,t.t2={},t.next=6,h.MakeProviderCall({methodName:"getTransaction",args:[e.transactionHash]});case 6:return t.t3=t.sent,t.t4=(0,t.t1)(t.t2,t.t3),t.next=10,h.MakeProviderCall({methodName:"getTransactionReceipt",args:[e.transactionHash]});case 10:t.t5=t.sent,a[e.transactionHash]=(0,t.t0)(t.t4,t.t5);case 12:return t.abrupt("return",f(f({},e),a[e.transactionHash]));case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 12:p[r]=t.sent;case 13:l.push(p[r]);case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 16:return t.abrupt("return",l);case 17:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})}]),t}();t.exports=I},function(t,e){t.exports={"0x23dcae6acc296731e3679d01e7cd963988e5a372850a0a1db2b9b01539e19ff4":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"principal",type:"address"},{indexed:!1,name:"entity",type:"address"},{indexed:!1,name:"aggregate",type:"uint8"}],name:"RightsChanged",type:"event"}],ambiguous:!0},"0xa33a9370a938260eee2537d9480ca0caa9789521da8e57afb3a0699d3ff9b260":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"label",type:"string"},{indexed:!1,name:"index",type:"uint256"},{indexed:!1,name:"a",type:"address"}],name:"dbgAddress",type:"event"}],ambiguous:!0},"0xb251eb052afc73ffd02ffe85ad79990a8b3fed60d76dbc2fa2fdd7123dffd914":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"candidate",type:"address"}],name:"MemberAdded",type:"event"}],contract:"BaseAccessControlGroup"},"0x93bcaab179551bde429187645251f8e1fb8ac85801fcb1cf91eb2c9043d61117":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"candidate",type:"address"}],name:"ManagerAccessGranted",type:"event"}],contract:"BaseAccessControlGroup"},"0x745cd29407db644ed93e3ceb61cbcab96d1dfb496989ac5d5bf514fc5a9fab9c":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"candidate",type:"address"}],name:"MemberRevoked",type:"event"}],contract:"BaseAccessControlGroup"},"0x2d6aa1a9629d125e23a0cf692cda7cd6795dff1652eedd4673b38ec31e387b95":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"candidate",type:"address"}],name:"ManagerAccessRevoked",type:"event"}],contract:"BaseAccessControlGroup"},"0x23de2adc3e22f171f66b3e5a333e17feb9dc30ba9570933bd259cb6c13ef7ab7":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"operationCode",type:"uint256"},{indexed:!1,name:"candidate",type:"address"}],name:"UnauthorizedOperation",type:"event"}],ambiguous:!0},"0x04c71e53d136838eea703132a77007b0526b9a7691cdb7a6017a93673f865cbb":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"enabled",type:"bool"}],name:"OAuthStatusChanged",type:"event"}],contract:"BaseAccessControlGroup"},"0xb3ac059d88af6016aca1aebb7b3e796f2e7420435c59c563687814e9b85daa75":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"parentAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"CommitPending",type:"event"}],ambiguous:!0},"0x403f30aa5f4f2f89331a7b50054f64a00ce206f4d0a37f566ff344bbe46f8b65":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"objectHash",type:"string"}],name:"UpdateRequest",type:"event"}],ambiguous:!0},"0x482875da75e6d9f93f74a5c1a61f14cf08822057c01232f44cb92ae998e30d8e":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"objectHash",type:"string"}],name:"VersionConfirm",type:"event"}],ambiguous:!0},"0x238d74c13cda9ba51e904772d41a616a1b9b30d09802484df6279fe1c3c07f51":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"spaceAddress",type:"address"},{indexed:!1,name:"versionHash",type:"string"},{indexed:!1,name:"index",type:"int256"}],name:"VersionDelete",type:"event"}],ambiguous:!0},"0x583d8312ef7016406c7ea8ba9796b9e55ac1fdc22455754cbc93869509faefad":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"guarantor",type:"address"},{indexed:!1,name:"code",type:"int256"}],name:"ExecStatus",type:"event"}],contract:"BaseAccessWallet"},"0x280016f7418306a55542432120fd1a239ef9fcc1a92694d8d44ca76be0249ea7":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"contentType",type:"address"},{indexed:!1,name:"contentContract",type:"address"}],name:"ContentTypeAdded",type:"event"}],ambiguous:!0},"0xd41375b9d347dfe722f90a780731abd23b7855f9cf14ea7063c4cab5f9ae58e2":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"contentType",type:"address"}],name:"ContentTypeRemoved",type:"event"}],ambiguous:!0},"0xed78a9defa7412748c9513ba9cf680f57703a46dd7e0fb0b1e94063423c73e88":{abi:[{anonymous:!1,inputs:[],name:"AccessRequest",type:"event"}],ambiguous:!0},"0xe2b310ec9dabdc05229a748e07666c3bc9c46c6ef465cce30d0aa3aa64a0644c":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"key",type:"bytes"}],name:"ObjectMetaChanged",type:"event"}],ambiguous:!0},"0xc3decc188980e855666b70498ca85e8fa284d97d30483d828fa126f7303d7d19":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"containingLibrary",type:"address"}],name:"ContentObjectCreate",type:"event"}],contract:"BaseContent"},"0x4f692e87baf302f7281e83eec109053efc2ca8e7bddfc6ce88c579cd9767f71f":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"contentType",type:"address"},{indexed:!1,name:"contentContractAddress",type:"address"}],name:"SetContentType",type:"event"}],contract:"BaseContent"},"0x50f423e39e8beb25bb2da38a63e3d33b5368f261522813712756733eaf569a06":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"requestID",type:"uint256"},{indexed:!1,name:"level",type:"uint8"},{indexed:!1,name:"contentHash",type:"string"},{indexed:!1,name:"pkeRequestor",type:"string"},{indexed:!1,name:"pkeAFGH",type:"string"}],name:"AccessRequest",type:"event"}],contract:"BaseContent"},"0xad58d18ea7292f887da6f15bb4f0badddaa33d169713d09cf49710acc7c3a5b9":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"requestID",type:"uint256"},{indexed:!1,name:"label",type:"string"},{indexed:!1,name:"payee",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"LogPayment",type:"event"}],contract:"BaseContent"},"0x475e9d68ca61f129cebee5af694af00ed0e3b3b0d4b74071fbb81d0e2b912718":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"requestID",type:"uint256"},{indexed:!1,name:"access_granted",type:"bool"},{indexed:!1,name:"reKey",type:"string"},{indexed:!1,name:"encryptedAESKey",type:"string"}],name:"AccessGrant",type:"event"}],contract:"BaseContent"},"0x515e0a48b385fce2a8e4d9f169a97c4f6ea669a752358f5e6ab37cc3c2e84c38":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"customValue",type:"bytes32"}],name:"AccessRequestValue",type:"event"}],contract:"BaseContent"},"0xb6e3239e521a6c66920ae634f8e921a37e6991d520ac44d52f8516397f41b684":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"stakeholder",type:"address"}],name:"AccessRequestStakeholder",type:"event"}],contract:"BaseContent"},"0x2c49ac638ee7bf3341004c40512c79847bb7fb8f17fb53151ff576a35630ac06":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"requestID",type:"uint256"},{indexed:!1,name:"scorePct",type:"uint256"},{indexed:!1,name:"customContractResult",type:"bool"}],name:"AccessComplete",type:"event"}],contract:"BaseContent"},"0xa6f2e38f0cfebf27212317fced3ac40bc62e00bd33f38d69603710740c69acb7":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"contentContractAddress",type:"address"}],name:"SetContentContract",type:"event"}],contract:"BaseContent"},"0x4114f8ef80b6de2161db580cbefa14e1892d15d3ebe2062c9914e4a5773114a3":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"accessCharge",type:"uint256"}],name:"SetAccessCharge",type:"event"}],contract:"BaseContent"},"0xa58326ee5bb617cb8b4f0d0f5f557c469d2d05d7a738f777037deda9c724b370":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"level",type:"uint8"},{indexed:!1,name:"accessCharge",type:"uint256"}],name:"GetAccessCharge",type:"event"}],contract:"BaseContent"},"0x03eb8b54a949acec2cd08fdb6d6bd4647a1f2c907d75d6900648effa92eb147f":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"accessCharge",type:"uint256"},{indexed:!1,name:"amountProvided",type:"uint256"}],name:"InsufficientFunds",type:"event"}],contract:"BaseContent"},"0xda4f34b30fa0ba8a73fedb922f4d28e2a10a5d68e53cf8e942abce3ac09158a2":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"statusCode",type:"int256"}],name:"SetStatusCode",type:"event"}],contract:"BaseContent"},"0xad9c5eacc073b2e1767affc883e050347e1dd379c9799cb5ac0a17bde80f5cf4":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"requestStatus",type:"bool"},{indexed:!1,name:"statusCode",type:"int256"},{indexed:!1,name:"objectHash",type:"string"}],name:"Publish",type:"event"}],contract:"BaseContent"},"0x12b04791b5caab768e2757268992f0c62801e3921d9e310c893f0d5f9caa5f71":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"custom_contract",type:"address"}],name:"InvokeCustomPreHook",type:"event"}],contract:"BaseContent"},"0x8c693e8b27db7caf9b9637b66dcc11444760023a4d53e95407a3acef1b249f50":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"custom_contract",type:"address"},{indexed:!1,name:"result",type:"uint256"}],name:"ReturnCustomHook",type:"event"}],contract:"BaseContent"},"0x97d9c9779ed3ed8b9a6edfe16d17b1fdec843245747a19abfb621806e37d4a89":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"custom_contract",type:"address"}],name:"InvokeCustomPostHook",type:"event"}],contract:"BaseContent"},"0x8354ff8c2c210fd53709db56438bb45d36a62de8bcc95c8459d80ce933d47680":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"timestamp",type:"uint256"},{indexed:!1,name:"libraryAddress",type:"address"},{indexed:!1,name:"contentAddress",type:"address"},{indexed:!1,name:"userAddress",type:"address"},{indexed:!1,name:"contextHash",type:"bytes32"},{indexed:!1,name:"request_timestamp",type:"uint64"}],name:"AccessRequest",type:"event"}],contract:"BaseContentFactory"},"0x078326d18c0223483393342523f51da024ddcb0f1e929aa1f142100381c794f5":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"timestamp",type:"uint256"},{indexed:!1,name:"libraryAddress",type:"address"},{indexed:!1,name:"contentAddress",type:"address"},{indexed:!1,name:"userAddress",type:"address"},{indexed:!1,name:"contextHash",type:"bytes32"},{indexed:!1,name:"request_timestamp",type:"uint64"}],name:"AccessComplete",type:"event"}],contract:"BaseContentFactory"},"0x9e69777f30c55126be256664fa7beff4b796ac32ebceab94df5071b0148017f8":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"contentTypeAddress",type:"address"}],name:"CreateContentType",type:"event"}],contract:"BaseContentSpace"},"0x473c07a6d0228c4fb8fe2be3b4617c3b5fb7c0f8cd9ba4b67e8631844b9b6571":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"libraryAddress",type:"address"}],name:"CreateLibrary",type:"event"}],contract:"BaseContentSpace"},"0xa3b1fe71ae61bad8cffa485b230e24e518938f76182a30fa0d9979e7237ad159":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"groupAddress",type:"address"}],name:"CreateGroup",type:"event"}],contract:"BaseContentSpace"},"0xa0633ea0b3cb5796607e5f551ae79c7eeee0dc7ee0c3ff8996506261651368ce":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"contentAddress",type:"address"}],name:"CreateContent",type:"event"}],contract:"BaseContentSpace"},"0x56c4bf13bebaa9f2be39ac3f2f4619a0dd1b694bb8c5f43c6b244a6dba0f0cca":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"wallet",type:"address"}],name:"CreateAccessWallet",type:"event"}],contract:"BaseContentSpace"},"0x05e3f3adaf96d565bb326088a1d8e0d78497549df2c99a8ab681e5fbc7a9b3f2":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"wallet",type:"address"},{indexed:!1,name:"userAddr",type:"address"}],name:"BindUserWallet",type:"event"}],contract:"BaseContentSpace"},"0x53ce35a7383a3ea3f695bdf0f87d7e5485ba816b382673e849bfdd24e7f5e3ca":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"accountAddress",type:"address"}],name:"EngageAccountLibrary",type:"event"}],contract:"BaseContentSpace"},"0x1c893ef9379093af30f458b9e74d2aba13c499660b68dec5e29af7b199c188b9":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"factory",type:"address"}],name:"SetFactory",type:"event"}],contract:"BaseContentSpace"},"0x4575facd117046c9c28b69a3eb9c08939f2462a5a22ea6c6dcd4f79b8dd124e9":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"nodeObjAddr",type:"address"}],name:"RegisterNode",type:"event"}],contract:"BaseContentSpace"},"0xb98695ab4c6cedb3b4dfe62479a9d39a59aa2cb38b8bd92bbb6ce5856e42bdf4":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"nodeObjAddr",type:"address"}],name:"UnregisterNode",type:"event"}],contract:"BaseContentSpace"},"0xdf8127994c229011ce9c4764bdc0375bb71c06cf1544f034cd81a42f37233319":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"sender",type:"address"},{indexed:!1,name:"status",type:"uint256"}],name:"AddKMSLocator",type:"event"}],contract:"BaseContentSpace"},"0x5f463eb53cddf646852b82c0d9bdb1d1ec215c3802b780e8b7beea8b6e99f94c":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"sender",type:"address"},{indexed:!1,name:"status",type:"uint256"}],name:"RemoveKMSLocator",type:"event"}],contract:"BaseContentSpace"},"0x599bb380c80b69455450a615c515544b8da3b09f2efa116a5f0567682203cf54":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"version",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"CreateSpace",type:"event"}],contract:"BaseContentSpace"},"0x1c917c3c2698bd5b98acb9772728da62f2ce3670e4578910a6465b955f63e157":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"walletAddress",type:"address"}],name:"GetAccessWallet",type:"event"}],contract:"BaseContentSpace"},"0xae5645569f32b946f7a747113c64094a29a6b84c5ddf55816ef4381ce8a3a46d":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"addr",type:"address"},{indexed:!1,name:"locator",type:"bytes"}],name:"NodeSubmitted",type:"event"}],ambiguous:!0},"0xd644c8164f225d3b7fdbcc404f279bb1e823ef0d93f88dd4b24e85d0e7bc6a54":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"addr",type:"address"},{indexed:!1,name:"locator",type:"bytes"}],name:"NodeApproved",type:"event"}],ambiguous:!0},"0x2bb0f9ba138ffddb5a8f974e9885b65a7814d3002654f1cf3f2d3f619a4006c4":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"ownerAddr",type:"address"},{indexed:!1,name:"nodeAddr",type:"address"}],name:"AddNode",type:"event"}],ambiguous:!0},"0x41ec5b9efdbf61871df6a18b687e04bea93d5793af5f8c8b4626e155b23dc19d":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"ownerAddr",type:"address"},{indexed:!1,name:"nodeAddr",type:"address"}],name:"RemoveNode",type:"event"}],ambiguous:!0},"0xadc3945407fc9e1f5763b74624698197e96e741e6e7c683373498712ba3eb878":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"contentAddress",type:"address"},{indexed:!1,name:"content_type",type:"address"},{indexed:!1,name:"spaceAddress",type:"address"}],name:"ContentObjectCreated",type:"event"}],contract:"BaseLibrary"},"0x36500cee87b0da1746889a3483dccb525acfc40b8c0f2218e164c6cdf1482a3e":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"contentAddress",type:"address"},{indexed:!1,name:"spaceAddress",type:"address"}],name:"ContentObjectDeleted",type:"event"}],contract:"BaseLibrary"},"0x218673669018c25b89bfbf1b58d0075e37c8847ef16e707b92355b7833e97d61":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"group",type:"address"}],name:"ContributorGroupAdded",type:"event"}],contract:"BaseLibrary"},"0xbbd97daa1862eb12f77ed128a557406737cee07b131b1e2d7140dff2005e197c":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"group",type:"address"}],name:"ContributorGroupRemoved",type:"event"}],contract:"BaseLibrary"},"0x1b88a571cc8ac2e87512f05648e79d184f5cc0cbb2889bc487c41f8b9a3202eb":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"group",type:"address"}],name:"ReviewerGroupAdded",type:"event"}],contract:"BaseLibrary"},"0xdf9d78c5635b72b709c85300a786eb7238acbe5bffe01c60c16464e45c6eb6eb":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"group",type:"address"}],name:"ReviewerGroupRemoved",type:"event"}],contract:"BaseLibrary"},"0x3a94857e4393737f73edb175a7d0c195c7f635d9ae995e12740616ec55c9d411":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"group",type:"address"}],name:"AccessorGroupAdded",type:"event"}],contract:"BaseLibrary"},"0xc5224c4118417a068eeac7d714e6d8af6f99ec3fb611bc965185460b0e38f081":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"group",type:"address"}],name:"AccessorGroupRemoved",type:"event"}],contract:"BaseLibrary"},"0x0588a34cf0de4e025d359c89ca4bacbcbf175440909952d91c814412d9da996a":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"contentAddress",type:"address"},{indexed:!1,name:"submitter",type:"address"}],name:"ApproveContentRequest",type:"event"}],contract:"BaseLibrary"},"0x70234ce475fee4ab40e5e55cf533f67f12b47ef4c860e62dd7affa84ead4b442":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"contentAddress",type:"address"},{indexed:!1,name:"approved",type:"bool"},{indexed:!1,name:"note",type:"string"}],name:"ApproveContent",type:"event"}],contract:"BaseLibrary"},"0x74538e2fbd034afddf32b42c5939d211ce86c7683f9768f1a4969746f81f8608":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"addressKms",type:"address"}],name:"UpdateKmsAddress",type:"event"}],contract:"BaseLibrary"},"0xcf34ef537ac33ee1ac626ca1587a0a7e8e51561e5514f8cb36afa1c5102b3bab":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"label",type:"string"}],name:"Log",type:"event"}],ambiguous:!0},"0x4c34c2f9a78632f29fa59aaed5514cb742fd9fbcfd7ccc2c03c85f2bbc621c47":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"label",type:"string"},{indexed:!1,name:"b",type:"bool"}],name:"LogBool",type:"event"}],ambiguous:!0},"0x62ddffe5b5108385f7a590f100e1ee414ad9551a31f089e64e82998440785e1e":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"label",type:"string"},{indexed:!1,name:"a",type:"address"}],name:"LogAddress",type:"event"}],ambiguous:!0},"0x31c369d7029afba34b21369bcf9a6ac132fb2621c34558b914859b768d05232d":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"label",type:"string"},{indexed:!1,name:"u",type:"uint256"}],name:"LogUint256",type:"event"}],ambiguous:!0},"0x3d9b341774178bb033613e3a7a1cadb2244b3bcbb1372905d2ba24dca38aeb22":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"label",type:"string"},{indexed:!1,name:"u",type:"int256"}],name:"LogInt256",type:"event"}],ambiguous:!0},"0x02d93529bba9d141e5e06733c52c7e6fbcb1149586adb5c24064b522ab26f1d7":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"label",type:"string"},{indexed:!1,name:"b",type:"bytes32"}],name:"LogBytes32",type:"event"}],ambiguous:!0},"0x6a0f12fe24f7c34df8acc096f076bac6e3f1ff225f4fccc7b0f389657bde895a":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"label",type:"string"},{indexed:!1,name:"payee",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"LogPayment",type:"event"}],ambiguous:!0},"0x9df71221e13c480b974b5d5bd7591b30b7ea3bfff8a56dfa7fde810a14c1c39b":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"result",type:"uint256"}],name:"RunCreate",type:"event"}],ambiguous:!0},"0x6d0dbfc3805aef247651b04b50fc717599f7e0b66c6b022ae1544406f7bf8f86":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"result",type:"uint256"}],name:"RunKill",type:"event"}],ambiguous:!0},"0xb6c1c013bb5004fe8e943c6890e300ccedf9bd73dcd4eb291b31b9f96874feff":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"proposedStatusCode",type:"int256"},{indexed:!1,name:"returnStatusCode",type:"int256"}],name:"RunStatusChange",type:"event"}],ambiguous:!0},"0xffadad18ab3777a19f664019a6261b011ab9405749e01a45950d44fb9360b385":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"level",type:"uint8"},{indexed:!1,name:"calculateAccessCharge",type:"int256"}],name:"RunAccessCharge",type:"event"}],ambiguous:!0},"0x3e68dc35f88d76818f276322c37f5021ee00e232fe0d27a93c02801aec4d9c58":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"requestID",type:"uint256"},{indexed:!1,name:"result",type:"uint256"}],name:"RunAccess",type:"event"}],ambiguous:!0},"0xbf0f2215c45c5ee802d4c20bdfc915308c4459b0f6a78f23ad350e6408bf2891":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"requestID",type:"uint256"},{indexed:!1,name:"result",type:"uint256"}],name:"RunFinalize",type:"event"}],ambiguous:!0},"0x786a1cca426afc9bf7b81ff1382a573ebc21b93bddf4784c49f56a3ae8a691c8":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"contentSpace",type:"address"},{indexed:!1,name:"extUserAddr",type:"address"}],name:"CreateExtUserWallet",type:"event"}],contract:"ExternalUserWallet"},"0xe36c3ab835cea1a8af00f744c77bb77bbbd33d20062bee3f9aceb6518d08e45e":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"timestamp",type:"uint256"},{indexed:!1,name:"accessor",type:"address"},{indexed:!1,name:"rightsHolder",type:"bool"},{indexed:!1,name:"provider",type:"bool"},{indexed:!1,name:"membership",type:"bool"}],name:"AuthorizeRecording",type:"event"}],contract:"LvRecordableStream"},"0x41b90676ca6c9f288172c8f4f1f0253bfc527115acd3f7a972a5219ea4b0d0c5":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"timestamp",type:"uint256"},{indexed:!1,name:"accessor",type:"address"},{indexed:!1,name:"recObj",type:"address"},{indexed:!1,name:"recContract",type:"address"}],name:"CreateRecording",type:"event"}],contract:"LvRecordableStream"},"0x9d3bb073bb2ef4d4a880f32fbbc665abfad2b29f532a231d93ab2207396f0b25":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"timestamp",type:"uint256"},{indexed:!1,name:"accessor",type:"address"},{indexed:!1,name:"recObj",type:"address"},{indexed:!1,name:"recContract",type:"address"}],name:"DeleteRecording",type:"event"}],contract:"LvRecordableStream"},"0x8e6b298cf577550234f0d0de33a4910d4bf1c4e08fe31b1173b2c6232297b3f4":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"timestamp",type:"uint256"},{indexed:!1,name:"accessor",type:"address"},{indexed:!1,name:"recObj",type:"address"},{indexed:!1,name:"recStartTime",type:"uint256"},{indexed:!1,name:"recEndTime",type:"uint256"}],name:"SetRecordingTimes",type:"event"}],contract:"LvRecordableStream"},"0x93ee8bc66b5d08a5dc39e788b1f78aa5f9ff2deda9e1387aa1fe22f9c329ed85":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"timestamp",type:"uint256"},{indexed:!1,name:"accessor",type:"address"},{indexed:!1,name:"recObj",type:"address"},{indexed:!1,name:"recStatus",type:"string"}],name:"SetRecordingStatus",type:"event"}],contract:"LvRecordableStream"},"0x182a726f966f22c96d651085c2a7143482b8d96fb0964ff2664ab8bdf2b703aa":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"timestamp",type:"uint256"},{indexed:!1,name:"accessor",type:"address"},{indexed:!1,name:"recObj",type:"address"},{indexed:!1,name:"requestID",type:"uint256"},{indexed:!1,name:"accessTimestamp",type:"uint256"}],name:"RecordingPlaybackStarted",type:"event"}],contract:"LvRecordableStream"},"0x208745b583bd0c257eced13411dc4b50e9a3a9c1ef0cc2f95b30a7457ec50cc1":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"timestamp",type:"uint256"},{indexed:!1,name:"accessor",type:"address"},{indexed:!1,name:"recObj",type:"address"},{indexed:!1,name:"requestID",type:"uint256"},{indexed:!1,name:"percentPlayed",type:"uint8"},{indexed:!1,name:"finalizeTimestamp",type:"uint256"}],name:"RecordingPlaybackCompleted",type:"event"}],contract:"LvRecordableStream"},"0xe3b30c4da7320d1a542eb57f205a34d2fc36ecd114595f3d50be2a73b3426e6b":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"timestamp",type:"uint256"},{indexed:!1,name:"accessor",type:"address"},{indexed:!1,name:"recObj",type:"address"},{indexed:!1,name:"programId",type:"string"},{indexed:!1,name:"programStart",type:"uint256"},{indexed:!1,name:"programEnd",type:"uint256"},{indexed:!1,name:"programTitle",type:"string"}],name:"RecordedProgramId",type:"event"}],contract:"LvRecordableStream"},"0x7b4822b1021af568bad37d56a35fbc255dc67153c544aa4116a289632a4e5955":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"timestamp",type:"uint256"},{indexed:!1,name:"group",type:"address"}],name:"MembershipGroupRemoved",type:"event"}],contract:"LvRecordableStream"},"0x467a7c1305f91e354a8a1e9046906d4d1a4852f958a073a392555d809be313a7":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"timestamp",type:"uint256"},{indexed:!1,name:"group",type:"address"}],name:"MembershipGroupAdded",type:"event"}],contract:"LvRecordableStream"},"0x8d7e6a8f23ccc8845c41fd09bebe570a0885272343268bbdfd71090b878b4b21":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"timestamp",type:"uint256"}],name:"StartStream",type:"event"}],contract:"LvRecordableStream"},"0x1b01b687e3428bc184341f729ec8a57bdd569536206cfb59e5d0cecb30dfcb7e":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"timestamp",type:"uint256"}],name:"StopStream",type:"event"}],contract:"LvRecordableStream"},"0xe1182e14924c528bfb564fb8d4feefe9766244f88b00051f28182e635e9a1ae8":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"timestamp",type:"uint256"}],name:"EnableRecording",type:"event"}],contract:"LvRecordableStream"},"0x3a5d2272abc5c09c8e771719f0eeca97e31d2fc425f6c34cf1d7a712b5fb6bfd":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"timestamp",type:"uint256"}],name:"DisableRecording",type:"event"}],contract:"LvRecordableStream"},"0x3e5026851758e1ab6e995b071b048e26e92f459b047600ff68914479d5074c54":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"timestamp",type:"uint256"},{indexed:!1,name:"startTime",type:"uint256"},{indexed:!1,name:"endTime",type:"uint256"}],name:"SetTimes",type:"event"}],contract:"LvRecording"},"0x6fff8c8938f3906f27a679f8d6b6652c28d82df5e27e55ef5cdc5f96b06dee09":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"timestamp",type:"uint256"},{indexed:!1,name:"status",type:"uint8"}],name:"UpdateRecordingStatus",type:"event"}],contract:"LvRecording"},"0x453384b91e17e6c44d171f27d5d32a864cf9cc9740578ffd6552d323aa973372":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"timestamp",type:"uint256"},{indexed:!1,name:"programId",type:"string"}],name:"RecordProgramId",type:"event"}],contract:"LvRecording"},"0xb72dd3ed580fe54dae87f5560d5617f1425b22e33e0a8e6ca80bf5cca9505535":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"timestamp",type:"uint256"},{indexed:!1,name:"stream",type:"address"},{indexed:!1,name:"accessor",type:"address"},{indexed:!1,name:"rightsHolder",type:"bool"},{indexed:!1,name:"provider",type:"bool"},{indexed:!1,name:"membership",type:"bool"}],name:"AuthorizeRecording",type:"event"}],contract:"LvStreamRightsHolder"},"0xc9861f7825199418647d352092481fbd508dc7420e7a6e2f0f41be183d6e2c8d":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"timestamp",type:"uint256"},{indexed:!1,name:"stream",type:"address"}],name:"EnableRecording",type:"event"}],contract:"LvStreamRightsHolder"},"0xaeba60bf43bc8bad9685cf80e62ae6d5cd753813786f1821576545517a3e49cb":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"timestamp",type:"uint256"},{indexed:!1,name:"stream",type:"address"}],name:"DisableRecording",type:"event"}],contract:"LvStreamRightsHolder"},"0x66887b54b3a468d1f49f169043427354bba12c2a112aea5390bb426a96bf916c":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"numtokens",type:"uint256"},{indexed:!1,name:"pay_to",type:"string"},{indexed:!1,name:"nonce",type:"string"}],name:"RedeemTokenRequest",type:"event"}],contract:"PaymentService"},"0x34a9ae2cb75f5f06f7599e9cc92cb12c6a2f63af676d375bdc639acae37db5e0":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"currency",type:"string"},{indexed:!1,name:"value",type:"uint256"},{indexed:!1,name:"payment_proof",type:"string"},{indexed:!1,name:"nonce",type:"string"}],name:"RedeemTokenExecuted",type:"event"}],contract:"PaymentService"},"0x5847a2cfd3bf297a9d3a67cfa50403274ce0289f9dac832c5cb7490a7972977a":{abi:[{anonymous:!1,inputs:[{indexed:!1,name:"currency",type:"string"},{indexed:!1,name:"value",type:"uint256"}],name:"SetTokenValue",type:"event"}],contract:"PaymentService"}}},function(t,e,n){var r=n(3),i=n(4),a=n(14),s=n(15),o=n(9),u=n(12),c=n(197).FrameClient,A=n(31).LogMessage,d=function(){"use strict";function t(e){var n=e.client,r=e.debug;a(this,t),this.client=n,this.debug=r,this.userWalletAddresses={},this.walletAddress=void 0,this.walletAddressRetrieved=!1}var e,n,d,p,f,l,h,y,g,m,b,I,C,v,E,w,B,Q;return s(t,[{key:"Log",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];A(this,t,e)}},{key:"CreateWallet",value:(Q=i(r.mark((function t(){var e,n,i,a,s;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.creatingWallet){t.next=6;break}case 1:if(!this.creatingWallet){t.next=6;break}return t.next=4,new Promise((function(t){return setTimeout(t,500)}));case 4:t.next=1;break;case 6:if(this.creatingWallet=!0,t.prev=7,this.walletAddress&&!o.EqualAddress(this.walletAddress,o.nullAddress)){t.next=23;break}return this.Log("Creating user wallet for user ".concat(this.client.signer.address)),t.next=12,this.client.GetBalance({address:this.client.signer.address});case 12:if(!(t.sent<.1)){t.next=15;break}return t.abrupt("return",void 0);case 15:return t.next=17,this.client.CallContractMethodAndWait({contractAddress:o.HashToAddress(this.client.contentSpaceId),methodName:"createAccessWallet",methodArgs:[]});case 17:return e=t.sent,t.next=20,this.client.ContractAbi({contractAddress:this.client.contentSpaceAddress});case 20:n=t.sent,this.walletAddress=this.client.ExtractValueFromEvent({abi:n,event:e,eventName:"CreateAccessWallet",eventValue:"wallet"}),this.userWalletAddresses[o.FormatAddress(this.client.signer.address)]=this.walletAddress;case 23:return i=this.client.contentSpaceLibraryId,a=o.AddressToObjectId(this.walletAddress),t.prev=25,t.next=28,this.client.ContentObject({libraryId:i,objectId:a});case 28:t.next=39;break;case 30:if(t.prev=30,t.t0=t.catch(25),404!==t.t0.status){t.next=39;break}return this.Log("Creating wallet object for user ".concat(this.client.signer.address)),t.next=36,this.client.CreateContentObject({libraryId:i,objectId:a});case 36:return s=t.sent,t.next=39,this.client.FinalizeContentObject({libraryId:i,objectId:a,writeToken:s.write_token,commitMessage:"Create user wallet object"});case 39:t.next=45;break;case 41:t.prev=41,t.t1=t.catch(7),console.error("Failed to create wallet contract:"),console.error(t.t1);case 45:return t.prev=45,this.creatingWallet=!1,t.finish(45);case 48:case"end":return t.stop()}}),t,this,[[7,41,45,48],[25,30]])}))),function(){return Q.apply(this,arguments)})},{key:"WalletAddress",value:(B=i(r.mark((function t(){var e,n,i=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=!(i.length>0&&void 0!==i[0])||i[0],!this.walletAddress&&!this.walletAddressRetrieved){t.next=3;break}return t.abrupt("return",this.walletAddress);case 3:return this.walletAddressPromise||(this.walletAddressPromise=this.client.CallContractMethod({contractAddress:o.HashToAddress(this.client.contentSpaceId),methodName:"userWallets",methodArgs:[this.client.signer.address]})),t.next=6,this.walletAddressPromise;case 6:if(n=t.sent,o.EqualAddress(n,o.nullAddress)||(this.walletAddress=n),this.walletAddress||!e){t.next=11;break}return t.next=11,this.CreateWallet();case 11:return this.walletAddressRetrieved=!0,t.abrupt("return",this.walletAddress);case 13:case"end":return t.stop()}}),t,this)}))),function(){return B.apply(this,arguments)})},{key:"UserWalletAddress",value:(w=i(r.mark((function t(e){var n,i;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.address,!o.EqualAddress(n,this.client.signer.address)){t.next=5;break}return t.next=4,this.WalletAddress();case 4:return t.abrupt("return",t.sent);case 5:if(this.userWalletAddresses[n]){t.next=11;break}return this.Log("Retrieving user wallet address for user ".concat(n)),t.next=9,this.client.CallContractMethod({contractAddress:o.HashToAddress(this.client.contentSpaceId),methodName:"userWallets",methodArgs:[n]});case 9:i=t.sent,o.EqualAddress(i,o.nullAddress)||(this.userWalletAddresses[n]=i);case 11:return t.abrupt("return",this.userWalletAddresses[n]);case 12:case"end":return t.stop()}}),t,this)}))),function(t){return w.apply(this,arguments)})},{key:"UserWalletObjectInfo",value:(E=i(r.mark((function t(){var e,n,i,a=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=a.length>0&&void 0!==a[0]?a[0]:{},!(n=e.address)){t.next=7;break}return t.next=4,this.UserWalletAddress({address:n});case 4:t.t0=t.sent,t.next=10;break;case 7:return t.next=9,this.WalletAddress();case 9:t.t0=t.sent;case 10:return i=t.t0,t.abrupt("return",{libraryId:this.client.contentSpaceLibraryId,objectId:i?o.AddressToObjectId(i):""});case 12:case"end":return t.stop()}}),t,this)}))),function(){return E.apply(this,arguments)})},{key:"PublicUserMetadata",value:(v=i(r.mark((function t(e){var n,i,a,s,o,c,A,d,p,f,l,h,y,g,m,b,I,C;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.address,i=e.metadataSubtree,a=void 0===i?"/":i,s=e.queryParams,o=void 0===s?{}:s,c=e.select,A=void 0===c?[]:c,d=e.resolveLinks,p=void 0!==d&&d,f=e.resolveIncludeSource,l=void 0!==f&&f,h=e.resolveIgnoreErrors,y=void 0!==h&&h,g=e.linkDepthLimit,m=void 0===g?1:g,n){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,this.UserWalletAddress({address:n});case 5:if(t.sent){t.next=8;break}return t.abrupt("return");case 8:return a=u("public",a||"/"),t.next=11,this.UserWalletObjectInfo({address:n});case 11:if(b=t.sent,I=b.libraryId,C=b.objectId){t.next=16;break}return t.abrupt("return");case 16:return t.next=18,this.client.ContentObjectMetadata({libraryId:I,objectId:C,queryParams:o,select:A,metadataSubtree:a,resolveLinks:p,resolveIncludeSource:l,resolveIgnoreErrors:y,linkDepthLimit:m});case 18:return t.abrupt("return",t.sent);case 19:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"UserMetadata",value:(C=i(r.mark((function t(){var e,n,i,a,s,o,u,c,A,d,p,f,l,h,y,g,m,b,I=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=I.length>0&&void 0!==I[0]?I[0]:{},n=e.metadataSubtree,i=void 0===n?"/":n,a=e.queryParams,s=void 0===a?{}:a,o=e.select,u=void 0===o?[]:o,c=e.resolveLinks,A=void 0!==c&&c,d=e.resolveIncludeSource,p=void 0!==d&&d,f=e.resolveIgnoreErrors,l=void 0!==f&&f,h=e.linkDepthLimit,y=void 0===h?1:h,this.Log("Accessing private user metadata at ".concat(i)),t.next=4,this.UserWalletObjectInfo();case 4:return g=t.sent,m=g.libraryId,b=g.objectId,t.next=9,this.client.ContentObjectMetadata({libraryId:m,objectId:b,metadataSubtree:i,queryParams:s,select:u,resolveLinks:A,resolveIncludeSource:p,resolveIgnoreErrors:l,linkDepthLimit:y});case 9:return t.abrupt("return",t.sent);case 10:case"end":return t.stop()}}),t,this)}))),function(){return C.apply(this,arguments)})},{key:"MergeUserMetadata",value:(I=i(r.mark((function t(e){var n,i,a,s,o,u,c,A;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.metadataSubtree,i=void 0===n?"/":n,a=e.metadata,s=void 0===a?{}:a,this.Log("Merging user metadata at ".concat(i)),t.next=4,this.UserWalletObjectInfo();case 4:return o=t.sent,u=o.libraryId,c=o.objectId,t.next=9,this.client.EditContentObject({libraryId:u,objectId:c});case 9:return A=t.sent,t.next=12,this.client.MergeMetadata({libraryId:u,objectId:c,writeToken:A.write_token,metadataSubtree:i,metadata:s});case 12:return t.next=14,this.client.FinalizeContentObject({libraryId:u,objectId:c,writeToken:A.write_token,commitMessage:"Merge user metadata"});case 14:case"end":return t.stop()}}),t,this)}))),function(t){return I.apply(this,arguments)})},{key:"ReplaceUserMetadata",value:(b=i(r.mark((function t(e){var n,i,a,s,o,u,c,A;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.metadataSubtree,i=void 0===n?"/":n,a=e.metadata,s=void 0===a?{}:a,this.Log("Replacing user metadata at ".concat(i)),t.next=4,this.UserWalletObjectInfo();case 4:return o=t.sent,u=o.libraryId,c=o.objectId,t.next=9,this.client.EditContentObject({libraryId:u,objectId:c});case 9:return A=t.sent,t.next=12,this.client.ReplaceMetadata({libraryId:u,objectId:c,writeToken:A.write_token,metadataSubtree:i,metadata:s});case 12:return t.next=14,this.client.FinalizeContentObject({libraryId:u,objectId:c,writeToken:A.write_token,commitMessage:"Replace user metadata"});case 14:case"end":return t.stop()}}),t,this)}))),function(t){return b.apply(this,arguments)})},{key:"DeleteUserMetadata",value:(m=i(r.mark((function t(e){var n,i,a,s,o,u;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.metadataSubtree,i=void 0===n?"/":n,this.Log("Deleting user metadata at ".concat(i)),t.next=4,this.UserWalletObjectInfo();case 4:return a=t.sent,s=a.libraryId,o=a.objectId,t.next=9,this.client.EditContentObject({libraryId:s,objectId:o});case 9:return u=t.sent,t.next=12,this.client.DeleteMetadata({libraryId:s,objectId:o,writeToken:u.write_token,metadataSubtree:i});case 12:return t.next=14,this.client.FinalizeContentObject({libraryId:s,objectId:o,writeToken:u.write_token,commitMessage:"Delete user metadata"});case 14:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"AccessLevel",value:(g=i(r.mark((function t(){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.UserMetadata({metadataSubtree:"access_level"});case 2:if(t.t0=t.sent,t.t0){t.next=5;break}t.t0="prompt";case 5:return t.abrupt("return",t.t0);case 6:case"end":return t.stop()}}),t,this)}))),function(){return g.apply(this,arguments)})},{key:"SetAccessLevel",value:(y=i(r.mark((function t(e){var n;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=(n=e.level).toLowerCase(),["private","prompt","public"].includes(n)){t.next=4;break}throw new Error("Invalid access level: "+n);case 4:return t.next=6,this.ReplaceUserMetadata({metadataSubtree:"access_level",metadata:n});case 6:case"end":return t.stop()}}),t,this)}))),function(t){return y.apply(this,arguments)})},{key:"TenantId",value:(h=i(r.mark((function t(){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.tenantId){t.next=4;break}return t.next=3,this.UserMetadata({metadataSubtree:"tenantId"});case 3:this.tenantId=t.sent;case 4:return t.abrupt("return",this.tenantId);case 5:case"end":return t.stop()}}),t,this)}))),function(){return h.apply(this,arguments)})},{key:"SetTenantId",value:(l=i(r.mark((function t(e){var n,i;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.id,i=e.address,!n||n.startsWith("iten")&&o.ValidHash(n)){t.next=3;break}throw Error("Invalid tenant ID: ".concat(n));case 3:if(!i){t.next=7;break}if(o.ValidAddress(i)){t.next=6;break}throw Error("Invalid address: ".concat(i));case 6:n="iten".concat(o.AddressToHash(i));case 7:return t.prev=7,t.next=10,this.client.AccessType({id:n});case 10:if(t.sent===this.client.authClient.ACCESS_TYPES.GROUP){t.next=13;break}throw Error("Invalid tenant ID: "+n);case 13:t.next=18;break;case 15:throw t.prev=15,t.t0=t.catch(7),Error("Invalid tenant ID: "+n);case 18:return t.next=20,this.ReplaceUserMetadata({metadataSubtree:"tenantId",metadata:n});case 20:this.tenantId=n;case 21:case"end":return t.stop()}}),t,this,[[7,15]])}))),function(t){return l.apply(this,arguments)})},{key:"UserProfileImage",value:(f=i(r.mark((function t(){var e,n,i,a,s,o,u,c=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=c.length>0&&void 0!==c[0]?c[0]:{},n=e.address,i=e.height,!n){t.next=7;break}return t.next=4,this.UserWalletAddress({address:n});case 4:a=t.sent,t.next=9;break;case 7:n=this.client.signer.address,a=this.walletAddress;case 9:if(a){t.next=11;break}return t.abrupt("return");case 11:return t.next=13,this.UserWalletObjectInfo({address:n});case 13:return s=t.sent,o=s.libraryId,u=s.objectId,t.abrupt("return",this.client.ContentObjectImageUrl({libraryId:o,objectId:u,height:i,imagePath:"public/profile_image"}));case 17:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"SetUserProfileImage",value:(p=i(r.mark((function t(e){var n,i,a,s,o;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.image,this.Log("Setting profile image for user ".concat(this.client.signer.address)),!((n.length||n.byteLength||n.size)>5e6)){t.next=5;break}throw Error("Maximum profile image size is 5MB");case 5:return t.next=7,this.UserWalletObjectInfo();case 7:return i=t.sent,a=i.libraryId,s=i.objectId,t.next=12,this.client.EditContentObject({libraryId:a,objectId:s});case 12:return o=t.sent,t.next=15,this.client.SetContentObjectImage({libraryId:a,objectId:s,writeToken:o.write_token,image:n,imageName:"profile_image",imagePath:"public/profile_image"});case 15:return t.next=17,this.client.FinalizeContentObject({libraryId:a,objectId:s,writeToken:o.write_token,commitMessage:"Set user profile image"});case 17:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"CollectedTags",value:(d=i(r.mark((function t(){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.UserMetadata({metadataSubtree:"collected_data"});case 2:if(t.t0=t.sent,t.t0){t.next=5;break}t.t0={};case 5:return t.abrupt("return",t.t0);case 6:case"end":return t.stop()}}),t,this)}))),function(){return d.apply(this,arguments)})},{key:"RecordTags",value:(n=i(r.mark((function t(e){var n,i,a;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,i=e.objectId,a=e.versionHash,t.prev=1,t.next=4,this.__RecordTags({libraryId:n,objectId:i,versionHash:a});case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),console.error(t.t0);case 9:case"end":return t.stop()}}),t,this,[[1,6]])}))),function(t){return n.apply(this,arguments)})},{key:"__RecordTags",value:(e=i(r.mark((function t(e){var n,i,a,s,o,c,A,d,p,f;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,i=e.objectId,a=e.versionHash,t.next=3,this.client.AccessType({id:i});case 3:if("object"===t.sent){t.next=6;break}return t.abrupt("return");case 6:if(a||n){t.next=10;break}return t.next=9,this.client.ContentObjectLibraryId({objectId:i});case 9:n=t.sent;case 10:if(a){t.next=14;break}return t.next=13,this.client.ContentObject({libraryId:n,objectId:i});case 13:a=t.sent.hash;case 14:return t.next=16,this.UserMetadata({metadataSubtree:u("accessed_content",a)});case 16:if(!t.sent){t.next=19;break}return t.abrupt("return");case 19:return t.next=21,this.UserWalletObjectInfo();case 21:return s=t.sent,o=s.libraryId,c=s.objectId,t.next=26,this.client.EditContentObject({libraryId:o,objectId:c});case 26:return A=t.sent,t.next=29,this.client.ReplaceMetadata({libraryId:o,objectId:c,writeToken:A.write_token,metadataSubtree:u("accessed_content",a),metadata:Date.now()});case 29:return t.next=31,this.client.ContentObjectMetadata({libraryId:n,objectId:i,versionHash:a,metadataSubtree:"video_tags"});case 31:if(!((d=t.sent)&&d.length>0)){t.next=40;break}return t.next=35,this.CollectedTags();case 35:return p=t.sent,f=this.__FormatVideoTags(d),Object.keys(f).forEach((function(t){p[t]?(p[t].occurrences+=1,p[t].aggregate+=f[t]):p[t]={occurrences:1,aggregate:f[t]}})),t.next=40,this.client.ReplaceMetadata({libraryId:o,objectId:c,writeToken:A.write_token,metadataSubtree:"collected_data",metadata:p});case 40:return t.next=42,this.client.FinalizeContentObject({libraryId:o,objectId:c,writeToken:A.write_token,commitMessage:"Record user tags",awaitCommitConfirmation:!1});case 42:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"__FormatVideoTags",value:function(t){var e={};t.forEach((function(t){t.tags.forEach((function(t){e[t.tag]?(e[t.tag].occurrences+=1,e[t.tag].aggregate+=t.score):e[t.tag]={occurrences:1,aggregate:t.score}}))}));var n={};return Object.keys(e).forEach((function(t){n[t]=e[t].aggregate/e[t].occurrences})),n}},{key:"PromptedMethods",value:function(){return c.PromptedMethods()}},{key:"MetadataMethods",value:function(){return c.MetadataMethods()}},{key:"FrameAllowedMethods",value:function(){var t=["constructor","FrameAllowedMethods","Log","MetadataMethods","PromptedMethods","RecordTags","SetAccessLevel","SetTenantId","SetUserProfileImage","__IsLibraryCreated","__TouchLibrary","__FormatVideoTags","__RecordTags"];return Object.getOwnPropertyNames(Object.getPrototypeOf(this)).filter((function(e){return!t.includes(e)}))}}]),t}();t.exports=d},function(t,e,n){var r=n(7),i=n(3),a=n(4),s=n(14),o=n(15);function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function A(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){o=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var p=n(198),f=n(9),l=n(91).permissionLevels,h=function(){"use strict";function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.target,o=n.timeout,u=void 0===o?30:o;s(this,t),this.permissionLevels=l,!r&&"undefined"!=typeof window&&window.parent&&(r=window.parent),this.target=r,this.timeout=u,this.utils=f;var c,d=A(this.AllowedMethods());try{var p=function(){var t=c.value;e[t]=function(){var n=a(i.mark((function n(r){var a;return i.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return(a=r&&r.callback)&&delete r.callback,n.next=4,e.SendMessage({options:{calledMethod:t,args:e.utils.MakeClonable(r)},callback:a});case 4:return n.abrupt("return",n.sent);case 5:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}()};for(d.s();!(c=d.n()).done;)p()}catch(t){d.e(t)}finally{d.f()}this.userProfileClient={};var h,y=A(this.AllowedUserProfileMethods());try{var g=function(){var n=h.value;e.userProfileClient[n]=function(){var r=a(i.mark((function r(a){var s;return i.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return(s=a&&a.callback)&&delete a.callback,r.next=4,e.SendMessage({options:{module:"userProfileClient",calledMethod:n,args:e.utils.MakeClonable(a),prompted:t.PromptedMethods().includes(n)},callback:s});case 4:return r.abrupt("return",r.sent);case 5:case"end":return r.stop()}}),r)})));return function(t){return r.apply(this,arguments)}}()};for(y.s();!(h=y.n()).done;)g()}catch(t){y.e(t)}finally{y.f()}}var e,n,r;return o(t,[{key:"PassRequest",value:(r=a(i.mark((function t(e){var n,r,a,s,o;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.request,r=e.Respond,t.prev=1,n.callbackId&&(o=function(t){return r({type:"ElvFrameResponse",requestId:n.callbackId,response:t})}),t.next=5,this.SendMessage({options:n,callback:o});case 5:a=t.sent,t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),s=t.t0;case 11:return t.abrupt("return",{type:"ElvFrameResponse",requestId:n.requestId,response:a,error:s});case 12:case"end":return t.stop()}}),t,this,[[1,8]])}))),function(t){return r.apply(this,arguments)})},{key:"SendMessage",value:(n=a(i.mark((function e(n){var r,a,s,o,u,A,d,f,l,h;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.options,a=void 0===r?{}:r,s=n.callback,o=n.noResponse,u=void 0!==o&&o,A=p.next(),s&&(d=p.next()),this.target.postMessage(c(c({},a),{},{type:"ElvFrameRequest",requestId:A,callbackId:d}),"*"),!u){e.next=6;break}return e.abrupt("return");case 6:return f=a.calledMethod||a.operation,l=t.FileMethods().includes(a.calledMethod),h=this.timeout,a.prompted||l?h=0:a.args&&a.args.fcTimeout&&(h=a.args.fcTimeout),e.next=12,this.AwaitMessage(A,h,s,d,f);case 12:return e.abrupt("return",e.sent);case 13:case"end":return e.stop()}}),e,this)}))),function(t){return n.apply(this,arguments)})},{key:"AwaitMessage",value:(e=a(i.mark((function t(e,n,r,s,o){return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,new Promise((function(t,u){var c,A,d,p=function(){A&&clearTimeout(A),n>0&&(A=setTimeout((function(){"undefined"!=typeof window&&(window.removeEventListener("message",c),d&&window.removeEventListener("message",d)),u("Request ".concat(e," timed out (").concat(o,")"))}),1e3*n))};s&&(d=function(t){try{p();var e=t.data;if("ElvFrameResponse"!==e.type||e.requestId!==s)return;r(e.response)}catch(t){console.error(t)}},window.addEventListener("message",d)),c=function(){var n=a(i.mark((function n(r){var a;return i.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,"ElvFrameResponse"===(a=r.data).type&&a.requestId===e){n.next=4;break}return n.abrupt("return");case 4:clearTimeout(A),window.removeEventListener("message",c),d&&window.removeEventListener("message",d),a.error?u(a.error):t(a.response),n.next=16;break;case 10:n.prev=10,n.t0=n.catch(0),clearTimeout(A),window.removeEventListener("message",c),d&&window.removeEventListener("message",d),u(n.t0);case 16:case"end":return n.stop()}}),n,null,[[0,10]])})));return function(t){return n.apply(this,arguments)}}(),p(),window.addEventListener("message",c)}));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)}))),function(t,n,r,i,a){return e.apply(this,arguments)})},{key:"AllowedMethods",value:function(){return["AccessGroupManagers","AccessGroupMembers","AccessGroupOwner","AccessInfo","AccessRequest","AccessType","AddAccessGroupManager","AddAccessGroupMember","AddContentLibraryGroup","AddContentObjectGroupPermission","AddLibraryContentType","AssetMetadata","AvailableDRMs","AvailableOfferings","AwaitPending","BitmovinPlayoutOptions","BlockNumber","CallBitcodeMethod","CallContractMethod","CallContractMethodAndWait","ClearCache","ClearStaticToken","Collection","CollectionTransactions","ConfigUrl","ContentLibraries","ContentLibrary","ContentLibraryGroupPermissions","ContentLibraryOwner","ContentObject","ContentObjectAccessComplete","ContentObjectGraph","ContentObjectGroupPermissions","ContentObjectImageUrl","ContentObjectLibraryId","ContentObjectMetadata","ContentObjectOwner","ContentObjectTenantId","ContentObjectVersions","ContentObjects","ContentPart","ContentParts","ContentSpaceId","ContentType","ContentTypeOwner","ContentTypes","ContractAbi","ContractEvents","ContractMetadata","ContractName","CopyContentObject","CreateABRMezzanine","CreateAccessGroup","CreateAndFinalizeContentObject","CreateContentLibrary","CreateContentObject","CreateContentType","CreateEncryptionConk","CreateFileDirectories","CreateFileUploadJob","CreateLinks","CreateNTPInstance","CreateNonOwnerCap","CreatePart","CreateProductionMaster","CreateSignedToken","CurrentAccountAddress","CustomContractAddress","Decrypt","DecryptECIES","DefaultKMSAddress","DeleteAccessGroup","DeleteContentLibrary","DeleteContentObject","DeleteContentVersion","DeleteFiles","DeleteMetadata","DeleteNTPInstance","DeletePart","DeployContract","Download","DownloadEncrypted","DownloadFile","DownloadPart","EditAndFinalizeContentObject","EditContentObject","Encrypt","EncryptECIES","EncryptionConk","Events","ExtractEventFromLogs","ExtractValueFromEvent","FabricUrl","FileUrl","FinalizeABRMezzanine","FinalizeContentObject","FinalizePart","FinalizeStateChannelAccess","FinalizeUploadJob","FormatContractArguments","GenerateStateChannelToken","GetBalance","InitializeAuthPolicy","IssueNTPCode","IssueSignedNTPCode","LatestVersionHash","LibraryContentTypes","LinkAccessGroupToOauth","LinkData","LinkTarget","LinkUrl","ListAccessGroups","ListFiles","ListNTPInstances","LROStatus","MergeContractMetadata","MergeMetadata","MetadataAuth","MintNFT","NetworkInfo","NodeId","Nodes","NTPInstance","Permission","PlayoutOptions","PlayoutPathResolution","ProduceMetadataLinks","Proofs","PublicRep","PublishContentVersion","QParts","RedeemCode","RemoveAccessGroupManager","RemoveAccessGroupMember","RemoveContentObjectGroupPermission","RemoveContentLibraryGroup","RemoveLibraryContentType","Rep","ReplaceContractMetadata","ReplaceMetadata","Request","ResetRegion","SendFunds","SetAccessCharge","SetAuth","SetAuthContext","SetAuthPolicy","SetContentLibraryImage","SetContentObjectImage","SetCustomContentContract","SetGroupPermission","SetNodes","SetOauthToken","SetPolicyAuthorization","SetSignerFromOauthToken","SetStaticToken","SetVisibility","SetPermission","StartABRMezzanineJobs","SuspendNTPInstance","UnlinkAccessGroupFromOauth","UpdateContentObjectGraph","UpdateNTPInstance","UploadFileData","UploadFiles","UploadFilesFromS3","UploadJobStatus","UploadPart","UploadPartChunk","UploadStatus","UseRegion","VerifyContentObject","Visibility"]}},{key:"AllowedUserProfileMethods",value:function(){return["AccessLevel","CollectedTags","CreateWallet","DeleteUserMetadata","MergeUserMetadata","PublicUserMetadata","ReplaceUserMetadata","TenantId","UserMetadata","UserProfileImage","UserWalletAddress","UserWalletObjectInfo","WalletAddress"]}}],[{key:"PromptedMethods",value:function(){return["CollectedTags","DeleteUserMetadata","MergeUserMetadata","ReplaceUserMetadata","UserMetadata"]}},{key:"MetadataMethods",value:function(){return["DeleteUserMetadata","MergeUserMetadata","ReplaceUserMetadata","UserMetadata"]}},{key:"FileMethods",value:function(){return["DownloadFile","DownloadPart","UpdateContentObjectGraph","UploadFiles","UploadFilesFromS3","UploadPart","UploadPartChunk"]}}]),t}();e.FrameClient=h},function(t,e,n){var r=n(14),i=n(15),a=0,s=function(){"use strict";function t(){r(this,t)}return i(t,null,[{key:"next",value:function(){return++a}}]),t}();t.exports=s},function(t,e,n){var r=n(200),i=n(257)((function(t,e,n,i){r(t,e,n,i)}));t.exports=i},function(t,e,n){var r=n(201),i=n(95),a=n(232),s=n(234),o=n(21),u=n(105),c=n(104);t.exports=function t(e,n,A,d,p){e!==n&&a(n,(function(a,u){if(p||(p=new r),o(a))s(e,n,u,A,t,d,p);else{var f=d?d(c(e,u),a,u+"",e,n,p):void 0;void 0===f&&(f=a),i(e,u,f)}}),u)}},function(t,e,n){var r=n(39),i=n(207),a=n(208),s=n(209),o=n(210),u=n(211);function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=a,c.prototype.get=s,c.prototype.has=o,c.prototype.set=u,t.exports=c},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(40),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():i.call(e,n,1),--this.size,!0)}},function(t,e,n){var r=n(40);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(40);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(40);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(39);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(39),i=n(92),a=n(219);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.length<199)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new a(s)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(55),i=n(215),a=n(21),s=n(217),o=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,A=u.toString,d=c.hasOwnProperty,p=RegExp("^"+A.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!a(t)||i(t))&&(r(t)?p:o).test(s(t))}},function(t,e,n){var r=n(93),i=Object.prototype,a=i.hasOwnProperty,s=i.toString,o=r?r.toStringTag:void 0;t.exports=function(t){var e=a.call(t,o),n=t[o];try{t[o]=void 0;var r=!0}catch(t){}var i=s.call(t);return r&&(e?t[o]=n:delete t[o]),i}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r,i=n(216),a=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!a&&a in t}},function(t,e,n){var r=n(26)["__core-js_shared__"];t.exports=r},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(220),i=n(227),a=n(229),s=n(230),o=n(231);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=s,u.prototype.set=o,t.exports=u},function(t,e,n){var r=n(221),i=n(39),a=n(92);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},function(t,e,n){var r=n(222),i=n(223),a=n(224),s=n(225),o=n(226);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=s,u.prototype.set=o,t.exports=u},function(t,e,n){var r=n(43);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var r=n(43),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(43),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},function(t,e,n){var r=n(43);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,n){var r=n(44);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){var e=n(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(44);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(44);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(44);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},function(t,e,n){var r=n(233)();t.exports=r},function(t,e){t.exports=function(t){return function(e,n,r){for(var i=-1,a=Object(e),s=r(e),o=s.length;o--;){var u=s[t?o:++i];if(!1===n(a[u],u,a))break}return e}}},function(t,e,n){var r=n(95),i=n(235),a=n(236),s=n(239),o=n(240),u=n(99),c=n(100),A=n(244),d=n(102),p=n(55),f=n(21),l=n(246),h=n(103),y=n(104),g=n(250);t.exports=function(t,e,n,m,b,I,C){var v=y(t,n),E=y(e,n),w=C.get(E);if(w)r(t,n,w);else{var B=I?I(v,E,n+"",t,e,C):void 0,Q=void 0===B;if(Q){var M=c(E),k=!M&&d(E),_=!M&&!k&&h(E);B=E,M||k||_?c(v)?B=v:A(v)?B=s(v):k?(Q=!1,B=i(E,!0)):_?(Q=!1,B=a(E,!0)):B=[]:l(E)||u(E)?(B=v,u(v)?B=g(v):f(v)&&!p(v)||(B=o(E))):Q=!1}Q&&(C.set(E,B),b(B,E,m,I,C),C.delete(E)),r(t,n,B)}}},function(t,e,n){(function(t){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(26),a="object"==r(e)&&e&&!e.nodeType&&e,s=a&&"object"==r(t)&&t&&!t.nodeType&&t,o=s&&s.exports===a?i.Buffer:void 0,u=o?o.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=u?u(n):new t.constructor(n);return t.copy(r),r}}).call(this,n(13)(t))},function(t,e,n){var r=n(237);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},function(t,e,n){var r=n(238);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},function(t,e,n){var r=n(26).Uint8Array;t.exports=r},function(t,e){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},function(t,e,n){var r=n(241),i=n(97),a=n(98);t.exports=function(t){return"function"!=typeof t.constructor||a(t)?{}:r(i(t))}},function(t,e,n){var r=n(21),i=Object.create,a=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=a},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){var r=n(42),i=n(32);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},function(t,e,n){var r=n(57),i=n(32);t.exports=function(t){return i(t)&&r(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(42),i=n(97),a=n(32),s=Function.prototype,o=Object.prototype,u=s.toString,c=o.hasOwnProperty,A=u.call(Object);t.exports=function(t){if(!a(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=c.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==A}},function(t,e,n){var r=n(42),i=n(101),a=n(32),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,t.exports=function(t){return a(t)&&i(t.length)&&!!s[r(t)]}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,n){(function(t){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(94),a="object"==r(e)&&e&&!e.nodeType&&e,s=a&&"object"==r(t)&&t&&!t.nodeType&&t,o=s&&s.exports===a&&i.process,u=function(){try{var t=s&&s.require&&s.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=u}).call(this,n(13)(t))},function(t,e,n){var r=n(251),i=n(105);t.exports=function(t){return r(t,i(t))}},function(t,e,n){var r=n(252),i=n(56);t.exports=function(t,e,n,a){var s=!n;n||(n={});for(var o=-1,u=e.length;++o<u;){var c=e[o],A=a?a(n[c],t[c],c,n,t):void 0;void 0===A&&(A=t[c]),s?i(n,c,A):r(n,c,A)}return n}},function(t,e,n){var r=n(56),i=n(41),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var s=t[e];a.call(t,e)&&i(s,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(254),i=n(99),a=n(100),s=n(102),o=n(106),u=n(103),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=a(t),A=!n&&i(t),d=!n&&!A&&s(t),p=!n&&!A&&!d&&u(t),f=n||A||d||p,l=f?r(t.length,String):[],h=l.length;for(var y in t)!e&&!c.call(t,y)||f&&("length"==y||d&&("offset"==y||"parent"==y)||p&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||o(y,h))||l.push(y);return l}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(21),i=n(98),a=n(256),s=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return a(t);var e=i(t),n=[];for(var o in t)("constructor"!=o||!e&&s.call(t,o))&&n.push(o);return n}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},function(t,e,n){var r=n(258),i=n(265);t.exports=function(t){return r((function(e,n){var r=-1,a=n.length,s=a>1?n[a-1]:void 0,o=a>2?n[2]:void 0;for(s=t.length>3&&"function"==typeof s?(a--,s):void 0,o&&i(n[0],n[1],o)&&(s=a<3?void 0:s,a=1),e=Object(e);++r<a;){var u=n[r];u&&t(e,u,r,s)}return e}))}},function(t,e,n){var r=n(107),i=n(259),a=n(261);t.exports=function(t,e){return a(i(t,e,r),t+"")}},function(t,e,n){var r=n(260),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var a=arguments,s=-1,o=i(a.length-e,0),u=Array(o);++s<o;)u[s]=a[e+s];s=-1;for(var c=Array(e+1);++s<e;)c[s]=a[s];return c[e]=n(u),r(t,this,c)}}},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var r=n(262),i=n(264)(r);t.exports=i},function(t,e,n){var r=n(263),i=n(96),a=n(107),s=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:a;t.exports=s},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e){var n=Date.now;t.exports=function(t){var e=0,r=0;return function(){var i=n(),a=16-(i-r);if(r=i,a>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(41),a=n(57),s=n(106),o=n(21);t.exports=function(t,e,n){if(!o(n))return!1;var u=r(e);return!!("number"==u?a(n)&&s(e,n.length):"string"==u&&e in n)&&i(n[e],t)}},function(t,e,n){var r=n(3),i=n(4),a=n(14),s=n(15),o=n(267),u=n(269),c=n(271);function A(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=c(t);if(e){var i=c(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return u(this,n)}}var d=n(18),p=n(9),f=n(25),l=n(12),h=function(t){"use strict";o(g,t);var e,n,u,c,h,y=A(g);function g(t){var e,n=t.rpcUris,r=t.idToken,i=t.authToken,s=t.tenantId,o=t.provider,u=t.extraData,c=void 0===u?{}:u,A=t.unsignedPublicAuth,d=void 0!==A&&A;return a(this,g),(e=y.call(this)).remoteSigner=!0,e.unsignedPublicAuth=d,e.HttpClient=new f({uris:n}),e.idToken=r,e.tenantId=s,e.authToken=i,e.extraLoginData=c||{},e.provider=o,e.signatureCache={},e}return s(g,[{key:"Initialize",value:(h=i(r.mark((function t(){var e,n,i,a,s,o;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.authToken){t.next=10;break}return t.next=3,p.ResponseToJson(this.HttpClient.Request({path:l("as","wlt","login","jwt"),method:"POST",body:this.tenantId?{tid:this.tenantId,ext:this.extraLoginData||{}}:{ext:this.extraLoginData||{}},headers:{Authorization:"Bearer ".concat(this.idToken)}}));case 3:e=t.sent,n=e.addr,i=e.eth,a=e.token,this.authToken=a,this.address=p.FormatAddress(n),this.id=i;case 10:if(this.address){t.next=16;break}return t.next=13,p.ResponseToJson(this.HttpClient.Request({method:"GET",path:l("as","wlt","keys"),headers:{Authorization:"Bearer ".concat(this.authToken)}}));case 13:s=t.sent,(o=s.eth[0])&&o.startsWith("0x")?this.address=o:this.address=p.HashToAddress(s.eth[0]);case 16:this.id=this.address?"ikms".concat(p.AddressToHash(this.address)):void 0,this.signer=this.provider.getSigner(this.address);case 18:case"end":return t.stop()}}),t,this)}))),function(){return h.apply(this,arguments)})},{key:"getAddress",value:function(){return this.address}},{key:"signDigest",value:(c=i(r.mark((function t(e){var n=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.signatureCache[e]||(this.signatureCache[e]=new Promise(function(){var t=i(r.mark((function t(i,a){var s;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,p.ResponseToJson(n.HttpClient.Request({method:"POST",path:l("as","wlt","sign","eth",n.id),headers:{Authorization:"Bearer ".concat(n.authToken)},body:{hash:e}}));case 3:(s=t.sent).v=parseInt(s.v,16),s.recoveryParam=s.v-27,i(s),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),a(t.t0);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(e,n){return t.apply(this,arguments)}}())),t.next=3,this.signatureCache[e];case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"signMessage",value:(u=i(r.mark((function t(e){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=Promise,t.t1=d.utils,t.t2="0x",t.next=5,this.signDigest(d.utils.hashMessage(e));case 5:return t.t3=t.sent,t.t4=t.t2.concat.call(t.t2,t.t3),t.t5=t.t1.joinSignature.call(t.t1,t.t4),t.abrupt("return",t.t0.resolve.call(t.t0,t.t5));case 9:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"sign",value:(n=i(r.mark((function t(e){var n;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d.utils.resolveProperties(e);case 2:return e=t.sent,t.next=5,this.signDigest(d.utils.keccak256(d.utils.serializeTransaction(e)));case 5:return n=t.sent,t.abrupt("return",d.utils.serializeTransaction(e,n));case 7:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"sendTransaction",value:(e=i(r.mark((function t(e){var n=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=e.nonce){t.next=5;break}return e=d.utils.shallowCopy(e),t.next=4,this.provider.getTransactionCount(this.address,"pending");case 4:e.nonce=t.sent;case 5:return t.abrupt("return",d.utils.populateTransaction(e,this.provider,this.address).then((function(t){return n.sign(t).then((function(t){return n.provider.sendTransaction(t)}))})));case 6:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"connect",value:function(){}}]),g}(d.Signer);t.exports=h},function(t,e,n){var r=n(268);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&r(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,n(e,r)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var r=n(17).default,i=n(270);t.exports=function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return i(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){(function(e,r){var i=n(3),a=n(4);void 0===e&&(e=n(2).Buffer);var s,o=n(88),u=n(108),c=n(9);if("undefined"==typeof crypto){var A=n(283);A.getRandomValues=function(t){return A.randomBytes(t.length)},r.crypto=A}switch(c.Platform()){case c.PLATFORM_REACT_NATIVE:case c.PLATFORM_WEB:s=n(159).default;break;default:s=n(!function(){var t=new Error("Cannot find module '@eluvio/crypto/dist/elv-crypto.bundle.node'");throw t.code="MODULE_NOT_FOUND",t}()).default}var d,p,f,l,h,y={ElvCrypto:(h=a(i.mark((function t(){return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,y.elvCrypto){t.next=5;break}return t.next=4,(new s).init();case 4:y.elvCrypto=t.sent;case 5:return t.abrupt("return",y.elvCrypto);case 8:t.prev=8,t.t0=t.catch(0),console.error("Error initializing ElvCrypto:"),console.error(t.t0);case 12:case"end":return t.stop()}}),t,null,[[0,8]])}))),function(){return h.apply(this,arguments)}),EncryptedSize:function(t){var e=Math.floor(t/1e6)*y.EncryptedBlockSize(1e6);return t%1e6!=0&&(e+=y.EncryptedBlockSize(t%1e6)),e},EncryptedBlockSize:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=129,r=608,i=48,a=12*(i-1),s=12*i,o=Math.floor(t/a)*s;return t%a!=0&&(o+=s),e?o+r:o+n},EncryptConk:function(t,n){return a(i.mark((function r(){var a,s,o,u,A,d;return i.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,y.ElvCrypto();case 2:return a=r.sent,n=new Uint8Array(e.from(n.replace("0x",""),"hex")),t=new Uint8Array(e.from(JSON.stringify(t))),r.next=7,a.encryptECIES(t,n);case 7:return s=r.sent,o=s.data,u=s.ephemeralKey,A=s.tag,d=e.concat([e.from(u),e.from(A),e.from(o)]),r.abrupt("return",c.B64(d));case 13:case"end":return r.stop()}}),r)})))()},DecryptCap:function(t,n){return a(i.mark((function r(){var a,s,o,u,c;return i.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,y.ElvCrypto();case 2:return a=r.sent,n=new Uint8Array(e.from(n.replace("0x",""),"hex")),t=e.from(t,"base64"),s=t.slice(0,65),o=t.slice(65,81),u=t.slice(81),c=a.decryptECIES(new Uint8Array(u),n,new Uint8Array(s),new Uint8Array(o)),r.abrupt("return",JSON.parse(e.from(c).toString()));case 10:case"end":return r.stop()}}),r)})))()},GeneratePrimaryConk:function(t){return a(i.mark((function n(){var r,a,s,u,c,A,d;return i.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=t.spaceId,a=t.objectId,n.next=3,y.ElvCrypto();case 3:return s=n.sent,u=s.generatePrimaryKeys(),c=u.secretKey,A=u.publicKey,d=s.generateSymmetricKey().key,n.abrupt("return",{symm_key:"kpsy".concat(o.encode(e.from(d))),secret_key:"kpsk".concat(o.encode(e.from(c))),public_key:"kppk".concat(o.encode(e.from(A))),sid:r,qid:a});case 7:case"end":return n.stop()}}),n)})))()},GenerateTargetConk:function(){return a(i.mark((function t(){var n,r,a,s;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,y.ElvCrypto();case 2:return n=t.sent,r=n.generateTargetKeys(),a=r.secretKey,s=r.publicKey,t.abrupt("return",{secret_key:"kpsk".concat(o.encode(e.from(a))),public_key:"ktpk".concat(o.encode(e.from(s)))});case 5:case"end":return t.stop()}}),t)})))()},CapToConk:function(t){var e=function(t){return new Uint8Array(o.decode(t.slice(4)))};return{symmetricKey:e(t.symm_key),secretKey:e(t.secret_key),publicKey:e(t.public_key)}},EncryptionContext:function(t){return a(i.mark((function e(){var n,r,a,s,o,u,c;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y.ElvCrypto();case 2:return n=e.sent,r=y.CapToConk(t),a=r.symmetricKey,s=r.secretKey,(o=r.publicKey).length===n.PRIMARY_PK_KEY_SIZE?(c=n.CRYPTO_TYPE_PRIMARY,u=n.newPrimaryContext(o,s,a)):(c=n.CRYPTO_TYPE_TARGET,u=n.newTargetDecryptionContext(s,a)),e.abrupt("return",{context:u,type:c});case 6:case"end":return e.stop()}}),e)})))()},Encrypt:(l=a(i.mark((function t(n,r){var a,s,o,u,c;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,y.OpenEncryptionStream(n);case 2:if(a=t.sent,e.isBuffer(r)||r instanceof ArrayBuffer){t.next=9;break}return t.t0=e,t.next=7,new Response(r).arrayBuffer();case 7:t.t1=t.sent,r=t.t0.from.call(t.t0,t.t1);case 9:for(s=new Uint8Array(r),o=0;o<s.length;o+=1e6)u=Math.min(s.length,o+1e6),a.write(s.slice(o,u));return a.end(),c=[],t.next=15,new Promise((function(t,e){a.on("data",(function(t){c.push(t)})).on("finish",(function(){t()})).on("error",(function(t){e(t)}))}));case 15:return t.abrupt("return",e.concat(c));case 16:case"end":return t.stop()}}),t)}))),function(t,e){return l.apply(this,arguments)}),OpenEncryptionStream:(f=a(i.mark((function t(e){var n,r,a,s,o;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,y.ElvCrypto();case 2:return n=t.sent,t.next=5,y.EncryptionContext(e);case 5:return r=t.sent,a=r.context,s=new u.PassThrough,o=n.createCipher(a),t.abrupt("return",s.pipe(o).on("finish",(function(){a.free()})).on("error",(function(t){throw Error(t)})));case 10:case"end":return t.stop()}}),t)}))),function(t){return f.apply(this,arguments)}),Decrypt:(p=a(i.mark((function t(n,r){var a,s,o,u,c;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,y.OpenDecryptionStream(n);case 2:for(a=t.sent,s=new Uint8Array(r),o=0;o<s.length;o+=1e6)u=Math.min(s.length,o+1e6),a.write(s.slice(o,u));return a.end(),c=[],t.next=9,new Promise((function(t,e){a.on("data",(function(t){c.push(t)})).on("finish",(function(){t()})).on("error",(function(t){e(t)}))}));case 9:return t.abrupt("return",e.concat(c));case 10:case"end":return t.stop()}}),t)}))),function(t,e){return p.apply(this,arguments)}),OpenDecryptionStream:(d=a(i.mark((function t(e){var n,r,a,s,o,c;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,y.ElvCrypto();case 2:return n=t.sent,t.next=5,y.EncryptionContext(e);case 5:return r=t.sent,a=r.context,s=r.type,o=new u.PassThrough,c=n.createDecipher(s,a),t.abrupt("return",o.pipe(c).on("finish",(function(){a.free()})).on("error",(function(t){throw Error(t)})));case 11:case"end":return t.stop()}}),t)}))),function(t){return d.apply(this,arguments)})};t.exports=y}).call(this,n(2).Buffer,n(6))},function(t,e){},function(t,e,n){"use strict";var r=n(59).Buffer,i=n(275);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var e,n,i,a=r.allocUnsafe(t>>>0),s=this.head,o=0;s;)e=s.data,n=a,i=o,e.copy(n,i),o+=s.data.length,s=s.next;return a},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new a(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new a(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(277),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(6))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,a,s,o,u=1,c={},A=!1,d=t.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(t);p=p&&p.setTimeout?p:t,"[object process]"==={}.toString.call(t.process)?r=function(){var t=f(arguments);return e.nextTick(l(h,t)),t}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((a=new MessageChannel).port1.onmessage=function(t){h(t.data)},r=function(){var t=f(arguments);return a.port2.postMessage(t),t}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,r=function(){var t=f(arguments),e=d.createElement("script");return e.onreadystatechange=function(){h(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e),t}):r=function(){var t=f(arguments);return setTimeout(l(h,t),0),t}:(s="setImmediate$"+Math.random()+"$",o=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&h(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",o,!1):t.attachEvent("onmessage",o),r=function(){var e=f(arguments);return t.postMessage(s+e,"*"),e}),p.setImmediate=r,p.clearImmediate=y}function f(t){return c[u]=l.apply(void 0,t),u++}function l(t){var e=[].slice.call(arguments,1);return function(){"function"==typeof t?t.apply(void 0,e):new Function(""+t)()}}function h(t){if(A)setTimeout(l(h,t),0);else{var e=c[t];if(e){A=!0;try{e()}finally{y(t),A=!1}}}}function y(t){delete c[t]}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(6),n(8))},function(t,e,n){"use strict";t.exports=a;var r=n(113),i=Object.create(n(34));function a(t){if(!(this instanceof a))return new a(t);r.call(this,t)}i.inherits=n(0),i.inherits(a,r),a.prototype._transform=function(t,e,n){n(null,t)}},function(t,e,n){t.exports=n(60)},function(t,e,n){t.exports=n(22)},function(t,e,n){t.exports=n(58).Transform},function(t,e,n){t.exports=n(58).PassThrough},function(t,e,n){"use strict";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=n(23),e.createHash=e.Hash=n(27),e.createHmac=e.Hmac=n(66);var r=n(124),i=Object.keys(r),a=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);e.getHashes=function(){return a};var s=n(67);e.pbkdf2=s.pbkdf2,e.pbkdf2Sync=s.pbkdf2Sync;var o=n(130);e.Cipher=o.Cipher,e.createCipher=o.createCipher,e.Cipheriv=o.Cipheriv,e.createCipheriv=o.createCipheriv,e.Decipher=o.Decipher,e.createDecipher=o.createDecipher,e.Decipheriv=o.Decipheriv,e.createDecipheriv=o.createDecipheriv,e.getCiphers=o.getCiphers,e.listCiphers=o.listCiphers;var u=n(138);e.DiffieHellmanGroup=u.DiffieHellmanGroup,e.createDiffieHellmanGroup=u.createDiffieHellmanGroup,e.getDiffieHellman=u.getDiffieHellman,e.createDiffieHellman=u.createDiffieHellman,e.DiffieHellman=u.DiffieHellman;var c=n(141);e.createSign=c.createSign,e.Sign=c.Sign,e.createVerify=c.createVerify,e.Verify=c.Verify,e.createECDH=n(153);var A=n(154);e.publicEncrypt=A.publicEncrypt,e.privateEncrypt=A.privateEncrypt,e.publicDecrypt=A.publicDecrypt,e.privateDecrypt=A.privateDecrypt;var d=n(158);e.randomFill=d.randomFill,e.randomFillSync=d.randomFillSync,e.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(t,e){},function(t,e,n){"use strict";function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var s=n(2).Buffer,o=n(286).inspect,u=o&&o.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,n,c;return e=t,(n=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,n,r,i=s.allocUnsafe(t>>>0),a=this.head,o=0;a;)e=a.data,n=i,r=o,s.prototype.copy.call(e,n,r),o+=a.data.length,a=a.next;return i}},{key:"consume",value:function(t,e){var n;return t<this.head.data.length?(n=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):n=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,n=1,r=e.data;for(t-=r.length;e=e.next;){var i=e.data,a=t>i.length?i.length:t;if(a===i.length?r+=i:r+=i.slice(0,t),0==(t-=a)){a===i.length?(++n,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(a));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),n=this.head,r=1;for(n.data.copy(e),t-=n.data.length;n=n.next;){var i=n.data,a=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,a),0==(t-=a)){a===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,e}},{key:u,value:function(t,e){return o(this,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&a(e.prototype,n),c&&a(e,c),t}()},function(t,e){},function(t,e,n){"use strict";(function(e){var r;function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var a=n(63),s=Symbol("lastResolve"),o=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),A=Symbol("lastPromise"),d=Symbol("handlePromise"),p=Symbol("stream");function f(t,e){return{value:t,done:e}}function l(t){var e=t[s];if(null!==e){var n=t[p].read();null!==n&&(t[A]=null,t[s]=null,t[o]=null,e(f(n,!1)))}}function h(t){e.nextTick(l,t)}var y=Object.getPrototypeOf((function(){})),g=Object.setPrototypeOf((i(r={get stream(){return this[p]},next:function(){var t=this,n=this[u];if(null!==n)return Promise.reject(n);if(this[c])return Promise.resolve(f(void 0,!0));if(this[p].destroyed)return new Promise((function(n,r){e.nextTick((function(){t[u]?r(t[u]):n(f(void 0,!0))}))}));var r,i=this[A];if(i)r=new Promise(function(t,e){return function(n,r){t.then((function(){e[c]?n(f(void 0,!0)):e[d](n,r)}),r)}}(i,this));else{var a=this[p].read();if(null!==a)return Promise.resolve(f(a,!1));r=new Promise(this[d])}return this[A]=r,r}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var t=this;return new Promise((function(e,n){t[p].destroy(null,(function(t){t?n(t):e(f(void 0,!0))}))}))})),r),y);t.exports=function(t){var e,n=Object.create(g,(i(e={},p,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,o,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,d,{value:function(t,e){var r=n[p].read();r?(n[A]=null,n[s]=null,n[o]=null,t(f(r,!1))):(n[s]=t,n[o]=e)},writable:!0}),e));return n[A]=null,a(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=n[o];return null!==e&&(n[A]=null,n[s]=null,n[o]=null,e(t)),void(n[u]=t)}var r=n[s];null!==r&&(n[A]=null,n[s]=null,n[o]=null,r(f(void 0,!0))),n[c]=!0})),t.on("readable",h.bind(null,n)),n}}).call(this,n(8))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,n){"use strict";t.exports=i;var r=n(120);function i(t){if(!(this instanceof i))return new i(t);r.call(this,t)}n(0)(i,r),i.prototype._transform=function(t,e,n){n(null,t)}},function(t,e,n){"use strict";var r;var i=n(28).codes,a=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function o(t){if(t)throw t}function u(t,e,i,a){a=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(a);var o=!1;t.on("close",(function(){o=!0})),void 0===r&&(r=n(63)),r(t,{readable:e,writable:i},(function(t){if(t)return a(t);o=!0,a()}));var u=!1;return function(e){if(!o&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void a(e||new s("pipe"))}}function c(t){t()}function A(t,e){return t.pipe(e)}function d(t){return t.length?"function"!=typeof t[t.length-1]?o:t.pop():o}t.exports=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=d(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new a("streams");var s=e.map((function(t,n){var a=n<e.length-1;return u(t,a,n>0,(function(t){r||(r=t),t&&s.forEach(c),a||(s.forEach(c),i(r))}))}));return e.reduce(A)}},function(t,e,n){var r=n(0),i=n(30),a=n(1).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function u(){this.init(),this._w=o,i.call(this,64,56)}function c(t){return t<<30|t>>>2}function A(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}r(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,a=0|this._c,o=0|this._d,u=0|this._e,d=0;d<16;++d)n[d]=t.readInt32BE(4*d);for(;d<80;++d)n[d]=n[d-3]^n[d-8]^n[d-14]^n[d-16];for(var p=0;p<80;++p){var f=~~(p/20),l=0|((e=r)<<5|e>>>27)+A(f,i,a,o)+u+n[p]+s[f];u=o,o=a,a=c(i),i=r,r=l}this._a=r+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=a.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,n){var r=n(0),i=n(30),a=n(1).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function u(){this.init(),this._w=o,i.call(this,64,56)}function c(t){return t<<5|t>>>27}function A(t){return t<<30|t>>>2}function d(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}r(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,a=0|this._c,o=0|this._d,u=0|this._e,p=0;p<16;++p)n[p]=t.readInt32BE(4*p);for(;p<80;++p)n[p]=(e=n[p-3]^n[p-8]^n[p-14]^n[p-16])<<1|e>>>31;for(var f=0;f<80;++f){var l=~~(f/20),h=c(r)+d(l,i,a,o)+u+n[f]+s[l]|0;u=o,o=a,a=A(i),i=r,r=h}this._a=r+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=a.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,n){var r=n(0),i=n(121),a=n(30),s=n(1).Buffer,o=new Array(64);function u(){this.init(),this._w=o,a.call(this,64,56)}r(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=s.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},function(t,e,n){var r=n(0),i=n(122),a=n(30),s=n(1).Buffer,o=new Array(160);function u(){this.init(),this._w=o,a.call(this,128,112)}r(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=s.allocUnsafe(48);function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},function(t,e,n){"use strict";var r=n(0),i=n(1).Buffer,a=n(20),s=i.alloc(128);function o(t,e){a.call(this,"digest"),"string"==typeof e&&(e=i.from(e)),this._alg=t,this._key=e,e.length>64?e=t(e):e.length<64&&(e=i.concat([e,s],64));for(var n=this._ipad=i.allocUnsafe(64),r=this._opad=i.allocUnsafe(64),o=0;o<64;o++)n[o]=54^e[o],r[o]=92^e[o];this._hash=[n]}r(o,a),o.prototype._update=function(t){this._hash.push(t)},o.prototype._final=function(){var t=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,t]))},t.exports=o},function(t,e,n){(function(e){var r,i,a=n(1).Buffer,s=n(126),o=n(127),u=n(128),c=n(129),A=e.crypto&&e.crypto.subtle,d={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},p=[];function f(){return i||(i=e.process&&e.process.nextTick?e.process.nextTick:e.queueMicrotask?e.queueMicrotask:e.setImmediate?e.setImmediate:e.setTimeout)}function l(t,e,n,r,i){return A.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return A.deriveBits({name:"PBKDF2",salt:e,iterations:n,hash:{name:i}},t,r<<3)})).then((function(t){return a.from(t)}))}t.exports=function(t,n,i,h,y,g){"function"==typeof y&&(g=y,y=void 0);var m=d[(y=y||"sha1").toLowerCase()];if(m&&"function"==typeof e.Promise){if(s(i,h),t=c(t,o,"Password"),n=c(n,o,"Salt"),"function"!=typeof g)throw new Error("No callback provided to pbkdf2");!function(t,e){t.then((function(t){f()((function(){e(null,t)}))}),(function(t){f()((function(){e(t)}))}))}(function(t){if(e.process&&!e.process.browser)return Promise.resolve(!1);if(!A||!A.importKey||!A.deriveBits)return Promise.resolve(!1);if(void 0!==p[t])return p[t];var n=l(r=r||a.alloc(8),r,10,128,t).then((function(){return!0})).catch((function(){return!1}));return p[t]=n,n}(m).then((function(e){return e?l(t,n,i,h,m):u(t,n,i,h,y)})),g)}else f()((function(){var e;try{e=u(t,n,i,h,y)}catch(t){return g(t)}g(null,e)}))}}).call(this,n(6))},function(t,e,n){var r=n(20),i=n(298),a=n(0),s=n(1).Buffer,o={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function u(t){r.call(this);var e,n=t.mode.toLowerCase(),i=o[n];e=t.decrypt?"decrypt":"encrypt";var a=t.key;s.isBuffer(a)||(a=s.from(a)),"des-ede"!==n&&"des-ede-cbc"!==n||(a=s.concat([a,a.slice(0,8)]));var u=t.iv;s.isBuffer(u)||(u=s.from(u)),this._des=i.create({key:a,iv:u,type:e})}o.des=o["des-cbc"],o.des3=o["des-ede3-cbc"],t.exports=u,a(u,r),u.prototype._update=function(t){return s.from(this._des.update(t))},u.prototype._final=function(){return s.from(this._des.final())}},function(t,e,n){"use strict";e.utils=n(131),e.Cipher=n(68),e.DES=n(132),e.CBC=n(299),e.EDE=n(300)},function(t,e,n){"use strict";var r=n(10),i=n(0),a={};function s(t){r.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}e.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}i(e,t);for(var n=Object.keys(a),r=0;r<n.length;r++){var s=n[r];e.prototype[s]=a[s]}return e.create=function(t){return new e(t)},e},a._cbcInit=function(){var t=new s(this.options.iv);this._cbcState=t},a._update=function(t,e,n,r){var i=this._cbcState,a=this.constructor.super_.prototype,s=i.iv;if("encrypt"===this.type){for(var o=0;o<this.blockSize;o++)s[o]^=t[e+o];a._update.call(this,s,0,n,r);for(o=0;o<this.blockSize;o++)s[o]=n[r+o]}else{a._update.call(this,t,e,n,r);for(o=0;o<this.blockSize;o++)n[r+o]^=s[o];for(o=0;o<this.blockSize;o++)s[o]=t[e+o]}}},function(t,e,n){"use strict";var r=n(10),i=n(0),a=n(68),s=n(132);function o(t,e){r.equal(e.length,24,"Invalid key length");var n=e.slice(0,8),i=e.slice(8,16),a=e.slice(16,24);this.ciphers="encrypt"===t?[s.create({type:"encrypt",key:n}),s.create({type:"decrypt",key:i}),s.create({type:"encrypt",key:a})]:[s.create({type:"decrypt",key:a}),s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:n})]}function u(t){a.call(this,t);var e=new o(this.type,this.options.key);this._edeState=e}i(u,a),t.exports=u,u.create=function(t){return new u(t)},u.prototype._update=function(t,e,n,r){var i=this._edeState;i.ciphers[0]._update(t,e,n,r),i.ciphers[1]._update(n,r,n,r),i.ciphers[2]._update(n,r,n,r)},u.prototype._pad=s.prototype._pad,u.prototype._unpad=s.prototype._unpad},function(t,e,n){var r=n(70),i=n(136),a=n(1).Buffer,s=n(137),o=n(20),u=n(46),c=n(47);function A(t,e,n){o.call(this),this._cache=new p,this._cipher=new u.AES(e),this._prev=a.from(n),this._mode=t,this._autopadding=!0}n(0)(A,o),A.prototype._update=function(t){var e,n;this._cache.add(t);for(var r=[];e=this._cache.get();)n=this._mode.encrypt(this,e),r.push(n);return a.concat(r)};var d=a.alloc(16,16);function p(){this.cache=a.allocUnsafe(0)}function f(t,e,n){var o=r[t.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=a.from(e)),e.length!==o.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof n&&(n=a.from(n)),"GCM"!==o.mode&&n.length!==o.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===o.type?new s(o.module,e,n):"auth"===o.type?new i(o.module,e,n):new A(o.module,e,n)}A.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(d))throw this._cipher.scrub(),new Error("data not multiple of block length")},A.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},p.prototype.add=function(t){this.cache=a.concat([this.cache,t])},p.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},p.prototype.flush=function(){for(var t=16-this.cache.length,e=a.allocUnsafe(t),n=-1;++n<t;)e.writeUInt8(t,n);return a.concat([this.cache,e])},e.createCipheriv=f,e.createCipher=function(t,e){var n=r[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var i=c(e,!1,n.key,n.iv);return f(t,i.key,i.iv)}},function(t,e){e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},function(t,e,n){var r=n(36);e.encrypt=function(t,e){var n=r(e,t._prev);return t._prev=t._cipher.encryptBlock(n),t._prev},e.decrypt=function(t,e){var n=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return r(i,n)}},function(t,e,n){var r=n(1).Buffer,i=n(36);function a(t,e,n){var a=e.length,s=i(e,t._cache);return t._cache=t._cache.slice(a),t._prev=r.concat([t._prev,n?e:s]),s}e.encrypt=function(t,e,n){for(var i,s=r.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=r.allocUnsafe(0)),!(t._cache.length<=e.length)){s=r.concat([s,a(t,e,n)]);break}i=t._cache.length,s=r.concat([s,a(t,e.slice(0,i),n)]),e=e.slice(i)}return s}},function(t,e,n){var r=n(1).Buffer;function i(t,e,n){var i=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=r.concat([t._prev.slice(1),r.from([n?e:i])]),i}e.encrypt=function(t,e,n){for(var a=e.length,s=r.allocUnsafe(a),o=-1;++o<a;)s[o]=i(t,e[o],n);return s}},function(t,e,n){var r=n(1).Buffer;function i(t,e,n){for(var r,i,s=-1,o=0;++s<8;)r=e&1<<7-s?128:0,o+=(128&(i=t._cipher.encryptBlock(t._prev)[0]^r))>>s%8,t._prev=a(t._prev,n?r:i);return o}function a(t,e){var n=t.length,i=-1,a=r.allocUnsafe(t.length);for(t=r.concat([t,r.from([e])]);++i<n;)a[i]=t[i]<<1|t[i+1]>>7;return a}e.encrypt=function(t,e,n){for(var a=e.length,s=r.allocUnsafe(a),o=-1;++o<a;)s[o]=i(t,e[o],n);return s}},function(t,e,n){(function(t){var r=n(36);function i(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(e,n){for(;e._cache.length<n.length;)e._cache=t.concat([e._cache,i(e)]);var a=e._cache.slice(0,n.length);return e._cache=e._cache.slice(n.length),r(n,a)}}).call(this,n(2).Buffer)},function(t,e,n){var r=n(1).Buffer,i=r.alloc(16,0);function a(t){var e=r.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function s(t){this.h=t,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}s.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},s.prototype._multiply=function(){for(var t,e,n,r=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],i=[0,0,0,0],s=-1;++s<128;){for(0!=(this.state[~~(s/8)]&1<<7-s%8)&&(i[0]^=r[0],i[1]^=r[1],i[2]^=r[2],i[3]^=r[3]),n=0!=(1&r[3]),e=3;e>0;e--)r[e]=r[e]>>>1|(1&r[e-1])<<31;r[0]=r[0]>>>1,n&&(r[0]=r[0]^225<<24)}this.state=a(i)},s.prototype.update=function(t){var e;for(this.cache=r.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},s.prototype.final=function(t,e){return this.cache.length&&this.ghash(r.concat([this.cache,i],16)),this.ghash(a([0,t,0,e])),this.state},t.exports=s},function(t,e,n){var r=n(136),i=n(1).Buffer,a=n(70),s=n(137),o=n(20),u=n(46),c=n(47);function A(t,e,n){o.call(this),this._cache=new d,this._last=void 0,this._cipher=new u.AES(e),this._prev=i.from(n),this._mode=t,this._autopadding=!0}function d(){this.cache=i.allocUnsafe(0)}function p(t,e,n){var o=a[t.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=i.from(n)),"GCM"!==o.mode&&n.length!==o.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof e&&(e=i.from(e)),e.length!==o.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===o.type?new s(o.module,e,n,!0):"auth"===o.type?new r(o.module,e,n,!0):new A(o.module,e,n)}n(0)(A,o),A.prototype._update=function(t){var e,n;this._cache.add(t);for(var r=[];e=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,e),r.push(n);return i.concat(r)},A.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");var n=-1;for(;++n<e;)if(t[n+(16-e)]!==e)throw new Error("unable to decrypt data");if(16===e)return;return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},A.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},d.prototype.add=function(t){this.cache=i.concat([this.cache,t])},d.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},d.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var n=a[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=c(e,!1,n.key,n.iv);return p(t,r.key,r.iv)},e.createDecipheriv=p},function(t,e){e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}},function(t,e){},function(t,e){},function(t){t.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},function(t,e,n){(function(e){var r=n(5),i=new(n(140)),a=new r(24),s=new r(11),o=new r(10),u=new r(3),c=new r(7),A=n(139),d=n(23);function p(t,n){return n=n||"utf8",e.isBuffer(t)||(t=new e(t,n)),this._pub=new r(t),this}function f(t,n){return n=n||"utf8",e.isBuffer(t)||(t=new e(t,n)),this._priv=new r(t),this}t.exports=h;var l={};function h(t,e,n){this.setGenerator(e),this.__prime=new r(t),this._prime=r.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,n?(this.setPublicKey=p,this.setPrivateKey=f):this._primeCode=8}function y(t,n){var r=new e(t.toArray());return n?r.toString(n):r}Object.defineProperty(h.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,e){var n=e.toString("hex"),r=[n,t.toString(16)].join("_");if(r in l)return l[r];var d,p=0;if(t.isEven()||!A.simpleSieve||!A.fermatTest(t)||!i.test(t))return p+=1,p+="02"===n||"05"===n?8:4,l[r]=p,p;switch(i.test(t.shrn(1))||(p+=2),n){case"02":t.mod(a).cmp(s)&&(p+=8);break;case"05":(d=t.mod(o)).cmp(u)&&d.cmp(c)&&(p+=8);break;default:p+=4}return l[r]=p,p}(this.__prime,this.__gen)),this._primeCode}}),h.prototype.generateKeys=function(){return this._priv||(this._priv=new r(d(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},h.prototype.computeSecret=function(t){var n=(t=(t=new r(t)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new e(n.toArray()),a=this.getPrime();if(i.length<a.length){var s=new e(a.length-i.length);s.fill(0),i=e.concat([s,i])}return i},h.prototype.getPublicKey=function(t){return y(this._pub,t)},h.prototype.getPrivateKey=function(t){return y(this._priv,t)},h.prototype.getPrime=function(t){return y(this.__prime,t)},h.prototype.getGenerator=function(t){return y(this._gen,t)},h.prototype.setGenerator=function(t,n){return n=n||"utf8",e.isBuffer(t)||(t=new e(t,n)),this.__gen=t,this._gen=new r(t),this}}).call(this,n(2).Buffer)},function(t,e,n){var r=n(1).Buffer,i=n(66),a=n(72),s=n(73).ec,o=n(5),u=n(49),c=n(152);function A(t,e,n,a){if((t=r.from(t.toArray())).length<e.byteLength()){var s=r.alloc(e.byteLength()-t.length);t=r.concat([s,t])}var o=n.length,u=function(t,e){t=(t=d(t,e)).mod(e);var n=r.from(t.toArray());if(n.length<e.byteLength()){var i=r.alloc(e.byteLength()-n.length);n=r.concat([i,n])}return n}(n,e),c=r.alloc(o);c.fill(1);var A=r.alloc(o);return A=i(a,A).update(c).update(r.from([0])).update(t).update(u).digest(),c=i(a,A).update(c).digest(),{k:A=i(a,A).update(c).update(r.from([1])).update(t).update(u).digest(),v:c=i(a,A).update(c).digest()}}function d(t,e){var n=new o(t),r=(t.length<<3)-e.bitLength();return r>0&&n.ishrn(r),n}function p(t,e,n){var a,s;do{for(a=r.alloc(0);8*a.length<t.bitLength();)e.v=i(n,e.k).update(e.v).digest(),a=r.concat([a,e.v]);s=d(a,t),e.k=i(n,e.k).update(e.v).update(r.from([0])).digest(),e.v=i(n,e.k).update(e.v).digest()}while(-1!==s.cmp(t));return s}function f(t,e,n,r){return t.toRed(o.mont(n)).redPow(e).fromRed().mod(r)}t.exports=function(t,e,n,i,l){var h=u(e);if(h.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return function(t,e){var n=c[e.curve.join(".")];if(!n)throw new Error("unknown curve "+e.curve.join("."));var i=new s(n).keyFromPrivate(e.privateKey).sign(t);return r.from(i.toDER())}(t,h)}if("dsa"===h.type){if("dsa"!==i)throw new Error("wrong private key type");return function(t,e,n){var i,a=e.params.priv_key,s=e.params.p,u=e.params.q,c=e.params.g,l=new o(0),h=d(t,u).mod(u),y=!1,g=A(a,u,t,n);for(;!1===y;)i=p(u,g,n),l=f(c,i,s,u),0===(y=i.invm(u).imul(h.add(a.mul(l))).mod(u)).cmpn(0)&&(y=!1,l=new o(0));return function(t,e){t=t.toArray(),e=e.toArray(),128&t[0]&&(t=[0].concat(t));128&e[0]&&(e=[0].concat(e));var n=[48,t.length+e.length+4,2,t.length];return n=n.concat(t,[2,e.length],e),r.from(n)}(l,y)}(t,h,n)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");t=r.concat([l,t]);for(var y=h.modulus.byteLength(),g=[0,1];t.length+g.length+1<y;)g.push(255);g.push(0);for(var m=-1;++m<t.length;)g.push(t[m]);return a(g,h)},t.exports.getKey=A,t.exports.makeKey=p},function(t){t.exports=JSON.parse('{"name":"elliptic","version":"6.5.4","description":"EC cryptography","main":"lib/elliptic.js","files":["lib"],"scripts":{"lint":"eslint lib test","lint:fix":"npm run lint -- --fix","unit":"istanbul test _mocha --reporter=spec test/index.js","test":"npm run lint && npm run unit","version":"grunt dist && git add dist/"},"repository":{"type":"git","url":"git@github.com:indutny/elliptic"},"keywords":["EC","Elliptic","curve","Cryptography"],"author":"Fedor Indutny <fedor@indutny.com>","license":"MIT","bugs":{"url":"https://github.com/indutny/elliptic/issues"},"homepage":"https://github.com/indutny/elliptic","devDependencies":{"brfs":"^2.0.2","coveralls":"^3.1.0","eslint":"^7.6.0","grunt":"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.5","mocha":"^8.0.1"},"dependencies":{"bn.js":"^4.11.9","brorand":"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1","inherits":"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}')},function(t,e,n){"use strict";var r=n(11),i=n(5),a=n(0),s=n(48),o=r.assert;function u(t){s.call(this,"short",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(t,e,n,r){s.BasePoint.call(this,t,"affine"),null===e&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function A(t,e,n,r){s.BasePoint.call(this,t,"jacobian"),null===e&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(n,16),this.z=new i(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}a(u,s),t.exports=u,u.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,n;if(t.beta)e=new i(t.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);e=(e=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(t.lambda)n=new i(t.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(e))?n=a[0]:(n=a[1],o(0===this.g.mul(n).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:n,basis:t.basis?t.basis.map((function(t){return{a:new i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(n)}}},u.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),n=new i(2).toRed(e).redInvm(),r=n.redNeg(),a=new i(3).toRed(e).redNeg().redSqrt().redMul(n);return[r.redAdd(a).fromRed(),r.redSub(a).fromRed()]},u.prototype._getEndoBasis=function(t){for(var e,n,r,a,s,o,u,c,A,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),p=t,f=this.n.clone(),l=new i(1),h=new i(0),y=new i(0),g=new i(1),m=0;0!==p.cmpn(0);){var b=f.div(p);c=f.sub(b.mul(p)),A=y.sub(b.mul(l));var I=g.sub(b.mul(h));if(!r&&c.cmp(d)<0)e=u.neg(),n=l,r=c.neg(),a=A;else if(r&&2==++m)break;u=c,f=p,p=c,y=l,l=A,g=h,h=I}s=c.neg(),o=A;var C=r.sqr().add(a.sqr());return s.sqr().add(o.sqr()).cmp(C)>=0&&(s=e,o=n),r.negative&&(r=r.neg(),a=a.neg()),s.negative&&(s=s.neg(),o=o.neg()),[{a:r,b:a},{a:s,b:o}]},u.prototype._endoSplit=function(t){var e=this.endo.basis,n=e[0],r=e[1],i=r.b.mul(t).divRound(this.n),a=n.b.neg().mul(t).divRound(this.n),s=i.mul(n.a),o=a.mul(r.a),u=i.mul(n.b),c=a.mul(r.b);return{k1:t.sub(s).sub(o),k2:u.add(c).neg()}},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var n=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var a=r.fromRed().isOdd();return(e&&!a||!e&&a)&&(r=r.redNeg()),this.point(t,r)},u.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,n=t.y,r=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(t,e,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,a=0;a<t.length;a++){var s=this._endoSplit(e[a]),o=t[a],u=o._getBeta();s.k1.negative&&(s.k1.ineg(),o=o.neg(!0)),s.k2.negative&&(s.k2.ineg(),u=u.neg(!0)),r[2*a]=o,r[2*a+1]=u,i[2*a]=s.k1,i[2*a+1]=s.k2}for(var c=this._wnafMulAdd(1,r,i,2*a,n),A=0;A<2*a;A++)r[A]=null,i[A]=null;return c},a(c,s.BasePoint),u.prototype.point=function(t,e,n){return new c(this,t,e,n)},u.prototype.pointFromJSON=function(t,e){return c.fromJSON(this,t,e)},c.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var n=this.curve,r=function(t){return n.point(t.x.redMul(n.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(r)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(r)}}}return e}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(t,e,n){"string"==typeof e&&(e=JSON.parse(e));var r=t.point(e[0],e[1],n);if(!e[2])return r;function i(e){return t.point(e[0],e[1],n)}var a=e[2];return r.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[r].concat(a.doubles.points.map(i))},naf:a.naf&&{wnd:a.naf.wnd,points:[r].concat(a.naf.points.map(i))}},r},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var n=e.redSqr().redISub(this.x).redISub(t.x),r=e.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},c.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,n=this.x.redSqr(),r=t.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(e).redMul(r),a=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,n){var r=[this,e],i=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},c.prototype.jmulAdd=function(t,e,n){var r=[this,e],i=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},c.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},c.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var n=this.precomputed,r=function(t){return t.neg()};e.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 e},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(A,s.BasePoint),u.prototype.jpoint=function(t,e,n){return new A(this,t,e,n)},A.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),n=this.x.redMul(e),r=this.y.redMul(e).redMul(t);return this.curve.point(n,r)},A.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},A.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(e),i=t.x.redMul(n),a=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(n.redMul(this.z)),o=r.redSub(i),u=a.redSub(s);if(0===o.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=o.redSqr(),A=c.redMul(o),d=r.redMul(c),p=u.redSqr().redIAdd(A).redISub(d).redISub(d),f=u.redMul(d.redISub(p)).redISub(a.redMul(A)),l=this.z.redMul(t.z).redMul(o);return this.curve.jpoint(p,f,l)},A.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),n=this.x,r=t.x.redMul(e),i=this.y,a=t.y.redMul(e).redMul(this.z),s=n.redSub(r),o=i.redSub(a);if(0===s.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),c=u.redMul(s),A=n.redMul(u),d=o.redSqr().redIAdd(c).redISub(A).redISub(A),p=o.redMul(A.redISub(d)).redISub(i.redMul(c)),f=this.z.redMul(s);return this.curve.jpoint(d,p,f)},A.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var n=this;for(e=0;e<t;e++)n=n.dbl();return n}var r=this.curve.a,i=this.curve.tinv,a=this.x,s=this.y,o=this.z,u=o.redSqr().redSqr(),c=s.redAdd(s);for(e=0;e<t;e++){var A=a.redSqr(),d=c.redSqr(),p=d.redSqr(),f=A.redAdd(A).redIAdd(A).redIAdd(r.redMul(u)),l=a.redMul(d),h=f.redSqr().redISub(l.redAdd(l)),y=l.redISub(h),g=f.redMul(y);g=g.redIAdd(g).redISub(p);var m=c.redMul(o);e+1<t&&(u=u.redMul(p)),a=h,o=m,c=g}return this.curve.jpoint(a,c.redMul(i),o)},A.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},A.prototype._zeroDbl=function(){var t,e,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(r).redISub(a);s=s.redIAdd(s);var o=r.redAdd(r).redIAdd(r),u=o.redSqr().redISub(s).redISub(s),c=a.redIAdd(a);c=(c=c.redIAdd(c)).redIAdd(c),t=u,e=o.redMul(s.redISub(u)).redISub(c),n=this.y.redAdd(this.y)}else{var A=this.x.redSqr(),d=this.y.redSqr(),p=d.redSqr(),f=this.x.redAdd(d).redSqr().redISub(A).redISub(p);f=f.redIAdd(f);var l=A.redAdd(A).redIAdd(A),h=l.redSqr(),y=p.redIAdd(p);y=(y=y.redIAdd(y)).redIAdd(y),t=h.redISub(f).redISub(f),e=l.redMul(f.redISub(t)).redISub(y),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(t,e,n)},A.prototype._threeDbl=function(){var t,e,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(r).redISub(a);s=s.redIAdd(s);var o=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),u=o.redSqr().redISub(s).redISub(s);t=u;var c=a.redIAdd(a);c=(c=c.redIAdd(c)).redIAdd(c),e=o.redMul(s.redISub(u)).redISub(c),n=this.y.redAdd(this.y)}else{var A=this.z.redSqr(),d=this.y.redSqr(),p=this.x.redMul(d),f=this.x.redSub(A).redMul(this.x.redAdd(A));f=f.redAdd(f).redIAdd(f);var l=p.redIAdd(p),h=(l=l.redIAdd(l)).redAdd(l);t=f.redSqr().redISub(h),n=this.y.redAdd(this.z).redSqr().redISub(d).redISub(A);var y=d.redSqr();y=(y=(y=y.redIAdd(y)).redIAdd(y)).redIAdd(y),e=f.redMul(l.redISub(t)).redISub(y)}return this.curve.jpoint(t,e,n)},A.prototype._dbl=function(){var t=this.curve.a,e=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),a=e.redSqr(),s=n.redSqr(),o=a.redAdd(a).redIAdd(a).redIAdd(t.redMul(i)),u=e.redAdd(e),c=(u=u.redIAdd(u)).redMul(s),A=o.redSqr().redISub(c.redAdd(c)),d=c.redISub(A),p=s.redSqr();p=(p=(p=p.redIAdd(p)).redIAdd(p)).redIAdd(p);var f=o.redMul(d).redISub(p),l=n.redAdd(n).redMul(r);return this.curve.jpoint(A,f,l)},A.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),n=this.z.redSqr(),r=e.redSqr(),i=t.redAdd(t).redIAdd(t),a=i.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(r),o=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(a)).redSqr(),u=r.redIAdd(r);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=i.redIAdd(s).redSqr().redISub(a).redISub(o).redISub(u),A=e.redMul(c);A=(A=A.redIAdd(A)).redIAdd(A);var d=this.x.redMul(o).redISub(A);d=(d=d.redIAdd(d)).redIAdd(d);var p=this.y.redMul(c.redMul(u.redISub(c)).redISub(s.redMul(o)));p=(p=(p=p.redIAdd(p)).redIAdd(p)).redIAdd(p);var f=this.z.redAdd(s).redSqr().redISub(n).redISub(o);return this.curve.jpoint(d,p,f)},A.prototype.mul=function(t,e){return t=new i(t,e),this.curve._wnafMul(this,t)},A.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),n=t.z.redSqr();if(0!==this.x.redMul(n).redISub(t.x.redMul(e)).cmpn(0))return!1;var r=e.redMul(this.z),i=n.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(r)).cmpn(0)},A.prototype.eqXToP=function(t){var e=this.z.redSqr(),n=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(n))return!0;for(var r=t.clone(),i=this.curve.redN.redMul(e);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},A.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},A.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(t,e,n){"use strict";var r=n(5),i=n(0),a=n(48),s=n(11);function o(t){a.call(this,"mont",t),this.a=new r(t.a,16).toRed(this.red),this.b=new r(t.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(t,e,n){a.BasePoint.call(this,t,"projective"),null===e&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(e,16),this.z=new r(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(o,a),t.exports=o,o.prototype.validate=function(t){var e=t.normalize().x,n=e.redSqr(),r=n.redMul(e).redAdd(n.redMul(this.a)).redAdd(e);return 0===r.redSqrt().redSqr().cmp(r)},i(u,a.BasePoint),o.prototype.decodePoint=function(t,e){return this.point(s.toArray(t,e),1)},o.prototype.point=function(t,e){return new u(this,t,e)},o.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(t,e){return new u(t,e[0],e[1]||t.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),n=t.redSub(e),r=t.redMul(e),i=n.redMul(e.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(t,e){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=t.x.redAdd(t.z),a=t.x.redSub(t.z).redMul(n),s=i.redMul(r),o=e.z.redMul(a.redAdd(s).redSqr()),u=e.x.redMul(a.redISub(s).redSqr());return this.curve.point(o,u)},u.prototype.mul=function(t){for(var e=t.clone(),n=this,r=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var a=i.length-1;a>=0;a--)0===i[a]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(t,e,n){"use strict";var r=n(11),i=n(5),a=n(0),s=n(48),o=r.assert;function u(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,s.call(this,"edwards",t),this.a=new i(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),o(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function c(t,e,n,r,a){s.BasePoint.call(this,t,"projective"),null===e&&null===n&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(e,16),this.y=new i(n,16),this.z=r?new i(r,16):this.curve.one,this.t=a&&new i(a,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}a(u,s),t.exports=u,u.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},u.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},u.prototype.jpoint=function(t,e,n,r){return this.point(t,e,n,r)},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var n=t.redSqr(),r=this.c2.redSub(this.a.redMul(n)),a=this.one.redSub(this.c2.redMul(this.d).redMul(n)),s=r.redMul(a.redInvm()),o=s.redSqrt();if(0!==o.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var u=o.fromRed().isOdd();return(e&&!u||!e&&u)&&(o=o.redNeg()),this.point(t,o)},u.prototype.pointFromY=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var n=t.redSqr(),r=n.redSub(this.c2),a=n.redMul(this.d).redMul(this.c2).redSub(this.a),s=r.redMul(a.redInvm());if(0===s.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var o=s.redSqrt();if(0!==o.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return o.fromRed().isOdd()!==e&&(o=o.redNeg()),this.point(o,t)},u.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),n=t.y.redSqr(),r=e.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(n)));return 0===r.cmp(i)},a(c,s.BasePoint),u.prototype.pointFromJSON=function(t){return c.fromJSON(this,t)},u.prototype.point=function(t,e,n,r){return new c(this,t,e,n,r)},c.fromJSON=function(t,e){return new c(t,e[0],e[1],e[2])},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),a=r.redAdd(e),s=a.redSub(n),o=r.redSub(e),u=i.redMul(s),c=a.redMul(o),A=i.redMul(o),d=s.redMul(a);return this.curve.point(u,c,d,A)},c.prototype._projDbl=function(){var t,e,n,r,i,a,s=this.x.redAdd(this.y).redSqr(),o=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var c=(r=this.curve._mulA(o)).redAdd(u);this.zOne?(t=s.redSub(o).redSub(u).redMul(c.redSub(this.curve.two)),e=c.redMul(r.redSub(u)),n=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),a=c.redSub(i).redISub(i),t=s.redSub(o).redISub(u).redMul(a),e=c.redMul(r.redSub(u)),n=c.redMul(a))}else r=o.redAdd(u),i=this.curve._mulC(this.z).redSqr(),a=r.redSub(i).redSub(i),t=this.curve._mulC(s.redISub(r)).redMul(a),e=this.curve._mulC(r).redMul(o.redISub(u)),n=r.redMul(a);return this.curve.point(t,e,n)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),n=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),r=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),a=n.redSub(e),s=i.redSub(r),o=i.redAdd(r),u=n.redAdd(e),c=a.redMul(s),A=o.redMul(u),d=a.redMul(u),p=s.redMul(o);return this.curve.point(c,A,p,d)},c.prototype._projAdd=function(t){var e,n,r=this.z.redMul(t.z),i=r.redSqr(),a=this.x.redMul(t.x),s=this.y.redMul(t.y),o=this.curve.d.redMul(a).redMul(s),u=i.redSub(o),c=i.redAdd(o),A=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(a).redISub(s),d=r.redMul(u).redMul(A);return this.curve.twisted?(e=r.redMul(c).redMul(s.redSub(this.curve._mulA(a))),n=u.redMul(c)):(e=r.redMul(c).redMul(s.redSub(a)),n=this.curve._mulC(u).redMul(c)),this.curve.point(d,e,n)},c.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},c.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,n){return this.curve._wnafMulAdd(1,[this,e],[t,n],2,!1)},c.prototype.jmulAdd=function(t,e,n){return this.curve._wnafMulAdd(1,[this,e],[t,n],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},c.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var n=t.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(r),0===this.x.cmp(e))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},function(t,e,n){"use strict";e.sha1=n(321),e.sha224=n(322),e.sha256=n(145),e.sha384=n(323),e.sha512=n(146)},function(t,e,n){"use strict";var r=n(16),i=n(37),a=n(144),s=r.rotl32,o=r.sum32,u=r.sum32_5,c=a.ft_1,A=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function p(){if(!(this instanceof p))return new p;A.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(p,A),t.exports=p,p.blockSize=512,p.outSize=160,p.hmacStrength=80,p.padLength=64,p.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r<n.length;r++)n[r]=s(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],a=this.h[1],A=this.h[2],p=this.h[3],f=this.h[4];for(r=0;r<n.length;r++){var l=~~(r/20),h=u(s(i,5),c(l,a,A,p),f,n[r],d[l]);f=p,p=A,A=s(a,30),a=i,i=h}this.h[0]=o(this.h[0],i),this.h[1]=o(this.h[1],a),this.h[2]=o(this.h[2],A),this.h[3]=o(this.h[3],p),this.h[4]=o(this.h[4],f)},p.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(t,e,n){"use strict";var r=n(16),i=n(145);function a(){if(!(this instanceof a))return new a;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(a,i),t.exports=a,a.blockSize=512,a.outSize=224,a.hmacStrength=192,a.padLength=64,a.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},function(t,e,n){"use strict";var r=n(16),i=n(146);function a(){if(!(this instanceof a))return new a;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(a,i),t.exports=a,a.blockSize=1024,a.outSize=384,a.hmacStrength=192,a.padLength=128,a.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}},function(t,e,n){"use strict";var r=n(16),i=n(37),a=r.rotl32,s=r.sum32,o=r.sum32_3,u=r.sum32_4,c=i.BlockHash;function A(){if(!(this instanceof A))return new A;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function d(t,e,n,r){return t<=15?e^n^r:t<=31?e&n|~e&r:t<=47?(e|~n)^r:t<=63?e&r|n&~r:e^(n|~r)}function p(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function f(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}r.inherits(A,c),e.ripemd160=A,A.blockSize=512,A.outSize=160,A.hmacStrength=192,A.padLength=64,A.prototype._update=function(t,e){for(var n=this.h[0],r=this.h[1],i=this.h[2],c=this.h[3],A=this.h[4],m=n,b=r,I=i,C=c,v=A,E=0;E<80;E++){var w=s(a(u(n,d(E,r,i,c),t[l[E]+e],p(E)),y[E]),A);n=A,A=c,c=a(i,10),i=r,r=w,w=s(a(u(m,d(79-E,b,I,C),t[h[E]+e],f(E)),g[E]),v),m=v,v=C,C=a(I,10),I=b,b=w}w=o(this.h[1],i,C),this.h[1]=o(this.h[2],c,v),this.h[2]=o(this.h[3],A,m),this.h[3]=o(this.h[4],n,b),this.h[4]=o(this.h[0],r,I),this.h[0]=w},A.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var l=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],h=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],g=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(t,e,n){"use strict";var r=n(16),i=n(10);function a(t,e,n){if(!(this instanceof a))return new a(t,e,n);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(e,n))}t.exports=a,a.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},a.prototype.update=function(t,e){return this.inner.update(t,e),this},a.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},function(t,e){t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(5),a=n(328),s=n(11),o=n(74),u=n(71),c=s.assert,A=n(329),d=n(330);function p(t){if(!(this instanceof p))return new p(t);"string"==typeof t&&(c(Object.prototype.hasOwnProperty.call(o,t),"Unknown curve "+t),t=o[t]),t instanceof o.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=p,p.prototype.keyPair=function(t){return new A(this,t)},p.prototype.keyFromPrivate=function(t,e){return A.fromPrivate(this,t,e)},p.prototype.keyFromPublic=function(t,e){return A.fromPublic(this,t,e)},p.prototype.genKeyPair=function(t){t||(t={});for(var e=new a({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||u(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),r=this.n.sub(new i(2));;){var s=new i(e.generate(n));if(!(s.cmp(r)>0))return s.iaddn(1),this.keyFromPrivate(s)}},p.prototype._truncateToN=function(t,e){var n=8*t.byteLength()-this.n.bitLength();return n>0&&(t=t.ushrn(n)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},p.prototype.sign=function(t,e,n,s){"object"===r(n)&&(s=n,n=null),s||(s={}),e=this.keyFromPrivate(e,n),t=this._truncateToN(new i(t,16));for(var o=this.n.byteLength(),u=e.getPrivate().toArray("be",o),c=t.toArray("be",o),A=new a({hash:this.hash,entropy:u,nonce:c,pers:s.pers,persEnc:s.persEnc||"utf8"}),p=this.n.sub(new i(1)),f=0;;f++){var l=s.k?s.k(f):new i(A.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(p)>=0)){var h=this.g.mul(l);if(!h.isInfinity()){var y=h.getX(),g=y.umod(this.n);if(0!==g.cmpn(0)){var m=l.invm(this.n).mul(g.mul(e.getPrivate()).iadd(t));if(0!==(m=m.umod(this.n)).cmpn(0)){var b=(h.getY().isOdd()?1:0)|(0!==y.cmp(g)?2:0);return s.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),b^=1),new d({r:g,s:m,recoveryParam:b})}}}}}},p.prototype.verify=function(t,e,n,r){t=this._truncateToN(new i(t,16)),n=this.keyFromPublic(n,r);var a=(e=new d(e,"hex")).r,s=e.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o,u=s.invm(this.n),c=u.mul(t).umod(this.n),A=u.mul(a).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(c,n.getPublic(),A)).isInfinity()&&o.eqXToP(a):!(o=this.g.mulAdd(c,n.getPublic(),A)).isInfinity()&&0===o.getX().umod(this.n).cmp(a)},p.prototype.recoverPubKey=function(t,e,n,r){c((3&n)===n,"The recovery param is more than two bits"),e=new d(e,r);var a=this.n,s=new i(t),o=e.r,u=e.s,A=1&n,p=n>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");o=p?this.curve.pointFromX(o.add(this.curve.n),A):this.curve.pointFromX(o,A);var f=e.r.invm(a),l=a.sub(s).mul(f).umod(a),h=u.mul(f).umod(a);return this.g.mulAdd(l,o,h)},p.prototype.getKeyRecoveryParam=function(t,e,n,r){if(null!==(e=new d(e,r)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(t,e,i)}catch(t){continue}if(a.eq(n))return i}throw new Error("Unable to find valid recovery factor")}},function(t,e,n){"use strict";var r=n(75),i=n(142),a=n(10);function s(t){if(!(this instanceof s))return new s(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),n=i.toArray(t.nonce,t.nonceEnc||"hex"),r=i.toArray(t.pers,t.persEnc||"hex");a(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,n,r)}t.exports=s,s.prototype._init=function(t,e,n){var r=t.concat(e).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new r.hmac(this.hash,this.K)},s.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(t,e,n,r){"string"!=typeof e&&(r=n,n=e,e=null),t=i.toArray(t,e),n=i.toArray(n,r),a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(n||[])),this._reseed=1},s.prototype.generate=function(t,e,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(r=n,n=e,e=null),n&&(n=i.toArray(n,r||"hex"),this._update(n));for(var a=[];a.length<t;)this.V=this._hmac().update(this.V).digest(),a=a.concat(this.V);var s=a.slice(0,t);return this._update(n),this._reseed++,i.encode(s,e)}},function(t,e,n){"use strict";var r=n(5),i=n(11).assert;function a(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=a,a.fromPublic=function(t,e,n){return e instanceof a?e:new a(t,{pub:e,pubEnc:n})},a.fromPrivate=function(t,e,n){return e instanceof a?e:new a(t,{priv:e,privEnc:n})},a.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},a.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},a.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(t,e){this.priv=new r(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?i(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},a.prototype.derive=function(t){return t.validate()||i(t.validate(),"public point not validated"),t.mul(this.priv).getX()},a.prototype.sign=function(t,e,n){return this.ec.sign(t,this,e,n)},a.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},a.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(t,e,n){"use strict";var r=n(5),i=n(11),a=i.assert;function s(t,e){if(t instanceof s)return t;this._importDER(t,e)||(a(t.r&&t.s,"Signature without r or s"),this.r=new r(t.r,16),this.s=new r(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function o(){this.place=0}function u(t,e){var n=t[e.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;for(var i=0,a=0,s=e.place;a<r;a++,s++)i<<=8,i|=t[s],i>>>=0;return!(i<=127)&&(e.place=s,i)}function c(t){for(var e=0,n=t.length-1;!t[e]&&!(128&t[e+1])&&e<n;)e++;return 0===e?t:t.slice(e)}function A(t,e){if(e<128)t.push(e);else{var n=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|n);--n;)t.push(e>>>(n<<3)&255);t.push(e)}}t.exports=s,s.prototype._importDER=function(t,e){t=i.toArray(t,e);var n=new o;if(48!==t[n.place++])return!1;var a=u(t,n);if(!1===a)return!1;if(a+n.place!==t.length)return!1;if(2!==t[n.place++])return!1;var s=u(t,n);if(!1===s)return!1;var c=t.slice(n.place,s+n.place);if(n.place+=s,2!==t[n.place++])return!1;var A=u(t,n);if(!1===A)return!1;if(t.length!==A+n.place)return!1;var d=t.slice(n.place,A+n.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new r(c),this.s=new r(d),this.recoveryParam=null,!0},s.prototype.toDER=function(t){var e=this.r.toArray(),n=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&n[0]&&(n=[0].concat(n)),e=c(e),n=c(n);!(n[0]||128&n[1]);)n=n.slice(1);var r=[2];A(r,e.length),(r=r.concat(e)).push(2),A(r,n.length);var a=r.concat(n),s=[48];return A(s,a.length),s=s.concat(a),i.encode(s,t)}},function(t,e,n){"use strict";var r=n(75),i=n(74),a=n(11),s=a.assert,o=a.parseBytes,u=n(332),c=n(333);function A(t){if(s("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof A))return new A(t);t=i[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=r.sha512}t.exports=A,A.prototype.sign=function(t,e){t=o(t);var n=this.keyFromSecret(e),r=this.hashInt(n.messagePrefix(),t),i=this.g.mul(r),a=this.encodePoint(i),s=this.hashInt(a,n.pubBytes(),t).mul(n.priv()),u=r.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:a})},A.prototype.verify=function(t,e,n){t=o(t),e=this.makeSignature(e);var r=this.keyFromPublic(n),i=this.hashInt(e.Rencoded(),r.pubBytes(),t),a=this.g.mul(e.S());return e.R().add(r.pub().mul(i)).eq(a)},A.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return a.intFromLE(t.digest()).umod(this.curve.n)},A.prototype.keyFromPublic=function(t){return u.fromPublic(this,t)},A.prototype.keyFromSecret=function(t){return u.fromSecret(this,t)},A.prototype.makeSignature=function(t){return t instanceof c?t:new c(this,t)},A.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},A.prototype.decodePoint=function(t){var e=(t=a.parseBytes(t)).length-1,n=t.slice(0,e).concat(-129&t[e]),r=0!=(128&t[e]),i=a.intFromLE(n);return this.curve.pointFromY(i,r)},A.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},A.prototype.decodeInt=function(t){return a.intFromLE(t)},A.prototype.isPoint=function(t){return t instanceof this.pointClass}},function(t,e,n){"use strict";var r=n(11),i=r.assert,a=r.parseBytes,s=r.cachedProperty;function o(t,e){this.eddsa=t,this._secret=a(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=a(e.pub)}o.fromPublic=function(t,e){return e instanceof o?e:new o(t,{pub:e})},o.fromSecret=function(t,e){return e instanceof o?e:new o(t,{secret:e})},o.prototype.secret=function(){return this._secret},s(o,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),s(o,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(o,"privBytes",(function(){var t=this.eddsa,e=this.hash(),n=t.encodingLength-1,r=e.slice(0,t.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r})),s(o,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(o,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(o,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),o.prototype.sign=function(t){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},o.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},o.prototype.getSecret=function(t){return i(this._secret,"KeyPair is public only"),r.encode(this.secret(),t)},o.prototype.getPublic=function(t){return r.encode(this.pubBytes(),t)},t.exports=o},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(5),a=n(11),s=a.assert,o=a.cachedProperty,u=a.parseBytes;function c(t,e){this.eddsa=t,"object"!==r(e)&&(e=u(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),s(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof i&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}o(c,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),o(c,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),o(c,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),o(c,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),c.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},c.prototype.toHex=function(){return a.encode(this.toBytes(),"hex").toUpperCase()},t.exports=c},function(t,e,n){"use strict";var r=n(147);e.certificate=n(340);var i=r.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));e.RSAPrivateKey=i;var a=r.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));e.RSAPublicKey=a;var s=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}));e.PublicKey=s;var o=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),u=r.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(o),this.key("subjectPrivateKey").octstr())}));e.PrivateKey=u;var c=r.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));e.EncryptedPrivateKey=c;var A=r.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));e.DSAPrivateKey=A,e.DSAparam=r.define("DSAparam",(function(){this.int()}));var d=r.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(p),this.key("publicKey").optional().explicit(1).bitstr())}));e.ECPrivateKey=d;var p=r.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));e.signature=r.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},function(t,e,n){"use strict";var r=n(148),i=n(150),a=n(0);function s(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}e.define=function(t,e){return new s(t,e)},s.prototype._createNamed=function(t){var e=this.name;function n(t){this._initNamed(t,e)}return a(n,t),n.prototype._initNamed=function(e,n){t.call(this,e,n)},new n(this)},s.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(i[t])),this.decoders[t]},s.prototype.decode=function(t,e,n){return this._getDecoder(e).decode(t,n)},s.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(r[t])),this.encoders[t]},s.prototype.encode=function(t,e,n){return this._getEncoder(e).encode(t,n)}},function(t,e,n){"use strict";var r=n(0),i=n(149);function a(t){i.call(this,t),this.enc="pem"}r(a,i),t.exports=a,a.prototype.encode=function(t,e){for(var n=i.prototype.encode.call(this,t).toString("base64"),r=["-----BEGIN "+e.label+"-----"],a=0;a<n.length;a+=64)r.push(n.slice(a,a+64));return r.push("-----END "+e.label+"-----"),r.join("\n")}},function(t,e,n){"use strict";var r=n(0),i=n(76).Buffer,a=n(151);function s(t){a.call(this,t),this.enc="pem"}r(s,a),t.exports=s,s.prototype.decode=function(t,e){for(var n=t.toString().split(/[\r\n]+/g),r=e.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/,o=-1,u=-1,c=0;c<n.length;c++){var A=n[c].match(s);if(null!==A&&A[2]===r){if(-1!==o){if("END"!==A[1])break;u=c;break}if("BEGIN"!==A[1])break;o=c}}if(-1===o||-1===u)throw new Error("PEM section not found for: "+r);var d=n.slice(o+1,u).join("");d.replace(/[^a-z0-9+/=]+/gi,"");var p=i.from(d,"base64");return a.prototype.decode.call(this,p,e)}},function(t,e,n){"use strict";var r=e;r.Reporter=n(78).Reporter,r.DecoderBuffer=n(38).DecoderBuffer,r.EncoderBuffer=n(38).EncoderBuffer,r.Node=n(77)},function(t,e,n){"use strict";var r=e;r._reverse=function(t){var e={};return Object.keys(t).forEach((function(n){(0|n)==n&&(n|=0);var r=t[n];e[r]=n})),e},r.der=n(79)},function(t,e,n){"use strict";var r=n(147),i=r.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),a=r.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),o=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),u=r.define("RelativeDistinguishedName",(function(){this.setof(a)})),c=r.define("RDNSequence",(function(){this.seqof(u)})),A=r.define("Name",(function(){this.choice({rdnSequence:this.use(c)})})),d=r.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),p=r.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),f=r.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(A),this.key("validity").use(d),this.key("subject").use(A),this.key("subjectPublicKeyInfo").use(o),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(p).optional())})),l=r.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(f),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));t.exports=l},function(t){t.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},function(t,e,n){var r=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,a=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,s=n(47),o=n(69),u=n(1).Buffer;t.exports=function(t,e){var n,c=t.toString(),A=c.match(r);if(A){var d="aes"+A[1],p=u.from(A[2],"hex"),f=u.from(A[3].replace(/[\r\n]/g,""),"base64"),l=s(e,p.slice(0,8),parseInt(A[1],10)).key,h=[],y=o.createDecipheriv(d,l,p);h.push(y.update(f)),h.push(y.final()),n=u.concat(h)}else{var g=c.match(a);n=u.from(g[2].replace(/[\r\n]/g,""),"base64")}return{tag:c.match(i)[1],data:n}}},function(t,e,n){var r=n(1).Buffer,i=n(5),a=n(73).ec,s=n(49),o=n(152);function u(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=e)throw new Error("invalid sig")}t.exports=function(t,e,n,c,A){var d=s(n);if("ec"===d.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(t,e,n){var r=o[n.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var i=new a(r),s=n.data.subjectPrivateKey.data;return i.verify(e,t,s)}(t,e,d)}if("dsa"===d.type){if("dsa"!==c)throw new Error("wrong public key type");return function(t,e,n){var r=n.data.p,a=n.data.q,o=n.data.g,c=n.data.pub_key,A=s.signature.decode(t,"der"),d=A.s,p=A.r;u(d,a),u(p,a);var f=i.mont(r),l=d.invm(a);return 0===o.toRed(f).redPow(new i(e).mul(l).mod(a)).fromRed().mul(c.toRed(f).redPow(p.mul(l).mod(a)).fromRed()).mod(r).mod(a).cmp(p)}(t,e,d)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");e=r.concat([A,e]);for(var p=d.modulus.byteLength(),f=[1],l=0;e.length+f.length+2<p;)f.push(255),l++;f.push(0);for(var h=-1;++h<e.length;)f.push(e[h]);f=r.from(f);var y=i.mont(d.modulus);t=(t=new i(t).toRed(y)).redPow(new i(d.publicExponent)),t=r.from(t.fromRed().toArray());var g=l<8?1:0;for(p=Math.min(t.length,f.length),t.length!==f.length&&(g=1),h=-1;++h<p;)g|=t[h]^f[h];return 0===g}},function(t,e,n){var r=n(49),i=n(23),a=n(27),s=n(155),o=n(156),u=n(5),c=n(157),A=n(72),d=n(1).Buffer;t.exports=function(t,e,n){var p;p=t.padding?t.padding:n?1:4;var f,l=r(t);if(4===p)f=function(t,e){var n=t.modulus.byteLength(),r=e.length,c=a("sha1").update(d.alloc(0)).digest(),A=c.length,p=2*A;if(r>n-p-2)throw new Error("message too long");var f=d.alloc(n-r-p-2),l=n-A-1,h=i(A),y=o(d.concat([c,f,d.alloc(1,1),e],l),s(h,l)),g=o(h,s(y,A));return new u(d.concat([d.alloc(1),g,y],n))}(l,e);else if(1===p)f=function(t,e,n){var r,a=e.length,s=t.modulus.byteLength();if(a>s-11)throw new Error("message too long");r=n?d.alloc(s-a-3,255):function(t){var e,n=d.allocUnsafe(t),r=0,a=i(2*t),s=0;for(;r<t;)s===a.length&&(a=i(2*t),s=0),(e=a[s++])&&(n[r++]=e);return n}(s-a-3);return new u(d.concat([d.from([0,n?1:2]),r,d.alloc(1),e],s))}(l,e,n);else{if(3!==p)throw new Error("unknown padding");if((f=new u(e)).cmp(l.modulus)>=0)throw new Error("data too long for modulus")}return n?A(f,l):c(f,l)}},function(t,e,n){var r=n(49),i=n(155),a=n(156),s=n(5),o=n(72),u=n(27),c=n(157),A=n(1).Buffer;t.exports=function(t,e,n){var d;d=t.padding?t.padding:n?1:4;var p,f=r(t),l=f.modulus.byteLength();if(e.length>l||new s(e).cmp(f.modulus)>=0)throw new Error("decryption error");p=n?c(new s(e),f):o(e,f);var h=A.alloc(l-p.length);if(p=A.concat([h,p],l),4===d)return function(t,e){var n=t.modulus.byteLength(),r=u("sha1").update(A.alloc(0)).digest(),s=r.length;if(0!==e[0])throw new Error("decryption error");var o=e.slice(1,s+1),c=e.slice(s+1),d=a(o,i(c,s)),p=a(c,i(d,n-s-1));if(function(t,e){t=A.from(t),e=A.from(e);var n=0,r=t.length;t.length!==e.length&&(n++,r=Math.min(t.length,e.length));var i=-1;for(;++i<r;)n+=t[i]^e[i];return n}(r,p.slice(0,s)))throw new Error("decryption error");var f=s;for(;0===p[f];)f++;if(1!==p[f++])throw new Error("decryption error");return p.slice(f)}(f,p);if(1===d)return function(t,e,n){var r=e.slice(0,2),i=2,a=0;for(;0!==e[i++];)if(i>=e.length){a++;break}var s=e.slice(2,i-1);("0002"!==r.toString("hex")&&!n||"0001"!==r.toString("hex")&&n)&&a++;s.length<8&&a++;if(a)throw new Error("decryption error");return e.slice(i)}(0,p,n);if(3===d)return p;throw new Error("unknown padding")}},function(t,e,n){(function(e){var r=n(62).Transform,i=n(0);function a(t){r.call(this,t),this._destroyed=!1}function s(t,e,n){n(null,t)}function o(t){return function(e,n,r){return"function"==typeof e&&(r=n,n=e,e={}),"function"!=typeof n&&(n=s),"function"!=typeof r&&(r=null),t(e,n,r)}}i(a,r),a.prototype.destroy=function(t){if(!this._destroyed){this._destroyed=!0;var n=this;e.nextTick((function(){t&&n.emit("error",t),n.emit("close")}))}},t.exports=o((function(t,e,n){var r=new a(t);return r._transform=e,n&&(r._flush=n),r})),t.exports.ctor=o((function(t,e,n){function r(e){if(!(this instanceof r))return new r(e);this.options=Object.assign({},t,e),a.call(this,this.options)}return i(r,a),r.prototype._transform=e,n&&(r.prototype._flush=n),r})),t.exports.obj=o((function(t,e,n){var r=new a(Object.assign({objectMode:!0,highWaterMark:16},t));return r._transform=e,n&&(r._flush=n),r}))}).call(this,n(8))},function(t,e,n){var r=n(7),i=n(24),a=n(3),s=n(4);function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var c=n(19),A=c.ValidatePresence,d=c.ValidateLibrary,p=c.ValidateObject,f=c.ValidateAddress;e.ListAccessGroups=s(a.mark((function t(){var e,n,r=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.Collection({collectionType:"accessGroups"});case 2:return e=t.sent.map((function(t){return r.utils.FormatAddress(t)})),t.next=5,this.utils.LimitedMap(5,e,function(){var t=s(a.mark((function t(e){var n,i;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.utils.AddressToHash(e),t.next=3,r.ContentObjectMetadata({libraryId:r.contentSpaceLibraryId,objectId:"iq__".concat(n)});case 3:if(t.t0=t.sent,t.t0){t.next=6;break}t.t0={};case 6:return i=t.t0,t.abrupt("return",{address:e,id:"igrp".concat(n),meta:i});case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 5:return n=t.sent,t.abrupt("return",n.sort((function(t,e){return((t.meta.public||{}).name||"zz__".concat(t.address))<((e.meta.public||{}).name||"zz__".concat(e.address))?-1:1})));case 7:case"end":return t.stop()}}),t,this)}))),e.SetGroupPermission=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u,c,A;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.groupAddress,r=e.objectId,i=e.permission,s=e.remove,o=void 0!==s&&s,t.next=3,this.authClient.ContractInfo({address:n});case 3:return u=t.sent,t.next=6,this.authClient.ContractInfo({id:r});case 6:if(c=t.sent,0!==Object.keys(u).length){t.next=9;break}throw Error("No information returned for group address ".concat(n));case 9:if(c.isV3||c.accessType!==this.authClient.ACCESS_TYPES.GROUP){t.next=17;break}if(!u.isV3){t.next=12;break}throw Error("Unable to map V3 group to V2 object");case 12:return t.next=14,this.CallContractMethodAndWait({contractAddress:n,methodName:"setAccessGroupRights",methodArgs:[this.utils.HashToAddress(r),"manage"===i?2:"access"===i?1:0,"none"===i||o?0:2]});case 14:A=t.sent,t.next=20;break;case 17:return t.next=19,this.CallContractMethodAndWait({contractAddress:this.utils.HashToAddress(r),methodName:"setRights",methodArgs:[n,"manage"===i?2:"access"===i?1:0,"none"===i||o?0:2]});case 19:A=t.sent;case 20:return t.next=22,this.ExtractEventFromLogs({abi:u.abi,event:A,eventName:"RightsChanged"});case 22:return t.abrupt("return",t.sent);case 23:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AccessGroupOwner=function(){var t=s(a.mark((function t(e){var n;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.contractAddress,n=f(n),this.Log("Retrieving owner of access group ".concat(n)),t.next=5,this.authClient.Owner({address:n});case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AccessGroupMembers=function(){var t=s(a.mark((function t(e){var n,r,o=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.contractAddress,n=f(n),this.Log("Retrieving members for group ".concat(n)),t.next=5,this.CallContractMethod({contractAddress:n,methodName:"membersNum"});case 5:return r=t.sent.toNumber(),t.next=8,Promise.all(i(Array(r)).map(function(){var t=s(a.mark((function t(e,r){return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=o.utils,t.next=3,o.CallContractMethod({contractAddress:n,methodName:"membersList",methodArgs:[r]});case 3:return t.t1=t.sent,t.abrupt("return",t.t0.FormatAddress.call(t.t0,t.t1));case 5:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()));case 8:return t.abrupt("return",t.sent);case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AccessGroupManagers=function(){var t=s(a.mark((function t(e){var n,r,o=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.contractAddress,n=f(n),this.Log("Retrieving managers for group ".concat(n)),t.next=5,this.CallContractMethod({contractAddress:n,methodName:"managersNum"});case 5:return r=t.sent.toNumber(),t.next=8,Promise.all(i(Array(r)).map(function(){var t=s(a.mark((function t(e,r){return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=o.utils,t.next=3,o.CallContractMethod({contractAddress:n,methodName:"managersList",methodArgs:[r]});case 3:return t.t1=t.sent,t.abrupt("return",t.t0.FormatAddress.call(t.t0,t.t1));case 5:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()));case 8:return t.abrupt("return",t.sent);case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CreateAccessGroup=s(a.mark((function t(){var e,n,r,i,s,o,c,A,d,p=arguments;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=p.length>0&&void 0!==p[0]?p[0]:{},n=e.name,r=e.description,i=e.metadata,s=void 0===i?{}:i,this.Log("Creating access group: ".concat(n||""," ").concat(r||"")),t.next=4,this.authClient.CreateAccessGroup();case 4:return o=t.sent,c=o.contractAddress,c=this.utils.FormatAddress(c),A=this.utils.AddressToObjectId(c),this.Log("Access group: ".concat(c," ").concat(A)),t.next=11,this.EditContentObject({libraryId:this.contentSpaceLibraryId,objectId:A});case 11:return d=t.sent,t.next=14,this.ReplaceMetadata({libraryId:this.contentSpaceLibraryId,objectId:A,writeToken:d.write_token,metadata:u({public:{name:n,description:r},name:n,description:r},s)});case 14:return t.next=16,this.FinalizeContentObject({libraryId:this.contentSpaceLibraryId,objectId:A,writeToken:d.write_token,commitMessage:"Create access group"});case 16:return t.abrupt("return",c);case 17:case"end":return t.stop()}}),t,this)}))),e.DeleteAccessGroup=function(){var t=s(a.mark((function t(e){return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw e.contractAddress,Error("Not supported");case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AccessGroupMembershipMethod=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u,c;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.contractAddress,r=e.memberAddress,i=e.methodName,s=e.eventName,n=f(n),r=f(r),this.utils.EqualAddress(this.signer.address,r)){t.next=9;break}return t.next=6,this.CallContractMethod({contractAddress:n,methodName:"hasManagerAccess",methodArgs:[this.utils.FormatAddress(this.signer.address)]});case 6:if(t.sent){t.next=9;break}throw Error("Manager access required");case 9:return this.Log("Calling ".concat(i," on group ").concat(n," for user ").concat(r)),t.next=12,this.CallContractMethodAndWait({contractAddress:n,methodName:i,methodArgs:[r],eventName:s,eventValue:"candidate"});case 12:return o=t.sent,t.next=15,this.ContractAbi({contractAddress:n});case 15:if(u=t.sent,c=this.ExtractValueFromEvent({abi:u,event:o,eventName:s,eventValue:"candidate"}),this.utils.FormatAddress(c)===this.utils.FormatAddress(r)){t.next=21;break}throw console.error("Mismatch: "+c+" :: "+r),console.error("Is target user address wallet created?"),Error("Access group method "+i+" failed. Is target user address wallet created?");case 21:return t.abrupt("return",o.transactionHash);case 22:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AddAccessGroupMember=function(){var t=s(a.mark((function t(e){var n,r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.contractAddress,r=e.memberAddress,n=f(n),r=f(r),t.next=5,this.AccessGroupMembershipMethod({contractAddress:n,memberAddress:r,methodName:"grantAccess",eventName:"MemberAdded"});case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.RemoveAccessGroupMember=function(){var t=s(a.mark((function t(e){var n,r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.contractAddress,r=e.memberAddress,n=f(n),r=f(r),t.next=5,this.AccessGroupMembershipMethod({contractAddress:n,memberAddress:r,methodName:"revokeAccess",eventName:"MemberRevoked"});case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AddAccessGroupManager=function(){var t=s(a.mark((function t(e){var n,r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.contractAddress,r=e.memberAddress,n=f(n),r=f(r),t.next=5,this.AccessGroupMembershipMethod({contractAddress:n,memberAddress:r,methodName:"grantManagerAccess",eventName:"ManagerAccessGranted"});case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.RemoveAccessGroupManager=function(){var t=s(a.mark((function t(e){var n,r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.contractAddress,r=e.memberAddress,n=f(n),r=f(r),t.next=5,this.AccessGroupMembershipMethod({contractAddress:n,memberAddress:r,methodName:"revokeManagerAccess",eventName:"ManagerAccessRevoked"});case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentLibraryGroupPermissions=function(){var t=s(a.mark((function t(e){var n,r,o,u,c=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.permissions,o=void 0===r?[]:r,d(n),u={},o=o&&0!==o.length?o.map((function(t){if(t=t.toLowerCase(),!["accessor","contributor","reviewer"].includes(t))throw Error("Invalid permission: ".concat(t));return t})):["accessor","contributor","reviewer"],this.Log("Retrieving ".concat(o.join(", ")," group(s) for library ").concat(n)),t.next=7,Promise.all(o.map(function(){var t=s(a.mark((function t(e){var r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.CallContractMethod({contractAddress:c.utils.HashToAddress(n),methodName:e+"GroupsLength"});case 2:return r=t.sent,r=parseInt(r._hex,16),t.next=6,c.utils.LimitedMap(3,i(Array(r).keys()),function(){var t=s(a.mark((function t(r){return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.t0=c.utils,t.next=4,c.CallContractMethod({contractAddress:c.utils.HashToAddress(n),methodName:e+"Groups",methodArgs:[r]});case 4:return t.t1=t.sent,t.abrupt("return",t.t0.FormatAddress.call(t.t0,t.t1));case 8:t.prev=8,t.t2=t.catch(0),console.error(t.t2);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e){return t.apply(this,arguments)}}());case 6:t.sent.forEach((function(t){return u[t]=[].concat(i(u[t]||[]),[e]).sort()}));case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 7:return t.abrupt("return",u);case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AddContentLibraryGroup=function(){var t=s(a.mark((function t(e){var n,r,i,s,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.groupAddress,i=e.permission,d(n),r=f(r),["accessor","contributor","reviewer"].includes(i.toLowerCase())){t.next=5;break}throw Error("Invalid group type: ".concat(i));case 5:return this.Log("Adding ".concat(i," group ").concat(r," to library ").concat(n)),t.next=8,this.ContentLibraryGroupPermissions({libraryId:n,permissions:[i]});case 8:if(!t.sent[r]){t.next=11;break}return t.abrupt("return");case 11:return i=i.charAt(0).toUpperCase()+i.substr(1).toLowerCase(),t.next=14,this.CallContractMethodAndWait({contractAddress:this.utils.HashToAddress(n),methodName:"add".concat(i,"Group"),methodArgs:[r]});case 14:return s=t.sent,t.next=17,this.ContractAbi({id:n});case 17:return o=t.sent,t.next=20,this.ExtractEventFromLogs({abi:o,event:s,eventName:"".concat(i,"GroupAdded")});case 20:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.RemoveContentLibraryGroup=function(){var t=s(a.mark((function t(e){var n,r,i,s,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.groupAddress,i=e.permission,d(n),r=f(r),["accessor","contributor","reviewer"].includes(i.toLowerCase())){t.next=5;break}throw Error("Invalid group type: ".concat(i));case 5:return this.Log("Removing ".concat(i," group ").concat(r," from library ").concat(n)),t.next=8,this.ContentLibraryGroupPermissions({libraryId:n,permissions:[i]});case 8:if(t.sent[r]){t.next=11;break}return t.abrupt("return");case 11:return i=i.charAt(0).toUpperCase()+i.substr(1).toLowerCase(),t.next=14,this.CallContractMethodAndWait({contractAddress:this.utils.HashToAddress(n),methodName:"remove".concat(i,"Group"),methodArgs:[r]});case 14:return s=t.sent,t.next=17,this.ContractAbi({id:n});case 17:return o=t.sent,t.next=20,this.ExtractEventFromLogs({abi:o,event:s,eventName:"".concat(i,"GroupRemoved")});case 20:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectGroupPermissions=function(){var t=s(a.mark((function t(e){var n,r,i,o,u,c=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.objectId,p(n),this.Log("Retrieving group permissions for object ".concat(n)),r=this.utils.HashToAddress(n),t.next=6,this.Collection({collectionType:"accessGroups"});case 6:return i=t.sent,t.next=9,this.AccessType({id:n});case 9:t.t0=t.sent,t.next=t.t0===this.authClient.ACCESS_TYPES.OBJECT?12:t.t0===this.authClient.ACCESS_TYPES.TYPE?14:t.t0===this.authClient.ACCESS_TYPES.GROUP?16:t.t0===this.authClient.ACCESS_TYPES.LIBRARY?18:19;break;case 12:return o="getContentObjectRights",t.abrupt("break",19);case 14:return o="getContentTypeRights",t.abrupt("break",19);case 16:return o="getAccessGroupRights",t.abrupt("break",19);case 18:o="getLibraryRights";case 19:return u={},t.next=22,Promise.all(i.map(function(){var t=s(a.mark((function t(e){var n,i;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e=c.utils.FormatAddress(e),t.next=4,c.CallContractMethod({contractAddress:e,methodName:o,methodArgs:[r]});case 4:if(0!==(n=t.sent)){t.next=7;break}return t.abrupt("return");case 7:i=[],n>=100&&i.push("manage"),n%100>=10&&i.push("access"),n%10>0&&i.push("see"),u[e]=i,t.next=18;break;case 14:t.prev=14,t.t0=t.catch(0),c.Log("Failed to retrieve group permissions for ".concat(e),!0),c.Log(t.t0,!0);case 18:case"end":return t.stop()}}),t,null,[[0,14]])})));return function(e){return t.apply(this,arguments)}}()));case 22:return t.abrupt("return",u);case 23:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AddContentObjectGroupPermission=function(){var t=s(a.mark((function t(e){var n,r,i;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.objectId,r=e.groupAddress,i=e.permission,A("permission",i),p(n),r=f(r),!this.utils.EqualAddress(r,this.utils.HashToAddress(n))){t.next=6;break}throw Error("Group rights cannot be set on the same group");case 6:if(i=i.toLowerCase(),["see","access","manage"].includes(i)){t.next=9;break}throw Error("Invalid permission type: ".concat(i));case 9:return this.Log("Adding ".concat(i," permission to group ").concat(r," for ").concat(n)),t.next=12,this.SetGroupPermission({groupAddress:r,objectId:n,permission:i});case 12:return t.abrupt("return",t.sent);case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.RemoveContentObjectGroupPermission=function(){var t=s(a.mark((function t(e){var n,r,i;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.objectId,r=e.groupAddress,i=e.permission,A("permission",i),p(n),r=f(r),i=i.toLowerCase(),["see","access","manage"].includes(i)){t.next=7;break}throw Error("Invalid permission type: ".concat(i));case 7:return this.Log("Removing ".concat(i," permission from group ").concat(r," for ").concat(n)),t.next=10,this.SetGroupPermission({groupAddress:r,objectId:n,permission:i,remove:!0});case 10:return t.abrupt("return",t.sent);case 11:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.LinkAccessGroupToOauth=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u,c,d,p,l,h;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.groupAddress,r=e.kmsId,i=e.oauthConfig,f(n),A("kmsId",r),A("oauthConfig",i),"string"==typeof i&&(i=JSON.parse(i)),t.next=7,this.authClient.KMSInfo({kmsId:r});case 7:return s=t.sent,o=s.publicKey,u="eluv.jwtv.".concat(r),t.next=12,this.Crypto.EncryptConk(i,o);case 12:return c=t.sent,d="eluv.jwtv.iusr".concat(this.utils.AddressToHash(this.signer.address)),t.next=16,this.EncryptECIES({message:i});case 16:return p=t.sent,l=this.utils.AddressToObjectId(n),t.next=20,this.EditContentObject({libraryId:this.contentSpaceLibraryId,objectId:l});case 20:return h=t.sent.write_token,t.next=23,this.ReplaceMetadata({libraryId:this.contentSpaceLibraryId,objectId:l,writeToken:h,metadataSubtree:u,metadata:c});case 23:return t.next=25,this.ReplaceMetadata({libraryId:this.contentSpaceLibraryId,objectId:l,writeToken:h,metadataSubtree:d,metadata:p});case 25:return t.next=27,this.FinalizeContentObject({libraryId:this.contentSpaceLibraryId,objectId:l,writeToken:h,commitMessage:"Bind access group to OAuth"});case 27:return t.next=29,this.CallContractMethodAndWait({contractAddress:n,methodName:"setOAuthEnabled",methodArgs:[!1]});case 29:return t.next=31,this.CallContractMethodAndWait({contractAddress:n,methodName:"setOAuthEnabled",methodArgs:[!0]});case 31:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UnlinkAccessGroupFromOauth=function(){var t=s(a.mark((function t(e){var n;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.groupAddress,f(n),t.next=4,this.CallContractMethodAndWait({contractAddress:n,methodName:"setOAuthEnabled",methodArgs:[!1]});case 4:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},function(t,e,n){(function(t){var r=n(7),i=n(17),a=n(3),s=n(4);function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var c=n(18),A=n(19),d=A.ValidateAddress,p=A.ValidateParameters,f=A.ValidatePresence;e.ContractName=function(){var t=s(a.mark((function t(e){var n;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.contractAddress,n=d(n),t.next=4,this.ethClient.ContractName(n);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContractAbi=function(){var t=s(a.mark((function t(e){var n,r,i;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.contractAddress,r=e.id,t.next=3,this.authClient.ContractInfo({address:n,id:r});case 3:if(i=t.sent){t.next=6;break}throw Error("Unable to determine contract info for ".concat(n));case 6:return t.abrupt("return",i.abi);case 7:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.FormatContractArguments=function(t){var e=t.abi,n=t.methodName,r=t.args;return this.ethClient.FormatContractArguments({abi:e,methodName:n,args:r})},e.DeployContract=function(){var t=s(a.mark((function t(e){var n,r,i,s,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.abi,r=e.bytecode,i=e.constructorArgs,s=e.overrides,o=void 0===s?{}:s,t.next=3,this.ethClient.DeployContract({abi:n,bytecode:r,constructorArgs:i,overrides:o,signer:this.signer});case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContractEvents=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u,c,A,p,f,l;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.contractAddress,r=e.abi,i=e.fromBlock,s=void 0===i?0:i,o=e.toBlock,u=e.count,c=void 0===u?1e3:u,A=e.topics,p=e.includeTransaction,f=void 0!==p&&p,n=d(n),r){t.next=6;break}return t.next=5,this.ContractAbi({contractAddress:n});case 5:r=t.sent;case 6:return t.next=8,this.FormatBlockNumbers({fromBlock:s,toBlock:o,count:c});case 8:return l=t.sent,this.Log("Querying contract events ".concat(n," - Blocks ").concat(l.fromBlock," to ").concat(l.toBlock)),t.next=12,this.ethClient.ContractEvents({contractAddress:n,abi:r,fromBlock:l.fromBlock,toBlock:l.toBlock,topics:A,includeTransaction:f});case 12:return t.abrupt("return",t.sent);case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CallContractMethod=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u,c,A,p,f,l,h,y,g;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.contractAddress,r=e.abi,i=e.methodName,s=e.methodArgs,o=void 0===s?[]:s,u=e.value,c=e.overrides,A=void 0===c?{}:c,p=e.formatArguments,f=void 0===p||p,l=e.cacheContract,h=void 0===l||l,y=e.overrideCachedContract,g=void 0!==y&&y,n=d(n),n=this.utils.FormatAddress(n),"setVisibility"===i&&this.visibilityInfo[n]&&delete this.visibilityInfo[n],r){t.next=8;break}return t.next=7,this.ContractAbi({contractAddress:n});case 7:r=t.sent;case 8:return t.next=10,this.ethClient.CallContractMethod({contractAddress:n,abi:r,methodName:i,methodArgs:o,value:u,overrides:A,formatArguments:f,cacheContract:h,overrideCachedContract:g});case 10:return t.abrupt("return",t.sent);case 11:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CallContractMethodAndWait=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u,c,A,p,f,l,h,y;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.contractAddress,r=e.abi,i=e.methodName,s=e.methodArgs,o=e.value,u=e.overrides,c=void 0===u?{}:u,A=e.formatArguments,p=void 0===A||A,f=e.cacheContract,l=void 0===f||f,h=e.overrideCachedContract,y=void 0!==h&&h,n=d(n),n=this.utils.FormatAddress(n),"setVisibility"===i&&this.visibilityInfo[n]&&delete this.visibilityInfo[n],r){t.next=8;break}return t.next=7,this.ContractAbi({contractAddress:n});case 7:r=t.sent;case 8:return t.next=10,this.ethClient.CallContractMethodAndWait({contractAddress:n,abi:r,methodName:i,methodArgs:s,value:o,overrides:c,formatArguments:p,cacheContract:l,overrideCachedContract:y});case 10:return t.abrupt("return",t.sent);case 11:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContractMetadata=function(){var e=s(a.mark((function e(n){var r,i,s,o;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.contractAddress,i=n.metadataKey,f("contractAddress",r),f("metadataKey",i),e.prev=3,e.next=6,this.CallContractMethod({contractAddress:r,methodName:"getMeta",methodArgs:[i]});case 6:return s=e.sent,o=t.from((s||"").replace("0x",""),"hex").toString("utf-8"),e.prev=8,e.abrupt("return",JSON.parse(o));case 12:return e.prev=12,e.t0=e.catch(8),e.abrupt("return",o);case 15:e.next=20;break;case 17:return e.prev=17,e.t1=e.catch(3),e.abrupt("return","");case 20:case"end":return e.stop()}}),e,this,[[3,17],[8,12]])})));return function(t){return e.apply(this,arguments)}}(),e.MergeContractMetadata=function(){var t=s(a.mark((function t(e){var n,r,s,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.contractAddress,r=e.metadataKey,s=e.metadata,f("contractAddress",n),f("metadataKey",r),t.next=5,this.ContractMetadata({contractAddress:n,metadataKey:r});case 5:if(t.t0=t.sent,t.t0){t.next=8;break}t.t0={};case 8:return o=t.t0,"object"===i(o)&&(s=u(u({},o),s)),t.next=12,this.CallContractMethodAndWait({contractAddress:n,methodName:"putMeta",methodArgs:[r,JSON.stringify(s)]});case 12:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ReplaceContractMetadata=function(){var t=s(a.mark((function t(e){var n,r,i;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.contractAddress,r=e.metadataKey,i=e.metadata,f("contractAddress",n),f("metadataKey",r),t.next=5,this.CallContractMethodAndWait({contractAddress:n,methodName:"putMeta",methodArgs:[r,JSON.stringify(i)]});case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CustomContractAddress=function(){var t=s(a.mark((function t(e){var n,r,i,s,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,i=e.versionHash,p({libraryId:n,objectId:r,versionHash:i}),i&&(r=this.utils.DecodeVersionHash(i).objectId),n!==this.contentSpaceLibraryId&&!this.utils.EqualHash(n,r)){t.next=5;break}return t.abrupt("return");case 5:return this.Log("Retrieving custom contract address: ".concat(r)),t.next=8,this.ContractAbi({id:r});case 8:return s=t.sent,t.next=11,this.ethClient.CallContractMethod({contractAddress:this.utils.HashToAddress(r),abi:s,methodName:"contentContractAddress",methodArgs:[]});case 11:if((o=t.sent)!==this.utils.nullAddress){t.next=14;break}return t.abrupt("return");case 14:return t.abrupt("return",this.utils.FormatAddress(o));case 15:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.SetCustomContentContract=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u,c,A,f,l,h;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.customContractAddress,s=e.name,o=e.description,u=e.abi,c=e.factoryAbi,A=e.overrides,f=void 0===A?{}:A,p({libraryId:n,objectId:r}),i=d(i),i=this.utils.FormatAddress(i),this.Log("Setting custom contract address: ".concat(r," ").concat(i)),t.next=7,this.ethClient.SetCustomContentContract({contentContractAddress:this.utils.HashToAddress(r),customContractAddress:i,overrides:f,signer:this.signer});case 7:return l=t.sent,t.next=10,this.EditContentObject({libraryId:n,objectId:r});case 10:return h=t.sent.write_token,t.next=13,this.ReplaceMetadata({libraryId:n,objectId:r,writeToken:h,metadataSubtree:"custom_contract",metadata:{name:s,description:o,address:i,abi:u,factoryAbi:c}});case 13:return t.next=15,this.FinalizeContentObject({libraryId:n,objectId:r,writeToken:h,commitMessage:"Set custom contract"});case 15:return t.abrupt("return",l);case 16:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ExtractEventFromLogs=function(t){var e=t.abi,n=t.event,r=t.eventName;return this.ethClient.ExtractEventFromLogs({abi:e,event:n,eventName:r})},e.ExtractValueFromEvent=function(t){var e=t.abi,n=t.event,r=t.eventName,i=t.eventValue,a=this.ethClient.ExtractEventFromLogs({abi:e,event:n,eventName:r,eventValue:i});return a?a.values[i]:void 0},e.FormatBlockNumbers=function(){var t=s(a.mark((function t(e){var n,r,i,s,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.fromBlock,r=e.toBlock,i=e.count,s=void 0===i?10:i,t.next=3,this.BlockNumber();case 3:return o=t.sent,r?n||(n=r-s+1):n?r=n+s-1:n=(r=o)-s+1,r>o&&(r=o),n<0&&(n=0),t.abrupt("return",{fromBlock:n,toBlock:r});case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.Events=s(a.mark((function t(){var e,n,r,i,s,o,u,c,A=arguments;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=A.length>0&&void 0!==A[0]?A[0]:{},n=e.toBlock,r=e.fromBlock,i=e.count,s=void 0===i?10:i,o=e.includeTransaction,u=void 0!==o&&o,t.next=3,this.FormatBlockNumbers({fromBlock:r,toBlock:n,count:s});case 3:return c=t.sent,this.Log("Querying events - Blocks ".concat(c.fromBlock," to ").concat(c.toBlock)),t.next=7,this.ethClient.Events({fromBlock:c.fromBlock,toBlock:c.toBlock,includeTransaction:u});case 7:return t.abrupt("return",t.sent);case 8:case"end":return t.stop()}}),t,this)}))),e.BlockNumber=s(a.mark((function t(){return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.ethClient.MakeProviderCall({methodName:"getBlockNumber"});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),e.GetBalance=function(){var t=s(a.mark((function t(e){var n,r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.address,n=d(n),t.next=4,this.ethClient.MakeProviderCall({methodName:"getBalance",args:[n]});case 4:return r=t.sent,t.abrupt("return",c.utils.formatEther(r));case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.SendFunds=function(){var t=s(a.mark((function t(e){var n,r,i;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.recipient,r=e.ether,n=d(n),t.next=4,this.signer.sendTransaction({to:n,value:c.utils.parseEther(r.toString())});case 4:return i=t.sent,t.next=7,i.wait();case 7:return t.abrupt("return",t.sent);case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()}).call(this,n(2).Buffer)},function(t,e,n){(function(t,r){var i=n(7),a=n(3),s=n(4);function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var c,A=n(9);A.Platform()===A.PLATFORM_NODE&&(t.Response=n(53).Response,c=n(350));var d=n(12),p=n(19),f=p.ValidatePresence,l=p.ValidateWriteToken,h=p.ValidatePartHash,y=p.ValidateParameters;e.ListFiles=function(){var t=s(a.mark((function t(e){var n,r,i,s;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.versionHash,y({libraryId:n,objectId:r,versionHash:i}),i&&(r=this.utils.DecodeVersionHash(i).objectId),s=d("q",i||r,"meta","files"),t.t0=this.utils,t.t1=this.HttpClient,t.next=8,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,versionHash:i});case 8:return t.t2=t.sent,t.t3=s,t.t4={headers:t.t2,method:"GET",path:t.t3},t.t5=t.t1.Request.call(t.t1,t.t4),t.abrupt("return",t.t0.ResponseToJson.call(t.t0,t.t5));case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UploadFilesFromS3=function(){var t=s(a.mark((function t(e){var n,i,s,o,c,A,d,p,f,h,g,m,b,I,C,v,E,w,B,Q,M,k,_,x,S,D,R,T,N;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.libraryId,i=e.objectId,s=e.writeToken,o=e.region,c=e.bucket,A=e.fileInfo,d=e.accessKey,p=e.secret,f=e.signedUrl,h=e.encryption,g=void 0===h?"none":h,m=e.copy,b=void 0!==m&&m,I=e.callback,y({libraryId:n,objectId:i}),l(s),C=/^s3:\/\/([^/]+)\//i,v=0;case 5:if(!(v<A.length)){t.next=18;break}if(E=A[v].source,!(w=C.exec(E))){t.next=15;break}if(w[1]===c){t.next=14;break}throw Error('Full S3 file path "'+E+"\" specified, but does not match provided bucket name '"+c+"'");case 14:A[v].source=E.replace(C,"");case 15:v++,t.next=5;break;case 18:if(this.Log("Uploading files from S3: ".concat(n," ").concat(i," ").concat(s)),"cgck"!==g){t.next=25;break}return t.next=22,this.EncryptionConk({libraryId:n,objectId:i,writeToken:s});case 22:Q=u(u({},Q=t.sent),{},{secret_key:""}),B="kp__".concat(this.utils.B58(r.from(JSON.stringify(Q))));case 25:return M={access_key_id:d,secret_access_key:p},f&&(M={signed_url:f}),k={encryption_key:B,access:{protocol:"s3",platform:"aws",path:c,storage_endpoint:{region:o},cloud_credentials:M}},_=A.map((function(t){return b?{op:"ingest-copy",path:t.path,encryption:{scheme:"cgck"===g?"cgck":"none"},ingest:{type:"key",path:t.source}}:{op:"add-reference",path:t.path,reference:{type:"key",path:t.source}}})),t.next=31,this.CreateFileUploadJob({libraryId:n,objectId:i,writeToken:s,ops:_,defaults:k});case 31:x=t.sent,S=x.id;case 33:return t.next=36,new Promise((function(t){return setTimeout(t,1e3)}));case 36:return t.next=38,this.UploadStatus({libraryId:n,objectId:i,writeToken:s,uploadId:S});case 38:if(!((D=t.sent).errors&&D.errors.length>1)){t.next=43;break}throw D.errors.join("\n");case 43:if(!D.error){t.next=48;break}throw this.Log("S3 file upload failed:\n".concat(JSON.stringify(D,null,2))),D.error;case 48:if("failed"!==D.status.toLowerCase()){t.next=50;break}throw"File upload failed";case 50:if(R=!1,b?(R=D.ingest_copy.done,I&&(T=D.ingest_copy.progress,I({done:R,uploaded:T.bytes.completed,total:T.bytes.total,uploadedFiles:T.files.completed,totalFiles:T.files.total,fileStatus:T.files.details}))):(R=D.add_reference.done,I&&(N=D.add_reference.progress,I({done:R,uploadedFiles:N.completed,totalFiles:N.total}))),!R){t.next=54;break}return t.abrupt("break",56);case 54:t.next=33;break;case 56:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UploadFiles=function(){var t=s(a.mark((function t(e){var n,i,o,A,d,p,f,h,g,m,b,I,C,v,E,w,B,Q,M,k,_,x,S,D,R,T,N,O,H=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,i=e.objectId,o=e.writeToken,A=e.fileInfo,d=e.encryption,p=void 0===d?"none":d,f=e.callback,y({libraryId:n,objectId:i}),l(o),this.Log("Uploading files: ".concat(n," ").concat(i," ").concat(o)),"cgck"!==p){t.next=8;break}return t.next=7,this.EncryptionConk({libraryId:n,objectId:i,writeToken:o});case 7:h=t.sent;case 8:for(g={},m={},b=0;b<A.length;b++)(I=u(u({},A[b]),{},{data:void 0})).path=I.path.replace(/^\/+/,""),"cgck"===p&&(I.encryption={scheme:"cgck"}),m[I.path]=A[b].data,delete I.data,I.type="file",g[I.path]={uploaded:0,total:I.size},A[b]=I;return this.Log(A),f&&f(g),t.next=15,this.CreateFileUploadJob({libraryId:n,objectId:i,writeToken:o,ops:A,encryption:p});case 15:C=t.sent,v=C.id,E=C.jobs,this.Log("Upload ID: ".concat(v)),this.Log(E),104857600,w=[],B=0,Q=0,M=function(){var t=s(a.mark((function t(){var e,s,u,A,d,f;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=0;case 1:if(!(e<E.length)){t.next=31;break}case 2:if(!(B-Q>104857600)){t.next=7;break}return t.next=5,new Promise((function(t){return setTimeout(t,500)}));case 5:t.next=2;break;case 7:return s=E[e],t.next=10,H.UploadJobStatus({libraryId:n,objectId:i,writeToken:o,uploadId:v,jobId:s});case 10:u=t.sent,A=0;case 12:if(!(A<u.files.length)){t.next=25;break}if(d=u.files[A],f=void 0,"number"==typeof m[d.path]?(f=r.alloc(d.len),c.readSync(m[d.path],f,0,d.len,d.off)):f=m[d.path].slice(d.off,d.off+d.len),"cgck"!==p){t.next=20;break}return t.next=19,H.Crypto.Encrypt(h,f);case 19:f=t.sent;case 20:u.files[A].data=f,B+=d.len;case 22:A++,t.next=12;break;case 25:return w[e]=u,t.next=28,new Promise((function(t){return setTimeout(t,50)}));case 28:e++,t.next=1;break;case 31:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),k=function(){var t=s(a.mark((function t(e,r){var s,c,A,d;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(w[r]){t.next=5;break}return t.next=3,new Promise((function(t){return setTimeout(t,500)}));case 3:t.next=0;break;case 5:s=w[r],c=s.files,A=0;case 8:if(!(A<c.length)){t.next=18;break}return d=c[A],t.next=12,H.UploadFileData({libraryId:n,objectId:i,writeToken:o,uploadId:v,jobId:e,fileData:d.data});case 12:delete w[r].files[A].data,Q+=d.len,f&&(g[d.path]=u(u({},g[d.path]),{},{uploaded:g[d.path].uploaded+d.len}),f(g));case 15:A++,t.next=8;break;case 18:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),M(),_=Math.min(3,E.length),x=[],S=0;case 30:if(!(S<_)){t.next=40;break}return D=(new Date).getTime(),t.next=34,k(E[S],S);case 34:R=((new Date).getTime()-D)/1e3,T=w[S].files.map((function(t){return t.len})).reduce((function(t,e){return t+e}),0),x.push(T/R/1048576);case 37:S++,t.next=30;break;case 40:return N=x.reduce((function(t,e){return t+e}),0)/_,O=Math.min(5,Math.ceil(N/2)),t.next=44,this.utils.LimitedMap(O,E,function(){var t=s(a.mark((function t(e,n){return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n<_)){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,k(e,n);case 4:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}());case 44:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CreateFileUploadJob=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u,c,A,p,f;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.writeToken,s=e.ops,o=e.defaults,u=void 0===o?{}:o,c=e.encryption,A=void 0===c?"none":c,y({libraryId:n,objectId:r}),l(i),this.Log("Creating file upload job: ".concat(n," ").concat(r," ").concat(i)),this.Log(s),"cgck"===A&&(u.encryption={scheme:"cgck"}),p={seq:0,seq_complete:!0,defaults:u,ops:s},f=d("q",i,"file_jobs"),t.t0=this.utils,t.t1=this.HttpClient,t.next=12,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,update:!0,encryption:A});case 12:return t.t2=t.sent,t.t3=f,t.t4=p,t.t5={headers:t.t2,method:"POST",path:t.t3,body:t.t4,failover:!1},t.t6=t.t1.Request.call(t.t1,t.t5),t.abrupt("return",t.t0.ResponseToJson.call(t.t0,t.t6));case 18:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UploadStatus=function(){var t=s(a.mark((function t(e){var n,r,i,s,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.writeToken,s=e.uploadId,y({libraryId:n,objectId:r}),l(i),o=d("q",i,"file_jobs",s),t.t0=this.utils,t.t1=this.HttpClient,t.next=8,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,update:!0});case 8:return t.t2=t.sent,t.t3=o,t.t4={headers:t.t2,method:"GET",path:t.t3,failover:!1},t.t5=t.t1.Request.call(t.t1,t.t4),t.abrupt("return",t.t0.ResponseToJson.call(t.t0,t.t5));case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UploadJobStatus=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.writeToken,s=e.uploadId,o=e.jobId,y({libraryId:n,objectId:r}),l(i),u=d("q",i,"file_jobs",s,"uploads",o),t.t0=this.utils,t.t1=this.HttpClient,t.next=8,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,update:!0});case 8:return t.t2=t.sent,t.t3=u,t.t4={headers:t.t2,method:"GET",path:t.t3,failover:!1},t.t5=t.t1.Request.call(t.t1,t.t4),t.abrupt("return",t.t0.ResponseToJson.call(t.t0,t.t5));case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UploadFileData=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,c,A;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.writeToken,s=e.uploadId,o=e.jobId,c=e.fileData,y({libraryId:n,objectId:r}),l(i),A=d("q",i,"file_jobs",s,o),t.t0=this.utils,t.t1=this.HttpClient,t.t2=A,t.t3=c,t.t4=u,t.t5={"Content-type":"application/octet-stream"},t.next=12,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,update:!0});case 12:return t.t6=t.sent,t.t7=(0,t.t4)(t.t5,t.t6),t.t8={method:"POST",path:t.t2,body:t.t3,bodyType:"BINARY",headers:t.t7,failover:!1},t.t9=t.t1.Request.call(t.t1,t.t8),t.next=18,t.t0.ResponseToJson.call(t.t0,t.t9);case 18:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.FinalizeUploadJob=function(){var t=s(a.mark((function t(e){var n,r,i,s;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.writeToken,y({libraryId:n,objectId:r}),l(i),this.Log("Finalizing upload job: ".concat(n," ").concat(r," ").concat(i)),s=d("q",i,"files"),t.t0=this.HttpClient,t.t1=s,t.next=9,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,update:!0});case 9:return t.t2=t.sent,t.t3={method:"POST",path:t.t1,bodyType:"BINARY",headers:t.t2,failover:!1},t.next=13,t.t0.Request.call(t.t0,t.t3);case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CreateFileDirectories=function(){var t=s(a.mark((function t(e){var n,r,i,s,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.writeToken,s=e.filePaths,y({libraryId:n,objectId:r}),l(i),this.Log("Creating Directories: ".concat(n," ").concat(r," ").concat(i)),this.Log(s),o=s.map((function(t){return{op:"add",type:"directory",path:t}})),t.next=8,this.CreateFileUploadJob({libraryId:n,objectId:r,writeToken:i,ops:o});case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DeleteFiles=function(){var t=s(a.mark((function t(e){var n,r,i,s,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.writeToken,s=e.filePaths,y({libraryId:n,objectId:r}),l(i),this.Log("Deleting Files: ".concat(n," ").concat(r," ").concat(i)),this.Log(s),o=s.map((function(t){return{op:"del",path:t}})),t.next=8,this.CreateFileUploadJob({libraryId:n,objectId:r,writeToken:i,ops:o});case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DownloadFile=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,c,A,p,l,h,g,m,b,I,C,v,E,w,B,Q,M,k=arguments;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.versionHash,s=e.writeToken,o=e.filePath,c=e.format,A=void 0===c?"arrayBuffer":c,p=e.chunked,l=void 0!==p&&p,h=e.chunkSize,g=e.clientSideDecryption,m=void 0!==g&&g,b=e.callback,y({libraryId:n,objectId:r,versionHash:i}),f("filePath",o),i&&(r=this.utils.DecodeVersionHash(i).objectId),t.next=6,this.ContentObjectMetadata({libraryId:n,objectId:r,versionHash:i,writeToken:s,metadataSubtree:d("files",o)});case 6:return I=t.sent,C=I&&I["."].encryption&&"cgck"===I["."].encryption.scheme,v=C?"cgck":void 0,E=C&&!m?d("q",s||i||r,"rep","files_download",o):d("q",s||i||r,"files",o),t.next=12,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,versionHash:i,encryption:v});case 12:return(w=t.sent).Accept="*/*",B="eluv.caps.iusr".concat(this.utils.AddressToHash(this.signer.address)),t.next=17,this.ContentObjectMetadata({libraryId:n,objectId:r,metadataSubtree:B});case 17:if(Q=t.sent,t.t1=C,!t.t1){t.next=26;break}return t.t2=this.utils,t.t3=this.signer.address,t.next=24,this.ContentObjectOwner({objectId:r});case 24:t.t4=t.sent,t.t1=!t.t2.EqualAddress.call(t.t2,t.t3,t.t4);case 26:if(t.t0=t.t1,!t.t0){t.next=29;break}t.t0=!Q;case 29:if(!t.t0){t.next=31;break}w["X-Content-Fabric-Decryption-Mode"]="reencrypt";case 31:if(C&&!m&&(w["X-Content-Fabric-Decryption-Mode"]="decrypt",h=Number.MAX_SAFE_INTEGER),M=I["."].size,!C||!m){t.next=51;break}return t.t5=this,t.next=37,this.EncryptionConk({libraryId:n,objectId:r,versionHash:i,download:!0});case 37:return t.t6=t.sent,t.t7=E,t.t8=M,t.t9=w,t.t10=b,t.t11=A,t.t12=m,t.t13=l,t.t14={conk:t.t6,downloadPath:t.t7,bytesTotal:t.t8,headers:t.t9,callback:t.t10,format:t.t11,clientSideDecryption:t.t12,chunked:t.t13},t.next=48,t.t5.DownloadEncrypted.call(t.t5,t.t14);case 48:return t.abrupt("return",t.sent);case 51:return h||(h=1e7),t.prev=52,t.next=55,this.Download({downloadPath:E,bytesTotal:M,headers:w,callback:b,format:A,chunked:l,chunkSize:h});case 55:return t.abrupt("return",t.sent);case 58:if(t.prev=58,t.t15=t.catch(52),!C||m){t.next=62;break}return t.abrupt("return",this.DownloadFile(u(u({},k[0]),{},{clientSideDecryption:!0})));case 62:throw t.t15;case 63:case"end":return t.stop()}}),t,this,[[52,58]])})));return function(e){return t.apply(this,arguments)}}(),e.ContentParts=function(){var t=s(a.mark((function t(e){var n,r,i,s,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.versionHash,y({libraryId:n,objectId:r,versionHash:i}),this.Log("Retrieving parts: ".concat(n," ").concat(r||i)),i&&(r=this.utils.DecodeVersionHash(i).objectId),s=d("q",i||r,"parts"),t.t0=this.utils,t.t1=this.HttpClient,t.next=9,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,versionHash:i});case 9:return t.t2=t.sent,t.t3=s,t.t4={headers:t.t2,method:"GET",path:t.t3},t.t5=t.t1.Request.call(t.t1,t.t4),t.next=15,t.t0.ResponseToJson.call(t.t0,t.t5);case 15:return o=t.sent,t.abrupt("return",o.parts);case 17:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentPart=function(){var t=s(a.mark((function t(e){var n,r,i,s,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.versionHash,s=e.partHash,y({libraryId:n,objectId:r,versionHash:i}),h(s),this.Log("Retrieving part: ".concat(n," ").concat(r||i," ").concat(s)),i&&(r=this.utils.DecodeVersionHash(i).objectId),o=d("q",i||r,"parts",s),t.t0=this.utils,t.t1=this.HttpClient,t.next=10,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,versionHash:i});case 10:return t.t2=t.sent,t.t3=o,t.t4={headers:t.t2,method:"GET",path:t.t3},t.t5=t.t1.Request.call(t.t1,t.t4),t.next=16,t.t0.ResponseToJson.call(t.t0,t.t5);case 16:return t.abrupt("return",t.sent);case 17:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DownloadPart=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u,c,A,p,f,l,g,m,b,I,C,v;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.versionHash,s=e.writeToken,o=e.partHash,u=e.format,c=void 0===u?"arrayBuffer":u,A=e.chunked,p=void 0!==A&&A,f=e.chunkSize,l=void 0===f?1e7:f,g=e.callback,y({libraryId:n,objectId:r,versionHash:i}),h(o),i&&(r=this.utils.DecodeVersionHash(i).objectId),m=o.startsWith("hqpe"),b=m?"cgck":void 0,I=d("q",s||i||r,"data",o),t.next=9,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,versionHash:i,encryption:b});case 9:return C=t.sent,t.next=12,this.ContentPart({libraryId:n,objectId:r,versionHash:i,partHash:o});case 12:if(v=t.sent.part.size,!m){t.next=37;break}return t.t0=this.utils,t.t1=this.signer.address,t.next=18,this.ContentObjectOwner({objectId:r});case 18:if(t.t2=t.sent,t.t0.EqualAddress.call(t.t0,t.t1,t.t2)){t.next=21;break}C["X-Content-Fabric-Decryption-Mode"]="reencrypt";case 21:return t.t3=this,t.next=24,this.EncryptionConk({libraryId:n,objectId:r,download:!0});case 24:return t.t4=t.sent,t.t5=I,t.t6=v,t.t7=C,t.t8=g,t.t9=c,t.t10=p,t.t11={conk:t.t4,downloadPath:t.t5,bytesTotal:t.t6,headers:t.t7,callback:t.t8,format:t.t9,chunked:t.t10},t.next=34,t.t3.DownloadEncrypted.call(t.t3,t.t11);case 34:return t.abrupt("return",t.sent);case 37:return t.next=39,this.Download({downloadPath:I,bytesTotal:v,headers:C,callback:g,format:c,chunked:p,chunkSize:l});case 39:return t.abrupt("return",t.sent);case 40:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.Download=function(){var t=s(a.mark((function t(e){var n,i,s,o,u,c,A,d,p,f,l,h,y,g,m;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.downloadPath,i=e.headers,s=e.bytesTotal,o=e.chunked,u=void 0!==o&&o,c=e.chunkSize,A=void 0===c?2e6:c,d=e.callback,p=e.format,f=void 0===p?"arrayBuffer":p,!u||d){t.next=3;break}throw Error("No callback specified for chunked download");case 3:u||(l=[]),h=0,y=Math.ceil(s/A),g=0;case 7:if(!(g<y)){t.next=35;break}return i.Range="bytes=".concat(h,"-").concat(h+A-1),t.next=11,this.HttpClient.Request({path:n,headers:i,method:"GET"});case 11:if(m=t.sent,h=Math.min(h+A,s),!u){t.next=24;break}return t.t0=d,t.t1=h,t.t2=s,t.next=19,this.utils.ResponseToFormat(f,m);case 19:t.t3=t.sent,t.t4={bytesFinished:t.t1,bytesTotal:t.t2,chunk:t.t3},(0,t.t0)(t.t4),t.next=32;break;case 24:return t.t5=l,t.t6=r,t.next=28,m.arrayBuffer();case 28:t.t7=t.sent,t.t8=t.t6.from.call(t.t6,t.t7),t.t5.push.call(t.t5,t.t8),d&&d({bytesFinished:h,bytesTotal:s});case 32:g++,t.next=7;break;case 35:if(u){t.next=39;break}return t.next=38,this.utils.ResponseToFormat(f,new Response(r.concat(l)));case 38:return t.abrupt("return",t.sent);case 39:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DownloadEncrypted=function(){var t=s(a.mark((function t(e){var n,i,o,u,c,A,d,p,f,l,h,y,g,m,b,I,C,v=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.conk,i=e.downloadPath,o=e.bytesTotal,u=e.headers,c=e.callback,A=e.format,d=void 0===A?"arrayBuffer":A,p=e.chunked,!(f=void 0!==p&&p)||c){t.next=3;break}throw Error("No callback specified for chunked download");case 3:return l=n.public_key.startsWith("ktpk"),h=this.Crypto.EncryptedBlockSize(1e6,l),y=0,d=d.toLowerCase(),g=[],t.next=10,this.Crypto.OpenDecryptionStream(n);case 10:(m=t.sent).on("data",function(){var t=s(a.mark((function t(e){var n;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!f){t.next=13;break}if("buffer"===d){t.next=10;break}if(n=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),"arraybuffer"!==d){t.next=7;break}e=n,t.next=10;break;case 7:return t.next=9,v.utils.ResponseToFormat(d,new Response(n));case 9:e=t.sent;case 10:c({bytesFinished:y,bytesTotal:o,chunk:e}),t.next=15;break;case 13:c&&c({bytesFinished:y,bytesTotal:o}),g.push(e);case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),b=Math.ceil(o/h),I=0;case 14:if(!(I<b)){t.next=30;break}return u.Range="bytes=".concat(y,"-").concat(y+h-1),t.next=18,this.HttpClient.Request({headers:u,method:"GET",path:i});case 18:return C=t.sent,y=Math.min(y+h,o),t.t0=m,t.t1=Uint8Array,t.next=24,C.arrayBuffer();case 24:t.t2=t.sent,t.t3=new t.t1(t.t2),t.t0.write.call(t.t0,t.t3);case 27:I++,t.next=14;break;case 30:return m.end(),t.next=33,new Promise((function(t){return m.on("finish",(function(){t()}))}));case 33:if(f){t.next=37;break}return t.next=36,this.utils.ResponseToFormat(d,new Response(r.concat(g)));case 36:return t.abrupt("return",t.sent);case 37:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CreatePart=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.writeToken,s=e.encryption,y({libraryId:n,objectId:r}),l(i),o=d("q",i,"parts"),t.t0=this.utils,t.t1=this.HttpClient,t.next=8,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,update:!0,encryption:s});case 8:return t.t2=t.sent,t.t3=o,t.t4={headers:t.t2,method:"POST",path:t.t3,bodyType:"BINARY",body:"",failover:!1},t.t5=t.t1.Request.call(t.t1,t.t4),t.next=14,t.t0.ResponseToJson.call(t.t0,t.t5);case 14:return u=t.sent,t.abrupt("return",u.part.write_token);case 16:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UploadPartChunk=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u,c,A;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,i=e.writeToken,s=e.partWriteToken,o=e.chunk,u=e.encryption,y({libraryId:n,objectId:r}),l(i),!u||"none"===u){t.next=10;break}return t.next=6,this.EncryptionConk({libraryId:n,objectId:r,writeToken:i});case 6:return c=t.sent,t.next=9,this.Crypto.Encrypt(c,o);case 9:o=t.sent;case 10:return A=d("q",i,"parts"),t.t0=this.utils,t.t1=this.HttpClient,t.next=15,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,update:!0,encryption:u});case 15:return t.t2=t.sent,t.t3=d(A,s),t.t4=o,t.t5={headers:t.t2,method:"POST",path:t.t3,body:t.t4,bodyType:"BINARY",failover:!1},t.t6=t.t1.Request.call(t.t1,t.t5),t.next=22,t.t0.ResponseToJson.call(t.t0,t.t6);case 22:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.FinalizePart=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.writeToken,s=e.partWriteToken,o=e.encryption,y({libraryId:n,objectId:r}),l(i),u=d("q",i,"parts"),t.t0=this.utils,t.t1=this.HttpClient,t.next=8,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,update:!0,encryption:o});case 8:return t.t2=t.sent,t.t3=d(u,s),t.t4={headers:t.t2,method:"POST",path:t.t3,bodyType:"BINARY",body:"",failover:!1},t.next=13,t.t1.Request.call(t.t1,t.t4);case 13:return t.t5=t.sent,t.next=16,t.t0.ResponseToJson.call(t.t0,t.t5);case 16:return t.abrupt("return",t.sent);case 17:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UploadPart=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u,c,A,d,p,f,h,g;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.writeToken,s=e.data,o=e.encryption,u=void 0===o?"none":o,c=e.chunkSize,A=void 0===c?1e7:c,d=e.callback,y({libraryId:n,objectId:r}),l(i),t.next=5,this.CreatePart({libraryId:n,objectId:r,writeToken:i,encryption:u});case 5:p=t.sent,f=s.length||s.byteLength||s.size,d&&d({bytesFinished:0,bytesTotal:f}),h=0;case 9:if(!(h<f)){t.next=17;break}return g=s.slice(h,h+A),t.next=13,this.UploadPartChunk({libraryId:n,objectId:r,writeToken:i,partWriteToken:p,chunk:g,encryption:u});case 13:d&&d({bytesFinished:Math.min(h+A,f),bytesTotal:f});case 14:h+=A,t.next=9;break;case 17:return t.next=19,this.FinalizePart({libraryId:n,objectId:r,writeToken:i,partWriteToken:p,encryption:u});case 19:return t.abrupt("return",t.sent);case 20:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DeletePart=function(){var t=s(a.mark((function t(e){var n,r,i,s,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.writeToken,s=e.partHash,y({libraryId:n,objectId:r}),l(i),h(s),o=d("q",i,"parts",s),t.t0=this.HttpClient,t.next=8,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,update:!0});case 8:return t.t1=t.sent,t.t2=o,t.t3={headers:t.t1,method:"DELETE",path:t.t2,failover:!1},t.next=13,t.t0.Request.call(t.t0,t.t3);case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()}).call(this,n(6),n(2).Buffer)},function(t,e){},function(t,e,n){var r=n(24),i=n(3),a=n(7),s=n(4);function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var c=n(359),A=n(12),d=n(25),p=n(19),f=p.ValidateLibrary,l=p.ValidateVersion,h=p.ValidateParameters;e.CreateProductionMaster=function(){var t=s(i.mark((function t(e){var n,r,a,s,o,c,d,p,l,h,y,g,m,b,I,C,v,E,w,B,Q,M,k,_,x,S,D,R,T,N,O,H,L,U,F,j,P,G,q,Y;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.type,a=e.name,s=e.description,o=e.metadata,c=void 0===o?{}:o,d=e.fileInfo,p=e.encrypt,l=void 0!==p&&p,h=e.access,y=void 0===h?[]:h,g=e.copy,m=void 0!==g&&g,b=e.callback,f(n),t.next=4,this.CreateContentObject({libraryId:n,options:r?{type:r}:{}});case 4:if(I=t.sent,C=I.id,v=I.write_token,!d){t.next=59;break}if(!(y.length>0)){t.next=57;break}E=/^s3:\/\/([^/]+)\//i,w=0;case 11:if(!(w<d.length)){t.next=42;break}B=d[w],Q=!1,M=0;case 15:if(Q||!(M<y.length)){t.next=37;break}k=y[M],_=k.remote_access.path.replace(/\/$/,""),x=k.path_matchers,S=0;case 20:if(Q||!(S<x.length)){t.next=34;break}if(D=new RegExp(x[S]),R=B.source,!D.test(R)){t.next=31;break}if(Q=!0,!(T=E.exec(R))){t.next=30;break}if(T[1]===_){t.next=30;break}throw Error('Full S3 file path "'+R+"\" matched to credential set with different bucket name '"+_+"'");case 30:k.hasOwnProperty("matched")?k.matched.push(B):k.matched=[B];case 31:S++,t.next=20;break;case 34:M++,t.next=15;break;case 37:if(Q){t.next=39;break}throw Error('no credential set found for file path: "'+filePath+'"');case 39:w++,t.next=11;break;case 42:N=0;case 43:if(!(N<y.length)){t.next=55;break}if(!((O=y[N]).hasOwnProperty("matched")&&O.matched.length>0)){t.next=52;break}return H=O.remote_access.storage_endpoint.region,L=O.remote_access.path.replace(/\/$/,""),U=O.remote_access.cloud_credentials.access_key_id,F=O.remote_access.cloud_credentials.secret_access_key,t.next=52,this.UploadFilesFromS3({libraryId:n,objectId:C,writeToken:v,fileInfo:O.matched,region:H,bucket:L,accessKey:U,secret:F,copy:m,callback:b,encryption:l?"cgck":"none"});case 52:N++,t.next=43;break;case 55:t.next=59;break;case 57:return t.next=59,this.UploadFiles({libraryId:n,objectId:C,writeToken:v,fileInfo:d,callback:b,encryption:l?"cgck":"none"});case 59:return t.next=61,this.CreateEncryptionConk({libraryId:n,objectId:C,writeToken:v,createKMSConk:!0});case 61:return t.next=63,this.CallBitcodeMethod({libraryId:n,objectId:C,writeToken:v,method:A("media","production_master","init"),body:{access:y},constant:!1});case 63:return j=t.sent,P=j.logs,G=j.errors,q=j.warnings,t.next=69,this.MergeMetadata({libraryId:n,objectId:C,writeToken:v,metadata:u(u({},c||{}),{},{name:a,description:s,reference:y&&!m,public:u(u({},(c||{}).public||{}),{},{name:a||"",description:s||""}),elv_created_at:(new Date).getTime()})});case 69:return t.next=71,this.FinalizeContentObject({libraryId:n,objectId:C,writeToken:v,commitMessage:"Create master",awaitCommitConfirmation:!1});case 71:return Y=t.sent,t.abrupt("return",u({errors:G||[],logs:P||[],warnings:q||[]},Y));case 73:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CreateABRMezzanine=function(){var t=s(i.mark((function t(e){var n,r,s,o,d,p,h,y,g,m,b,I,C,v,E,w,B,Q,M,k,_,x,S,D,R,T,N,O,H;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,s=e.type,o=e.name,d=e.description,p=e.metadata,h=e.masterVersionHash,y=e.abrProfile,g=e.variant,m=void 0===g?"default":g,b=e.offeringKey,I=void 0===b?"default":b,f(n),l(h),h){t.next=5;break}throw Error("Master version hash not specified");case 5:if(v=s?{type:s}:{},!(C=!!r)){t.next=15;break}return t.next=10,this.EditContentObject({libraryId:n,objectId:r,options:v});case 10:B=t.sent,E=B.id,w=B.write_token,t.next=20;break;case 15:return t.next=17,this.CreateContentObject({libraryId:n,options:v});case 17:Q=t.sent,E=Q.id,w=Q.write_token;case 20:return t.next=22,this.CreateEncryptionConk({libraryId:n,objectId:E,writeToken:w,createKMSConk:!0});case 22:return t.next=24,this.ContentObjectMetadata({versionHash:h,metadataSubtree:"public/name"});case 24:return M=t.sent,k=[],t.t0=k,t.next=29,this.authClient.AuthorizationToken({libraryId:n,objectId:E,update:!0});case 29:return t.t1=t.sent,t.t0.push.call(t.t0,t.t1),t.t2=k,t.next=34,this.authClient.AuthorizationToken({libraryId:n});case 34:return t.t3=t.sent,t.t2.push.call(t.t2,t.t3),t.t4=k,t.next=39,this.authClient.AuthorizationToken({versionHash:h});case 39:if(t.t5=t.sent,t.t4.push.call(t.t4,t.t5),_={Authorization:k.map((function(t){return"Bearer ".concat(t)})).join(",")},x={offering_key:I,variant_key:m,prod_master_hash:h},S=!1,!y){t.next=49;break}x.abr_profile=y,S=y.store_clear,t.next=52;break;case 49:return t.next=51,this.ContentObjectMetadata({libraryId:n,objectId:this.utils.AddressToObjectId(this.utils.HashToAddress(n)),metadataSubtree:"abr_profile/store_clear"});case 51:S=t.sent;case 52:if(S){t.next=55;break}return t.next=55,this.EncryptionConk({libraryId:n,objectId:E,writeToken:w});case 55:return t.next=57,this.CallBitcodeMethod({libraryId:n,objectId:E,writeToken:w,method:A("media","abr_mezzanine","init"),headers:_,body:x,constant:!1});case 57:return D=t.sent,R=D.logs,T=D.errors,N=D.warnings,p||(p={}),p.public||(p.public={}),p.public.asset_metadata||(p.public.asset_metadata={}),p.master={name:M,id:this.utils.DecodeVersionHash(h).objectId,hash:h,variant:m},p.public=u({},p.public),p.public.asset_metadata=u({sources:a({},I,{"/":"./rep/playout/".concat(I,"/options.json")})},p.public.asset_metadata),!o&&C||(p.name=o||"".concat(M," Mezzanine"),p.public.name=o||"".concat(M," Mezzanine")),!d&&C||(p.description=d||"",p.public.description=d||""),t.next=71,this.ContentObjectMetadata({libraryId:n,objectId:E,writeToken:w});case 71:return O=t.sent,p=c.mergeDeepRight(O,p),C||(p.elv_created_at=(new Date).getTime()),t.next=76,this.ReplaceMetadata({libraryId:n,objectId:E,writeToken:w,metadata:p});case 76:return t.next=78,this.FinalizeContentObject({libraryId:n,objectId:E,writeToken:w,commitMessage:"Create ABR mezzanine"});case 78:return H=t.sent,t.abrupt("return",u({logs:R||[],warnings:N||[],errors:T||[]},H));case 80:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.StartABRMezzanineJobs=function(){var t=s(i.mark((function t(e){var n,a,o,u,c,d,p,f,l,y,g,m,b,I,C,v,E,w,B,Q,M,k,_=this;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,a=e.objectId,o=e.offeringKey,u=void 0===o?"default":o,c=e.access,d=void 0===c?[]:c,p=e.jobIndexes,f=void 0===p?null:p,h({libraryId:n,objectId:a}),t.next=4,this.ContentObjectMetadata({libraryId:n,objectId:a,metadataSubtree:A("abr_mezzanine","offerings")});case 4:return l=t.sent,y=l[u].mez_prep_specs||[],g=Object.keys(y).map((function(t){return(y[t].source_streams||[]).map((function(t){return t.source_hash}))})),g=[].concat.apply([],g).filter((function(t){return t})).filter((function(t,e,n){return n.indexOf(t)===e})),t.next=10,Promise.all(g.map(function(){var t=s(i.mark((function t(e){return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,_.authClient.AuthorizationToken({versionHash:e});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 10:return m=t.sent,t.next=13,this.authClient.AuthorizationToken({libraryId:n,objectId:a,update:!0});case 13:return t.t0=t.sent,m=[t.t0].concat(r(m)),b={Authorization:m.map((function(t){return"Bearer ".concat(t)})).join(",")},t.next=18,this.EditContentObject({libraryId:n,objectId:a});case 18:return I=t.sent,C={write_token:I.write_token,node:this.HttpClient.BaseURI().toString(),offering:u},t.next=22,this.EditContentObject({libraryId:n,objectId:a});case 22:return v=t.sent,t.next=25,this.ReplaceMetadata({libraryId:n,objectId:a,writeToken:v.write_token,metadataSubtree:"lro_draft_".concat(u),metadata:C});case 25:return t.next=27,this.FinalizeContentObject({libraryId:n,objectId:a,writeToken:v.write_token,commitMessage:"Mezzanine LRO status"});case 27:return E=t.sent,t.next=30,this.CallBitcodeMethod({libraryId:n,objectId:a,writeToken:I.write_token,headers:b,method:A("media","abr_mezzanine","prep_start"),constant:!1,body:{access:d,offering_key:u,job_indexes:f}});case 30:return w=t.sent,B=w.data,Q=w.errors,M=w.warnings,k=w.logs,t.abrupt("return",{hash:E.hash,lro_draft:C,writeToken:I.write_token,data:B,logs:k||[],warnings:M||[],errors:Q||[]});case 36:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.LROStatus=function(){var t=s(i.mark((function t(e){var n,a,s,o,u,c,d,p;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,a=e.objectId,s=e.offeringKey,o=void 0===s?"default":s,h({libraryId:n,objectId:a}),t.next=4,this.ContentObjectMetadata({libraryId:n,objectId:a,metadataSubtree:"lro_draft_".concat(o)});case 4:if(t.t0=t.sent,t.t0){t.next=9;break}return t.next=8,this.ContentObjectMetadata({libraryId:n,objectId:a,metadataSubtree:"lro_draft"});case 8:t.t0=t.sent;case 9:if((u=t.t0)&&u.write_token){t.next=19;break}return t.next=13,this.ContentObjectMetadata({libraryId:n,objectId:a,metadataSubtree:A("abr_mezzanine","offerings",o,"ready")});case 13:if(!t.sent){t.next=18;break}throw Error("Mezzanine already finalized for offering '".concat(o,"'"));case 18:throw Error("No LRO draft found for this mezzanine");case 19:return p=this.fabricURIs,t.prev=20,this.SetNodes({fabricURIs:[u.node].concat(r(p))}),t.next=24,this.ContentObjectMetadata({libraryId:n,objectId:a,writeToken:u.write_token,metadataSubtree:"lro_status"});case 24:d=t.sent,t.next=30;break;case 27:t.prev=27,t.t1=t.catch(20),c=t.t1;case 30:return t.prev=30,this.SetNodes({fabricURIs:p}),t.finish(30);case 33:if(!c){t.next=35;break}throw c;case 35:return t.abrupt("return",d);case 36:case"end":return t.stop()}}),t,this,[[20,27,30,33]])})));return function(e){return t.apply(this,arguments)}}(),e.FinalizeABRMezzanine=function(){var t=s(i.mark((function t(e){var n,r,a,s,o,c,p,f,l,y,g,m,b,I,C,v,E,w;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,a=e.offeringKey,s=void 0===a?"default":a,h({libraryId:n,objectId:r}),t.next=4,this.ContentObjectMetadata({libraryId:n,objectId:r,metadataSubtree:"lro_draft_".concat(s)});case 4:if((o=t.sent)&&o.write_token){t.next=7;break}throw Error("No LRO draft found for this mezzanine");case 7:return c=this.HttpClient,t.prev=8,this.HttpClient=new d({uris:[o.node],debug:c.debug}),t.next=12,this.ContentObjectMetadata({libraryId:n,objectId:r,writeToken:o.write_token,metadataSubtree:A("abr_mezzanine","offerings")});case 12:return l=t.sent,y=l[s].prod_master_hash,t.next=16,this.authClient.AuthorizationToken({libraryId:n,objectId:r,update:!0});case 16:return t.t0=t.sent,t.next=19,this.authClient.AuthorizationToken({versionHash:y});case 19:return t.t1=t.sent,g=[t.t0,t.t1],m={Authorization:g.map((function(t){return"Bearer ".concat(t)})).join(",")},t.next=24,this.CallBitcodeMethod({objectId:r,libraryId:n,writeToken:o.write_token,method:A("media","abr_mezzanine","offerings",s,"finalize"),headers:m,constant:!1});case 24:return b=t.sent,I=b.data,C=b.errors,v=b.warnings,E=b.logs,t.next=31,this.FinalizeContentObject({libraryId:n,objectId:r,writeToken:o.write_token,commitMessage:"Finalize ABR mezzanine",awaitCommitConfirmation:!1});case 31:w=t.sent,f=u({data:I,logs:E||[],warnings:v||[],errors:C||[]},w),t.next=38;break;case 35:t.prev=35,t.t2=t.catch(8),p=t.t2;case 38:return t.prev=38,this.HttpClient=c,t.finish(38);case 41:if(!p){t.next=43;break}throw p;case 43:return t.abrupt("return",f);case 44:case"end":return t.stop()}}),t,this,[[8,35,38,41]])})));return function(e){return t.apply(this,arguments)}}()},function(t,e,n){var r=n(17),i=n(7),a=n(3),s=n(4);function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var c=n(12),A=n(353),d=n(18),p=n(19),f=p.ValidateLibrary,l=p.ValidateObject,h=p.ValidateVersion,y=p.ValidateWriteToken,g=p.ValidateParameters,m=p.ValidatePresence;e.SetVisibility=function(){var t=s(a.mark((function t(e){var n,r,i;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.id,r=e.visibility,this.Log("Setting visibility ".concat(r," on ").concat(n)),t.next=4,this.authClient.ContractHasMethod({contractAddress:this.utils.HashToAddress(n),methodName:"setVisibility"});case 4:if(t.sent){t.next=7;break}return t.abrupt("return");case 7:return t.next=9,this.CallContractMethodAndWait({contractAddress:this.utils.HashToAddress(n),methodName:"setVisibility",methodArgs:[r]});case 9:return i=t.sent,t.next=12,new Promise((function(t){return setTimeout(t,5e3)}));case 12:return t.abrupt("return",i);case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.SetPermission=function(){var t=s(a.mark((function t(e){var n,r,i,o,u,c,A,d,p,f,h=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.objectId,r=e.permission,i=e.writeToken,l(n),m("permission",r),o=this.permissionLevels[r]){t.next=6;break}throw Error("Unknown permission level: "+r);case 6:return t.next=8,this.AccessType({id:n});case 8:if(t.t0=t.sent,t.t1=this.authClient.ACCESS_TYPES.OBJECT,t.t0===t.t1){t.next=12;break}throw Error("Permission only valid for normal content objects: "+n);case 12:return u=o.settings,t.next=15,this.ContentObjectLibraryId({objectId:n});case 15:return c=t.sent,t.next=18,this.SetVisibility({id:n,visibility:u.visibility});case 18:return t.next=20,this.CallContractMethod({contractAddress:this.utils.HashToAddress(n),methodName:"statusCode"});case 20:if(t.sent===u.statusCode){t.next=29;break}if(!(u.statusCode<0)){t.next=27;break}return t.next=25,this.CallContractMethod({contractAddress:this.utils.HashToAddress(n),methodName:"setStatusCode",methodArgs:[-1]});case 25:t.next=29;break;case 27:return t.next=29,this.CallContractMethod({contractAddress:this.utils.HashToAddress(n),methodName:"publish"});case 29:return t.next=31,this.CallContractMethod({contractAddress:this.utils.HashToAddress(n),methodName:"addressKMS"});case 31:return A=t.sent,d="eluv.caps.ikms".concat(this.utils.AddressToHash(A)),t.next=35,this.ContentObjectMetadata({libraryId:c,objectId:n,metadataSubtree:d});case 35:if(!(p=t.sent)||u.kmsConk){t.next=41;break}return t.next=39,this.EditAndFinalizeContentObject({libraryId:c,objectId:n,commitMessage:"Remove encryption conk",callback:function(){var t=s(a.mark((function t(e){var r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.writeToken,t.next=3,h.DeleteMetadata({libraryId:c,objectId:n,writeToken:r,metadataSubtree:d});case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()});case 39:t.next=52;break;case 41:if(p||!u.kmsConk){t.next=52;break}if(f=!i,i){t.next=47;break}return t.next=46,this.EditContentObject({libraryId:c,objectId:n});case 46:i=t.sent.writeToken;case 47:return t.next=49,this.CreateEncryptionConk({libraryId:c,objectId:n,writeToken:i,createKMSConk:!0});case 49:if(!f){t.next=52;break}return t.next=52,this.FinalizeContentObject({libraryId:c,objectId:n,writeToken:i,commitMessage:"Set permissions to ".concat(r)});case 52:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CreateContentType=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,A,d,p,f,l;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.name,r=e.metadata,i=void 0===r?{}:r,s=e.bitcode,this.Log("Creating content type: ".concat(n)),i.name=n,i.public=u({name:n},i.public||{}),t.next=6,this.authClient.CreateContentType();case 6:return o=t.sent,A=o.contractAddress,d=this.utils.AddressToObjectId(A),t.next=11,this.SetVisibility({id:d,visibility:1});case 11:return p=c("qlibs",this.contentSpaceLibraryId,"qid",d),this.Log("Created type: ".concat(A," ").concat(d)),t.t0=this.utils,t.t1=this.HttpClient,t.next=17,this.authClient.AuthorizationHeader({libraryId:this.contentSpaceLibraryId,objectId:d,update:!0});case 17:return t.t2=t.sent,t.t3=p,t.t4={headers:t.t2,method:"POST",path:t.t3},t.t5=t.t1.Request.call(t.t1,t.t4),t.next=23,t.t0.ResponseToJson.call(t.t0,t.t5);case 23:return f=t.sent,this.HttpClient.RecordWriteToken(f.write_token),t.next=27,this.ReplaceMetadata({libraryId:this.contentSpaceLibraryId,objectId:d,writeToken:f.write_token,metadata:i});case 27:if(!s){t.next=33;break}return t.next=30,this.UploadPart({libraryId:this.contentSpaceLibraryId,objectId:d,writeToken:f.write_token,data:s,encrypted:!1});case 30:return l=t.sent,t.next=33,this.ReplaceMetadata({libraryId:this.contentSpaceLibraryId,objectId:d,writeToken:f.write_token,metadataSubtree:"bitcode_part",metadata:l.part.hash});case 33:return t.next=35,this.FinalizeContentObject({libraryId:this.contentSpaceLibraryId,objectId:d,writeToken:f.write_token,commitMessage:"Create content type"});case 35:return t.abrupt("return",d);case 36:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CreateContentLibrary=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,c,A,d,p,f,l,h,y;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.name,r=e.description,i=e.image,s=e.imageName,o=e.metadata,c=void 0===o?{}:o,A=e.kmsId,d=e.tenantId,A){t.next=9;break}return t.t0="ikms",t.t1=this.utils,t.next=6,this.DefaultKMSAddress();case 6:t.t2=t.sent,t.t3=t.t1.AddressToHash.call(t.t1,t.t2),A=t.t0.concat.call(t.t0,t.t3);case 9:return this.Log("Creating content library"),this.Log("KMS ID: ".concat(A)),t.next=13,this.authClient.CreateContentLibrary({kmsId:A});case 13:if(p=t.sent,f=p.contractAddress,d){t.next=19;break}return t.next=18,this.userProfileClient.TenantId();case 18:d=t.sent;case 19:if(!d){t.next=24;break}if(this.utils.ValidHash(d)){t.next=22;break}throw Error("Invalid tenant ID: ".concat(d));case 22:return t.next=24,this.CallContractMethod({contractAddress:f,methodName:"putMeta",methodArgs:["_tenantId",d]});case 24:return c=u(u({},c),{},{name:n,description:r,public:{name:n,description:r}}),l=this.utils.AddressToLibraryId(f),this.Log("Library ID: ".concat(l)),this.Log("Contract address: ".concat(f)),h=l.replace("ilib","iq__"),t.next=31,this.EditContentObject({libraryId:l,objectId:h});case 31:return y=t.sent,t.next=34,this.ReplaceMetadata({libraryId:l,objectId:h,metadata:c,writeToken:y.write_token});case 34:return t.next=36,this.FinalizeContentObject({libraryId:l,objectId:h,writeToken:y.write_token,commitMessage:"Create library"});case 36:if(!i){t.next=39;break}return t.next=39,this.SetContentLibraryImage({libraryId:l,image:i,imageName:s});case 39:return this.Log("Library ".concat(l," created")),t.abrupt("return",l);case 41:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.SetContentLibraryImage=function(){var t=s(a.mark((function t(e){var n,r,i,s,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.writeToken,i=e.image,s=e.imageName,f(n),o=n.replace("ilib","iq__"),t.abrupt("return",this.SetContentObjectImage({libraryId:n,objectId:o,writeToken:r,image:i,imageName:s}));case 4:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.SetContentObjectImage=function(){var t=s(a.mark((function t(e){var n,i,s,o,u,c,d,p,f;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,i=e.objectId,s=e.writeToken,o=e.image,u=e.imageName,c=e.imagePath,d=void 0===c?"public/display_image":c,g({libraryId:n,objectId:i}),y(s),m("image",o),u=u||"display_image","object"!==r(o)){t.next=9;break}return t.next=8,new Response(o).arrayBuffer();case 8:o=t.sent;case 9:return p=A(o),f=["jpg","jpeg","png","gif","webp"].includes(p.ext)?p.mime:"image/*",t.next=13,this.UploadFiles({libraryId:n,objectId:i,writeToken:s,encrypted:!1,fileInfo:[{path:u,mime_type:f,size:o.size||o.length||o.byteLength,data:o}]});case 13:return t.next=15,this.ReplaceMetadata({libraryId:n,objectId:i,writeToken:s,metadataSubtree:d,metadata:{"/":"./files/".concat(u)}});case 15:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DeleteContentLibrary=function(){var t=s(a.mark((function t(e){var n,r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw n=e.libraryId,Error("Not supported");case 6:return r=t.sent,t.next=9,this.CallContractMethodAndWait({contractAddress:this.utils.HashToAddress(n),methodName:"kill",methodArgs:[]});case 9:return t.next=11,this.HttpClient.Request({headers:r,method:"DELETE",path:void 0});case 11:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AddLibraryContentType=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u,c,A;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.typeId,i=e.typeName,s=e.typeHash,o=e.customContractAddress,f(n),this.Log("Adding library content type to ".concat(n,": ").concat(r||s||i)),s&&(r=this.utils.DecodeVersionHash(s).objectId),r){t.next=9;break}return t.next=7,this.ContentType({name:i});case 7:u=t.sent,r=u.id;case 9:return this.Log("Type ID: ".concat(r)),c=this.utils.HashToAddress(r),o=o||this.utils.nullAddress,t.next=14,this.ethClient.CallContractMethodAndWait({contractAddress:this.utils.HashToAddress(n),methodName:"addContentType",methodArgs:[c,o]});case 14:return A=t.sent,t.abrupt("return",A.transactionHash);case 16:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.RemoveLibraryContentType=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u,c;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.typeId,i=e.typeName,s=e.typeHash,f(n),this.Log("Removing library content type from ".concat(n,": ").concat(r||s||i)),s&&(r=this.utils.DecodeVersionHash(s).objectId),r){t.next=9;break}return t.next=7,this.ContentType({name:i});case 7:o=t.sent,r=o.id;case 9:return this.Log("Type ID: ".concat(r)),u=this.utils.HashToAddress(r),t.next=13,this.ethClient.CallContractMethodAndWait({contractAddress:this.utils.HashToAddress(n),methodName:"removeContentType",methodArgs:[u]});case 13:return c=t.sent,t.abrupt("return",c.transactionHash);case 15:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CreateContentObject=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u,A,d,p,h,y;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,i=e.options,s=void 0===i?{}:i,f(n),r&&l(r),this.Log("Creating content object: ".concat(n," ").concat(r||"")),!s.type){t.next=26;break}if(this.Log("Type specified: ".concat(s.type)),!(u=s.type).startsWith("hq__")){t.next=13;break}return t.next=10,this.ContentType({versionHash:u});case 10:u=t.sent,t.next=22;break;case 13:if(!u.startsWith("iq__")){t.next=19;break}return t.next=16,this.ContentType({typeId:u});case 16:u=t.sent,t.next=22;break;case 19:return t.next=21,this.ContentType({name:u});case 21:u=t.sent;case 22:if(u){t.next=24;break}throw Error("Unable to find content type '".concat(s.type,"'"));case 24:o=u.id,s.type=u.hash;case 26:if(r){t.next=44;break}return t.next=29,this.CurrentAccountAddress();case 29:return A=t.sent,t.next=32,this.CallContractMethod({contractAddress:this.utils.HashToAddress(n),methodName:"canContribute",methodArgs:[A]});case 32:if(t.sent){t.next=35;break}throw Error("Current user does not have permission to create content in library ".concat(n));case 35:return this.Log("Deploying contract..."),t.next=38,this.authClient.CreateContentObject({libraryId:n,typeId:o});case 38:d=t.sent,p=d.contractAddress,r=this.utils.AddressToObjectId(p),this.Log("Contract deployed: ".concat(p," ").concat(r)),t.next=51;break;case 44:return t.t0=this,t.t1="Contract already deployed for contract type: ",t.next=48,this.AccessType({id:r});case 48:t.t2=t.sent,t.t3=t.t1.concat.call(t.t1,t.t2),t.t0.Log.call(t.t0,t.t3);case 51:if(!s.visibility){t.next=55;break}return this.Log("Setting visibility to ".concat(s.visibility)),t.next=55,this.SetVisibility({id:r,visibility:s.visibility});case 55:return h=c("qid",r),t.t4=this.utils,t.t5=this.HttpClient,t.next=60,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,update:!0});case 60:return t.t6=t.sent,t.t7=h,t.t8=s,t.t9={headers:t.t6,method:"POST",path:t.t7,body:t.t8},t.t10=t.t5.Request.call(t.t5,t.t9),t.next=67,t.t4.ResponseToJson.call(t.t4,t.t10);case 67:return y=t.sent,this.HttpClient.RecordWriteToken(y.write_token),y.writeToken=y.write_token,y.objectId=y.id,t.abrupt("return",y);case 72:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CopyContentObject=function(){var t=s(a.mark((function t(e){var n,r,i,o,u,c,A,d,p,l,y,g,m=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.originalVersionHash,i=e.options,o=void 0===i?{}:i,f(n),h(r),o.copy_from=r,t.next=6,this.CreateContentObject({libraryId:n,options:o});case 6:return u=t.sent,c=u.objectId,A=u.writeToken,d=this.utils.DecodeVersionHash(r).objectId,t.next=12,this.ContentObjectMetadata({versionHash:r});case 12:return p=t.sent,t.next=15,this.Permission({objectId:d});case 15:if(l=t.sent,y="eluv.caps.iusr".concat(this.utils.AddressToHash(this.signer.address)),!p[y]){t.next=40;break}return t.t0=this.utils,t.t1=this.signer.address,t.next=22,this.ContentObjectOwner({objectId:d});case 22:if(t.t2=t.sent,t.t0.EqualAddress.call(t.t0,t.t1,t.t2)){t.next=26;break}throw Error("Current user is not owner of object ".concat(p));case 26:return t.next=28,this.Crypto.DecryptCap(p[y],this.signer.signingKey.privateKey);case 28:return(g=t.sent).qid=c,t.t3=this,t.t4=n,t.t5=c,t.t6=A,t.t7=y,t.next=37,this.Crypto.EncryptConk(g,this.signer.signingKey.publicKey);case 37:t.t8=t.sent,t.t9={libraryId:t.t4,objectId:t.t5,writeToken:t.t6,metadataSubtree:t.t7,metadata:t.t8},t.t3.ReplaceMetadata.call(t.t3,t.t9);case 40:return t.next=42,Promise.all(Object.keys(p).filter((function(t){return t.startsWith("eluv.caps.ikms")})).map(function(){var t=s(a.mark((function t(e){return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m.DeleteMetadata({libraryId:n,objectId:c,writeToken:A,metadataSubtree:e});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 42:if("owner"===l){t.next=45;break}return t.next=45,this.SetPermission({objectId:c,permission:l,writeToken:A});case 45:return t.next=47,this.FinalizeContentObject({libraryId:n,objectId:c,writeToken:A});case 47:return t.abrupt("return",t.sent);case 48:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CreateNonOwnerCap=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u,c,A,d,p,f;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.objectId,r=e.libraryId,i=e.publicKey,s=e.writeToken,o="eluv.caps.iusr".concat(this.utils.AddressToHash(this.signer.address)),t.next=4,this.ContentObjectMetadata({objectId:n,libraryId:r,metadataSubtree:o});case 4:if(u=t.sent){t.next=7;break}throw Error("No user cap found for current user");case 7:return t.next=9,this.Crypto.DecryptCap(u,this.signer.signingKey.privateKey);case 9:return c=t.sent,A=this.utils.PublicKeyToAddress(i),d="eluv.caps.iusr".concat(this.utils.AddressToHash(A)),t.next=14,this.Crypto.EncryptConk(c,i);case 14:if(p=t.sent,f=!s,s){t.next=20;break}return t.next=19,this.EditContentObject({libraryId:r,objectId:n}).writeToken;case 19:s=t.sent;case 20:if(this.ReplaceMetadata({libraryId:r,objectId:n,writeToken:s,metadataSubtree:d,metadata:p}),!f){t.next=24;break}return t.next=24,this.FinalizeContentObject({libraryId:r,objectId:n,writeToken:s,commitMessage:"Create non-owner cap"});case 24:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.EditContentObject=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.libraryId,r=e.objectId,i=e.options,s=void 0===i?{}:i,g({libraryId:n,objectId:r}),this.Log("Opening content draft: ".concat(n," ").concat(r)),!("type"in s)||!s.type){t.next=23;break}if(!s.type.startsWith("hq__")){t.next=10;break}return t.next=7,this.ContentType({versionHash:s.type});case 7:s.type=t.sent.hash,t.next=23;break;case 10:if(!s.type.startsWith("iq__")){t.next=16;break}return t.next=13,this.ContentType({typeId:s.type});case 13:s.type=t.sent.hash,t.next=23;break;case 16:if(!s.type){t.next=22;break}return t.next=19,this.ContentType({name:s.type});case 19:s.type=t.sent.hash,t.next=23;break;case 22:s.type="";case 23:return o=c("qid",r),t.t0=this.utils,t.t1=this.HttpClient,t.next=28,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,update:!0});case 28:return t.t2=t.sent,t.t3=o,t.t4=s,t.t5={headers:t.t2,method:"POST",path:t.t3,body:t.t4},t.t6=t.t1.Request.call(t.t1,t.t5),t.next=35,t.t0.ResponseToJson.call(t.t0,t.t6);case 35:return u=t.sent,this.HttpClient.RecordWriteToken(u.write_token),u.writeToken=u.write_token,u.objectId=u.id,t.abrupt("return",u);case 40:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CreateAndFinalizeContentObject=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u,c,A,d,p,f,l,h;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.callback,i=e.options,s=void 0===i?{}:i,o=e.commitMessage,u=void 0===o?"":o,c=e.publish,A=void 0===c||c,d=e.awaitCommitConfirmation,p=void 0===d||d,t.next=3,this.CreateContentObject({libraryId:n,options:s});case 3:if(f=t.sent,l=f.id,h=f.writeToken,!r){t.next=8;break}return t.next=8,r({objectId:l,writeToken:h});case 8:return t.next=10,this.FinalizeContentObject({libraryId:n,objectId:l,writeToken:h,commitMessage:u,publish:A,awaitCommitConfirmation:p});case 10:return t.abrupt("return",t.sent);case 11:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.EditAndFinalizeContentObject=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u,c,A,d,p,f,l,h;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.callback,s=e.options,o=void 0===s?{}:s,u=e.commitMessage,c=void 0===u?"":u,A=e.publish,d=void 0===A||A,p=e.awaitCommitConfirmation,f=void 0===p||p,t.next=3,this.EditContentObject({libraryId:n,objectId:r,options:o});case 3:if(l=t.sent,h=l.writeToken,!i){t.next=8;break}return t.next=8,i({writeToken:h});case 8:return t.next=10,this.FinalizeContentObject({libraryId:n,objectId:r,writeToken:h,commitMessage:c,publish:d,awaitCommitConfirmation:f});case 10:return t.abrupt("return",t.sent);case 11:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AwaitPending=function(){var t=s(a.mark((function t(e){var n,r,i,o,u=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=function(){var t=s(a.mark((function t(){return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u.CallContractMethod({contractAddress:u.utils.HashToAddress(e),methodName:"pendingHash"});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),this.Log("Checking for pending commit"),t.next=4,n();case 4:if(t.sent){t.next=7;break}return t.abrupt("return");case 7:return t.next=9,this.authClient.AccessType(e);case 9:t.t0=t.sent,t.t1=this.authClient.ACCESS_TYPES.WALLET,r=t.t0===t.t1,i=r?3:10,this.Log("Waiting for pending commit to clear for ".concat(e)),o=0;case 15:if(!(o<i)){t.next=25;break}return t.next=18,new Promise((function(t){return setTimeout(t,1e3)}));case 18:return t.next=20,n();case 20:if(t.sent){t.next=22;break}return t.abrupt("return");case 22:o++,t.next=15;break;case 25:if(!r){t.next=31;break}return this.Log("Clearing stuck wallet commit",!0),t.next=29,this.CallContractMethodAndWait({contractAddress:this.utils.HashToAddress(e),methodName:"clearPending"});case 29:t.next=32;break;case 31:throw Error("Unable to finalize ".concat(e," - Another commit is pending"));case 32:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.FinalizeContentObject=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u,A,d,p,f,l;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.writeToken,s=e.commitMessage,o=void 0===s?"":s,u=e.publish,A=void 0===u||u,d=e.awaitCommitConfirmation,p=void 0===d||d,g({libraryId:n,objectId:r}),y(i),t.t0=this,t.t1=n,t.t2=r,t.t3=i,t.t4=o,t.next=10,this.userProfileClient.UserMetadata({metadataSubtree:"public/name"});case 10:if(t.t5=t.sent,t.t5){t.next=13;break}t.t5=this.CurrentAccountAddress();case 13:return t.t6=t.t5,t.t7=this.CurrentAccountAddress(),t.t8=(new Date).toISOString(),t.t9={message:t.t4,author:t.t6,author_address:t.t7,timestamp:t.t8},t.t10={libraryId:t.t1,objectId:t.t2,writeToken:t.t3,metadataSubtree:"commit",metadata:t.t9},t.next=20,t.t0.ReplaceMetadata.call(t.t0,t.t10);case 20:return this.Log("Finalizing content draft: ".concat(n," ").concat(r," ").concat(i)),t.next=23,this.AwaitPending(r);case 23:return f=c("q",i),t.t11=this.utils,t.t12=this.HttpClient,t.next=28,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,update:!0});case 28:return t.t13=t.sent,t.t14=f,t.t15={headers:t.t13,method:"POST",path:t.t14,failover:!1},t.t16=t.t12.Request.call(t.t12,t.t15),t.next=34,t.t11.ResponseToJson.call(t.t11,t.t16);case 34:if(l=t.sent,this.Log("Finalized: ".concat(l.hash)),!A){t.next=39;break}return t.next=39,this.PublishContentVersion({objectId:r,versionHash:l.hash,awaitCommitConfirmation:p});case 39:return delete this.contentTypes[r],t.abrupt("return",l);case 41:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.PublishContentVersion=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u,c,A,d,p=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.objectId,r=e.versionHash,i=e.awaitCommitConfirmation,s=void 0===i||i,r?h(r):l(n),this.Log("Publishing: ".concat(n||r)),r&&(n=this.utils.DecodeVersionHash(r).objectId),t.next=6,this.ethClient.CommitContent({contentObjectAddress:this.utils.HashToAddress(n),versionHash:r,signer:this.signer});case 6:return o=t.sent,t.next=9,this.ContractAbi({id:n});case 9:return u=t.sent,c=o.blockNumber+1,t.next=13,this.ExtractValueFromEvent({abi:u,event:o,eventName:"CommitPending",eventValue:"objectHash"});case 13:return A=t.sent,t.next=16,this.CallContractMethod({contractAddress:this.utils.HashToAddress(n),methodName:"pendingHash"});case 16:if(!(d=t.sent)||d===A){t.next=19;break}throw Error("Pending version hash mismatch on ".concat(n,": expected ").concat(A,", currently ").concat(d));case 19:if(!s){t.next=21;break}return t.delegateYield(a.mark((function t(){var e,r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:p.Log("Awaiting commit confirmation for ".concat(A)),e=p.ethClient.Provider().pollingInterval||500;case 2:return t.next=5,new Promise((function(t){return setTimeout(t,e)}));case 5:return t.next=7,p.ContractEvents({contractAddress:p.utils.HashToAddress(n),abi:u,fromBlock:c,count:1e3});case 7:if(r=t.sent,!r.find((function(t){return t.find((function(t){return A===(t&&t.values&&t.values.objectHash)}))}))){t.next=12;break}return p.Log("Commit confirmed: ".concat(A)),t.abrupt("break",14);case 12:t.next=2;break;case 14:case"end":return t.stop()}}),t)}))(),"t0",21);case 21:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DeleteContentVersion=function(){var t=s(a.mark((function t(e){var n,r,i;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.versionHash,h(n),this.Log("Deleting content version: ".concat(n)),r=this.utils.DecodeVersionHash(n),i=r.objectId,t.next=6,this.CallContractMethodAndWait({contractAddress:this.utils.HashToAddress(i),methodName:"deleteVersion",methodArgs:[n]});case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DeleteContentObject=function(){var t=s(a.mark((function t(e){var n,r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,g({libraryId:n,objectId:r}),this.Log("Deleting content version: ".concat(n," ").concat(r)),t.next=5,this.CallContractMethodAndWait({contractAddress:this.utils.HashToAddress(n),methodName:"deleteContent",methodArgs:[this.utils.HashToAddress(r)]});case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.MergeMetadata=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u,A,d;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.writeToken,s=e.metadataSubtree,o=void 0===s?"/":s,u=e.metadata,A=void 0===u?{}:u,g({libraryId:n,objectId:r}),y(i),this.Log("Merging metadata: ".concat(n," ").concat(r," ").concat(i,"\n Subtree: ").concat(o)),this.Log(A),d=c("q",i,"meta",o),t.t0=this.HttpClient,t.next=9,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,update:!0});case 9:return t.t1=t.sent,t.t2=d,t.t3=A,t.t4={headers:t.t1,method:"POST",path:t.t2,body:t.t3,failover:!1},t.next=15,t.t0.Request.call(t.t0,t.t4);case 15:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ReplaceMetadata=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u,A,d;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.writeToken,s=e.metadataSubtree,o=void 0===s?"/":s,u=e.metadata,A=void 0===u?{}:u,g({libraryId:n,objectId:r}),y(i),this.Log("Replacing metadata: ".concat(n," ").concat(r," ").concat(i,"\n Subtree: ").concat(o)),this.Log(A),d=c("q",i,"meta",o),t.t0=this.HttpClient,t.next=9,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,update:!0});case 9:return t.t1=t.sent,t.t2=d,t.t3=A,t.t4={headers:t.t1,method:"PUT",path:t.t2,body:t.t3,failover:!1},t.next=15,t.t0.Request.call(t.t0,t.t4);case 15:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DeleteMetadata=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.writeToken,s=e.metadataSubtree,o=void 0===s?"/":s,g({libraryId:n,objectId:r}),y(i),this.Log("Deleting metadata: ".concat(n," ").concat(r," ").concat(i,"\n Subtree: ").concat(o)),this.Log("Subtree: ".concat(o)),u=c("q",i,"meta",o),t.t0=this.HttpClient,t.next=9,this.authClient.AuthorizationHeader({libraryId:n,objectId:r,update:!0});case 9:return t.t1=t.sent,t.t2=u,t.t3={headers:t.t1,method:"DELETE",path:t.t2,failover:!1},t.next=14,t.t0.Request.call(t.t0,t.t3);case 14:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.SetAccessCharge=function(){var t=s(a.mark((function t(e){var n,r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.objectId,r=e.accessCharge,l(n),this.Log("Setting access charge: ".concat(n," ").concat(r)),t.next=5,this.ethClient.CallContractMethodAndWait({contractAddress:this.utils.HashToAddress(n),methodName:"setAccessCharge",methodArgs:[this.utils.EtherToWei(r).toString()]});case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UpdateContentObjectGraph=function(){var t=s(a.mark((function t(e){var n,i,o,u,c,A,d,p,f=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.libraryId,i=e.objectId,o=e.versionHash,u=e.callback,g({libraryId:n,objectId:i,versionHash:o}),this.Log("Updating content object graph: ".concat(n||""," ").concat(i||o)),o&&(i=this.utils.DecodeVersionHash(o).objectId),A=0,d=a.mark((function t(){var e,r,d,p,l,h,y,g,m,b,I;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f.ContentObjectGraph({libraryId:n,objectId:i,versionHash:o,autoUpdate:!0,select:["name","public/name","public/asset_metadata/display_title"]});case 2:if(e=t.sent,0!==Object.keys(e.auto_updates).length){t.next=6;break}return f.Log("No more updates required"),t.abrupt("return",{v:void 0});case 6:return c||(c=e.auto_updates.order.length),r=e.auto_updates.order[0],d=e.auto_updates.links[r],p=e.details[r].meta||{},l=p.public&&p.public.asset_metadata&&p.public.asset_metadata.display_title||p.public&&p.public.name||p.name||o||i,t.next=13,f.ContentObjectLibraryId({versionHash:r});case 13:return h=t.sent,y=f.utils.DecodeVersionHash(r).objectId,u&&u({completed:A,total:c,action:"Updating ".concat(l," (").concat(y,")...")}),f.Log("Updating links for ".concat(l," (").concat(y," / ").concat(r,")")),t.next=19,f.EditContentObject({libraryId:h,objectId:y});case 19:return g=t.sent,m=g.write_token,t.next=23,Promise.all(d.map(function(){var t=s(a.mark((function t(e){var n,r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.path,r=e.updated,t.next=3,f.ReplaceMetadata({libraryId:h,objectId:y,writeToken:m,metadataSubtree:n,metadata:r});case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 23:return t.next=25,f.FinalizeContentObject({libraryId:h,objectId:y,writeToken:m,commitMessage:"Update links"});case 25:b=t.sent,I=b.hash,r===o&&(o=I),A+=1;case 29:case"end":return t.stop()}}),t)}));case 6:return t.delegateYield(d(),"t0",8);case 8:if(p=t.t0,"object"!==r(p)){t.next=11;break}return t.abrupt("return",p.v);case 11:t.next=6;break;case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CreateLinks=function(){var t=s(a.mark((function t(e){var n,r,i,o,u,c=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.writeToken,o=e.links,u=void 0===o?[]:o,g({libraryId:n,objectId:r}),y(i),t.next=5,this.utils.LimitedMap(10,u,function(){var t=s(a.mark((function t(e){var s,o,u,A;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=e.path.replace(/^(\/|\.)+/,""),"metadata"===(o="file"===(e.type||"file")?"files":e.type)&&(o="meta"),u=e.target.replace(/^(\/|\.)+/,""),u=e.targetHash?"/qfab/".concat(e.targetHash,"/").concat(o,"/").concat(u):"./".concat(o,"/").concat(u),A={"/":u},e.autoUpdate&&(A["."]={auto_update:{tag:"latest"}}),t.next=9,c.ReplaceMetadata({libraryId:n,objectId:r,writeToken:i,metadataSubtree:s,metadata:A});case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.InitializeAuthPolicy=function(){var t=s(a.mark((function t(e){var n,r,i,s,o,u,A,p,f,l,h;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.libraryId,r=e.objectId,i=e.writeToken,s=e.target,o=void 0===s?"auth_policy_spec":s,u=e.body,A=e.version,p=e.description,f=e.id,l={type:"epl-ast",version:A,body:u,data:{"/":c(".","meta",o)},signer:"iusr".concat(this.utils.AddressToHash(this.signer.address)),description:p||"",id:f||""},h="".concat(l.type,"|").concat(l.version,"|").concat(l.body,"|").concat(l.data["/"]),t.t0=this.utils,t.next=6,this.authClient.Sign(d.utils.keccak256(d.utils.toUtf8Bytes(h)));case 6:return t.t1=t.sent,l.signature=t.t0.FormatSignature.call(t.t0,t.t1),t.next=10,this.ReplaceMetadata({libraryId:n,objectId:r,writeToken:i,metadataSubtree:"auth_policy",metadata:l});case 10:return t.next=12,this.SetAuthPolicy({objectId:r,policyId:r});case 12:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.SetAuthPolicy=function(){var t=s(a.mark((function t(e){var n,r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.objectId,r=e.policyId,t.next=3,this.MergeContractMetadata({contractAddress:this.utils.HashToAddress(n),metadataKey:"_AUTH_CONTEXT",metadata:{"elv:delegation-id":r}});case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},function(t,e,n){"use strict";var r=n(354),i=new Set(["jpg","png","gif","webp","flif","cr2","tif","bmp","jxr","psd","ico","bpg","jp2","jpm","jpx","heic","cur","dcm"]),a=function(t){var e=r(t);return i.has(e&&e.ext)?e:null};t.exports=a,t.exports.default=a,Object.defineProperty(a,"minimumBytes",{value:r.minimumBytes})},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(t,e):void 0}}function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var toBytes=function(t){return _toConsumableArray(t).map((function(t){return t.charCodeAt(0)}))},xpiZipFilename=toBytes("META-INF/mozilla.rsa"),oxmlContentTypes=toBytes("[Content_Types].xml"),oxmlRels=toBytes("_rels/.rels");function readUInt64LE(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=t[e],r=1,i=0;++i<8;)r*=256,n+=t[e+i]*r;return n}var fileType=function(t){if(!(t instanceof Uint8Array||t instanceof ArrayBuffer||Buffer.isBuffer(t)))throw new TypeError("Expected the `input` argument to be of type `Uint8Array` or `Buffer` or `ArrayBuffer`, got `".concat(_typeof(t),"`"));var e=t instanceof Uint8Array?t:new Uint8Array(t);if(!(e&&e.length>1))return null;var n=function(t,n){n=Object.assign({offset:0},n);for(var r=0;r<t.length;r++)if(n.mask){if(t[r]!==(n.mask[r]&e[r+n.offset]))return!1}else if(t[r]!==e[r+n.offset])return!1;return!0},r=function(t,e){return n(toBytes(t),e)};if(n([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(n([137,80,78,71,13,10,26,10]))return{ext:"png",mime:"image/png"};if(n([71,73,70]))return{ext:"gif",mime:"image/gif"};if(n([87,69,66,80],{offset:8}))return{ext:"webp",mime:"image/webp"};if(n([70,76,73,70]))return{ext:"flif",mime:"image/flif"};if((n([73,73,42,0])||n([77,77,0,42]))&&n([67,82],{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(n([73,73,42,0])||n([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(n([66,77]))return{ext:"bmp",mime:"image/bmp"};if(n([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(n([56,66,80,83]))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(n([80,75,3,4])){if(n([109,105,109,101,116,121,112,101,97,112,112,108,105,99,97,116,105,111,110,47,101,112,117,98,43,122,105,112],{offset:30}))return{ext:"epub",mime:"application/epub+zip"};if(n(xpiZipFilename,{offset:30}))return{ext:"xpi",mime:"application/x-xpinstall"};if(r("mimetypeapplication/vnd.oasis.opendocument.text",{offset:30}))return{ext:"odt",mime:"application/vnd.oasis.opendocument.text"};if(r("mimetypeapplication/vnd.oasis.opendocument.spreadsheet",{offset:30}))return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};if(r("mimetypeapplication/vnd.oasis.opendocument.presentation",{offset:30}))return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"};var i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.findIndex((function(t,n,r){return n>=e&&80===r[n]&&75===r[n+1]&&3===r[n+2]&&4===r[n+3]}))},a=0,s=!1,o=null;do{var u=a+30;if(s||(s=n(oxmlContentTypes,{offset:u})||n(oxmlRels,{offset:u})),o||(r("word/",{offset:u})?o={ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}:r("ppt/",{offset:u})?o={ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"}:r("xl/",{offset:u})&&(o={ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})),s&&o)return o;a=i(e,u)}while(a>=0);if(o)return o}if(n([80,75])&&(3===e[2]||5===e[2]||7===e[2])&&(4===e[3]||6===e[3]||8===e[3]))return{ext:"zip",mime:"application/zip"};if(n([117,115,116,97,114],{offset:257}))return{ext:"tar",mime:"application/x-tar"};if(n([82,97,114,33,26,7])&&(0===e[6]||1===e[6]))return{ext:"rar",mime:"application/x-rar-compressed"};if(n([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(n([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(n([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(n([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(n([51,103,112,53])||n([0,0,0])&&n([102,116,121,112],{offset:4})&&(n([109,112,52,49],{offset:8})||n([109,112,52,50],{offset:8})||n([105,115,111,109],{offset:8})||n([105,115,111,50],{offset:8})||n([109,109,112,52],{offset:8})||n([77,52,86],{offset:8})||n([100,97,115,104],{offset:8})))return{ext:"mp4",mime:"video/mp4"};if(n([77,84,104,100]))return{ext:"mid",mime:"audio/midi"};if(n([26,69,223,163])){var c=e.subarray(4,4100),A=c.findIndex((function(t,e,n){return 66===n[e]&&130===n[e+1]}));if(-1!==A){var d=A+3,p=function(t){return _toConsumableArray(t).every((function(t,e){return c[d+e]===t.charCodeAt(0)}))};if(p("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(p("webm"))return{ext:"webm",mime:"video/webm"}}}if(n([0,0,0,20,102,116,121,112,113,116,32,32])||n([102,114,101,101],{offset:4})||n([102,116,121,112,113,116,32,32],{offset:4})||n([109,100,97,116],{offset:4})||n([109,111,111,118],{offset:4})||n([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(n([82,73,70,70])){if(n([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(n([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/vnd.wave"};if(n([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(n([48,38,178,117,142,102,207,17,166,217])){var f=30;do{var l=readUInt64LE(e,f+16);if(n([145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101],{offset:f})){if(n([64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43],{offset:f+24}))return{ext:"wma",mime:"audio/x-ms-wma"};if(n([192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43],{offset:f+24}))return{ext:"wmv",mime:"video/x-ms-asf"};break}f+=l}while(f+24<=e.length);return{ext:"asf",mime:"application/vnd.ms-asf"}}if(n([0,0,1,186])||n([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(n([102,116,121,112,51,103],{offset:4}))return{ext:"3gp",mime:"video/3gpp"};for(var h=0;h<2&&h<e.length-16;h++){if(n([73,68,51],{offset:h})||n([255,226],{offset:h,mask:[255,226]}))return{ext:"mp3",mime:"audio/mpeg"};if(n([255,228],{offset:h,mask:[255,228]}))return{ext:"mp2",mime:"audio/mpeg"};if(n([255,248],{offset:h,mask:[255,252]}))return{ext:"mp2",mime:"audio/mpeg"};if(n([255,240],{offset:h,mask:[255,252]}))return{ext:"mp4",mime:"audio/mpeg"}}if(n([102,116,121,112,77,52,65],{offset:4}))return{ext:"m4a",mime:"audio/mp4"};if(n([79,112,117,115,72,101,97,100],{offset:28}))return{ext:"opus",mime:"audio/opus"};if(n([79,103,103,83]))return n([128,116,104,101,111,114,97],{offset:28})?{ext:"ogv",mime:"video/ogg"}:n([1,118,105,100,101,111,0],{offset:28})?{ext:"ogm",mime:"video/ogg"}:n([127,70,76,65,67],{offset:28})?{ext:"oga",mime:"audio/ogg"}:n([83,112,101,101,120,32,32],{offset:28})?{ext:"spx",mime:"audio/ogg"}:n([1,118,111,114,98,105,115],{offset:28})?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"};if(n([102,76,97,67]))return{ext:"flac",mime:"audio/x-flac"};if(n([77,65,67,32]))return{ext:"ape",mime:"audio/ape"};if(n([119,118,112,107]))return{ext:"wv",mime:"audio/wavpack"};if(n([35,33,65,77,82,10]))return{ext:"amr",mime:"audio/amr"};if(n([37,80,68,70]))return{ext:"pdf",mime:"application/pdf"};if(n([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if((67===e[0]||70===e[0])&&n([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(n([123,92,114,116,102]))return{ext:"rtf",mime:"application/rtf"};if(n([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(n([119,79,70,70])&&(n([0,1,0,0],{offset:4})||n([79,84,84,79],{offset:4})))return{ext:"woff",mime:"font/woff"};if(n([119,79,70,50])&&(n([0,1,0,0],{offset:4})||n([79,84,84,79],{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(n([76,80],{offset:34})&&(n([0,0,1],{offset:8})||n([1,0,2],{offset:8})||n([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(n([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(n([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(n([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(n([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(n([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(n([37,33]))return{ext:"ps",mime:"application/postscript"};if(n([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(n([83,81,76,105]))return{ext:"sqlite",mime:"application/x-sqlite3"};if(n([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(n([67,114,50,52]))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(n([77,83,67,70])||n([73,83,99,40]))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(n([33,60,97,114,99,104,62,10,100,101,98,105,97,110,45,98,105,110,97,114,121]))return{ext:"deb",mime:"application/x-deb"};if(n([33,60,97,114,99,104,62]))return{ext:"ar",mime:"application/x-unix-archive"};if(n([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(n([31,160])||n([31,157]))return{ext:"Z",mime:"application/x-compress"};if(n([76,90,73,80]))return{ext:"lz",mime:"application/x-lzip"};if(n([208,207,17,224,161,177,26,225]))return{ext:"msi",mime:"application/x-msi"};if(n([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(n([71],{offset:4})&&(n([71],{offset:192})||n([71],{offset:196})))return{ext:"mts",mime:"video/mp2t"};if(n([66,76,69,78,68,69,82]))return{ext:"blend",mime:"application/x-blender"};if(n([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(n([0,0,0,12,106,80,32,32,13,10,135,10])){if(n([106,112,50,32],{offset:20}))return{ext:"jp2",mime:"image/jp2"};if(n([106,112,120,32],{offset:20}))return{ext:"jpx",mime:"image/jpx"};if(n([106,112,109,32],{offset:20}))return{ext:"jpm",mime:"image/jpm"};if(n([109,106,112,50],{offset:20}))return{ext:"mj2",mime:"image/mj2"}}if(n([70,79,82,77]))return{ext:"aif",mime:"audio/aiff"};if(r("<?xml "))return{ext:"xml",mime:"application/xml"};if(n([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(n([102,116,121,112],{offset:4})){if(n([109,105,102,49],{offset:8}))return{ext:"heic",mime:"image/heif"};if(n([109,115,102,49],{offset:8}))return{ext:"heic",mime:"image/heif-sequence"};if(n([104,101,105,99],{offset:8})||n([104,101,105,120],{offset:8}))return{ext:"heic",mime:"image/heic"};if(n([104,101,118,99],{offset:8})||n([104,101,118,120],{offset:8}))return{ext:"heic",mime:"image/heic-sequence"}}return n([171,75,84,88,32,49,49,187,13,10,26,10])?{ext:"ktx",mime:"image/ktx"}:n([68,73,67,77],{offset:128})?{ext:"dcm",mime:"application/dicom"}:n([77,80,43])||n([77,80,67,75])?{ext:"mpc",mime:"audio/x-musepack"}:n([66,69,71,73,78,58])?{ext:"ics",mime:"text/calendar"}:n([103,108,84,70,2,0,0,0])?{ext:"glb",mime:"model/gltf-binary"}:n([212,195,178,161])||n([161,178,195,212])?{ext:"pcap",mime:"application/vnd.tcpdump.pcap"}:null};module.exports=fileType,module.exports.default=fileType,Object.defineProperty(fileType,"minimumBytes",{value:4100}),module.exports.stream=function(readableStream){return new Promise((function(resolve,reject){var stream=eval("require")("stream");readableStream.once("readable",(function(){var t=new stream.PassThrough,e=readableStream.read(module.exports.minimumBytes)||readableStream.read();try{t.fileType=fileType(e)}catch(t){reject(t)}readableStream.unshift(e),stream.pipeline?resolve(stream.pipeline(readableStream,t,(function(){}))):resolve(readableStream.pipe(t))}))}))}}).call(this,__webpack_require__(2).Buffer)},function(t,e,n){var r=n(3),i=n(4),a=n(12),s=n(18),o=n(19),u=o.ValidateAddress,c=o.ValidateDate,A=o.ValidateObject,d=o.ValidatePresence,p=function(t){var e=t.pm||{},n={ntpId:t.id,ntpClass:"Class ".concat(t.de),tenantId:t.ti,kmsId:t.ki,objectId:e.qid,updatedAt:parseInt(t.ts),startTime:parseInt(e.vat),endTime:parseInt(e.exp),ticketLength:e.sen,maxRedemptions:e.ntp,maxTickets:t.mx};return void 0!==t.cnt&&(n.issuedTickets=t.cnt),n};e.CreateNTPInstance=function(){var t=i(r.mark((function t(e){var n,i,a,s,o,p,f,l,h,y,g,m,b,I,C,v=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.tenantId,i=e.objectId,a=e.groupAddresses,s=e.ntpClass,o=void 0===s?4:s,p=e.maxTickets,f=void 0===p?0:p,l=e.maxRedemptions,h=void 0===l?100:l,y=e.startTime,g=e.endTime,m=e.ticketLength,b=void 0===m?6:m,d("tenantId",n),d("objectId or groupAddresses",i||a),i&&A(i),a&&a.forEach((function(t){return u(t)})),y=c(y),g=c(g),I=["ntp:".concat(parseInt(h)),"sen:".concat(parseInt(b))],i?I.push("qid:".concat(i)):a&&(C=a.map((function(t){return"igrp".concat(v.utils.AddressToHash(t))})),I.push("gid:".concat(C.join(",")))),y&&I.push("vat:".concat(y)),g&&I.push("exp:".concat(g)),t.next=13,this.authClient.MakeKMSCall({tenantId:n,methodName:"elv_createOTPInstance",params:[n,o,JSON.stringify(I),parseInt(f),Date.now()],paramTypes:["string","int","string","int","int"]});case 13:return t.abrupt("return",t.sent);case 14:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UpdateNTPInstance=function(){var t=i(r.mark((function t(e){var n,i,a,s,o,u,A,f,l,h,y;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.tenantId,i=e.ntpId,a=e.maxTickets,s=void 0===a?0:a,o=e.maxRedemptions,u=void 0===o?100:o,A=e.startTime,f=e.endTime,d("tenantId",n),d("ntpId",i),A=c(A),f=c(f),l=[],u&&l.push("ntp:".concat(parseInt(u))),A&&l.push("vat:".concat(A)),f&&l.push("exp:".concat(f)),s&&l.push("max:".concat(parseInt(s))),t.next=12,this.authClient.MakeKMSCall({tenantId:n,methodName:"elv_updateOTPInstance",params:[n,i,"update",JSON.stringify(l),Date.now()],paramTypes:["string","string","string","string","int"]});case 12:return h=t.sent,y=h.Ret,t.abrupt("return",p(JSON.parse(y)));case 15:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.SuspendNTPInstance=function(){var t=i(r.mark((function t(e){var n,i;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.tenantId,i=e.ntpId,d("tenantId",n),d("ntpId",i),t.next=5,this.authClient.MakeKMSCall({tenantId:n,methodName:"elv_updateOTPInstance",params:[n,i,"cancel","[]",Date.now()],paramTypes:["string","string","string","string","int"]});case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DeleteNTPInstance=function(){var t=i(r.mark((function t(e){var n,i;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.tenantId,i=e.ntpId,d("tenantId",n),d("ntpId",i),t.next=5,this.authClient.MakeKMSCall({tenantId:n,methodName:"elv_updateOTPInstance",params:[n,i,"delete","[]",Date.now()],paramTypes:["string","string","string","string","int"]});case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ListNTPInstances=function(){var t=i(r.mark((function t(e){var n,i,a,s,o,u,c,A;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.tenantId,i=e.count,a=void 0===i?10:i,s=e.offset,o=void 0===s?0:s,d("tenantId",n),t.next=4,this.authClient.MakeKMSCall({tenantId:n,methodName:"elv_listOTPInfo",params:[n,o,a],paramTypes:["string","int","int"],signature:!1});case 4:return u=t.sent,c=u.Defs,A=u.Total,t.abrupt("return",{ntpInstances:Object.values(c||{}).map(p),start:o,end:Math.min(A,o+a),total:A});case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.NTPInstance=function(){var t=i(r.mark((function t(e){var n,i;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.tenantId,i=e.ntpId,d("tenantId",n),d("ntpId",i),t.t0=p,t.next=6,this.authClient.MakeKMSCall({tenantId:n,methodName:"elv_getOTPInfo",params:[n,i],paramTypes:["string","string"],signature:!1});case 6:return t.t1=t.sent,t.abrupt("return",(0,t.t0)(t.t1));case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.IssueNTPCode=function(){var t=i(r.mark((function t(e){var n,i,a,s,o,u,c;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.tenantId,i=e.ntpId,a=e.email,s=e.maxRedemptions,d("tenantId",n),d("ntpId",i),o=[],a&&o.push("eml:".concat(a)),s&&o.push("cnt:".concat(parseInt(s))),u=[n,i,JSON.stringify(o),Date.now()],c=["string","string","string","uint"],t.next=10,this.authClient.MakeKMSCall({methodName:"elv_issueOTPCode",params:u,paramTypes:c});case 10:return t.abrupt("return",t.sent);case 11:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.IssueSignedNTPCode=function(){var t=i(r.mark((function t(e){var n,i,a,o,u,c,A;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.tenantId,i=e.ntpId,a=e.email,o=e.maxRedemptions,t.next=3,this.IssueNTPCode({tenantId:n,ntpId:i,email:a,maxRedemptions:o});case 3:if(!(u=t.sent).token){t.next=10;break}return t.next=7,this.authClient.Sign(s.utils.keccak256(s.utils.toUtf8Bytes(u.token)));case 7:c=t.sent,A=this.utils.FormatSignature(c),u.token="".concat(u.token,".").concat(this.utils.B64(A));case 10:return t.abrupt("return",u);case 11:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.RedeemCode=function(){var t=i(r.mark((function t(e){var n,i,s,o,u,c,p,f,l,h,y,g,m,b,I,C,v,E;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.issuer,i=e.tenantId,s=e.ntpId,o=e.code,u=e.email,c=e.includeNTPId,p=void 0!==c&&c,f=this.GenerateWallet(),n=n||"",this.signer||this.SetSigner({signer:f.AddAccountFromMnemonic({mnemonic:f.GenerateMnemonic()})}),!n.startsWith("iq__")){t.next=8;break}A(n),t.next=28;break;case 8:if(!n||n.replace(/^\//,"").startsWith("otp/ntp/iten")){t.next=12;break}throw Error("Invalid issuer: "+n);case 12:return d("issuer or tenantId",n||i),n||(n=a("/otp","ntp",i,s||"")),t.prev=14,t.next=17,this.authClient.GenerateChannelContentToken({issuer:n,code:o,email:u});case 17:return l=t.sent,this.SetStaticToken({token:l}),h=JSON.parse(this.utils.FromB64(l)),t.abrupt("return",p?{objectId:h.qid,ntpId:h.oid}:h.qid);case 23:throw t.prev=23,t.t0=t.catch(14),this.Log("Failed to redeem code:",!0),this.Log(t.t0,!0),t.t0;case 28:return y=n,t.next=31,this.ContentObjectLibraryId({objectId:y});case 31:return g=t.sent,m=function(t){var e=t.split("").map((function(t){return t.charCodeAt(0)}));return e.reduce((function(t,n,r){return e[r+1]?2*t+n*e[r+1]*(r+1):t+n}),0).toString()}(o),t.next=36,this.ContentObjectMetadata({libraryId:g,objectId:y,metadataSubtree:"public/codes/".concat(m)});case 36:if(b=t.sent){t.next=40;break}throw this.Log("Code redemption failed:\n\t".concat(n,"\n\t").concat(o)),Error("Invalid code: "+o);case 40:return I=b.ak,C=b.sites,v=b.info,t.next=43,f.AddAccountFromEncryptedPK({encryptedPrivateKey:this.utils.FromB64(I),password:o});case 43:return E=t.sent,this.SetSigner({signer:E}),t.next=47,this.userProfileClient.WalletAddress();case 47:return t.abrupt("return",{addr:this.utils.FormatAddress(E.address),sites:C,info:v||{}});case 48:case"end":return t.stop()}}),t,this,[[14,23]])})));return function(e){return t.apply(this,arguments)}}()},function(t,e,n){var r=n(3),i=n(7),a=n(4);function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var u=n(360),c=n(12),A=n(19),d=A.ValidateAddress,p=A.ValidateObject,f=A.ValidatePresence;e.MintNFT=function(){var t=a(r.mark((function t(e){var n,i,a,s,A,l,h,y,g;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.tenantId,i=e.address,a=e.marketplaceId,s=e.items,A=e.extraData,l=void 0===A?{}:A,f("tenantId",n),f("address",i),f("marketplaceId",a),f("items",s),p(a),d(i),h={tickets:null,products:s.map((function(t){return{sku:t.sku,quant:t.quantity||1,extra:t.tokenId?o(o({},t.extraData||{}),{},{token_id:t.tokenId}):o({},t.extraData||{})}})),ident:i,cust_name:i,extra:o(o({},l),{},{elv_addr:i})},y=this.utils.B58(u.parse(u.v4())),h.ts=Date.now(),h.trans_id=y,t.next=13,this.Sign(JSON.stringify(h));case 13:return g=t.sent,t.next=16,this.authClient.MakeAuthServiceRequest({method:"POST",path:c("/as/tnt/trans/base",n,a),body:h,headers:{Authorization:"Bearer ".concat(g)}});case 16:return t.abrupt("return",{address:i,transactionId:y});case 17:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CollectionTransactions=function(){var t=a(r.mark((function t(e){var n,i,a,s,o,u,A,d,p;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.tenantId,i=e.collectionId,a=e.filterOptions,s=void 0===a?{}:a,o=Date.now(),u={ts:o},A={email:"email",fromOrdinal:"from_ord",max:"max",status:"status",transactionId:"trans_id"},Object.keys(A).forEach((function(t){s[t]&&(u[A[t]]=s[t])})),d=this.AuthHttpClient.BaseURI().path(c("/tnt","trans",n,i)).query(u).hash("").resource(),t.next=8,this.Sign(d);case 8:return p=t.sent,t.next=11,this.utils.ResponseToJson(this.authClient.MakeAuthServiceRequest({method:"GET",path:c("as","tnt","trans",n,i),queryParams:u,headers:{Authorization:"Bearer ".concat(p)}}));case 11:return t.abrupt("return",t.sent);case 12:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},function(t,e){var n={demo:{configUrl:"https://demov3.net955210.contentfabric.io/config",staging:{siteId:"iq__2gkNh8CCZqFFnoRpEUmz7P3PaBQG",purchaseMode:"develop",appUrl:"https://core.test.contentfabric.io/wallet-demo"}},main:{configUrl:"https://main.net955305.contentfabric.io/config",staging:{siteId:"iq__inauxD1KLyKWPHargCWjdCh2ayr",purchaseMode:"production",appUrl:"https://core.test.contentfabric.io/wallet"},production:{siteId:"iq__suqRJUt2vmXsyiWS5ZaSGwtFU9R",purchaseMode:"production",appUrl:"https://wallet.contentfabric.io"}},__MARKETPLACE_ORDER:["dolly-marketplace","oc-marketplace","maskverse-marketplace","emp-marketplace","microsoft","indieflix-marketplace","angels-airwaves-marketplace"]};n.demo.production=n.demo.staging,n.demov3=n.demo,t.exports=n},function(t,e,n){var r=n(7),i=n(3),a=n(4);function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var u=n(9),c=n(12),A=n(160),d=A.FormatNFTDetails,p=A.FormatNFTMetadata,f=A.FormatNFT;e.UserInfo=function(){if(this.loggedIn)return{address:this.UserAddress(),email:this.__authorization.email,walletType:this.__authorization.walletType,walletName:this.__authorization.walletName}},e.UserAddress=function(){if(this.loggedIn)return this.client.utils.DecodeSignedToken(this.AuthToken()).payload.adr},e.UserWalletBalance=a(i.mark((function t(){var e,n,r,a,s,o,u,A,d,p,f,l,h,y,g,m=arguments;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=m.length>0&&void 0!==m[0]&&m[0],this.loggedIn){t.next=3;break}return t.abrupt("return");case 3:return t.t0=this.client.utils,t.next=6,this.client.authClient.MakeAuthServiceRequest({path:c("as","wlt","mkt","bal"),method:"GET",headers:{Authorization:"Bearer ".concat(this.AuthToken())}});case 6:return t.t1=t.sent,t.next=9,t.t0.ResponseToJson.call(t.t0,t.t1);case 9:if(n=t.sent,r=n.balance,a=n.usage_hold,s=n.payout_hold,o=n.stripe_id,u=n.stripe_payouts_enabled,A=o,d=u,p=parseFloat(r||0),f=Math.max(0,p-parseFloat(a||0)),l=Math.max(0,p-f),h=Math.max(0,p-parseFloat(s||0)),!e||!o||u){t.next=28;break}return y=new URL(c(window.location.origin,window.location.pathname)).toString(),t.next=25,this.client.authClient.MakeAuthServiceRequest({path:c("as","wlt","onb","stripe"),method:"POST",body:{country:"US",mode:this.mode,refresh_url:y.toString(),return_url:y.toString()},headers:{Authorization:"Bearer ".concat(this.AuthToken())}});case 25:return t.next=27,this.UserWalletBalance(!1);case 27:return t.abrupt("return",t.sent);case 28:return g={totalWalletBalance:p,availableWalletBalance:f,pendingWalletBalance:l,withdrawableWalletBalance:h},d&&(g.userStripeId=A,g.userStripeEnabled=d),t.abrupt("return",g);case 31:case"end":return t.stop()}}),t,this)}))),e.UserItemInfo=a(i.mark((function t(){var e,n,r=this;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.loggedIn){t.next=2;break}return t.abrupt("return",{});case 2:return e="iusr".concat(u.AddressToHash(this.UserAddress())),t.next=5,this.client.ethClient.MakeProviderCall({methodName:"send",args:["elv_getAccountProfile",[this.client.contentSpaceId,e]]});case 5:if(this.profileData=t.sent,this.profileData&&this.profileData.NFTs){t.next=8;break}return t.abrupt("return",{});case 8:return n={},Object.keys(this.profileData.NFTs).map((function(t){return r.profileData.NFTs[t].forEach((function(t){var e=(t.TokenUri||"").split("/").find((function(t){return(t||"").startsWith("hq__")}));if(e){t.TokenHold&&(t.TokenHoldDate=new Date(1e3*parseInt(t.TokenHold)));var r=u.FormatAddress(t.ContractAddr),i="".concat(r,"-").concat(t.TokenIdStr);n[i]=o(o({},t),{},{ContractAddr:u.FormatAddress(t.ContractAddr),ContractId:"ictr".concat(u.AddressToHash(t.ContractAddr)),VersionHash:e})}}))})),this.nftInfo=n,t.abrupt("return",this.nftInfo);case 12:case"end":return t.stop()}}),t,this)}))),e.UserItems=a(i.mark((function t(){var e=arguments;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.FilteredQuery(o({mode:"owned"},e[0]||{})));case 1:case"end":return t.stop()}}),t,this)}))),e.UserListings=a(i.mark((function t(){var e,n,r,a,s,o,u,c,A=arguments;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=A.length>0&&void 0!==A[0]?A[0]:{},n=e.sortBy,r=void 0===n?"created":n,a=e.sortDesc,s=void 0!==a&&a,o=e.contractAddress,u=e.tokenId,c=e.marketplaceParams,t.next=3,this.FilteredQuery({mode:"listings",start:0,limit:1e4,sortBy:r,sortDesc:s,sellerAddress:this.UserAddress(),marketplaceParams:c,contractAddress:o,tokenId:u});case 3:return t.abrupt("return",t.sent.results);case 4:case"end":return t.stop()}}),t,this)}))),e.UserSales=a(i.mark((function t(){var e,n,r,a,s,o,u,c,A=arguments;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=A.length>0&&void 0!==A[0]?A[0]:{},n=e.sortBy,r=void 0===n?"created":n,a=e.sortDesc,s=void 0!==a&&a,o=e.contractAddress,u=e.tokenId,c=e.marketplaceParams,t.next=3,this.FilteredQuery({mode:"sales",start:0,limit:1e4,sortBy:r,sortDesc:s,sellerAddress:this.UserAddress(),marketplaceParams:c,contractAddress:o,tokenId:u});case 3:return t.abrupt("return",t.sent.results);case 4:case"end":return t.stop()}}),t,this)}))),e.TenantConfiguration=function(){var t=a(i.mark((function t(e){var n,r;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.tenantId,r=e.contractAddress,t.prev=1,t.next=4,u.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({path:r?c("as","config","nft",r):c("as","config","tnt",n),method:"GET"}));case 4:return t.abrupt("return",t.sent);case 7:return t.prev=7,t.t0=t.catch(1),this.Log("Failed to load tenant configuration",!0),this.Log(t.t0,!0),t.abrupt("return",{});case 12:case"end":return t.stop()}}),t,this,[[1,7]])})));return function(e){return t.apply(this,arguments)}}(),e.MarketplaceStock=function(){var t=a(i.mark((function t(e){var n,r,a;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.marketplaceParams,(r=e.tenantId)||(a=this.MarketplaceInfo({marketplaceParams:n}),r=a.tenantId),!this.loggedIn){t.next=6;break}return t.next=5,u.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({path:c("as","wlt","nft","info",r),method:"GET",headers:{Authorization:"Bearer ".concat(this.AuthToken())}}));case 5:return t.abrupt("return",t.sent);case 6:return t.next=8,u.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({path:c("as","nft","stock",r),method:"GET"}));case 8:return t.abrupt("return",t.sent);case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.MarketplaceInfo=function(t){var e,n=t.marketplaceParams,r=n||{},i=r.tenantSlug,a=r.marketplaceSlug,s=r.marketplaceId,o=r.marketplaceHash;if(i&&a?e=(this.availableMarketplaces[i]||{})[a]:(s=o?this.client.utils.DecodeVersionHash(o).objectId:s,e=this.availableMarketplacesById[s]),!e)throw Error("Eluvio Wallet Client: Unable to find marketplace with parameters ".concat(JSON.stringify(arguments)));return e},e.MarketplaceCSS=function(){var t=a(i.mark((function t(e){var n,r,a;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.marketplaceParams,r=this.MarketplaceInfo({marketplaceParams:n}),a=r.marketplaceHash,this.cachedCSS[a]){t.next=7;break}return t.next=6,this.client.ContentObjectMetadata({versionHash:a,metadataSubtree:"public/asset_metadata/info/branding/custom_css",authorizationToken:this.publicStaticToken,noAuth:!0});case 6:this.cachedCSS[a]=t.sent;case 7:return t.abrupt("return",this.cachedCSS[a]||"");case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AvailableMarketplaces=a(i.mark((function t(){var e,n,r,a=arguments;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=a.length>0&&void 0!==a[0]?a[0]:{},n=e.organizeById,r=e.forceReload,!(void 0!==r&&r)){t.next=4;break}return t.next=4,this.LoadAvailableMarketplaces(!0);case 4:return t.abrupt("return",o({},n?this.availableMarketplacesById:this.availableMarketplaces));case 5:case"end":return t.stop()}}),t,this)}))),e.Marketplace=function(){var t=a(i.mark((function t(e){var n;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.marketplaceParams,t.abrupt("return",this.LoadMarketplace(n));case 2:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.NFT=function(){var t=a(i.mark((function t(e){var n,r,a;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.tokenId,r=e.contractAddress,t.t0=d,t.next=4,u.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({path:c("as","nft","info",r,n),method:"GET"}));case 4:return t.t1=t.sent,a=(0,t.t0)(t.t1),t.t2=o,t.t3=o,t.t4={},t.next=11,this.client.ContentObjectMetadata({versionHash:a.details.VersionHash,metadataSubtree:"public/asset_metadata/nft",produceLinkUrls:!0});case 11:if(t.t5=t.sent,t.t5){t.next=14;break}t.t5={};case 14:return t.t6=t.t5,t.t7=(0,t.t3)(t.t4,t.t6),t.t8=a.metadata||{},a.metadata=(0,t.t2)(t.t7,t.t8),t.next=20,this.TenantConfiguration({contractAddress:r});case 20:return a.config=t.sent,t.abrupt("return",p(a));case 22:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.TransferNFT=function(){var t=a(i.mark((function t(e){var n,r,a;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.contractAddress,r=e.tokenId,(a=e.targetAddress)&&u.ValidAddress(a)){t.next=3;break}throw Error("Eluvio Wallet Client: Invalid or missing target address in UserTransferNFT");case 3:return t.next=5,this.client.authClient.MakeAuthServiceRequest({path:c("as","wlt","mkt","xfer"),method:"POST",body:{contract:u.FormatAddress(n),token:r,to_addr:u.FormatAddress(a)},headers:{Authorization:"Bearer ".concat(this.AuthToken())}});case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ListingStatus=function(){var t=a(i.mark((function t(e){var n;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.listingId,t.prev=1,t.t0=u,t.next=5,this.client.authClient.MakeAuthServiceRequest({path:c("as","mkt","status",n),method:"GET"});case 5:return t.t1=t.sent,t.next=8,t.t0.ResponseToJson.call(t.t0,t.t1);case 8:return t.abrupt("return",t.sent);case 11:if(t.prev=11,t.t2=t.catch(1),404!==t.t2.status){t.next=15;break}return t.abrupt("return");case 15:throw t.t2;case 16:case"end":return t.stop()}}),t,this,[[1,11]])})));return function(e){return t.apply(this,arguments)}}(),e.Listing=function(){var t=a(i.mark((function t(e){var n;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.listingId,t.t0=f,t.t1=u,t.next=5,this.client.authClient.MakeAuthServiceRequest({path:c("as","mkt","l",n),method:"GET"});case 5:return t.t2=t.sent,t.next=8,t.t1.ResponseToJson.call(t.t1,t.t2);case 8:return t.t3=t.sent,t.abrupt("return",(0,t.t0)(t.t3));case 10:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.Listings=a(i.mark((function t(){var e=arguments;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.FilteredQuery(o({mode:"listings"},e[0]||{})));case 1:case"end":return t.stop()}}),t,this)}))),e.ListingStats=a(i.mark((function t(){var e=arguments;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.FilteredQuery(o({mode:"listing-stats"},e[0]||{})));case 1:case"end":return t.stop()}}),t,this)}))),e.Sales=a(i.mark((function t(){var e=arguments;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.FilteredQuery(o({mode:"sales"},e[0]||{})));case 1:case"end":return t.stop()}}),t,this)}))),e.SalesStats=a(i.mark((function t(){var e=arguments;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.FilteredQuery(o({mode:"sales-stats"},e[0]||{})));case 1:case"end":return t.stop()}}),t,this)}))),e.CreateListing=function(){var t=a(i.mark((function t(e){var n,r,a,s;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.contractAddress,r=e.tokenId,a=e.price,s=e.listingId,n=u.FormatAddress(n),!s){t.next=12;break}return t.t0=u,t.next=6,this.client.authClient.MakeAuthServiceRequest({path:c("as","wlt","mkt"),method:"PUT",body:{id:s,price:parseFloat(a)},headers:{Authorization:"Bearer ".concat(this.AuthToken())}});case 6:return t.t1=t.sent,t.next=9,t.t0.ResponseToFormat.call(t.t0,"text",t.t1);case 9:return t.abrupt("return",t.sent);case 12:return t.t2=u,t.next=15,this.client.authClient.MakeAuthServiceRequest({path:c("as","wlt","mkt"),method:"POST",body:{contract:n,token:r,price:parseFloat(a)},headers:{Authorization:"Bearer ".concat(this.AuthToken())}});case 15:return t.t3=t.sent,t.next=18,t.t2.ResponseToJson.call(t.t2,t.t3);case 18:return t.abrupt("return",t.sent);case 19:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.RemoveListing=function(){var t=a(i.mark((function t(e){var n;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.listingId,t.next=3,this.client.authClient.MakeAuthServiceRequest({path:c("as","wlt","mkt",n),method:"DELETE",headers:{Authorization:"Bearer ".concat(this.AuthToken())}});case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ListingNames=function(){var t=a(i.mark((function t(e){var n,r;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n=e.marketplaceParams)){t.next=5;break}return t.next=4,this.MarketplaceInfo({marketplaceParams:n});case 4:r=t.sent.tenantId;case 5:return t.t0=u,t.next=8,this.client.authClient.MakeAuthServiceRequest({path:c("as","mkt","names"),method:"GET",queryParams:r?{filter:"tenant:eq:".concat(r)}:{}});case 8:return t.t1=t.sent,t.next=11,t.t0.ResponseToJson.call(t.t0,t.t1);case 11:return t.abrupt("return",t.sent);case 12:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ListingEditionNames=function(){var t=a(i.mark((function t(e){var n;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.displayName,t.t0=u,t.next=4,this.client.authClient.MakeAuthServiceRequest({path:c("as","mkt","editions"),queryParams:{filter:"nft/display_name:eq:".concat(n)},method:"GET"});case 4:return t.t1=t.sent,t.next=7,t.t0.ResponseToJson.call(t.t0,t.t1);case 7:return t.abrupt("return",t.sent);case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ListingAttributes=a(i.mark((function t(){var e,n,r,a,s,o=arguments;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=o.length>0&&void 0!==o[0]?o[0]:{},n=e.marketplaceParams,r=e.displayName,a=[],!n){t.next=10;break}return t.t0=a,t.t1="tenant:eq:",t.next=7,this.MarketplaceInfo({marketplaceParams:n});case 7:t.t2=t.sent.tenantId,t.t3=t.t1.concat.call(t.t1,t.t2),t.t0.push.call(t.t0,t.t3);case 10:return r&&a.push("nft/display_name:eq:".concat(r)),t.t4=u,t.next=14,this.client.authClient.MakeAuthServiceRequest({path:c("as","mkt","attributes"),method:"GET",queryParams:{filter:a}});case 14:return t.t5=t.sent,t.next=17,t.t4.ResponseToJson.call(t.t4,t.t5);case 17:return s=t.sent,t.abrupt("return",s.map((function(t){return{name:t.trait_type,values:t.values}})).filter((function(t){var e=t.name;return!["Content Fabric Hash","Total Minted Supply","Creator"].includes(e)})));case 19:case"end":return t.stop()}}),t,this)}))),e.ListingPurchaseStatus=function(){var t=a(i.mark((function t(e){var n,r,a,s;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.listingId,r=e.confirmationId,t.prev=1,t.next=4,this.ListingStatus({listingId:n});case 4:if(a=t.sent){t.next=7;break}throw Error("Unable to find info for listing "+n);case 7:return t.next=9,this.MintingStatus({tenantId:a.tenant});case 9:return s=t.sent,t.abrupt("return",s.find((function(t){return"nft-transfer"===t.op&&t.extra&&t.extra[0]===r}))||{status:"none"});case 13:return t.prev=13,t.t0=t.catch(1),this.Log(t.t0,!0),t.abrupt("return",{status:"unknown"});case 17:case"end":return t.stop()}}),t,this,[[1,13]])})));return function(e){return t.apply(this,arguments)}}(),e.PurchaseStatus=function(){var t=a(i.mark((function t(e){var n,r,a,s;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.marketplaceParams,r=e.confirmationId,t.prev=1,t.next=4,this.MarketplaceInfo({marketplaceParams:n});case 4:return a=t.sent,t.next=7,this.MintingStatus({tenantId:a.tenant_id});case 7:return s=t.sent,t.abrupt("return",s.find((function(t){return"nft-buy"===t.op&&t.confirmationId===r}))||{status:"none"});case 11:return t.prev=11,t.t0=t.catch(1),this.Log(t.t0,!0),t.abrupt("return",{status:"unknown"});case 15:case"end":return t.stop()}}),t,this,[[1,11]])})));return function(e){return t.apply(this,arguments)}}(),e.ClaimStatus=function(){var t=a(i.mark((function t(e){var n,r,a,s;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.marketplaceParams,r=e.sku,t.prev=1,t.next=4,this.MarketplaceInfo({marketplaceParams:n});case 4:return a=t.sent,t.next=7,this.MintingStatus({tenantId:a.tenantId});case 7:return s=t.sent,t.abrupt("return",s.find((function(t){return"nft-claim"===t.op&&t.marketplaceId===a.marketplaceId&&t.confirmationId===r}))||{status:"none"});case 11:return t.prev=11,t.t0=t.catch(1),this.Log(t.t0,!0),t.abrupt("return",{status:"unknown"});case 15:case"end":return t.stop()}}),t,this,[[1,11]])})));return function(e){return t.apply(this,arguments)}}(),e.PackOpenStatus=function(){var t=a(i.mark((function t(e){var n,r,a,s;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.contractAddress,r=e.tokenId,t.prev=1,t.next=4,this.TenantConfiguration({contractAddress:n});case 4:return a=t.sent,t.next=7,this.MintingStatus({tenantId:a.tenant});case 7:return s=t.sent,t.abrupt("return",s.find((function(t){return"nft-open"===t.op&&u.EqualAddress(n,t.address)&&t.tokenId===r}))||{status:"none"});case 11:return t.prev=11,t.t0=t.catch(1),this.Log(t.t0,!0),t.abrupt("return",{status:"unknown"});case 15:case"end":return t.stop()}}),t,this,[[1,11]])})));return function(e){return t.apply(this,arguments)}}(),e.CollectionRedemptionStatus=function(){var t=a(i.mark((function t(e){var n,r,a;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.marketplaceParams,r=e.confirmationId,t.prev=1,t.next=4,this.MintingStatus({marketplaceParams:n});case 4:return a=t.sent,t.abrupt("return",a.find((function(t){return"nft-redeem"===t.op&&t.confirmationId===r}))||{status:"none"});case 8:return t.prev=8,t.t0=t.catch(1),this.Log(t.t0,!0),t.abrupt("return",{status:"unknown"});case 12:case"end":return t.stop()}}),t,this,[[1,8]])})));return function(e){return t.apply(this,arguments)}}(),e.LoadDrop=function(){var t=a(i.mark((function t(e){var n,r,a,s,A,d,p=this;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.tenantSlug,r=e.eventSlug,a=e.dropId,this.drops||(this.drops={}),this.drops[n]||(this.drops[n]={}),this.drops[n][r]||(this.drops[n][r]={}),this.drops[n][r][a]){t.next=16;break}return t.next=7,this.client.LatestVersionHash({objectId:this.mainSiteId});case 7:return s=t.sent,t.next=10,this.client.ContentObjectMetadata({versionHash:s,metadataSubtree:c("public","asset_metadata","tenants",n,"sites",r,"info"),resolveLinks:!0,linkDepthLimit:2,resolveIncludeSource:!0,produceLinkUrls:!0,select:[".","drops"],noAuth:!0});case 10:if(t.t0=t.sent,t.t0){t.next=13;break}t.t0=[];case 13:A=t.t0,d=u.DecodeVersionHash(A["."].source).objectId,A.drops.forEach((function(t){t=o(o({},t),{},{eventId:d}),p.drops[n][r][t.uuid]=t,p.drops[t.uuid]=t}));case 16:return t.abrupt("return",this.drops[a]);case 17:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.SubmitDropVote=function(){var t=a(i.mark((function t(e){var n,r,a,s,o;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.marketplaceParams,r=e.eventId,a=e.dropId,s=e.sku,t.next=3,this.MarketplaceInfo({marketplaceParams:n});case 3:return o=t.sent,t.next=6,this.client.authClient.MakeAuthServiceRequest({path:c("as","wlt","act",o.tenant_id),method:"POST",body:{op:"vote-drop",evt:r,id:a,itm:s},headers:{Authorization:"Bearer ".concat(this.AuthToken())}});case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DropStatus=function(){var t=a(i.mark((function t(e){var n,r,a,s;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.marketplace,r=e.eventId,a=e.dropId,t.prev=1,t.next=4,u.ResponseToJson(this.client.authClient.MakeAuthServiceRequest({path:c("as","wlt","act",n.tenant_id,r,a),method:"GET",headers:{Authorization:"Bearer ".concat(this.AuthToken())}}));case 4:return s=t.sent,t.abrupt("return",s.sort((function(t,e){return t.ts>e.ts?1:-1}))[0]||{status:"none"});case 8:return t.prev=8,t.t0=t.catch(1),this.Log(t.t0,!0),t.abrupt("return","");case 12:case"end":return t.stop()}}),t,this,[[1,8]])})));return function(e){return t.apply(this,arguments)}}()},function(t,e,n){"use strict";n.r(e),n.d(e,"F",(function(){return r})),n.d(e,"T",(function(){return i})),n.d(e,"__",(function(){return a})),n.d(e,"add",(function(){return A})),n.d(e,"addIndex",(function(){return h})),n.d(e,"adjust",(function(){return g})),n.d(e,"all",(function(){return w})),n.d(e,"allPass",(function(){return et})),n.d(e,"always",(function(){return nt})),n.d(e,"and",(function(){return rt})),n.d(e,"any",(function(){return at})),n.d(e,"anyPass",(function(){return st})),n.d(e,"ap",(function(){return ot})),n.d(e,"aperture",(function(){return At})),n.d(e,"append",(function(){return dt})),n.d(e,"apply",(function(){return pt})),n.d(e,"applySpec",(function(){return ht})),n.d(e,"applyTo",(function(){return yt})),n.d(e,"ascend",(function(){return gt})),n.d(e,"assoc",(function(){return mt})),n.d(e,"assocPath",(function(){return It})),n.d(e,"binary",(function(){return vt})),n.d(e,"bind",(function(){return D})),n.d(e,"both",(function(){return Qt})),n.d(e,"call",(function(){return kt})),n.d(e,"chain",(function(){return St})),n.d(e,"clamp",(function(){return Dt})),n.d(e,"clone",(function(){return Ot})),n.d(e,"comparator",(function(){return Ht})),n.d(e,"complement",(function(){return Ut})),n.d(e,"compose",(function(){return Kt})),n.d(e,"composeK",(function(){return zt})),n.d(e,"composeP",(function(){return Wt})),n.d(e,"composeWith",(function(){return ee})),n.d(e,"concat",(function(){return we})),n.d(e,"cond",(function(){return Be})),n.d(e,"construct",(function(){return Me})),n.d(e,"constructN",(function(){return Qe})),n.d(e,"contains",(function(){return ke})),n.d(e,"converge",(function(){return _e})),n.d(e,"countBy",(function(){return De})),n.d(e,"curry",(function(){return Mt})),n.d(e,"curryN",(function(){return l})),n.d(e,"dec",(function(){return Re})),n.d(e,"defaultTo",(function(){return Te})),n.d(e,"descend",(function(){return Ne})),n.d(e,"difference",(function(){return Ue})),n.d(e,"differenceWith",(function(){return Fe})),n.d(e,"dissoc",(function(){return je})),n.d(e,"dissocPath",(function(){return qe})),n.d(e,"divide",(function(){return Ye})),n.d(e,"drop",(function(){return ze})),n.d(e,"dropLast",(function(){return Xe})),n.d(e,"dropLastWhile",(function(){return en})),n.d(e,"dropRepeats",(function(){return on})),n.d(e,"dropRepeatsWith",(function(){return sn})),n.d(e,"dropWhile",(function(){return cn})),n.d(e,"either",(function(){return dn})),n.d(e,"empty",(function(){return pn})),n.d(e,"endsWith",(function(){return ln})),n.d(e,"eqBy",(function(){return hn})),n.d(e,"eqProps",(function(){return yn})),n.d(e,"equals",(function(){return ue})),n.d(e,"evolve",(function(){return mn})),n.d(e,"filter",(function(){return be})),n.d(e,"find",(function(){return In})),n.d(e,"findIndex",(function(){return vn})),n.d(e,"findLast",(function(){return wn})),n.d(e,"findLastIndex",(function(){return Qn})),n.d(e,"flatten",(function(){return Mn})),n.d(e,"flip",(function(){return kn})),n.d(e,"forEach",(function(){return _n})),n.d(e,"forEachObjIndexed",(function(){return xn})),n.d(e,"fromPairs",(function(){return Sn})),n.d(e,"groupBy",(function(){return Dn})),n.d(e,"groupWith",(function(){return Rn})),n.d(e,"gt",(function(){return Tn})),n.d(e,"gte",(function(){return Nn})),n.d(e,"has",(function(){return Hn})),n.d(e,"hasIn",(function(){return Ln})),n.d(e,"hasPath",(function(){return On})),n.d(e,"head",(function(){return Zt})),n.d(e,"identical",(function(){return Un})),n.d(e,"identity",(function(){return $t})),n.d(e,"ifElse",(function(){return Fn})),n.d(e,"inc",(function(){return jn})),n.d(e,"includes",(function(){return Pn})),n.d(e,"indexBy",(function(){return Gn})),n.d(e,"indexOf",(function(){return qn})),n.d(e,"init",(function(){return Yn})),n.d(e,"innerJoin",(function(){return Kn})),n.d(e,"insert",(function(){return zn})),n.d(e,"insertAll",(function(){return Jn})),n.d(e,"intersection",(function(){return Zn})),n.d(e,"intersperse",(function(){return Xn})),n.d(e,"into",(function(){return ar})),n.d(e,"invert",(function(){return sr})),n.d(e,"invertObj",(function(){return or})),n.d(e,"invoker",(function(){return ur})),n.d(e,"is",(function(){return cr})),n.d(e,"isEmpty",(function(){return Ar})),n.d(e,"isNil",(function(){return bt})),n.d(e,"join",(function(){return dr})),n.d(e,"juxt",(function(){return pr})),n.d(e,"keys",(function(){return K})),n.d(e,"keysIn",(function(){return fr})),n.d(e,"last",(function(){return an})),n.d(e,"lastIndexOf",(function(){return lr})),n.d(e,"length",(function(){return yr})),n.d(e,"lens",(function(){return gr})),n.d(e,"lensIndex",(function(){return mr})),n.d(e,"lensPath",(function(){return br})),n.d(e,"lensProp",(function(){return Ir})),n.d(e,"lift",(function(){return Bt})),n.d(e,"liftN",(function(){return wt})),n.d(e,"lt",(function(){return Cr})),n.d(e,"lte",(function(){return vr})),n.d(e,"map",(function(){return z})),n.d(e,"mapAccum",(function(){return Er})),n.d(e,"mapAccumRight",(function(){return wr})),n.d(e,"mapObjIndexed",(function(){return Br})),n.d(e,"match",(function(){return Qr})),n.d(e,"mathMod",(function(){return Mr})),n.d(e,"max",(function(){return B})),n.d(e,"maxBy",(function(){return kr})),n.d(e,"mean",(function(){return xr})),n.d(e,"median",(function(){return Sr})),n.d(e,"memoizeWith",(function(){return Dr})),n.d(e,"merge",(function(){return Rr})),n.d(e,"mergeAll",(function(){return Tr})),n.d(e,"mergeDeepLeft",(function(){return Hr})),n.d(e,"mergeDeepRight",(function(){return Lr})),n.d(e,"mergeDeepWith",(function(){return Ur})),n.d(e,"mergeDeepWithKey",(function(){return Or})),n.d(e,"mergeLeft",(function(){return Fr})),n.d(e,"mergeRight",(function(){return jr})),n.d(e,"mergeWith",(function(){return Pr})),n.d(e,"mergeWithKey",(function(){return Nr})),n.d(e,"min",(function(){return Gr})),n.d(e,"minBy",(function(){return qr})),n.d(e,"modulo",(function(){return Yr})),n.d(e,"move",(function(){return Kr})),n.d(e,"multiply",(function(){return zr})),n.d(e,"nAry",(function(){return Ct})),n.d(e,"negate",(function(){return Jr})),n.d(e,"none",(function(){return Vr})),n.d(e,"not",(function(){return Lt})),n.d(e,"nth",(function(){return V})),n.d(e,"nthArg",(function(){return Wr})),n.d(e,"o",(function(){return Zr})),n.d(e,"objOf",(function(){return tr})),n.d(e,"of",(function(){return $r})),n.d(e,"omit",(function(){return ti})),n.d(e,"once",(function(){return ei})),n.d(e,"or",(function(){return An})),n.d(e,"otherwise",(function(){return ri})),n.d(e,"over",(function(){return ii})),n.d(e,"pair",(function(){return ai})),n.d(e,"partial",(function(){return oi})),n.d(e,"partialRight",(function(){return ui})),n.d(e,"partition",(function(){return ci})),n.d(e,"path",(function(){return Z})),n.d(e,"paths",(function(){return W})),n.d(e,"pathEq",(function(){return Ai})),n.d(e,"pathOr",(function(){return di})),n.d(e,"pathSatisfies",(function(){return pi})),n.d(e,"pick",(function(){return fi})),n.d(e,"pickAll",(function(){return li})),n.d(e,"pickBy",(function(){return hi})),n.d(e,"pipe",(function(){return qt})),n.d(e,"pipeK",(function(){return yi})),n.d(e,"pipeP",(function(){return Vt})),n.d(e,"pipeWith",(function(){return te})),n.d(e,"pluck",(function(){return $})),n.d(e,"prepend",(function(){return gi})),n.d(e,"product",(function(){return mi})),n.d(e,"project",(function(){return Ii})),n.d(e,"prop",(function(){return X})),n.d(e,"propEq",(function(){return Ci})),n.d(e,"propIs",(function(){return vi})),n.d(e,"propOr",(function(){return Ei})),n.d(e,"propSatisfies",(function(){return wi})),n.d(e,"props",(function(){return Bi})),n.d(e,"range",(function(){return Qi})),n.d(e,"reduce",(function(){return tt})),n.d(e,"reduceBy",(function(){return Se})),n.d(e,"reduceRight",(function(){return Mi})),n.d(e,"reduceWhile",(function(){return ki})),n.d(e,"reduced",(function(){return _i})),n.d(e,"reject",(function(){return Ie})),n.d(e,"remove",(function(){return Pe})),n.d(e,"repeat",(function(){return Si})),n.d(e,"replace",(function(){return Di})),n.d(e,"reverse",(function(){return Yt})),n.d(e,"scan",(function(){return Ri})),n.d(e,"sequence",(function(){return Ti})),n.d(e,"set",(function(){return Ni})),n.d(e,"slice",(function(){return Pt})),n.d(e,"sort",(function(){return Oi})),n.d(e,"sortBy",(function(){return Hi})),n.d(e,"sortWith",(function(){return Li})),n.d(e,"split",(function(){return Ui})),n.d(e,"splitAt",(function(){return Fi})),n.d(e,"splitEvery",(function(){return ji})),n.d(e,"splitWhen",(function(){return Pi})),n.d(e,"startsWith",(function(){return Gi})),n.d(e,"subtract",(function(){return qi})),n.d(e,"sum",(function(){return _r})),n.d(e,"symmetricDifference",(function(){return Yi})),n.d(e,"symmetricDifferenceWith",(function(){return Ki})),n.d(e,"tail",(function(){return Gt})),n.d(e,"take",(function(){return Ve})),n.d(e,"takeLast",(function(){return fn})),n.d(e,"takeLastWhile",(function(){return zi})),n.d(e,"takeWhile",(function(){return Vi})),n.d(e,"tap",(function(){return Zi})),n.d(e,"test",(function(){return Xi})),n.d(e,"andThen",(function(){return $i})),n.d(e,"times",(function(){return xi})),n.d(e,"toLower",(function(){return ta})),n.d(e,"toPairs",(function(){return ea})),n.d(e,"toPairsIn",(function(){return na})),n.d(e,"toString",(function(){return Ee})),n.d(e,"toUpper",(function(){return ra})),n.d(e,"transduce",(function(){return ia})),n.d(e,"transpose",(function(){return aa})),n.d(e,"traverse",(function(){return sa})),n.d(e,"trim",(function(){return ua})),n.d(e,"tryCatch",(function(){return ca})),n.d(e,"type",(function(){return Tt})),n.d(e,"unapply",(function(){return Aa})),n.d(e,"unary",(function(){return da})),n.d(e,"uncurryN",(function(){return pa})),n.d(e,"unfold",(function(){return fa})),n.d(e,"union",(function(){return la})),n.d(e,"unionWith",(function(){return ya})),n.d(e,"uniq",(function(){return Wn})),n.d(e,"uniqBy",(function(){return Vn})),n.d(e,"uniqWith",(function(){return ha})),n.d(e,"unless",(function(){return ga})),n.d(e,"unnest",(function(){return ma})),n.d(e,"until",(function(){return ba})),n.d(e,"update",(function(){return Ge})),n.d(e,"useWith",(function(){return bi})),n.d(e,"values",(function(){return ft})),n.d(e,"valuesIn",(function(){return Ia})),n.d(e,"view",(function(){return va})),n.d(e,"when",(function(){return Ea})),n.d(e,"where",(function(){return wa})),n.d(e,"whereEq",(function(){return Ba})),n.d(e,"without",(function(){return Qa})),n.d(e,"xor",(function(){return Ma})),n.d(e,"xprod",(function(){return ka})),n.d(e,"zip",(function(){return _a})),n.d(e,"zipObj",(function(){return xa})),n.d(e,"zipWith",(function(){return Sa})),n.d(e,"thunkify",(function(){return Da}));var r=function(){return!1},i=function(){return!0},a={"@@functional/placeholder":!0};function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){return null!=t&&"object"===s(t)&&!0===t["@@functional/placeholder"]}function u(t){return function e(n){return 0===arguments.length||o(n)?e:t.apply(this,arguments)}}function c(t){return function e(n,r){switch(arguments.length){case 0:return e;case 1:return o(n)?e:u((function(e){return t(n,e)}));default:return o(n)&&o(r)?e:o(n)?u((function(e){return t(e,r)})):o(r)?u((function(e){return t(n,e)})):t(n,r)}}}var A=c((function(t,e){return Number(t)+Number(e)}));function d(t,e){var n;e=e||[];var r=(t=t||[]).length,i=e.length,a=[];for(n=0;n<r;)a[a.length]=t[n],n+=1;for(n=0;n<i;)a[a.length]=e[n],n+=1;return a}function p(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,n){return e.apply(this,arguments)};case 3:return function(t,n,r){return e.apply(this,arguments)};case 4:return function(t,n,r,i){return e.apply(this,arguments)};case 5:return function(t,n,r,i,a){return e.apply(this,arguments)};case 6:return function(t,n,r,i,a,s){return e.apply(this,arguments)};case 7:return function(t,n,r,i,a,s,o){return e.apply(this,arguments)};case 8:return function(t,n,r,i,a,s,o,u){return e.apply(this,arguments)};case 9:return function(t,n,r,i,a,s,o,u,c){return e.apply(this,arguments)};case 10:return function(t,n,r,i,a,s,o,u,c,A){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function f(t,e,n){return function(){for(var r=[],i=0,a=t,s=0;s<e.length||i<arguments.length;){var u;s<e.length&&(!o(e[s])||i>=arguments.length)?u=e[s]:(u=arguments[i],i+=1),r[s]=u,o(u)||(a-=1),s+=1}return a<=0?n.apply(this,r):p(a,f(t,r,n))}}var l=c((function(t,e){return 1===t?u(e):p(t,f(t,[],e))})),h=u((function(t){return l(t.length,(function(){var e=0,n=arguments[0],r=arguments[arguments.length-1],i=Array.prototype.slice.call(arguments,0);return i[0]=function(){var t=n.apply(this,d(arguments,[e,r]));return e+=1,t},t.apply(this,i)}))}));function y(t){return function e(n,r,i){switch(arguments.length){case 0:return e;case 1:return o(n)?e:c((function(e,r){return t(n,e,r)}));case 2:return o(n)&&o(r)?e:o(n)?c((function(e,n){return t(e,r,n)})):o(r)?c((function(e,r){return t(n,e,r)})):u((function(e){return t(n,r,e)}));default:return o(n)&&o(r)&&o(i)?e:o(n)&&o(r)?c((function(e,n){return t(e,n,i)})):o(n)&&o(i)?c((function(e,n){return t(e,r,n)})):o(r)&&o(i)?c((function(e,r){return t(n,e,r)})):o(n)?u((function(e){return t(e,r,i)})):o(r)?u((function(e){return t(n,e,i)})):o(i)?u((function(e){return t(n,r,e)})):t(n,r,i)}}}var g=y((function(t,e,n){if(t>=n.length||t<-n.length)return n;var r=(t<0?n.length:0)+t,i=d(n);return i[r]=e(n[r]),i})),m=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)};function b(t){return null!=t&&"function"==typeof t["@@transducer/step"]}function I(t,e,n){return function(){if(0===arguments.length)return n();var r=Array.prototype.slice.call(arguments,0),i=r.pop();if(!m(i)){for(var a=0;a<t.length;){if("function"==typeof i[t[a]])return i[t[a]].apply(i,r);a+=1}if(b(i)){var s=e.apply(null,r);return s(i)}}return n.apply(this,arguments)}}function C(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}}var v={init:function(){return this.xf["@@transducer/init"]()},result:function(t){return this.xf["@@transducer/result"](t)}},E=function(){function t(t,e){this.xf=e,this.f=t,this.all=!0}return t.prototype["@@transducer/init"]=v.init,t.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.f(e)||(this.all=!1,t=C(this.xf["@@transducer/step"](t,!1))),t},t}(),w=c(I(["all"],c((function(t,e){return new E(t,e)})),(function(t,e){for(var n=0;n<e.length;){if(!t(e[n]))return!1;n+=1}return!0}))),B=c((function(t,e){return e>t?e:t}));function Q(t,e){for(var n=0,r=e.length,i=Array(r);n<r;)i[n]=t(e[n]),n+=1;return i}function M(t){return"[object String]"===Object.prototype.toString.call(t)}function k(t){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var _=u((function(t){return!!m(t)||!!t&&("object"===k(t)&&(!M(t)&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&(t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1)))))})),x=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},t}();function S(t){return new x(t)}var D=c((function(t,e){return p(t.length,(function(){return t.apply(e,arguments)}))}));function R(t,e,n){for(var r=n.next();!r.done;){if((e=t["@@transducer/step"](e,r.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)}function T(t,e,n,r){return t["@@transducer/result"](n[r](D(t["@@transducer/step"],t),e))}var N="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function O(t,e,n){if("function"==typeof t&&(t=S(t)),_(n))return function(t,e,n){for(var r=0,i=n.length;r<i;){if((e=t["@@transducer/step"](e,n[r]))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}(t,e,n);if("function"==typeof n["fantasy-land/reduce"])return T(t,e,n,"fantasy-land/reduce");if(null!=n[N])return R(t,e,n[N]());if("function"==typeof n.next)return R(t,e,n);if("function"==typeof n.reduce)return T(t,e,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}var H=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=v.init,t.prototype["@@transducer/result"]=v.result,t.prototype["@@transducer/step"]=function(t,e){return this.xf["@@transducer/step"](t,this.f(e))},t}(),L=c((function(t,e){return new H(t,e)}));function U(t,e){return Object.prototype.hasOwnProperty.call(e,t)}var F=Object.prototype.toString,j=function(){return"[object Arguments]"===F.call(arguments)?function(t){return"[object Arguments]"===F.call(t)}:function(t){return U("callee",t)}}(),P=!{toString:null}.propertyIsEnumerable("toString"),G=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],q=function(){return arguments.propertyIsEnumerable("length")}(),Y=function(t,e){for(var n=0;n<t.length;){if(t[n]===e)return!0;n+=1}return!1},K="function"!=typeof Object.keys||q?u((function(t){if(Object(t)!==t)return[];var e,n,r=[],i=q&&j(t);for(e in t)!U(e,t)||i&&"length"===e||(r[r.length]=e);if(P)for(n=G.length-1;n>=0;)U(e=G[n],t)&&!Y(r,e)&&(r[r.length]=e),n-=1;return r})):u((function(t){return Object(t)!==t?[]:Object.keys(t)})),z=c(I(["fantasy-land/map","map"],L,(function(t,e){switch(Object.prototype.toString.call(e)){case"[object Function]":return l(e.length,(function(){return t.call(this,e.apply(this,arguments))}));case"[object Object]":return O((function(n,r){return n[r]=t(e[r]),n}),{},K(e));default:return Q(t,e)}}))),J=Number.isInteger||function(t){return t<<0===t},V=c((function(t,e){var n=t<0?e.length+t:t;return M(e)?e.charAt(n):e[n]})),W=c((function(t,e){return t.map((function(t){for(var n,r=e,i=0;i<t.length;){if(null==r)return;n=t[i],r=J(n)?V(n,r):r[n],i+=1}return r}))})),Z=c((function(t,e){return W([t],e)[0]})),X=c((function(t,e){return Z([t],e)})),$=c((function(t,e){return z(X(t),e)})),tt=y(O),et=u((function(t){return l(tt(B,0,$("length",t)),(function(){for(var e=0,n=t.length;e<n;){if(!t[e].apply(this,arguments))return!1;e+=1}return!0}))})),nt=u((function(t){return function(){return t}})),rt=c((function(t,e){return t&&e})),it=function(){function t(t,e){this.xf=e,this.f=t,this.any=!1}return t.prototype["@@transducer/init"]=v.init,t.prototype["@@transducer/result"]=function(t){return this.any||(t=this.xf["@@transducer/step"](t,!1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.f(e)&&(this.any=!0,t=C(this.xf["@@transducer/step"](t,!0))),t},t}(),at=c(I(["any"],c((function(t,e){return new it(t,e)})),(function(t,e){for(var n=0;n<e.length;){if(t(e[n]))return!0;n+=1}return!1}))),st=u((function(t){return l(tt(B,0,$("length",t)),(function(){for(var e=0,n=t.length;e<n;){if(t[e].apply(this,arguments))return!0;e+=1}return!1}))})),ot=c((function(t,e){return"function"==typeof e["fantasy-land/ap"]?e["fantasy-land/ap"](t):"function"==typeof t.ap?t.ap(e):"function"==typeof t?function(n){return t(n)(e(n))}:O((function(t,n){return d(t,z(n,e))}),[],t)}));function ut(t,e){for(var n=0,r=e.length-(t-1),i=new Array(r>=0?r:0);n<r;)i[n]=Array.prototype.slice.call(e,n,n+t),n+=1;return i}var ct=function(){function t(t,e){this.xf=e,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=v.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.store(e),this.full?this.xf["@@transducer/step"](t,this.getCopy()):t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},t.prototype.getCopy=function(){return d(Array.prototype.slice.call(this.acc,this.pos),Array.prototype.slice.call(this.acc,0,this.pos))},t}(),At=c(I([],c((function(t,e){return new ct(t,e)})),ut)),dt=c((function(t,e){return d(e,[t])})),pt=c((function(t,e){return t.apply(this,e)})),ft=u((function(t){for(var e=K(t),n=e.length,r=[],i=0;i<n;)r[i]=t[e[i]],i+=1;return r}));function lt(t,e){return K(e).reduce((function(n,r){return n[r]=t(e[r]),n}),{})}var ht=u((function t(e){return e=lt((function(e){return"function"==typeof e?e:t(e)}),e),l(tt(B,0,$("length",ft(e))),(function(){var t=arguments;return lt((function(e){return pt(e,t)}),e)}))})),yt=c((function(t,e){return e(t)})),gt=y((function(t,e,n){var r=t(e),i=t(n);return r<i?-1:r>i?1:0})),mt=y((function(t,e,n){var r={};for(var i in n)r[i]=n[i];return r[t]=e,r})),bt=u((function(t){return null==t})),It=y((function t(e,n,r){if(0===e.length)return n;var i=e[0];if(e.length>1){var a=!bt(r)&&U(i,r)?r[i]:J(e[1])?[]:{};n=t(Array.prototype.slice.call(e,1),n,a)}if(J(i)&&m(r)){var s=[].concat(r);return s[i]=n,s}return mt(i,n,r)})),Ct=c((function(t,e){switch(t){case 0:return function(){return e.call(this)};case 1:return function(t){return e.call(this,t)};case 2:return function(t,n){return e.call(this,t,n)};case 3:return function(t,n,r){return e.call(this,t,n,r)};case 4:return function(t,n,r,i){return e.call(this,t,n,r,i)};case 5:return function(t,n,r,i,a){return e.call(this,t,n,r,i,a)};case 6:return function(t,n,r,i,a,s){return e.call(this,t,n,r,i,a,s)};case 7:return function(t,n,r,i,a,s,o){return e.call(this,t,n,r,i,a,s,o)};case 8:return function(t,n,r,i,a,s,o,u){return e.call(this,t,n,r,i,a,s,o,u)};case 9:return function(t,n,r,i,a,s,o,u,c){return e.call(this,t,n,r,i,a,s,o,u,c)};case 10:return function(t,n,r,i,a,s,o,u,c,A){return e.call(this,t,n,r,i,a,s,o,u,c,A)};default:throw new Error("First argument to nAry must be a non-negative integer no greater than ten")}})),vt=u((function(t){return Ct(2,t)}));function Et(t){var e=Object.prototype.toString.call(t);return"[object Function]"===e||"[object AsyncFunction]"===e||"[object GeneratorFunction]"===e||"[object AsyncGeneratorFunction]"===e}var wt=c((function(t,e){var n=l(t,e);return l(t,(function(){return O(ot,z(n,arguments[0]),Array.prototype.slice.call(arguments,1))}))})),Bt=u((function(t){return wt(t.length,t)})),Qt=c((function(t,e){return Et(t)?function(){return t.apply(this,arguments)&&e.apply(this,arguments)}:Bt(rt)(t,e)})),Mt=u((function(t){return l(t.length,t)})),kt=Mt((function(t){return t.apply(this,Array.prototype.slice.call(arguments,1))}));function _t(t){return function e(n){for(var r,i,a,s=[],o=0,u=n.length;o<u;){if(_(n[o]))for(a=0,i=(r=t?e(n[o]):n[o]).length;a<i;)s[s.length]=r[a],a+=1;else s[s.length]=n[o];o+=1}return s}}var xt=function(t){var e=function(t){return{"@@transducer/init":v.init,"@@transducer/result":function(e){return t["@@transducer/result"](e)},"@@transducer/step":function(e,n){var r=t["@@transducer/step"](e,n);return r["@@transducer/reduced"]?{"@@transducer/value":r,"@@transducer/reduced":!0}:r}}}(t);return{"@@transducer/init":v.init,"@@transducer/result":function(t){return e["@@transducer/result"](t)},"@@transducer/step":function(t,n){return _(n)?O(e,t,n):O(e,t,[n])}}},St=c(I(["fantasy-land/chain","chain"],c((function(t,e){return z(t,xt(e))})),(function(t,e){return"function"==typeof e?function(n){return t(e(n))(n)}:_t(!1)(z(t,e))}))),Dt=y((function(t,e,n){if(t>e)throw new Error("min must not be greater than max in clamp(min, max, value)");return n<t?t:n>e?e:n}));function Rt(t){return new RegExp(t.source,(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":""))}var Tt=u((function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}));function Nt(t,e,n,r){var i=function(i){for(var a=e.length,s=0;s<a;){if(t===e[s])return n[s];s+=1}for(var o in e[s+1]=t,n[s+1]=i,t)i[o]=r?Nt(t[o],e,n,!0):t[o];return i};switch(Tt(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return Rt(t);default:return t}}var Ot=u((function(t){return null!=t&&"function"==typeof t.clone?t.clone():Nt(t,[],[],!0)})),Ht=u((function(t){return function(e,n){return t(e,n)?-1:t(n,e)?1:0}})),Lt=u((function(t){return!t})),Ut=Bt(Lt);function Ft(t,e){return function(){return e.call(this,t.apply(this,arguments))}}function jt(t,e){return function(){var n=arguments.length;if(0===n)return e();var r=arguments[n-1];return m(r)||"function"!=typeof r[t]?e.apply(this,arguments):r[t].apply(r,Array.prototype.slice.call(arguments,0,n-1))}}var Pt=y(jt("slice",(function(t,e,n){return Array.prototype.slice.call(n,t,e)}))),Gt=u(jt("tail",Pt(1,1/0)));function qt(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return p(arguments[0].length,tt(Ft,arguments[0],Gt(arguments)))}var Yt=u((function(t){return M(t)?t.split("").reverse().join(""):Array.prototype.slice.call(t,0).reverse()}));function Kt(){if(0===arguments.length)throw new Error("compose requires at least one argument");return qt.apply(this,Yt(arguments))}function zt(){if(0===arguments.length)throw new Error("composeK requires at least one argument");var t=Array.prototype.slice.call(arguments),e=t.pop();return Kt(Kt.apply(this,z(St,t)),e)}function Jt(t,e){return function(){var n=this;return t.apply(n,arguments).then((function(t){return e.call(n,t)}))}}function Vt(){if(0===arguments.length)throw new Error("pipeP requires at least one argument");return p(arguments[0].length,tt(Jt,arguments[0],Gt(arguments)))}function Wt(){if(0===arguments.length)throw new Error("composeP requires at least one argument");return Vt.apply(this,Yt(arguments))}var Zt=V(0);function Xt(t){return t}var $t=u(Xt),te=c((function(t,e){if(e.length<=0)return $t;var n=Zt(e),r=Gt(e);return p(n.length,(function(){return O((function(e,n){return t.call(this,n,e)}),n.apply(this,arguments),r)}))})),ee=c((function(t,e){return te.apply(this,[t,Yt(e)])}));function ne(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}function re(t,e,n){for(var r=0,i=n.length;r<i;){if(t(e,n[r]))return!0;r+=1}return!1}var ie="function"==typeof Object.is?Object.is:function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e};function ae(t){return(ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function se(t,e,n,r){var i=ne(t);function a(t,e){return oe(t,e,n.slice(),r.slice())}return!re((function(t,e){return!re(a,e,t)}),ne(e),i)}function oe(t,e,n,r){if(ie(t,e))return!0;var i=Tt(t);if(i!==Tt(e))return!1;if(null==t||null==e)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof e["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e)&&"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof e.equals)return"function"==typeof t.equals&&t.equals(e)&&"function"==typeof e.equals&&e.equals(t);switch(i){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===function(t){var e=String(t).match(/^function (\w*)/);return null==e?"":e[1]}(t.constructor))return t===e;break;case"Boolean":case"Number":case"String":if(ae(t)!==ae(e)||!ie(t.valueOf(),e.valueOf()))return!1;break;case"Date":if(!ie(t.valueOf(),e.valueOf()))return!1;break;case"Error":return t.name===e.name&&t.message===e.message;case"RegExp":if(t.source!==e.source||t.global!==e.global||t.ignoreCase!==e.ignoreCase||t.multiline!==e.multiline||t.sticky!==e.sticky||t.unicode!==e.unicode)return!1}for(var a=n.length-1;a>=0;){if(n[a]===t)return r[a]===e;a-=1}switch(i){case"Map":return t.size===e.size&&se(t.entries(),e.entries(),n.concat([t]),r.concat([e]));case"Set":return t.size===e.size&&se(t.values(),e.values(),n.concat([t]),r.concat([e]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var s=K(t);if(s.length!==K(e).length)return!1;var o=n.concat([t]),u=r.concat([e]);for(a=s.length-1;a>=0;){var c=s[a];if(!U(c,e)||!oe(e[c],t[c],o,u))return!1;a-=1}return!0}var ue=c((function(t,e){return oe(t,e,[],[])}));function ce(t){return(ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ae(t,e,n){var r,i;if("function"==typeof t.indexOf)switch(ce(e)){case"number":if(0===e){for(r=1/e;n<t.length;){if(0===(i=t[n])&&1/i===r)return n;n+=1}return-1}if(e!=e){for(;n<t.length;){if("number"==typeof(i=t[n])&&i!=i)return n;n+=1}return-1}return t.indexOf(e,n);case"string":case"boolean":case"function":case"undefined":return t.indexOf(e,n);case"object":if(null===e)return t.indexOf(e,n)}for(;n<t.length;){if(ue(t[n],e))return n;n+=1}return-1}function de(t,e){return Ae(e,t,0)>=0}function pe(t){return'"'+t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var fe=function(t){return(t<10?"0":"")+t},le="function"==typeof Date.prototype.toISOString?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+fe(t.getUTCMonth()+1)+"-"+fe(t.getUTCDate())+"T"+fe(t.getUTCHours())+":"+fe(t.getUTCMinutes())+":"+fe(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function he(t){return function(){return!t.apply(this,arguments)}}function ye(t,e){for(var n=0,r=e.length,i=[];n<r;)t(e[n])&&(i[i.length]=e[n]),n+=1;return i}function ge(t){return"[object Object]"===Object.prototype.toString.call(t)}var me=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=v.init,t.prototype["@@transducer/result"]=v.result,t.prototype["@@transducer/step"]=function(t,e){return this.f(e)?this.xf["@@transducer/step"](t,e):t},t}(),be=c(I(["filter"],c((function(t,e){return new me(t,e)})),(function(t,e){return ge(e)?O((function(n,r){return t(e[r])&&(n[r]=e[r]),n}),{},K(e)):ye(t,e)}))),Ie=c((function(t,e){return be(he(t),e)}));function Ce(t){return(Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ve(t,e){var n=function(n){var r=e.concat([t]);return de(n,r)?"<Circular>":ve(n,r)},r=function(t,e){return Q((function(e){return pe(e)+": "+n(t[e])}),e.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+Q(n,t).join(", ")+"))";case"[object Array]":return"["+Q(n,t).concat(r(t,Ie((function(t){return/^\d+$/.test(t)}),K(t)))).join(", ")+"]";case"[object Boolean]":return"object"===Ce(t)?"new Boolean("+n(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?n(NaN):pe(le(t)))+")";case"[object Null]":return"null";case"[object Number]":return"object"===Ce(t)?"new Number("+n(t.valueOf())+")":1/t==-1/0?"-0":t.toString(10);case"[object String]":return"object"===Ce(t)?"new String("+n(t.valueOf())+")":pe(t);case"[object Undefined]":return"undefined";default:if("function"==typeof t.toString){var i=t.toString();if("[object Object]"!==i)return i}return"{"+r(t,K(t)).join(", ")+"}"}}var Ee=u((function(t){return ve(t,[])})),we=c((function(t,e){if(m(t)){if(m(e))return t.concat(e);throw new TypeError(Ee(e)+" is not an array")}if(M(t)){if(M(e))return t+e;throw new TypeError(Ee(e)+" is not a string")}if(null!=t&&Et(t["fantasy-land/concat"]))return t["fantasy-land/concat"](e);if(null!=t&&Et(t.concat))return t.concat(e);throw new TypeError(Ee(t)+' does not have a method named "concat" or "fantasy-land/concat"')})),Be=u((function(t){return p(tt(B,0,z((function(t){return t[0].length}),t)),(function(){for(var e=0;e<t.length;){if(t[e][0].apply(this,arguments))return t[e][1].apply(this,arguments);e+=1}}))})),Qe=c((function(t,e){if(t>10)throw new Error("Constructor with greater than ten arguments");return 0===t?function(){return new e}:Mt(Ct(t,(function(t,n,r,i,a,s,o,u,c,A){switch(arguments.length){case 1:return new e(t);case 2:return new e(t,n);case 3:return new e(t,n,r);case 4:return new e(t,n,r,i);case 5:return new e(t,n,r,i,a);case 6:return new e(t,n,r,i,a,s);case 7:return new e(t,n,r,i,a,s,o);case 8:return new e(t,n,r,i,a,s,o,u);case 9:return new e(t,n,r,i,a,s,o,u,c);case 10:return new e(t,n,r,i,a,s,o,u,c,A)}})))})),Me=u((function(t){return Qe(t.length,t)})),ke=c(de),_e=c((function(t,e){return l(tt(B,0,$("length",e)),(function(){var n=arguments,r=this;return t.apply(r,Q((function(t){return t.apply(r,n)}),e))}))})),xe=function(){function t(t,e,n,r){this.valueFn=t,this.valueAcc=e,this.keyFn=n,this.xf=r,this.inputs={}}return t.prototype["@@transducer/init"]=v.init,t.prototype["@@transducer/result"]=function(t){var e;for(e in this.inputs)if(U(e,this.inputs)&&(t=this.xf["@@transducer/step"](t,this.inputs[e]))["@@transducer/reduced"]){t=t["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){var n=this.keyFn(e);return this.inputs[n]=this.inputs[n]||[n,this.valueAcc],this.inputs[n][1]=this.valueFn(this.inputs[n][1],e),t},t}(),Se=f(4,[],I([],f(4,[],(function(t,e,n,r){return new xe(t,e,n,r)})),(function(t,e,n,r){return O((function(r,i){var a=n(i);return r[a]=t(U(a,r)?r[a]:Nt(e,[],[],!1),i),r}),{},r)}))),De=Se((function(t,e){return t+1}),0),Re=A(-1),Te=c((function(t,e){return null==e||e!=e?t:e})),Ne=y((function(t,e,n){var r=t(e),i=t(n);return r>i?-1:r<i?1:0}));function Oe(t){return(Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function He(t,e,n){var r,i=Oe(t);switch(i){case"string":case"number":return 0===t&&1/t==-1/0?!!n._items["-0"]||(e&&(n._items["-0"]=!0),!1):null!==n._nativeSet?e?(r=n._nativeSet.size,n._nativeSet.add(t),n._nativeSet.size===r):n._nativeSet.has(t):i in n._items?t in n._items[i]||(e&&(n._items[i][t]=!0),!1):(e&&(n._items[i]={},n._items[i][t]=!0),!1);case"boolean":if(i in n._items){var a=t?1:0;return!!n._items[i][a]||(e&&(n._items[i][a]=!0),!1)}return e&&(n._items[i]=t?[!1,!0]:[!0,!1]),!1;case"function":return null!==n._nativeSet?e?(r=n._nativeSet.size,n._nativeSet.add(t),n._nativeSet.size===r):n._nativeSet.has(t):i in n._items?!!de(t,n._items[i])||(e&&n._items[i].push(t),!1):(e&&(n._items[i]=[t]),!1);case"undefined":return!!n._items[i]||(e&&(n._items[i]=!0),!1);case"object":if(null===t)return!!n._items.null||(e&&(n._items.null=!0),!1);default:return(i=Object.prototype.toString.call(t))in n._items?!!de(t,n._items[i])||(e&&n._items[i].push(t),!1):(e&&(n._items[i]=[t]),!1)}}var Le=function(){function t(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}return t.prototype.add=function(t){return!He(t,!0,this)},t.prototype.has=function(t){return He(t,!1,this)},t}(),Ue=c((function(t,e){for(var n=[],r=0,i=t.length,a=e.length,s=new Le,o=0;o<a;o+=1)s.add(e[o]);for(;r<i;)s.add(t[r])&&(n[n.length]=t[r]),r+=1;return n})),Fe=y((function(t,e,n){for(var r=[],i=0,a=e.length;i<a;)re(t,e[i],n)||re(t,e[i],r)||r.push(e[i]),i+=1;return r})),je=c((function(t,e){var n={};for(var r in e)n[r]=e[r];return delete n[t],n})),Pe=y((function(t,e,n){var r=Array.prototype.slice.call(n,0);return r.splice(t,e),r})),Ge=y((function(t,e,n){return g(t,nt(e),n)})),qe=c((function t(e,n){switch(e.length){case 0:return n;case 1:return J(e[0])&&m(n)?Pe(e[0],1,n):je(e[0],n);default:var r=e[0],i=Array.prototype.slice.call(e,1);return null==n[r]?n:J(r)&&m(n)?Ge(r,t(i,n[r]),n):mt(r,t(i,n[r]),n)}})),Ye=c((function(t,e){return t/e})),Ke=function(){function t(t,e){this.xf=e,this.n=t}return t.prototype["@@transducer/init"]=v.init,t.prototype["@@transducer/result"]=v.result,t.prototype["@@transducer/step"]=function(t,e){return this.n>0?(this.n-=1,t):this.xf["@@transducer/step"](t,e)},t}(),ze=c(I(["drop"],c((function(t,e){return new Ke(t,e)})),(function(t,e){return Pt(Math.max(0,t),1/0,e)}))),Je=function(){function t(t,e){this.xf=e,this.n=t,this.i=0}return t.prototype["@@transducer/init"]=v.init,t.prototype["@@transducer/result"]=v.result,t.prototype["@@transducer/step"]=function(t,e){this.i+=1;var n=0===this.n?t:this.xf["@@transducer/step"](t,e);return this.n>=0&&this.i>=this.n?C(n):n},t}(),Ve=c(I(["take"],c((function(t,e){return new Je(t,e)})),(function(t,e){return Pt(0,t<0?1/0:t,e)})));function We(t,e){return Ve(t<e.length?e.length-t:0,e)}var Ze=function(){function t(t,e){this.xf=e,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=v.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.full&&(t=this.xf["@@transducer/step"](t,this.acc[this.pos])),this.store(e),t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},t}(),Xe=c(I([],c((function(t,e){return new Ze(t,e)})),We));function $e(t,e){for(var n=e.length-1;n>=0&&t(e[n]);)n-=1;return Pt(0,n+1,e)}var tn=function(){function t(t,e){this.f=t,this.retained=[],this.xf=e}return t.prototype["@@transducer/init"]=v.init,t.prototype["@@transducer/result"]=function(t){return this.retained=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.f(e)?this.retain(t,e):this.flush(t,e)},t.prototype.flush=function(t,e){return t=O(this.xf["@@transducer/step"],t,this.retained),this.retained=[],this.xf["@@transducer/step"](t,e)},t.prototype.retain=function(t,e){return this.retained.push(e),t},t}(),en=c(I([],c((function(t,e){return new tn(t,e)})),$e)),nn=function(){function t(t,e){this.xf=e,this.pred=t,this.lastValue=void 0,this.seenFirstValue=!1}return t.prototype["@@transducer/init"]=v.init,t.prototype["@@transducer/result"]=v.result,t.prototype["@@transducer/step"]=function(t,e){var n=!1;return this.seenFirstValue?this.pred(this.lastValue,e)&&(n=!0):this.seenFirstValue=!0,this.lastValue=e,n?t:this.xf["@@transducer/step"](t,e)},t}(),rn=c((function(t,e){return new nn(t,e)})),an=V(-1),sn=c(I([],rn,(function(t,e){var n=[],r=1,i=e.length;if(0!==i)for(n[0]=e[0];r<i;)t(an(n),e[r])||(n[n.length]=e[r]),r+=1;return n}))),on=u(I([],rn(ue),sn(ue))),un=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=v.init,t.prototype["@@transducer/result"]=v.result,t.prototype["@@transducer/step"]=function(t,e){if(this.f){if(this.f(e))return t;this.f=null}return this.xf["@@transducer/step"](t,e)},t}(),cn=c(I(["dropWhile"],c((function(t,e){return new un(t,e)})),(function(t,e){for(var n=0,r=e.length;n<r&&t(e[n]);)n+=1;return Pt(n,1/0,e)}))),An=c((function(t,e){return t||e})),dn=c((function(t,e){return Et(t)?function(){return t.apply(this,arguments)||e.apply(this,arguments)}:Bt(An)(t,e)})),pn=u((function(t){return null!=t&&"function"==typeof t["fantasy-land/empty"]?t["fantasy-land/empty"]():null!=t&&null!=t.constructor&&"function"==typeof t.constructor["fantasy-land/empty"]?t.constructor["fantasy-land/empty"]():null!=t&&"function"==typeof t.empty?t.empty():null!=t&&null!=t.constructor&&"function"==typeof t.constructor.empty?t.constructor.empty():m(t)?[]:M(t)?"":ge(t)?{}:j(t)?function(){return arguments}():void 0})),fn=c((function(t,e){return ze(t>=0?e.length-t:0,e)})),ln=c((function(t,e){return ue(fn(t.length,e),t)})),hn=y((function(t,e,n){return ue(t(e),t(n))})),yn=y((function(t,e,n){return ue(e[t],n[t])}));function gn(t){return(gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var mn=c((function t(e,n){var r,i,a,s=n instanceof Array?[]:{};for(i in n)a=gn(r=e[i]),s[i]="function"===a?r(n[i]):r&&"object"===a?t(r,n[i]):n[i];return s})),bn=function(){function t(t,e){this.xf=e,this.f=t,this.found=!1}return t.prototype["@@transducer/init"]=v.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.f(e)&&(this.found=!0,t=C(this.xf["@@transducer/step"](t,e))),t},t}(),In=c(I(["find"],c((function(t,e){return new bn(t,e)})),(function(t,e){for(var n=0,r=e.length;n<r;){if(t(e[n]))return e[n];n+=1}}))),Cn=function(){function t(t,e){this.xf=e,this.f=t,this.idx=-1,this.found=!1}return t.prototype["@@transducer/init"]=v.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,-1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.idx+=1,this.f(e)&&(this.found=!0,t=C(this.xf["@@transducer/step"](t,this.idx))),t},t}(),vn=c(I([],c((function(t,e){return new Cn(t,e)})),(function(t,e){for(var n=0,r=e.length;n<r;){if(t(e[n]))return n;n+=1}return-1}))),En=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=v.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.last))},t.prototype["@@transducer/step"]=function(t,e){return this.f(e)&&(this.last=e),t},t}(),wn=c(I([],c((function(t,e){return new En(t,e)})),(function(t,e){for(var n=e.length-1;n>=0;){if(t(e[n]))return e[n];n-=1}}))),Bn=function(){function t(t,e){this.xf=e,this.f=t,this.idx=-1,this.lastIdx=-1}return t.prototype["@@transducer/init"]=v.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.lastIdx))},t.prototype["@@transducer/step"]=function(t,e){return this.idx+=1,this.f(e)&&(this.lastIdx=this.idx),t},t}(),Qn=c(I([],c((function(t,e){return new Bn(t,e)})),(function(t,e){for(var n=e.length-1;n>=0;){if(t(e[n]))return n;n-=1}return-1}))),Mn=u(_t(!0)),kn=u((function(t){return l(t.length,(function(e,n){var r=Array.prototype.slice.call(arguments,0);return r[0]=n,r[1]=e,t.apply(this,r)}))})),_n=c(jt("forEach",(function(t,e){for(var n=e.length,r=0;r<n;)t(e[r]),r+=1;return e}))),xn=c((function(t,e){for(var n=K(e),r=0;r<n.length;){var i=n[r];t(e[i],i,e),r+=1}return e})),Sn=u((function(t){for(var e={},n=0;n<t.length;)e[t[n][0]]=t[n][1],n+=1;return e})),Dn=c(jt("groupBy",Se((function(t,e){return null==t&&(t=[]),t.push(e),t}),null))),Rn=c((function(t,e){for(var n=[],r=0,i=e.length;r<i;){for(var a=r+1;a<i&&t(e[a-1],e[a]);)a+=1;n.push(e.slice(r,a)),r=a}return n})),Tn=c((function(t,e){return t>e})),Nn=c((function(t,e){return t>=e})),On=c((function(t,e){if(0===t.length||bt(e))return!1;for(var n=e,r=0;r<t.length;){if(bt(n)||!U(t[r],n))return!1;n=n[t[r]],r+=1}return!0})),Hn=c((function(t,e){return On([t],e)})),Ln=c((function(t,e){return t in e})),Un=c(ie),Fn=y((function(t,e,n){return l(Math.max(t.length,e.length,n.length),(function(){return t.apply(this,arguments)?e.apply(this,arguments):n.apply(this,arguments)}))})),jn=A(1),Pn=c(de),Gn=Se((function(t,e){return e}),null),qn=c((function(t,e){return"function"!=typeof e.indexOf||m(e)?Ae(e,t,0):e.indexOf(t)})),Yn=Pt(0,-1),Kn=y((function(t,e,n){return ye((function(e){return re(t,e,n)}),e)})),zn=y((function(t,e,n){t=t<n.length&&t>=0?t:n.length;var r=Array.prototype.slice.call(n,0);return r.splice(t,0,e),r})),Jn=y((function(t,e,n){return t=t<n.length&&t>=0?t:n.length,[].concat(Array.prototype.slice.call(n,0,t),e,Array.prototype.slice.call(n,t))})),Vn=c((function(t,e){for(var n,r,i=new Le,a=[],s=0;s<e.length;)n=t(r=e[s]),i.add(n)&&a.push(r),s+=1;return a})),Wn=Vn($t),Zn=c((function(t,e){var n,r;return t.length>e.length?(n=t,r=e):(n=e,r=t),Wn(ye(kn(de)(n),r))})),Xn=c(jt("intersperse",(function(t,e){for(var n=[],r=0,i=e.length;r<i;)r===i-1?n.push(e[r]):n.push(e[r],t),r+=1;return n})));var $n="function"==typeof Object.assign?Object.assign:function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1,r=arguments.length;n<r;){var i=arguments[n];if(null!=i)for(var a in i)U(a,i)&&(e[a]=i[a]);n+=1}return e},tr=c((function(t,e){var n={};return n[t]=e,n}));function er(t){return(er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var nr={"@@transducer/init":Array,"@@transducer/step":function(t,e){return t.push(e),t},"@@transducer/result":Xt},rr={"@@transducer/init":String,"@@transducer/step":function(t,e){return t+e},"@@transducer/result":Xt},ir={"@@transducer/init":Object,"@@transducer/step":function(t,e){return $n(t,_(e)?tr(e[0],e[1]):e)},"@@transducer/result":Xt};var ar=y((function(t,e,n){return b(t)?O(e(t),t["@@transducer/init"](),n):O(e(function(t){if(b(t))return t;if(_(t))return nr;if("string"==typeof t)return rr;if("object"===er(t))return ir;throw new Error("Cannot create transformer for "+t)}(t)),Nt(t,[],[],!1),n)})),sr=u((function(t){for(var e=K(t),n=e.length,r=0,i={};r<n;){var a=e[r],s=t[a],o=U(s,i)?i[s]:i[s]=[];o[o.length]=a,r+=1}return i})),or=u((function(t){for(var e=K(t),n=e.length,r=0,i={};r<n;){var a=e[r];i[t[a]]=a,r+=1}return i})),ur=c((function(t,e){return l(t+1,(function(){var n=arguments[t];if(null!=n&&Et(n[e]))return n[e].apply(n,Array.prototype.slice.call(arguments,0,t));throw new TypeError(Ee(n)+' does not have a method named "'+e+'"')}))})),cr=c((function(t,e){return null!=e&&e.constructor===t||e instanceof t})),Ar=u((function(t){return null!=t&&ue(t,pn(t))})),dr=ur(1,"join"),pr=u((function(t){return _e((function(){return Array.prototype.slice.call(arguments,0)}),t)})),fr=u((function(t){var e,n=[];for(e in t)n[n.length]=e;return n})),lr=c((function(t,e){if("function"!=typeof e.lastIndexOf||m(e)){for(var n=e.length-1;n>=0;){if(ue(e[n],t))return n;n-=1}return-1}return e.lastIndexOf(t)}));function hr(t){return"[object Number]"===Object.prototype.toString.call(t)}var yr=u((function(t){return null!=t&&hr(t.length)?t.length:NaN})),gr=c((function(t,e){return function(n){return function(r){return z((function(t){return e(t,r)}),n(t(r)))}}})),mr=u((function(t){return gr(V(t),Ge(t))})),br=u((function(t){return gr(Z(t),It(t))})),Ir=u((function(t){return gr(X(t),mt(t))})),Cr=c((function(t,e){return t<e})),vr=c((function(t,e){return t<=e})),Er=y((function(t,e,n){for(var r=0,i=n.length,a=[],s=[e];r<i;)s=t(s[0],n[r]),a[r]=s[1],r+=1;return[s[0],a]})),wr=y((function(t,e,n){for(var r=n.length-1,i=[],a=[e];r>=0;)a=t(a[0],n[r]),i[r]=a[1],r-=1;return[a[0],i]})),Br=c((function(t,e){return O((function(n,r){return n[r]=t(e[r],r,e),n}),{},K(e))})),Qr=c((function(t,e){return e.match(t)||[]})),Mr=c((function(t,e){return J(t)?!J(e)||e<1?NaN:(t%e+e)%e:NaN})),kr=y((function(t,e,n){return t(n)>t(e)?n:e})),_r=tt(A,0),xr=u((function(t){return _r(t)/t.length})),Sr=u((function(t){var e=t.length;if(0===e)return NaN;var n=2-e%2,r=(e-n)/2;return xr(Array.prototype.slice.call(t,0).sort((function(t,e){return t<e?-1:t>e?1:0})).slice(r,r+n))})),Dr=c((function(t,e){var n={};return p(e.length,(function(){var r=t.apply(this,arguments);return U(r,n)||(n[r]=e.apply(this,arguments)),n[r]}))})),Rr=c((function(t,e){return $n({},t,e)})),Tr=u((function(t){return $n.apply(null,[{}].concat(t))})),Nr=y((function(t,e,n){var r,i={};for(r in e)U(r,e)&&(i[r]=U(r,n)?t(r,e[r],n[r]):e[r]);for(r in n)U(r,n)&&!U(r,i)&&(i[r]=n[r]);return i})),Or=y((function t(e,n,r){return Nr((function(n,r,i){return ge(r)&&ge(i)?t(e,r,i):e(n,r,i)}),n,r)})),Hr=c((function(t,e){return Or((function(t,e,n){return e}),t,e)})),Lr=c((function(t,e){return Or((function(t,e,n){return n}),t,e)})),Ur=y((function(t,e,n){return Or((function(e,n,r){return t(n,r)}),e,n)})),Fr=c((function(t,e){return $n({},e,t)})),jr=c((function(t,e){return $n({},t,e)})),Pr=y((function(t,e,n){return Nr((function(e,n,r){return t(n,r)}),e,n)})),Gr=c((function(t,e){return e<t?e:t})),qr=y((function(t,e,n){return t(n)<t(e)?n:e})),Yr=c((function(t,e){return t%e})),Kr=y((function(t,e,n){var r=n.length,i=n.slice(),a=t<0?r+t:t,s=e<0?r+e:e,o=i.splice(a,1);return a<0||a>=n.length||s<0||s>=n.length?n:[].concat(i.slice(0,s)).concat(o).concat(i.slice(s,n.length))})),zr=c((function(t,e){return t*e})),Jr=u((function(t){return-t})),Vr=c((function(t,e){return w(he(t),e)})),Wr=u((function(t){return l(t<0?1:t+1,(function(){return V(t,arguments)}))})),Zr=y((function(t,e,n){return t(e(n))}));function Xr(t){return[t]}var $r=u(Xr),ti=c((function(t,e){for(var n={},r={},i=0,a=t.length;i<a;)r[t[i]]=1,i+=1;for(var s in e)r.hasOwnProperty(s)||(n[s]=e[s]);return n})),ei=u((function(t){var e,n=!1;return p(t.length,(function(){return n?e:(n=!0,e=t.apply(this,arguments))}))}));function ni(t,e){if(null==e||!Et(e.then))throw new TypeError("`"+t+"` expected a Promise, received "+ve(e,[]))}var ri=c((function(t,e){return ni("otherwise",e),e.then(null,t)})),ii=y((function(t,e,n){return t((function(t){return function t(e){return{value:e,map:function(n){return t(n(e))}}}(e(t))}))(n).value})),ai=c((function(t,e){return[t,e]}));function si(t){return c((function(e,n){return p(Math.max(0,e.length-n.length),(function(){return e.apply(this,t(n,arguments))}))}))}var oi=si(d),ui=si(kn(d)),ci=pr([be,Ie]),Ai=y((function(t,e,n){return ue(Z(t,n),e)})),di=y((function(t,e,n){return Te(t,Z(e,n))})),pi=y((function(t,e,n){return t(Z(e,n))})),fi=c((function(t,e){for(var n={},r=0;r<t.length;)t[r]in e&&(n[t[r]]=e[t[r]]),r+=1;return n})),li=c((function(t,e){for(var n={},r=0,i=t.length;r<i;){var a=t[r];n[a]=e[a],r+=1}return n})),hi=c((function(t,e){var n={};for(var r in e)t(e[r],r,e)&&(n[r]=e[r]);return n}));function yi(){if(0===arguments.length)throw new Error("pipeK requires at least one argument");return zt.apply(this,Yt(arguments))}var gi=c((function(t,e){return d([t],e)})),mi=tt(zr,1),bi=c((function(t,e){return l(e.length,(function(){for(var n=[],r=0;r<e.length;)n.push(e[r].call(this,arguments[r])),r+=1;return t.apply(this,n.concat(Array.prototype.slice.call(arguments,e.length)))}))})),Ii=bi(Q,[li,$t]),Ci=y((function(t,e,n){return ue(e,n[t])})),vi=y((function(t,e,n){return cr(t,n[e])})),Ei=y((function(t,e,n){return di(t,[e],n)})),wi=y((function(t,e,n){return t(n[e])})),Bi=c((function(t,e){return t.map((function(t){return Z([t],e)}))})),Qi=c((function(t,e){if(!hr(t)||!hr(e))throw new TypeError("Both arguments to range must be numbers");for(var n=[],r=t;r<e;)n.push(r),r+=1;return n})),Mi=y((function(t,e,n){for(var r=n.length-1;r>=0;)e=t(n[r],e),r-=1;return e})),ki=f(4,[],(function(t,e,n,r){return O((function(n,r){return t(n,r)?e(n,r):C(n)}),n,r)})),_i=u(C),xi=c((function(t,e){var n,r=Number(e),i=0;if(r<0||isNaN(r))throw new RangeError("n must be a non-negative number");for(n=new Array(r);i<r;)n[i]=t(i),i+=1;return n})),Si=c((function(t,e){return xi(nt(t),e)})),Di=y((function(t,e,n){return n.replace(t,e)})),Ri=y((function(t,e,n){for(var r=0,i=n.length,a=[e];r<i;)e=t(e,n[r]),a[r+1]=e,r+=1;return a})),Ti=c((function(t,e){return"function"==typeof e.sequence?e.sequence(t):Mi((function(t,e){return ot(z(gi,t),e)}),t([]),e)})),Ni=y((function(t,e,n){return ii(t,nt(e),n)})),Oi=c((function(t,e){return Array.prototype.slice.call(e,0).sort(t)})),Hi=c((function(t,e){return Array.prototype.slice.call(e,0).sort((function(e,n){var r=t(e),i=t(n);return r<i?-1:r>i?1:0}))})),Li=c((function(t,e){return Array.prototype.slice.call(e,0).sort((function(e,n){for(var r=0,i=0;0===r&&i<t.length;)r=t[i](e,n),i+=1;return r}))})),Ui=ur(1,"split"),Fi=c((function(t,e){return[Pt(0,t,e),Pt(t,yr(e),e)]})),ji=c((function(t,e){if(t<=0)throw new Error("First argument to splitEvery must be a positive integer");for(var n=[],r=0;r<e.length;)n.push(Pt(r,r+=t,e));return n})),Pi=c((function(t,e){for(var n=0,r=e.length,i=[];n<r&&!t(e[n]);)i.push(e[n]),n+=1;return[i,Array.prototype.slice.call(e,n)]})),Gi=c((function(t,e){return ue(Ve(t.length,e),t)})),qi=c((function(t,e){return Number(t)-Number(e)})),Yi=c((function(t,e){return we(Ue(t,e),Ue(e,t))})),Ki=y((function(t,e,n){return we(Fe(t,e,n),Fe(t,n,e))})),zi=c((function(t,e){for(var n=e.length-1;n>=0&&t(e[n]);)n-=1;return Pt(n+1,1/0,e)})),Ji=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=v.init,t.prototype["@@transducer/result"]=v.result,t.prototype["@@transducer/step"]=function(t,e){return this.f(e)?this.xf["@@transducer/step"](t,e):C(t)},t}(),Vi=c(I(["takeWhile"],c((function(t,e){return new Ji(t,e)})),(function(t,e){for(var n=0,r=e.length;n<r&&t(e[n]);)n+=1;return Pt(0,n,e)}))),Wi=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=v.init,t.prototype["@@transducer/result"]=v.result,t.prototype["@@transducer/step"]=function(t,e){return this.f(e),this.xf["@@transducer/step"](t,e)},t}(),Zi=c(I([],c((function(t,e){return new Wi(t,e)})),(function(t,e){return t(e),e})));var Xi=c((function(t,e){if(n=t,"[object RegExp]"!==Object.prototype.toString.call(n))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+Ee(t));var n;return Rt(t).test(e)})),$i=c((function(t,e){return ni("andThen",e),e.then(t)})),ta=ur(0,"toLowerCase"),ea=u((function(t){var e=[];for(var n in t)U(n,t)&&(e[e.length]=[n,t[n]]);return e})),na=u((function(t){var e=[];for(var n in t)e[e.length]=[n,t[n]];return e})),ra=ur(0,"toUpperCase"),ia=l(4,(function(t,e,n,r){return O(t("function"==typeof e?S(e):e),n,r)})),aa=u((function(t){for(var e=0,n=[];e<t.length;){for(var r=t[e],i=0;i<r.length;)void 0===n[i]&&(n[i]=[]),n[i].push(r[i]),i+=1;e+=1}return n})),sa=y((function(t,e,n){return"function"==typeof n["fantasy-land/traverse"]?n["fantasy-land/traverse"](e,t):Ti(t,z(e,n))})),oa="\t\n\v\f\r \u2028\u2029\ufeff",ua=u("function"==typeof String.prototype.trim&&!oa.trim()&&"".trim()?function(t){return t.trim()}:function(t){var e=new RegExp("^["+oa+"]["+oa+"]*"),n=new RegExp("["+oa+"]["+oa+"]*$");return t.replace(e,"").replace(n,"")}),ca=c((function(t,e){return p(t.length,(function(){try{return t.apply(this,arguments)}catch(t){return e.apply(this,d([t],arguments))}}))})),Aa=u((function(t){return function(){return t(Array.prototype.slice.call(arguments,0))}})),da=u((function(t){return Ct(1,t)})),pa=c((function(t,e){return l(t,(function(){for(var n,r=1,i=e,a=0;r<=t&&"function"==typeof i;)n=r===t?arguments.length:a+i.length,i=i.apply(this,Array.prototype.slice.call(arguments,a,n)),r+=1,a=n;return i}))})),fa=c((function(t,e){for(var n=t(e),r=[];n&&n.length;)r[r.length]=n[0],n=t(n[1]);return r})),la=c(Kt(Wn,d)),ha=c((function(t,e){for(var n,r=0,i=e.length,a=[];r<i;)re(t,n=e[r],a)||(a[a.length]=n),r+=1;return a})),ya=y((function(t,e,n){return ha(t,d(e,n))})),ga=y((function(t,e,n){return t(n)?n:e(n)})),ma=St(Xt),ba=y((function(t,e,n){for(var r=n;!t(r);)r=e(r);return r})),Ia=u((function(t){var e,n=[];for(e in t)n[n.length]=t[e];return n})),Ca=function(t){return{value:t,"fantasy-land/map":function(){return this}}},va=c((function(t,e){return t(Ca)(e).value})),Ea=y((function(t,e,n){return t(n)?e(n):n})),wa=c((function(t,e){for(var n in t)if(U(n,t)&&!t[n](e[n]))return!1;return!0})),Ba=c((function(t,e){return wa(z(ue,t),e)})),Qa=c((function(t,e){return Ie(kn(de)(t),e)})),Ma=c((function(t,e){return Boolean(!t^!e)})),ka=c((function(t,e){for(var n,r=0,i=t.length,a=e.length,s=[];r<i;){for(n=0;n<a;)s[s.length]=[t[r],e[n]],n+=1;r+=1}return s})),_a=c((function(t,e){for(var n=[],r=0,i=Math.min(t.length,e.length);r<i;)n[r]=[t[r],e[r]],r+=1;return n})),xa=c((function(t,e){for(var n=0,r=Math.min(t.length,e.length),i={};n<r;)i[t[n]]=e[n],n+=1;return i})),Sa=y((function(t,e,n){for(var r=[],i=0,a=Math.min(e.length,n.length);i<a;)r[i]=t(e[i],n[i]),i+=1;return r})),Da=u((function(t){return l(t.length,(function(){var e=arguments;return function(){return t.apply(this,e)}}))}))},function(t,e,n){"use strict";var r;n.r(e),n.d(e,"v1",(function(){return h})),n.d(e,"v3",(function(){return B})),n.d(e,"v4",(function(){return Q})),n.d(e,"v5",(function(){return _})),n.d(e,"NIL",(function(){return x})),n.d(e,"version",(function(){return S})),n.d(e,"validate",(function(){return o})),n.d(e,"stringify",(function(){return p})),n.d(e,"parse",(function(){return y}));var i=new Uint8Array(16);function a(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}var s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var o=function(t){return"string"==typeof t&&s.test(t)},u=[],c=0;c<256;++c)u.push((c+256).toString(16).substr(1));var A,d,p=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(u[t[e+0]]+u[t[e+1]]+u[t[e+2]]+u[t[e+3]]+"-"+u[t[e+4]]+u[t[e+5]]+"-"+u[t[e+6]]+u[t[e+7]]+"-"+u[t[e+8]]+u[t[e+9]]+"-"+u[t[e+10]]+u[t[e+11]]+u[t[e+12]]+u[t[e+13]]+u[t[e+14]]+u[t[e+15]]).toLowerCase();if(!o(n))throw TypeError("Stringified UUID is invalid");return n},f=0,l=0;var h=function(t,e,n){var r=e&&n||0,i=e||new Array(16),s=(t=t||{}).node||A,o=void 0!==t.clockseq?t.clockseq:d;if(null==s||null==o){var u=t.random||(t.rng||a)();null==s&&(s=A=[1|u[0],u[1],u[2],u[3],u[4],u[5]]),null==o&&(o=d=16383&(u[6]<<8|u[7]))}var c=void 0!==t.msecs?t.msecs:Date.now(),h=void 0!==t.nsecs?t.nsecs:l+1,y=c-f+(h-l)/1e4;if(y<0&&void 0===t.clockseq&&(o=o+1&16383),(y<0||c>f)&&void 0===t.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");f=c,l=h,d=o;var g=(1e4*(268435455&(c+=122192928e5))+h)%4294967296;i[r++]=g>>>24&255,i[r++]=g>>>16&255,i[r++]=g>>>8&255,i[r++]=255&g;var m=c/4294967296*1e4&268435455;i[r++]=m>>>8&255,i[r++]=255&m,i[r++]=m>>>24&15|16,i[r++]=m>>>16&255,i[r++]=o>>>8|128,i[r++]=255&o;for(var b=0;b<6;++b)i[r+b]=s[b];return e||p(i)};var y=function(t){if(!o(t))throw TypeError("Invalid UUID");var e,n=new Uint8Array(16);return n[0]=(e=parseInt(t.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(t.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(t.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(t.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n};var g=function(t,e,n){function r(t,r,i,a){if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));for(var e=[],n=0;n<t.length;++n)e.push(t.charCodeAt(n));return e}(t)),"string"==typeof r&&(r=y(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+t.length);if(s.set(r),s.set(t,r.length),(s=n(s))[6]=15&s[6]|e,s[8]=63&s[8]|128,i){a=a||0;for(var o=0;o<16;++o)i[a+o]=s[o];return i}return p(s)}try{r.name=t}catch(t){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r};function m(t){return 14+(t+64>>>9<<4)+1}function b(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function I(t,e,n,r,i,a){return b((s=b(b(e,t),b(r,a)))<<(o=i)|s>>>32-o,n);var s,o}function C(t,e,n,r,i,a,s){return I(e&n|~e&r,t,e,i,a,s)}function v(t,e,n,r,i,a,s){return I(e&r|n&~r,t,e,i,a,s)}function E(t,e,n,r,i,a,s){return I(e^n^r,t,e,i,a,s)}function w(t,e,n,r,i,a,s){return I(n^(e|~r),t,e,i,a,s)}var B=g("v3",48,(function(t){if("string"==typeof t){var e=unescape(encodeURIComponent(t));t=new Uint8Array(e.length);for(var n=0;n<e.length;++n)t[n]=e.charCodeAt(n)}return function(t){for(var e=[],n=32*t.length,r=0;r<n;r+=8){var i=t[r>>5]>>>r%32&255,a=parseInt("0123456789abcdef".charAt(i>>>4&15)+"0123456789abcdef".charAt(15&i),16);e.push(a)}return e}(function(t,e){t[e>>5]|=128<<e%32,t[m(e)-1]=e;for(var n=1732584193,r=-271733879,i=-1732584194,a=271733878,s=0;s<t.length;s+=16){var o=n,u=r,c=i,A=a;n=C(n,r,i,a,t[s],7,-680876936),a=C(a,n,r,i,t[s+1],12,-389564586),i=C(i,a,n,r,t[s+2],17,606105819),r=C(r,i,a,n,t[s+3],22,-1044525330),n=C(n,r,i,a,t[s+4],7,-176418897),a=C(a,n,r,i,t[s+5],12,1200080426),i=C(i,a,n,r,t[s+6],17,-1473231341),r=C(r,i,a,n,t[s+7],22,-45705983),n=C(n,r,i,a,t[s+8],7,1770035416),a=C(a,n,r,i,t[s+9],12,-1958414417),i=C(i,a,n,r,t[s+10],17,-42063),r=C(r,i,a,n,t[s+11],22,-1990404162),n=C(n,r,i,a,t[s+12],7,1804603682),a=C(a,n,r,i,t[s+13],12,-40341101),i=C(i,a,n,r,t[s+14],17,-1502002290),r=C(r,i,a,n,t[s+15],22,1236535329),n=v(n,r,i,a,t[s+1],5,-165796510),a=v(a,n,r,i,t[s+6],9,-1069501632),i=v(i,a,n,r,t[s+11],14,643717713),r=v(r,i,a,n,t[s],20,-373897302),n=v(n,r,i,a,t[s+5],5,-701558691),a=v(a,n,r,i,t[s+10],9,38016083),i=v(i,a,n,r,t[s+15],14,-660478335),r=v(r,i,a,n,t[s+4],20,-405537848),n=v(n,r,i,a,t[s+9],5,568446438),a=v(a,n,r,i,t[s+14],9,-1019803690),i=v(i,a,n,r,t[s+3],14,-187363961),r=v(r,i,a,n,t[s+8],20,1163531501),n=v(n,r,i,a,t[s+13],5,-1444681467),a=v(a,n,r,i,t[s+2],9,-51403784),i=v(i,a,n,r,t[s+7],14,1735328473),r=v(r,i,a,n,t[s+12],20,-1926607734),n=E(n,r,i,a,t[s+5],4,-378558),a=E(a,n,r,i,t[s+8],11,-2022574463),i=E(i,a,n,r,t[s+11],16,1839030562),r=E(r,i,a,n,t[s+14],23,-35309556),n=E(n,r,i,a,t[s+1],4,-1530992060),a=E(a,n,r,i,t[s+4],11,1272893353),i=E(i,a,n,r,t[s+7],16,-155497632),r=E(r,i,a,n,t[s+10],23,-1094730640),n=E(n,r,i,a,t[s+13],4,681279174),a=E(a,n,r,i,t[s],11,-358537222),i=E(i,a,n,r,t[s+3],16,-722521979),r=E(r,i,a,n,t[s+6],23,76029189),n=E(n,r,i,a,t[s+9],4,-640364487),a=E(a,n,r,i,t[s+12],11,-421815835),i=E(i,a,n,r,t[s+15],16,530742520),r=E(r,i,a,n,t[s+2],23,-995338651),n=w(n,r,i,a,t[s],6,-198630844),a=w(a,n,r,i,t[s+7],10,1126891415),i=w(i,a,n,r,t[s+14],15,-1416354905),r=w(r,i,a,n,t[s+5],21,-57434055),n=w(n,r,i,a,t[s+12],6,1700485571),a=w(a,n,r,i,t[s+3],10,-1894986606),i=w(i,a,n,r,t[s+10],15,-1051523),r=w(r,i,a,n,t[s+1],21,-2054922799),n=w(n,r,i,a,t[s+8],6,1873313359),a=w(a,n,r,i,t[s+15],10,-30611744),i=w(i,a,n,r,t[s+6],15,-1560198380),r=w(r,i,a,n,t[s+13],21,1309151649),n=w(n,r,i,a,t[s+4],6,-145523070),a=w(a,n,r,i,t[s+11],10,-1120210379),i=w(i,a,n,r,t[s+2],15,718787259),r=w(r,i,a,n,t[s+9],21,-343485551),n=b(n,o),r=b(r,u),i=b(i,c),a=b(a,A)}return[n,r,i,a]}(function(t){if(0===t.length)return[];for(var e=8*t.length,n=new Uint32Array(m(e)),r=0;r<e;r+=8)n[r>>5]|=(255&t[r/8])<<r%32;return n}(t),8*t.length))}));var Q=function(t,e,n){var r=(t=t||{}).random||(t.rng||a)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var i=0;i<16;++i)e[n+i]=r[i];return e}return p(r)};function M(t,e,n,r){switch(t){case 0:return e&n^~e&r;case 1:return e^n^r;case 2:return e&n^e&r^n&r;case 3:return e^n^r}}function k(t,e){return t<<e|t>>>32-e}var _=g("v5",80,(function(t){var e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){var r=unescape(encodeURIComponent(t));t=[];for(var i=0;i<r.length;++i)t.push(r.charCodeAt(i))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);for(var a=t.length/4+2,s=Math.ceil(a/16),o=new Array(s),u=0;u<s;++u){for(var c=new Uint32Array(16),A=0;A<16;++A)c[A]=t[64*u+4*A]<<24|t[64*u+4*A+1]<<16|t[64*u+4*A+2]<<8|t[64*u+4*A+3];o[u]=c}o[s-1][14]=8*(t.length-1)/Math.pow(2,32),o[s-1][14]=Math.floor(o[s-1][14]),o[s-1][15]=8*(t.length-1)&4294967295;for(var d=0;d<s;++d){for(var p=new Uint32Array(80),f=0;f<16;++f)p[f]=o[d][f];for(var l=16;l<80;++l)p[l]=k(p[l-3]^p[l-8]^p[l-14]^p[l-16],1);for(var h=n[0],y=n[1],g=n[2],m=n[3],b=n[4],I=0;I<80;++I){var C=Math.floor(I/20),v=k(h,5)+M(C,y,g,m)+b+e[C]+p[I]>>>0;b=m,m=g,g=k(y,30)>>>0,y=h,h=v}n[0]=n[0]+h>>>0,n[1]=n[1]+y>>>0,n[2]=n[2]+g>>>0,n[3]=n[3]+m>>>0,n[4]=n[4]+b>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),x="00000000-0000-0000-0000-000000000000";var S=function(t){if(!o(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)}}])}));
|