1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | !function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[a]={exports:{}};t[a][0].call(f.exports,(function(e){return i(t[a][1][e]||e)}),f,f.exports,e,t,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(e,t,r){(function(r){(function(){"use strict";var n=e("object.assign/polyfill")();
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | function i(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}function o(e){return r.Buffer&&"function"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var a=e("util/"),s=Object.prototype.hasOwnProperty,u=Array.prototype.slice,c="foo"===function(){}.name;function f(e){return Object.prototype.toString.call(e)}function l(e){return!o(e)&&("function"==typeof r.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}var h=t.exports=b,d=/\s*function\s+([^\(\s]*)\s*/;function p(e){if(a.isFunction(e)){if(c)return e.name;var t=e.toString().match(d);return t&&t[1]}}function y(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function g(e){if(c||!a.isFunction(e))return a.inspect(e);var t=p(e);return"[Function"+(t?": "+t:"")+"]"}function v(e,t,r,n,i){throw new h.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:i})}function b(e,t){e||v(e,!0,t,"==",h.ok)}function _(e,t,r,n){if(e===t)return!0;if(o(e)&&o(t))return 0===i(e,t);if(a.isDate(e)&&a.isDate(t))return e.getTime()===t.getTime();if(a.isRegExp(e)&&a.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(l(e)&&l(t)&&f(e)===f(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===i(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(o(e)!==o(t))return!1;var s=(n=n||{actual:[],expected:[]}).actual.indexOf(e);return-1!==s&&s===n.expected.indexOf(t)||(n.actual.push(e),n.expected.push(t),function(e,t,r,n){if(null==e||null==t)return!1;if(a.isPrimitive(e)||a.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=m(e),o=m(t);if(i&&!o||!i&&o)return!1;if(i)return e=u.call(e),t=u.call(t),_(e,t,r);var s,c,f=E(e),l=E(t);if(f.length!==l.length)return!1;for(f.sort(),l.sort(),c=f.length-1;c>=0;c--)if(f[c]!==l[c])return!1;for(c=f.length-1;c>=0;c--)if(s=f[c],!_(e[s],t[s],r,n))return!1;return!0}(e,t,r,n))}return r?e===t:e==t}function m(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function k(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&v(i,r,"Missing expected exception"+n);var o="string"==typeof n,s=!e&&i&&!r;if((!e&&a.isError(i)&&o&&w(i,r)||s)&&v(i,r,"Got unwanted exception"+n),e&&i&&r&&!w(i,r)||!e&&i)throw i}h.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return y(g(e.actual),128)+" "+e.operator+" "+y(g(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=p(t),o=n.indexOf("\n"+i);if(o>=0){var a=n.indexOf("\n",o+1);n=n.substring(a+1)}this.stack=n}}},a.inherits(h.AssertionError,Error),h.fail=v,h.ok=b,h.equal=function(e,t,r){e!=t&&v(e,t,r,"==",h.equal)},h.notEqual=function(e,t,r){e==t&&v(e,t,r,"!=",h.notEqual)},h.deepEqual=function(e,t,r){_(e,t,!1)||v(e,t,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,r){_(e,t,!0)||v(e,t,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,r){_(e,t,!1)&&v(e,t,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,r,n){_(t,r,!0)&&v(t,r,n,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,r){e!==t&&v(e,t,r,"===",h.strictEqual)},h.notStrictEqual=function(e,t,r){e===t&&v(e,t,r,"!==",h.notStrictEqual)},h.throws=function(e,t,r){k(!0,e,t,r)},h.doesNotThrow=function(e,t,r){k(!1,e,t,r)},h.ifError=function(e){if(e)throw e},h.strict=n((function e(t,r){t||v(t,!0,r,"==",e)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var E=Object.keys||function(e){var t=[];for(var r in e)s.call(e,r)&&t.push(r);return t}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"object.assign/polyfill":91,"util/":143}],2:[function(e,t,r){"use strict";r.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){var t,r,n=c(e),a=n[0],s=n[1],u=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,s)),f=0,l=s>0?a-4:a;for(r=0;r<l;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],u[f++]=t>>16&255,u[f++]=t>>8&255,u[f++]=255&t;2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,u[f++]=255&t);1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,u[f++]=t>>8&255,u[f++]=255&t);return u},r.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=0,s=r-i;a<s;a+=16383)o.push(f(e,a,a+16383>s?s:a+16383));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)n[s]=a[s],i[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function f(e,t,r){for(var i,o,a=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],3:[function(e,t,r){},{}],4:[function(e,t,r){(function(t){(function(){
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 | "use strict";var t=e("base64-js"),n=e("ieee754"),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=a,r.SlowBuffer=function(e){+e!=e&&(e=0);return a.alloc(+e)},r.INSPECT_MAX_BYTES=50;function o(e){if(e>2147483647)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return s(e,t,r)}function s(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|d(e,t),n=o(r),i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(q(e,Uint8Array)){var t=new Uint8Array(e);return l(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(q(e,ArrayBuffer)||e&&q(e.buffer,ArrayBuffer))return l(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(q(e,SharedArrayBuffer)||e&&q(e.buffer,SharedArrayBuffer)))return l(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return a.from(n,t,r);var i=function(e){if(a.isBuffer(e)){var t=0|h(e.length),r=o(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||N(e.length)?o(0):f(e);if("Buffer"===e.type&&Array.isArray(e.data))return f(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),o(e<0?0:0|h(e))}function f(e){for(var t=e.length<0?0:0|h(e.length),r=o(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function l(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,a.prototype),n}function h(e){if(e>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|e}function d(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return C(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return I(e).length;default:if(i)return n?-1:C(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return S(this,t,r);case"ascii":return x(this,t,r);case"latin1":case"binary":return j(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),N(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){var o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var f=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var l=!0,h=0;h<u;h++)if(c(e,o+h)!==c(t,h)){l=!1;break}if(l)return o}return-1}function b(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(N(s))return a;e[r+a]=s}return a}function _(e,t,r,n){return D(C(t,e.length-r),e,r,n)}function m(e,t,r,n){return D(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function w(e,t,r,n){return D(I(t),e,r,n)}function k(e,t,r,n){return D(function(e,t){for(var r,n,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function E(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function S(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,u,c=e[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}r.kMaxLength=2147483647,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return s(e,t,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return function(e,t,r){return u(e),e<=0?o(e):void 0!==t?"string"==typeof r?o(e).fill(t,r):o(e).fill(t):o(e)}(e,t,r)},a.allocUnsafe=function(e){return c(e)},a.allocUnsafeSlow=function(e){return c(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(q(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),q(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},a.isEncoding=function(e){switch(String(e).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}},a.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=a.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(q(o,Uint8Array))i+o.length>n.length?a.from(o).copy(n,i):Uint8Array.prototype.set.call(n,o,i);else{if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},a.byteLength=d,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?S(this,0,e):p.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},i&&(a.prototype[i]=a.prototype.inspect),a.prototype.compare=function(e,t,r,n,i){if(q(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),u=Math.min(o,s),c=this.slice(n,i),f=e.slice(t,r),l=0;l<u;++l)if(c[l]!==f[l]){o=c[l],s=f[l];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},a.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":case"latin1":case"binary":return m(this,e,t,r);case"base64":return w(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function j(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function O(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=U[e[o]];return i}function A(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function R(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,r,n,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function T(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(e,t,r,i,o){return t=+t,r>>>=0,o||T(e,0,r,4),n.write(e,t,r,i,23,4),r+4}function P(e,t,r,i,o){return t=+t,r>>>=0,o||T(e,0,r,8),n.write(e,t,r,i,52,8),r+8}a.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||R(e,4,this.length),n.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),n.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),n.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),n.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||M(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||M(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);M(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);M(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,r){return B(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return B(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return P(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return P(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},a.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var s=a.isBuffer(e)?e:a.from(e,n),u=s.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=s[o%u]}return this};var L=/[^+/0-9A-Za-z-_]/g;function C(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function I(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function N(e){return e!=e}var U=function(){for(var e=new Array(256),t=0;t<16;++t)for(var r=16*t,n=0;n<16;++n)e[r+n]="0123456789abcdef"[t]+"0123456789abcdef"[n];return e}()}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":2,buffer:4,ieee754:44}],5:[function(e,t,r){"use strict";var n=e("get-intrinsic"),i=e("./"),o=i(n("String.prototype.indexOf"));t.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},{"./":6,"get-intrinsic":37}],6:[function(e,t,r){"use strict";var n=e("function-bind"),i=e("get-intrinsic"),o=e("set-function-length"),a=e("es-errors/type"),s=i("%Function.prototype.apply%"),u=i("%Function.prototype.call%"),c=i("%Reflect.apply%",!0)||n.call(u,s),f=e("es-define-property"),l=i("%Math.max%");t.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=c(n,u,arguments);return o(t,1+l(0,e.length-(arguments.length-1)),!0)};var h=function(){return c(n,s,arguments)};f?f(t.exports,"apply",{value:h}):t.exports.apply=h},{"es-define-property":25,"es-errors/type":31,"function-bind":35,"get-intrinsic":37,"set-function-length":103}],7:[function(e,t,r){function n(e){return Object.prototype.toString.call(e)}r.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},r.isBoolean=function(e){return"boolean"==typeof e},r.isNull=function(e){return null===e},r.isNullOrUndefined=function(e){return null==e},r.isNumber=function(e){return"number"==typeof e},r.isString=function(e){return"string"==typeof e},r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=function(e){return void 0===e},r.isRegExp=function(e){return"[object RegExp]"===n(e)},r.isObject=function(e){return"object"==typeof e&&null!==e},r.isDate=function(e){return"[object Date]"===n(e)},r.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},r.isFunction=function(e){return"function"==typeof e},r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("buffer").Buffer.isBuffer},{buffer:4}],8:[function(e,t,r){var n=e("abstract-leveldown").AbstractIterator;function i(e,t){n.call(this,e),this._options=t,this._iterator=null,this._operations=[]}e("inherits")(i,n),i.prototype.setDb=function(e){var t=this._iterator=e.iterator(this._options);this._operations.forEach((function(e){t[e.method].apply(t,e.args)}))},i.prototype._operation=function(e,t){if(this._iterator)return this._iterator[e].apply(this._iterator,t);this._operations.push({method:e,args:t})},"next end".split(" ").forEach((function(e){i.prototype["_"+e]=function(){this._operation(e,arguments)}})),i.prototype.seek=function(){this._operation("seek",arguments)},t.exports=i},{"abstract-leveldown":13,inherits:45}],9:[function(e,t,r){var n=e("abstract-leveldown").AbstractLevelDOWN,i=e("inherits"),o=e("./deferred-iterator"),a="put get del batch clear".split(" "),s="approximateSize compactRange".split(" ");function u(e){n.call(this,e.supports||{}),s.forEach((function(t){"function"!=typeof e[t]||this.supports.additionalMethods[t]||(this.supports.additionalMethods[t]=!0)}),this),this._db=e,this._operations=[],c(this)}function c(e){a.forEach((function(t){e["_"+t]=function(){this._operations.push({method:t,args:arguments})}})),Object.keys(e.supports.additionalMethods).forEach((function(t){e[t]=function(){this._operations.push({method:t,args:arguments})}})),e._iterator=function(t){var r=new o(e,t);return this._operations.push({iterator:r}),r}}i(u,n),u.prototype.type="deferred-leveldown",u.prototype._open=function(e,t){var r=this;this._db.open(e,(function(e){if(e)return t(e);r._operations.forEach((function(e){e.iterator?e.iterator.setDb(r._db):r._db[e.method].apply(r._db,e.args)})),r._operations=[],function(e){a.concat("iterator").forEach((function(t){e["_"+t]=function(){return this._db[t].apply(this._db,arguments)}})),Object.keys(e.supports.additionalMethods).forEach((function(t){e[t]=function(){return this._db[t].apply(this._db,arguments)}}))}(r),t()}))},u.prototype._close=function(e){var t=this;this._db.close((function(r){if(r)return e(r);c(t),e()}))},u.prototype._serializeKey=function(e){return e},u.prototype._serializeValue=function(e){return e},t.exports=u,t.exports.DeferredIterator=o},{"./deferred-iterator":8,"abstract-leveldown":13,inherits:45}],10:[function(e,t,r){var n=e("./next-tick");function i(e){if("object"!=typeof e||null===e)throw new TypeError("First argument must be an abstract-leveldown compliant store");this.db=e,this._operations=[],this._written=!1}i.prototype._checkWritten=function(){if(this._written)throw new Error("write() already called on this batch")},i.prototype.put=function(e,t){this._checkWritten();var r=this.db._checkKey(e)||this.db._checkValue(t);if(r)throw r;return e=this.db._serializeKey(e),t=this.db._serializeValue(t),this._put(e,t),this},i.prototype._put=function(e,t){this._operations.push({type:"put",key:e,value:t})},i.prototype.del=function(e){this._checkWritten();var t=this.db._checkKey(e);if(t)throw t;return e=this.db._serializeKey(e),this._del(e),this},i.prototype._del=function(e){this._operations.push({type:"del",key:e})},i.prototype.clear=function(){return this._checkWritten(),this._clear(),this},i.prototype._clear=function(){this._operations=[]},i.prototype.write=function(e,t){if(this._checkWritten(),"function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("write() requires a callback argument");"object"==typeof e&&null!==e||(e={}),this._written=!0,this._write(e,t)},i.prototype._write=function(e,t){this.db._batch(this._operations,e,t)},i.prototype._nextTick=n,t.exports=i},{"./next-tick":14}],11:[function(e,t,r){var n=e("./next-tick");function i(e){if("object"!=typeof e||null===e)throw new TypeError("First argument must be an abstract-leveldown compliant store");this.db=e,this._ended=!1,this._nexting=!1}i.prototype.next=function(e){var t=this;if("function"!=typeof e)throw new Error("next() requires a callback argument");return t._ended?(n(e,new Error("cannot call next() after end()")),t):t._nexting?(n(e,new Error("cannot call next() before previous next() has completed")),t):(t._nexting=!0,t._next((function(){t._nexting=!1,e.apply(null,arguments)})),t)},i.prototype._next=function(e){n(e)},i.prototype.seek=function(e){if(this._ended)throw new Error("cannot call seek() after end()");if(this._nexting)throw new Error("cannot call seek() before next() has completed");e=this.db._serializeKey(e),this._seek(e)},i.prototype._seek=function(e){},i.prototype.end=function(e){if("function"!=typeof e)throw new Error("end() requires a callback argument");if(this._ended)return n(e,new Error("end() already called on iterator"));this._ended=!0,this._end(e)},i.prototype._end=function(e){n(e)},i.prototype._nextTick=n,t.exports=i},{"./next-tick":14}],12:[function(e,t,r){var n=e("xtend"),i=e("level-supports"),o=e("buffer").Buffer,a=e("./abstract-iterator"),s=e("./abstract-chained-batch"),u=e("./next-tick"),c=Object.prototype.hasOwnProperty,f="start end gt gte lt lte".split(" ");function l(e){this.status="new",this.supports=i(e,{status:!0})}function h(e,t){var r={};for(var n in t)if(c.call(t,n)){var i=t[n];d(n)&&(i=e._serializeKey(i)),r[n]=i}return r}function d(e){return-1!==f.indexOf(e)}l.prototype.open=function(e,t){var r=this,n=this.status;if("function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("open() requires a callback argument");"object"==typeof e&&null!==e||(e={}),e.createIfMissing=!1!==e.createIfMissing,e.errorIfExists=!!e.errorIfExists,this.status="opening",this._open(e,(function(e){if(e)return r.status=n,t(e);r.status="open",t()}))},l.prototype._open=function(e,t){u(t)},l.prototype.close=function(e){var t=this,r=this.status;if("function"!=typeof e)throw new Error("close() requires a callback argument");this.status="closing",this._close((function(n){if(n)return t.status=r,e(n);t.status="closed",e()}))},l.prototype._close=function(e){u(e)},l.prototype.get=function(e,t,r){if("function"==typeof t&&(r=t),"function"!=typeof r)throw new Error("get() requires a callback argument");var n=this._checkKey(e);if(n)return u(r,n);e=this._serializeKey(e),"object"==typeof t&&null!==t||(t={}),t.asBuffer=!1!==t.asBuffer,this._get(e,t,r)},l.prototype._get=function(e,t,r){u((function(){r(new Error("NotFound"))}))},l.prototype.put=function(e,t,r,n){if("function"==typeof r&&(n=r),"function"!=typeof n)throw new Error("put() requires a callback argument");var i=this._checkKey(e)||this._checkValue(t);if(i)return u(n,i);e=this._serializeKey(e),t=this._serializeValue(t),"object"==typeof r&&null!==r||(r={}),this._put(e,t,r,n)},l.prototype._put=function(e,t,r,n){u(n)},l.prototype.del=function(e,t,r){if("function"==typeof t&&(r=t),"function"!=typeof r)throw new Error("del() requires a callback argument");var n=this._checkKey(e);if(n)return u(r,n);e=this._serializeKey(e),"object"==typeof t&&null!==t||(t={}),this._del(e,t,r)},l.prototype._del=function(e,t,r){u(r)},l.prototype.batch=function(e,t,r){if(!arguments.length)return this._chainedBatch();if("function"==typeof t&&(r=t),"function"==typeof e&&(r=e),"function"!=typeof r)throw new Error("batch(array) requires a callback argument");if(!Array.isArray(e))return u(r,new Error("batch(array) requires an array argument"));if(0===e.length)return u(r);"object"==typeof t&&null!==t||(t={});for(var i=new Array(e.length),o=0;o<e.length;o++){if("object"!=typeof e[o]||null===e[o])return u(r,new Error("batch(array) element must be an object and not `null`"));var a=n(e[o]);if("put"!==a.type&&"del"!==a.type)return u(r,new Error("`type` must be 'put' or 'del'"));var s=this._checkKey(a.key);if(s)return u(r,s);if(a.key=this._serializeKey(a.key),"put"===a.type){var c=this._checkValue(a.value);if(c)return u(r,c);a.value=this._serializeValue(a.value)}i[o]=a}this._batch(i,t,r)},l.prototype._batch=function(e,t,r){u(r)},l.prototype.clear=function(e,t){if("function"==typeof e)t=e;else if("function"!=typeof t)throw new Error("clear() requires a callback argument");(e=h(this,e)).reverse=!!e.reverse,e.limit="limit"in e?e.limit:-1,this._clear(e,t)},l.prototype._clear=function(e,t){e.keys=!0,e.values=!1,e.keyAsBuffer=!0,e.valueAsBuffer=!0;var r=this._iterator(e),n={},i=this,o=function(e){if(e)return r.end((function(){t(e)}));r.next((function(e,a){return e?o(e):void 0===a?r.end(t):void i._del(a,n,o)}))};o()},l.prototype._setupIteratorOptions=function(e){return(e=h(this,e)).reverse=!!e.reverse,e.keys=!1!==e.keys,e.values=!1!==e.values,e.limit="limit"in e?e.limit:-1,e.keyAsBuffer=!1!==e.keyAsBuffer,e.valueAsBuffer=!1!==e.valueAsBuffer,e},l.prototype.iterator=function(e){return"object"==typeof e&&null!==e||(e={}),e=this._setupIteratorOptions(e),this._iterator(e)},l.prototype._iterator=function(e){return new a(this)},l.prototype._chainedBatch=function(){return new s(this)},l.prototype._serializeKey=function(e){return e},l.prototype._serializeValue=function(e){return e},l.prototype._checkKey=function(e){return null==e?new Error("key cannot be `null` or `undefined`"):o.isBuffer(e)&&0===e.length?new Error("key cannot be an empty Buffer"):""===e?new Error("key cannot be an empty String"):Array.isArray(e)&&0===e.length?new Error("key cannot be an empty Array"):void 0},l.prototype._checkValue=function(e){if(null==e)return new Error("value cannot be `null` or `undefined`")},l.prototype._nextTick=u,t.exports=l},{"./abstract-chained-batch":10,"./abstract-iterator":11,"./next-tick":14,buffer:4,"level-supports":67,xtend:160}],13:[function(e,t,r){r.AbstractLevelDOWN=e("./abstract-leveldown"),r.AbstractIterator=e("./abstract-iterator"),r.AbstractChainedBatch=e("./abstract-chained-batch")},{"./abstract-chained-batch":10,"./abstract-iterator":11,"./abstract-leveldown":12}],14:[function(e,t,r){t.exports=e("immediate")},{immediate:15}],15:[function(e,t,r){"use strict";var n,i,o,a=[e("./nextTick"),e("./queueMicrotask"),e("./mutation.js"),e("./messageChannel"),e("./stateChange"),e("./timeout")],s=-1,u=[],c=!1;function f(){n&&i&&(n=!1,i.length?u=i.concat(u):s=-1,u.length&&l())}function l(){if(!n){c=!1,n=!0;for(var e=u.length,t=setTimeout(f);e;){for(i=u,u=[];i&&++s<e;)i[s].run();s=-1,e=u.length}i=null,s=-1,n=!1,clearTimeout(t)}}for(var h=-1,d=a.length;++h<d;)if(a[h]&&a[h].test&&a[h].test()){o=a[h].install(l);break}function p(e,t){this.fun=e,this.array=t}p.prototype.run=function(){var e=this.fun,t=this.array;switch(t.length){case 0:return e();case 1:return e(t[0]);case 2:return e(t[0],t[1]);case 3:return e(t[0],t[1],t[2]);default:return e.apply(null,t)}},t.exports=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new p(e,t)),c||n||(c=!0,o())}},{"./messageChannel":16,"./mutation.js":17,"./nextTick":3,"./queueMicrotask":18,"./stateChange":19,"./timeout":20}],16:[function(e,t,r){(function(e){(function(){"use strict";r.test=function(){return!e.setImmediate&&void 0!==e.MessageChannel},r.install=function(t){var r=new e.MessageChannel;return r.port1.onmessage=t,function(){r.port2.postMessage(0)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],17:[function(e,t,r){(function(e){(function(){"use strict";var t=e.MutationObserver||e.WebKitMutationObserver;r.test=function(){return t},r.install=function(r){var n=0,i=new t(r),o=e.document.createTextNode("");return i.observe(o,{characterData:!0}),function(){o.data=n=++n%2}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],18:[function(e,t,r){(function(e){(function(){"use strict";r.test=function(){return"function"==typeof e.queueMicrotask},r.install=function(t){return function(){e.queueMicrotask(t)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],19:[function(e,t,r){(function(e){(function(){"use strict";r.test=function(){return"document"in e&&"onreadystatechange"in e.document.createElement("script")},r.install=function(t){return function(){var r=e.document.createElement("script");return r.onreadystatechange=function(){t(),r.onreadystatechange=null,r.parentNode.removeChild(r),r=null},e.document.documentElement.appendChild(r),t}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],20:[function(e,t,r){"use strict";r.test=function(){return!0},r.install=function(e){return function(){setTimeout(e,0)}}},{}],21:[function(e,t,r){"use strict";var n=e("es-define-property"),i=e("es-errors/syntax"),o=e("es-errors/type"),a=e("gopd");t.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new o("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,f=arguments.length>6&&arguments[6],l=!!a&&a(e,t);if(n)n(e,t,{configurable:null===c&&l?l.configurable:!c,enumerable:null===s&&l?l.enumerable:!s,value:r,writable:null===u&&l?l.writable:!u});else{if(!f&&(s||u||c))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},{"es-define-property":25,"es-errors/syntax":30,"es-errors/type":31,gopd:38}],22:[function(e,t,r){"use strict";function n(e){if(this._capacity=o(e),this._length=0,this._front=0,i(e)){for(var t=e.length,r=0;r<t;++r)this[r]=e[r];this._length=t}}n.prototype.toArray=function(){for(var e=this._length,t=new Array(e),r=this._front,n=this._capacity,i=0;i<e;++i)t[i]=this[r+i&n-1];return t},n.prototype.push=function(e){var t=arguments.length,r=this._length;if(t>1){var n=this._capacity;if(r+t>n){for(var i=0;i<t;++i){this._checkCapacity(r+1),this[o=this._front+r&this._capacity-1]=arguments[i],r++,this._length=r}return r}for(var o=this._front,i=0;i<t;++i)this[o+r&n-1]=arguments[i],o++;return this._length=r+t,r+t}return 0===t?r:(this._checkCapacity(r+1),this[i=this._front+r&this._capacity-1]=e,this._length=r+1,r+1)},n.prototype.pop=function(){var e=this._length;if(0!==e){var t=this._front+e-1&this._capacity-1,r=this[t];return this[t]=void 0,this._length=e-1,r}},n.prototype.shift=function(){var e=this._length;if(0!==e){var t=this._front,r=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length=e-1,r}},n.prototype.unshift=function(e){var t=this._length,r=arguments.length;if(r>1){if(t+r>(i=this._capacity)){for(var n=r-1;n>=0;n--){this._checkCapacity(t+1);var i=this._capacity;this[a=(this._front-1&i-1^i)-i]=arguments[n],t++,this._length=t,this._front=a}return t}var o=this._front;for(n=r-1;n>=0;n--){var a;this[a=(o-1&i-1^i)-i]=arguments[n],o=a}return this._front=o,this._length=t+r,t+r}if(0===r)return t;this._checkCapacity(t+1);i=this._capacity;return this[n=(this._front-1&i-1^i)-i]=e,this._length=t+1,this._front=n,t+1},n.prototype.peekBack=function(){var e=this._length;if(0!==e)return this[this._front+e-1&this._capacity-1]},n.prototype.peekFront=function(){if(0!==this._length)return this[this._front]},n.prototype.get=function(e){var t=e;if(t===(0|t)){var r=this._length;if(t<0&&(t+=r),!(t<0||t>=r))return this[this._front+t&this._capacity-1]}},n.prototype.isEmpty=function(){return 0===this._length},n.prototype.clear=function(){for(var e=this._length,t=this._front,r=this._capacity,n=0;n<e;++n)this[t+n&r-1]=void 0;this._length=0,this._front=0},n.prototype.toString=function(){return this.toArray().toString()},n.prototype.valueOf=n.prototype.toString,n.prototype.removeFront=n.prototype.shift,n.prototype.removeBack=n.prototype.pop,n.prototype.insertFront=n.prototype.unshift,n.prototype.insertBack=n.prototype.push,n.prototype.enqueue=n.prototype.push,n.prototype.dequeue=n.prototype.shift,n.prototype.toJSON=n.prototype.toArray,Object.defineProperty(n.prototype,"length",{get:function(){return this._length},set:function(){throw new RangeError("")}}),n.prototype._checkCapacity=function(e){this._capacity<e&&this._resizeTo(o(1.5*this._capacity+16))},n.prototype._resizeTo=function(e){var t=this._capacity;this._capacity=e;var r=this._front,n=this._length;r+n>t&&function(e,t,r,n,i){for(var o=0;o<i;++o)r[o+n]=e[o+t],e[o+t]=void 0}(this,0,this,t,r+n&t-1)};var i=Array.isArray;function o(e){if("number"!=typeof e){if(!i(e))return 16;e=e.length}return t=Math.min(Math.max(16,e),1073741824),t>>>=0,t-=1,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,1+(t|=t>>16);var t}t.exports=n},{}],23:[function(e,t,r){var n=e("prr");function i(e,t,r){t&&"string"!=typeof t&&(t=t.message||t.name),n(this,{type:e,name:e,cause:"string"!=typeof t?t:r,message:t},"ewr")}function o(e,t){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),i.call(this,"CustomError",e,t)}o.prototype=new Error,t.exports=function(e){var t=function(t,r){return function(e,t,r){var n=function(r,o){i.call(this,t,r,o),"FilesystemError"==t&&(this.code=this.cause.code,this.path=this.cause.path,this.errno=this.cause.errno,this.message=(e.errno[this.cause.errno]?e.errno[this.cause.errno].description:this.cause.message)+(this.cause.path?" ["+this.cause.path+"]":"")),Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,n)};return n.prototype=r?new r:new o,n}(e,t,r)};return{CustomError:o,FilesystemError:t("FilesystemError"),createError:t}}},{prr:94}],24:[function(e,t,r){var n=t.exports.all=[{errno:-2,code:"ENOENT",description:"no such file or directory"},{errno:-1,code:"UNKNOWN",description:"unknown error"},{errno:0,code:"OK",description:"success"},{errno:1,code:"EOF",description:"end of file"},{errno:2,code:"EADDRINFO",description:"getaddrinfo error"},{errno:3,code:"EACCES",description:"permission denied"},{errno:4,code:"EAGAIN",description:"resource temporarily unavailable"},{errno:5,code:"EADDRINUSE",description:"address already in use"},{errno:6,code:"EADDRNOTAVAIL",description:"address not available"},{errno:7,code:"EAFNOSUPPORT",description:"address family not supported"},{errno:8,code:"EALREADY",description:"connection already in progress"},{errno:9,code:"EBADF",description:"bad file descriptor"},{errno:10,code:"EBUSY",description:"resource busy or locked"},{errno:11,code:"ECONNABORTED",description:"software caused connection abort"},{errno:12,code:"ECONNREFUSED",description:"connection refused"},{errno:13,code:"ECONNRESET",description:"connection reset by peer"},{errno:14,code:"EDESTADDRREQ",description:"destination address required"},{errno:15,code:"EFAULT",description:"bad address in system call argument"},{errno:16,code:"EHOSTUNREACH",description:"host is unreachable"},{errno:17,code:"EINTR",description:"interrupted system call"},{errno:18,code:"EINVAL",description:"invalid argument"},{errno:19,code:"EISCONN",description:"socket is already connected"},{errno:20,code:"EMFILE",description:"too many open files"},{errno:21,code:"EMSGSIZE",description:"message too long"},{errno:22,code:"ENETDOWN",description:"network is down"},{errno:23,code:"ENETUNREACH",description:"network is unreachable"},{errno:24,code:"ENFILE",description:"file table overflow"},{errno:25,code:"ENOBUFS",description:"no buffer space available"},{errno:26,code:"ENOMEM",description:"not enough memory"},{errno:27,code:"ENOTDIR",description:"not a directory"},{errno:28,code:"EISDIR",description:"illegal operation on a directory"},{errno:29,code:"ENONET",description:"machine is not on the network"},{errno:31,code:"ENOTCONN",description:"socket is not connected"},{errno:32,code:"ENOTSOCK",description:"socket operation on non-socket"},{errno:33,code:"ENOTSUP",description:"operation not supported on socket"},{errno:34,code:"ENOENT",description:"no such file or directory"},{errno:35,code:"ENOSYS",description:"function not implemented"},{errno:36,code:"EPIPE",description:"broken pipe"},{errno:37,code:"EPROTO",description:"protocol error"},{errno:38,code:"EPROTONOSUPPORT",description:"protocol not supported"},{errno:39,code:"EPROTOTYPE",description:"protocol wrong type for socket"},{errno:40,code:"ETIMEDOUT",description:"connection timed out"},{errno:41,code:"ECHARSET",description:"invalid Unicode character"},{errno:42,code:"EAIFAMNOSUPPORT",description:"address family for hostname not supported"},{errno:44,code:"EAISERVICE",description:"servname not supported for ai_socktype"},{errno:45,code:"EAISOCKTYPE",description:"ai_socktype not supported"},{errno:46,code:"ESHUTDOWN",description:"cannot send after transport endpoint shutdown"},{errno:47,code:"EEXIST",description:"file already exists"},{errno:48,code:"ESRCH",description:"no such process"},{errno:49,code:"ENAMETOOLONG",description:"name too long"},{errno:50,code:"EPERM",description:"operation not permitted"},{errno:51,code:"ELOOP",description:"too many symbolic links encountered"},{errno:52,code:"EXDEV",description:"cross-device link not permitted"},{errno:53,code:"ENOTEMPTY",description:"directory not empty"},{errno:54,code:"ENOSPC",description:"no space left on device"},{errno:55,code:"EIO",description:"i/o error"},{errno:56,code:"EROFS",description:"read-only file system"},{errno:57,code:"ENODEV",description:"no such device"},{errno:58,code:"ESPIPE",description:"invalid seek"},{errno:59,code:"ECANCELED",description:"operation canceled"}];t.exports.errno={},t.exports.code={},n.forEach((function(e){t.exports.errno[e.errno]=e,t.exports.code[e.code]=e})),t.exports.custom=e("./custom")(t.exports),t.exports.create=t.exports.custom.createError},{"./custom":23}],25:[function(e,t,r){"use strict";var n=e("get-intrinsic")("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(e){n=!1}t.exports=n},{"get-intrinsic":37}],26:[function(e,t,r){"use strict";t.exports=EvalError},{}],27:[function(e,t,r){"use strict";t.exports=Error},{}],28:[function(e,t,r){"use strict";t.exports=RangeError},{}],29:[function(e,t,r){"use strict";t.exports=ReferenceError},{}],30:[function(e,t,r){"use strict";t.exports=SyntaxError},{}],31:[function(e,t,r){"use strict";t.exports=TypeError},{}],32:[function(e,t,r){"use strict";t.exports=URIError},{}],33:[function(e,t,r){var n=Object.create||function(e){var t=function(){};return t.prototype=e,new t},i=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return r},o=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function a(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=n(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}t.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._maxListeners=void 0;var s,u=10;try{var c={};Object.defineProperty&&Object.defineProperty(c,"x",{value:0}),s=0===c.x}catch(e){s=!1}function f(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function l(e,t,r){if(t)e.call(r);else for(var n=e.length,i=w(e,n),o=0;o<n;++o)i[o].call(r)}function h(e,t,r,n){if(t)e.call(r,n);else for(var i=e.length,o=w(e,i),a=0;a<i;++a)o[a].call(r,n)}function d(e,t,r,n,i){if(t)e.call(r,n,i);else for(var o=e.length,a=w(e,o),s=0;s<o;++s)a[s].call(r,n,i)}function p(e,t,r,n,i,o){if(t)e.call(r,n,i,o);else for(var a=e.length,s=w(e,a),u=0;u<a;++u)s[u].call(r,n,i,o)}function y(e,t,r,n){if(t)e.apply(r,n);else for(var i=e.length,o=w(e,i),a=0;a<i;++a)o[a].apply(r,n)}function g(e,t,r,i){var o,a,s;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((a=e._events)?(a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),s=a[t]):(a=e._events=n(null),e._eventsCount=0),s){if("function"==typeof s?s=a[t]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),!s.warned&&(o=f(e))&&o>0&&s.length>o){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",u.name,u.message)}}else s=a[t]=r,++e._eventsCount;return e}function v(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t<e.length;++t)e[t]=arguments[t];this.listener.apply(this.target,e)}}function b(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=o.call(v,n);return i.listener=r,n.wrapFn=i,i}function _(e,t,r){var n=e._events;if(!n)return[];var i=n[t];return i?"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):w(i,i.length):[]}function m(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function w(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}s?Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||e!=e)throw new TypeError('"defaultMaxListeners" must be a positive number');u=e}}):a.defaultMaxListeners=u,a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return f(this)},a.prototype.emit=function(e){var t,r,n,i,o,a,s="error"===e;if(a=this._events)s=s&&null==a.error;else if(!s)return!1;if(s){if(arguments.length>1&&(t=arguments[1]),t instanceof Error)throw t;var u=new Error('Unhandled "error" event. ('+t+")");throw u.context=t,u}if(!(r=a[e]))return!1;var c="function"==typeof r;switch(n=arguments.length){case 1:l(r,c,this);break;case 2:h(r,c,this,arguments[1]);break;case 3:d(r,c,this,arguments[1],arguments[2]);break;case 4:p(r,c,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(n-1),o=1;o<n;o++)i[o-1]=arguments[o];y(r,c,this,i)}return!0},a.prototype.addListener=function(e,t){return g(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return g(this,e,t,!0)},a.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,b(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,b(this,e,t)),this},a.prototype.removeListener=function(e,t){var r,i,o,a,s;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(i=this._events))return this;if(!(r=i[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=n(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,a=r.length-1;a>=0;a--)if(r[a]===t||r[a].listener===t){s=r[a].listener,o=a;break}if(o<0)return this;0===o?r.shift():function(e,t){for(var r=t,n=r+1,i=e.length;n<i;r+=1,n+=1)e[r]=e[n];e.pop()}(r,o),1===r.length&&(i[e]=r[0]),i.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.removeAllListeners=function(e){var t,r,o;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=n(null),this._eventsCount=0):r[e]&&(0==--this._eventsCount?this._events=n(null):delete r[e]),this;if(0===arguments.length){var a,s=i(r);for(o=0;o<s.length;++o)"removeListener"!==(a=s[o])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=n(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(t)for(o=t.length-1;o>=0;o--)this.removeListener(e,t[o]);return this},a.prototype.listeners=function(e){return _(this,e,!0)},a.prototype.rawListeners=function(e){return _(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],34:[function(e,t,r){"use strict";var n="Function.prototype.bind called on incompatible ",i=Object.prototype.toString,o=Math.max,a=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var i=0;i<t.length;i+=1)r[i+e.length]=t[i];return r},s=function(e,t){for(var r=[],n=t||0,i=0;n<e.length;n+=1,i+=1)r[i]=e[n];return r},u=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};t.exports=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==i.apply(t))throw new TypeError(n+t);for(var r,c=s(arguments,1),f=function(){if(this instanceof r){var n=t.apply(this,a(c,arguments));return Object(n)===n?n:this}return t.apply(e,a(c,arguments))},l=o(0,t.length-c.length),h=[],d=0;d<l;d++)h[d]="$"+d;if(r=Function("binder","return function ("+u(h,",")+"){ return binder.apply(this,arguments); }")(f),t.prototype){var p=function(){};p.prototype=t.prototype,r.prototype=new p,p.prototype=null}return r}},{}],35:[function(e,t,r){"use strict";var n=e("./implementation");t.exports=Function.prototype.bind||n},{"./implementation":34}],36:[function(e,t,r){"use strict";t.exports=function(e){return new s(e||y,null)};function n(e,t,r,n,i,o){this._color=e,this.key=t,this.value=r,this.left=n,this.right=i,this._count=o}function i(e){return new n(e._color,e.key,e.value,e.left,e.right,e._count)}function o(e,t){return new n(e,t.key,t.value,t.left,t.right,t._count)}function a(e){e._count=1+(e.left?e.left._count:0)+(e.right?e.right._count:0)}function s(e,t){this._compare=e,this.root=t}var u=s.prototype;function c(e,t){var r;if(t.left&&(r=c(e,t.left)))return r;return(r=e(t.key,t.value))||(t.right?c(e,t.right):void 0)}function f(e,t,r,n){if(t(e,n.key)<=0){var i;if(n.left)if(i=f(e,t,r,n.left))return i;if(i=r(n.key,n.value))return i}if(n.right)return f(e,t,r,n.right)}function l(e,t,r,n,i){var o,a=r(e,i.key),s=r(t,i.key);if(a<=0){if(i.left&&(o=l(e,t,r,n,i.left)))return o;if(s>0&&(o=n(i.key,i.value)))return o}if(s>0&&i.right)return l(e,t,r,n,i.right)}function h(e,t){this.tree=e,this._stack=t}Object.defineProperty(u,"keys",{get:function(){var e=[];return this.forEach((function(t,r){e.push(t)})),e}}),Object.defineProperty(u,"values",{get:function(){var e=[];return this.forEach((function(t,r){e.push(r)})),e}}),Object.defineProperty(u,"length",{get:function(){return this.root?this.root._count:0}}),u.insert=function(e,t){for(var r=this._compare,i=this.root,u=[],c=[];i;){var f=r(e,i.key);u.push(i),c.push(f),i=f<=0?i.left:i.right}u.push(new n(0,e,t,null,null,1));for(var l=u.length-2;l>=0;--l){i=u[l];c[l]<=0?u[l]=new n(i._color,i.key,i.value,u[l+1],i.right,i._count+1):u[l]=new n(i._color,i.key,i.value,i.left,u[l+1],i._count+1)}for(l=u.length-1;l>1;--l){var h=u[l-1];i=u[l];if(1===h._color||1===i._color)break;var d=u[l-2];if(d.left===h)if(h.left===i){if(!(p=d.right)||0!==p._color){if(d._color=0,d.left=h.right,h._color=1,h.right=d,u[l-2]=h,u[l-1]=i,a(d),a(h),l>=3)(y=u[l-3]).left===d?y.left=h:y.right=h;break}h._color=1,d.right=o(1,p),d._color=0,l-=1}else{if(!(p=d.right)||0!==p._color){if(h.right=i.left,d._color=0,d.left=i.right,i._color=1,i.left=h,i.right=d,u[l-2]=i,u[l-1]=h,a(d),a(h),a(i),l>=3)(y=u[l-3]).left===d?y.left=i:y.right=i;break}h._color=1,d.right=o(1,p),d._color=0,l-=1}else if(h.right===i){if(!(p=d.left)||0!==p._color){if(d._color=0,d.right=h.left,h._color=1,h.left=d,u[l-2]=h,u[l-1]=i,a(d),a(h),l>=3)(y=u[l-3]).right===d?y.right=h:y.left=h;break}h._color=1,d.left=o(1,p),d._color=0,l-=1}else{var p;if(!(p=d.left)||0!==p._color){var y;if(h.left=i.right,d._color=0,d.right=i.left,i._color=1,i.right=h,i.left=d,u[l-2]=i,u[l-1]=h,a(d),a(h),a(i),l>=3)(y=u[l-3]).right===d?y.right=i:y.left=i;break}h._color=1,d.left=o(1,p),d._color=0,l-=1}}return u[0]._color=1,new s(r,u[0])},u.forEach=function(e,t,r){if(this.root)switch(arguments.length){case 1:return c(e,this.root);case 2:return f(t,this._compare,e,this.root);case 3:if(this._compare(t,r)>=0)return;return l(t,r,this._compare,e,this.root)}},Object.defineProperty(u,"begin",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.left;return new h(this,e)}}),Object.defineProperty(u,"end",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.right;return new h(this,e)}}),u.at=function(e){if(e<0)return new h(this,[]);for(var t=this.root,r=[];;){if(r.push(t),t.left){if(e<t.left._count){t=t.left;continue}e-=t.left._count}if(!e)return new h(this,r);if(e-=1,!t.right)break;if(e>=t.right._count)break;t=t.right}return new h(this,[])},u.ge=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var o=t(e,r.key);n.push(r),o<=0&&(i=n.length),r=o<=0?r.left:r.right}return n.length=i,new h(this,n)},u.gt=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var o=t(e,r.key);n.push(r),o<0&&(i=n.length),r=o<0?r.left:r.right}return n.length=i,new h(this,n)},u.lt=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var o=t(e,r.key);n.push(r),o>0&&(i=n.length),r=o<=0?r.left:r.right}return n.length=i,new h(this,n)},u.le=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var o=t(e,r.key);n.push(r),o>=0&&(i=n.length),r=o<0?r.left:r.right}return n.length=i,new h(this,n)},u.find=function(e){for(var t=this._compare,r=this.root,n=[];r;){var i=t(e,r.key);if(n.push(r),0===i)return new h(this,n);r=i<=0?r.left:r.right}return new h(this,[])},u.remove=function(e){var t=this.find(e);return t?t.remove():this},u.get=function(e){for(var t=this._compare,r=this.root;r;){var n=t(e,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var d=h.prototype;function p(e,t){e.key=t.key,e.value=t.value,e.left=t.left,e.right=t.right,e._color=t._color,e._count=t._count}function y(e,t){return e<t?-1:e>t?1:0}Object.defineProperty(d,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(d,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),d.clone=function(){return new h(this.tree,this._stack.slice())},d.remove=function(){var e=this._stack;if(0===e.length)return this.tree;var t=new Array(e.length),r=e[e.length-1];t[t.length-1]=new n(r._color,r.key,r.value,r.left,r.right,r._count);for(var u=e.length-2;u>=0;--u){(r=e[u]).left===e[u+1]?t[u]=new n(r._color,r.key,r.value,t[u+1],r.right,r._count):t[u]=new n(r._color,r.key,r.value,r.left,t[u+1],r._count)}if((r=t[t.length-1]).left&&r.right){var c=t.length;for(r=r.left;r.right;)t.push(r),r=r.right;var f=t[c-1];t.push(new n(r._color,f.key,f.value,r.left,r.right,r._count)),t[c-1].key=r.key,t[c-1].value=r.value;for(u=t.length-2;u>=c;--u)r=t[u],t[u]=new n(r._color,r.key,r.value,r.left,t[u+1],r._count);t[c-1].left=t[c]}if(0===(r=t[t.length-1])._color){var l=t[t.length-2];l.left===r?l.left=null:l.right===r&&(l.right=null),t.pop();for(u=0;u<t.length;++u)t[u]._count--;return new s(this.tree._compare,t[0])}if(r.left||r.right){r.left?p(r,r.left):r.right&&p(r,r.right),r._color=1;for(u=0;u<t.length-1;++u)t[u]._count--;return new s(this.tree._compare,t[0])}if(1===t.length)return new s(this.tree._compare,null);for(u=0;u<t.length;++u)t[u]._count--;var h=t[t.length-2];return function(e){for(var t,r,n,s,u=e.length-1;u>=0;--u){if(t=e[u],0===u)return void(t._color=1);if((r=e[u-1]).left===t){if((n=r.right).right&&0===n.right._color){if(s=(n=r.right=i(n)).right=i(n.right),r.right=n.left,n.left=r,n.right=s,n._color=r._color,t._color=1,r._color=1,s._color=1,a(r),a(n),u>1)(c=e[u-2]).left===r?c.left=n:c.right=n;return void(e[u-1]=n)}if(n.left&&0===n.left._color){if(s=(n=r.right=i(n)).left=i(n.left),r.right=s.left,n.left=s.right,s.left=r,s.right=n,s._color=r._color,r._color=1,n._color=1,t._color=1,a(r),a(n),a(s),u>1)(c=e[u-2]).left===r?c.left=s:c.right=s;return void(e[u-1]=s)}if(1===n._color){if(0===r._color)return r._color=1,void(r.right=o(0,n));r.right=o(0,n);continue}n=i(n),r.right=n.left,n.left=r,n._color=r._color,r._color=0,a(r),a(n),u>1&&((c=e[u-2]).left===r?c.left=n:c.right=n),e[u-1]=n,e[u]=r,u+1<e.length?e[u+1]=t:e.push(t),u+=2}else{if((n=r.left).left&&0===n.left._color){if(s=(n=r.left=i(n)).left=i(n.left),r.left=n.right,n.right=r,n.left=s,n._color=r._color,t._color=1,r._color=1,s._color=1,a(r),a(n),u>1)(c=e[u-2]).right===r?c.right=n:c.left=n;return void(e[u-1]=n)}if(n.right&&0===n.right._color){if(s=(n=r.left=i(n)).right=i(n.right),r.left=s.right,n.right=s.left,s.right=r,s.left=n,s._color=r._color,r._color=1,n._color=1,t._color=1,a(r),a(n),a(s),u>1)(c=e[u-2]).right===r?c.right=s:c.left=s;return void(e[u-1]=s)}if(1===n._color){if(0===r._color)return r._color=1,void(r.left=o(0,n));r.left=o(0,n);continue}var c;n=i(n),r.left=n.right,n.right=r,n._color=r._color,r._color=0,a(r),a(n),u>1&&((c=e[u-2]).right===r?c.right=n:c.left=n),e[u-1]=n,e[u]=r,u+1<e.length?e[u+1]=t:e.push(t),u+=2}}}(t),h.left===r?h.left=null:h.right=null,new s(this.tree._compare,t[0])},Object.defineProperty(d,"key",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(d,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(d,"index",{get:function(){var e=0,t=this._stack;if(0===t.length){var r=this.tree.root;return r?r._count:0}t[t.length-1].left&&(e=t[t.length-1].left._count);for(var n=t.length-2;n>=0;--n)t[n+1]===t[n].right&&(++e,t[n].left&&(e+=t[n].left._count));return e},enumerable:!0}),d.next=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.right)for(t=t.right;t;)e.push(t),t=t.left;else for(e.pop();e.length>0&&e[e.length-1].right===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(d,"hasNext",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].right)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].left===e[t])return!0;return!1}}),d.update=function(e){var t=this._stack;if(0===t.length)throw new Error("Can't update empty node!");var r=new Array(t.length),i=t[t.length-1];r[r.length-1]=new n(i._color,i.key,e,i.left,i.right,i._count);for(var o=t.length-2;o>=0;--o)(i=t[o]).left===t[o+1]?r[o]=new n(i._color,i.key,i.value,r[o+1],i.right,i._count):r[o]=new n(i._color,i.key,i.value,i.left,r[o+1],i._count);return new s(this.tree._compare,r[0])},d.prev=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.left)for(t=t.left;t;)e.push(t),t=t.right;else for(e.pop();e.length>0&&e[e.length-1].left===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(d,"hasPrev",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].left)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].right===e[t])return!0;return!1}})},{}],37:[function(e,t,r){"use strict";var n=e("es-errors"),i=e("es-errors/eval"),o=e("es-errors/range"),a=e("es-errors/ref"),s=e("es-errors/syntax"),u=e("es-errors/type"),c=e("es-errors/uri"),f=Function,l=function(e){try{return f('"use strict"; return ('+e+").constructor;")()}catch(e){}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch(e){h=null}var d=function(){throw new u},p=h?function(){try{return d}catch(e){try{return h(arguments,"callee").get}catch(e){return d}}}():d,y=e("has-symbols")(),g=e("has-proto")(),v=Object.getPrototypeOf||(g?function(e){return e.__proto__}:null),b={},_="undefined"!=typeof Uint8Array&&v?v(Uint8Array):void 0,m={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":y&&v?v([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?void 0:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?void 0:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":f,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":y&&v?v(v([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&y&&v?v((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":o,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&y&&v?v((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":y&&v?v(""[Symbol.iterator]()):void 0,"%Symbol%":y?Symbol:void 0,"%SyntaxError%":s,"%ThrowTypeError%":p,"%TypedArray%":_,"%TypeError%":u,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet};if(v)try{null.error}catch(e){var w=v(v(e));m["%Error.prototype%"]=w}var k={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},E=e("function-bind"),S=e("hasown"),x=E.call(Function.call,Array.prototype.concat),j=E.call(Function.apply,Array.prototype.splice),O=E.call(Function.call,String.prototype.replace),A=E.call(Function.call,String.prototype.slice),R=E.call(Function.call,RegExp.prototype.exec),M=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,B=function(e){var t=A(e,0,1),r=A(e,-1);if("%"===t&&"%"!==r)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var n=[];return O(e,M,(function(e,t,r,i){n[n.length]=r?O(i,T,"$1"):t||e})),n},P=function(e,t){var r,n=e;if(S(k,n)&&(n="%"+(r=k[n])[0]+"%"),S(m,n)){var i=m[n];if(i===b&&(i=function e(t){var r;if("%AsyncFunction%"===t)r=l("async function () {}");else if("%GeneratorFunction%"===t)r=l("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=l("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&v&&(r=v(i.prototype))}return m[t]=r,r}(n)),void 0===i&&!t)throw new u("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new s("intrinsic "+e+" does not exist!")};t.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new u('"allowMissing" argument must be a boolean');if(null===R(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=B(e),n=r.length>0?r[0]:"",i=P("%"+n+"%",t),o=i.name,a=i.value,c=!1,f=i.alias;f&&(n=f[0],j(r,x([0,1],f)));for(var l=1,d=!0;l<r.length;l+=1){var p=r[l],y=A(p,0,1),g=A(p,-1);if(('"'===y||"'"===y||"`"===y||'"'===g||"'"===g||"`"===g)&&y!==g)throw new s("property names with quotes must have matching quotes");if("constructor"!==p&&d||(c=!0),S(m,o="%"+(n+="."+p)+"%"))a=m[o];else if(null!=a){if(!(p in a)){if(!t)throw new u("base intrinsic for "+e+" exists, but the property is not available.");return}if(h&&l+1>=r.length){var v=h(a,p);a=(d=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:a[p]}else d=S(a,p),a=a[p];d&&!c&&(m[o]=a)}}return a}},{"es-errors":27,"es-errors/eval":26,"es-errors/range":28,"es-errors/ref":29,"es-errors/syntax":30,"es-errors/type":31,"es-errors/uri":32,"function-bind":35,"has-proto":40,"has-symbols":41,hasown:43}],38:[function(e,t,r){"use strict";var n=e("get-intrinsic")("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}t.exports=n},{"get-intrinsic":37}],39:[function(e,t,r){"use strict";var n=e("es-define-property"),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},t.exports=i},{"es-define-property":25}],40:[function(e,t,r){"use strict";var n={__proto__:null,foo:{}},i=Object;t.exports=function(){return{__proto__:n}.foo===n.foo&&!(n instanceof i)}},{}],41:[function(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=e("./shams");t.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},{"./shams":42}],42:[function(e,t,r){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},{}],43:[function(e,t,r){"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=e("function-bind");t.exports=o.call(n,i)},{"function-bind":35}],44:[function(e,t,r){
|
22 |
|
23 | r.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,f=-7,l=r?i-1:0,h=r?-1:1,d=e[t+l];for(l+=h,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+e[t+l],l+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+e[t+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(t*u-1)*Math.pow(2,i),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[r+d]=255&a,d+=p,a/=256,c-=8);e[r+d-p]|=128*y}},{}],45:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},{}],46:[function(e,t,r){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 | t.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],47:[function(e,t,r){t.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},{}],48:[function(e,t,r){var n=e("./lib/encodings");function i(e){if(!(this instanceof i))return new i(e);this.opts=e||{},this.encodings=n}t.exports=i,i.prototype._encoding=function(e){return"string"==typeof e&&(e=n[e]),e||(e=n.id),e},i.prototype._keyEncoding=function(e,t){return this._encoding(t&&t.keyEncoding||e&&e.keyEncoding||this.opts.keyEncoding)},i.prototype._valueEncoding=function(e,t){return this._encoding(t&&(t.valueEncoding||t.encoding)||e&&(e.valueEncoding||e.encoding)||this.opts.valueEncoding||this.opts.encoding)},i.prototype.encodeKey=function(e,t,r){return this._keyEncoding(t,r).encode(e)},i.prototype.encodeValue=function(e,t,r){return this._valueEncoding(t,r).encode(e)},i.prototype.decodeKey=function(e,t){return this._keyEncoding(t).decode(e)},i.prototype.decodeValue=function(e,t){return this._valueEncoding(t).decode(e)},i.prototype.encodeBatch=function(e,t){var r=this;return e.map((function(e){var n={type:e.type,key:r.encodeKey(e.key,t,e)};return r.keyAsBuffer(t,e)&&(n.keyEncoding="binary"),e.prefix&&(n.prefix=e.prefix),"value"in e&&(n.value=r.encodeValue(e.value,t,e),r.valueAsBuffer(t,e)&&(n.valueEncoding="binary")),n}))};var o=["lt","gt","lte","gte","start","end"];i.prototype.encodeLtgt=function(e){var t=this,r={};return Object.keys(e).forEach((function(n){r[n]=o.indexOf(n)>-1?t.encodeKey(e[n],e):e[n]})),r},i.prototype.createStreamDecoder=function(e){var t=this;return e.keys&&e.values?function(r,n){return{key:t.decodeKey(r,e),value:t.decodeValue(n,e)}}:e.keys?function(r){return t.decodeKey(r,e)}:e.values?function(r,n){return t.decodeValue(n,e)}:function(){}},i.prototype.keyAsBuffer=function(e){return this._keyEncoding(e).buffer},i.prototype.valueAsBuffer=function(e){return this._valueEncoding(e).buffer}},{"./lib/encodings":49}],49:[function(e,t,r){var n=e("buffer").Buffer;r.utf8=r["utf-8"]={encode:function(e){return o(e)?e:String(e)},decode:i,buffer:!1,type:"utf8"},r.json={encode:JSON.stringify,decode:JSON.parse,buffer:!1,type:"json"},r.binary={encode:function(e){return o(e)?e:n.from(e)},decode:i,buffer:!0,type:"binary"},r.none={encode:i,decode:i,buffer:!1,type:"id"},r.id=r.none;function i(e){return e}function o(e){return null==e||n.isBuffer(e)}["hex","ascii","base64","ucs2","ucs-2","utf16le","utf-16le"].forEach((function(e){r[e]={encode:function(t){return o(t)?t:n.from(t,e)},decode:function(t){return t.toString(e)},buffer:!0,type:e}}))},{buffer:4}],50:[function(e,t,r){var n=e("errno").create,i=n("LevelUPError"),o=n("NotFoundError",i);o.prototype.notFound=!0,o.prototype.status=404,t.exports={LevelUPError:i,InitializationError:n("InitializationError",i),OpenError:n("OpenError",i),ReadError:n("ReadError",i),WriteError:n("WriteError",i),NotFoundError:o,EncodingError:n("EncodingError",i)}},{errno:24}],51:[function(e,t,r){var n=e("inherits"),i=e("readable-stream").Readable,o=e("xtend");function a(e,t){if(!(this instanceof a))return new a(e,t);t=t||{},i.call(this,o(t,{objectMode:!0})),this._iterator=e,this._options=t,this.on("end",this.destroy.bind(this,null,null))}t.exports=a,n(a,i),a.prototype._read=function(){var e=this,t=this._options;this.destroyed||this._iterator.next((function(r,n,i){if(!e.destroyed)return r?e.destroy(r):void(void 0===n&&void 0===i?e.push(null):!1!==t.keys&&!1===t.values?e.push(n):!1===t.keys&&!1!==t.values?e.push(i):e.push({key:n,value:i}))}))},a.prototype._destroy=function(e,t){this._iterator.end((function(r){t(e||r)}))}},{inherits:45,"readable-stream":66,xtend:160}],52:[function(e,t,r){"use strict";var n={};function i(e,t,r){r||(r=Error);var i=function(e){var r,n;function i(r,n,i){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i))||this}return n=e,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=e,n[e]=i}function o(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,i,a,s;if("string"==typeof t&&(i="not ",t.substr(!a||a<0?0:+a,i.length)===i)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(n," ").concat(o(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(n," ").concat(o(t,"type"))}return s+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},{}],53:[function(e,t,r){(function(r){(function(){"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=c;var i=e("./_stream_readable"),o=e("./_stream_writable");e("inherits")(c,i);for(var a=n(o.prototype),s=0;s<a.length;s++){var u=a[s];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||r.nextTick(l,this)}function l(e){e.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(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this)}).call(this,e("_process"))},{"./_stream_readable":55,"./_stream_writable":57,_process:93,inherits:45}],54:[function(e,t,r){"use strict";t.exports=i;var n=e("./_stream_transform");function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}e("inherits")(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":56,inherits:45}],55:[function(e,t,r){(function(r,n){(function(){"use strict";var i;t.exports=x,x.ReadableState=S;e("events").EventEmitter;var o=function(e,t){return e.listeners(t).length},a=e("./internal/streams/stream"),s=e("buffer").Buffer,u=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,f=e("util");c=f&&f.debuglog?f.debuglog("stream"):function(){};var l,h,d,p=e("./internal/streams/buffer_list"),y=e("./internal/streams/destroy"),g=e("./internal/streams/state").getHighWaterMark,v=e("../errors").codes,b=v.ERR_INVALID_ARG_TYPE,_=v.ERR_STREAM_PUSH_AFTER_EOF,m=v.ERR_METHOD_NOT_IMPLEMENTED,w=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(x,a);var k=y.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(t,r,n){i=i||e("./_stream_duplex"),t=t||{},"boolean"!=typeof n&&(n=r instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",n),this.buffer=new p,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&&(l||(l=e("string_decoder/").StringDecoder),this.decoder=new l(t.encoding),this.encoding=t.encoding)}function x(t){if(i=i||e("./_stream_duplex"),!(this instanceof x))return new x(t);var r=this instanceof i;this._readableState=new S(t,this,r),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function j(e,t,r,n,i){c("readableAddChunk",t);var o,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(c("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?R(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,M(e)))}(e,a);else if(i||(o=function(e,t){var r;n=t,s.isBuffer(n)||n instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(a,t)),o)k(e,o);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n)a.endEmitted?k(e,new w):O(e,a,t,!0);else if(a.ended)k(e,new _);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?O(e,a,t,!1):T(e,a)):O(e,a,t,!1)}else n||(a.reading=!1,T(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function O(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&R(e)),T(e,t)}Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),x.prototype.destroy=y.destroy,x.prototype._undestroy=y.undestroy,x.prototype._destroy=function(e,t){t(e)},x.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=s.from(e,t),t=""),r=!0),j(this,e,t,!1,r)},x.prototype.unshift=function(e){return j(this,e,null,!0,!1)},x.prototype.isPaused=function(){return!1===this._readableState.flowing},x.prototype.setEncoding=function(t){l||(l=e("string_decoder/").StringDecoder);var r=new l(t);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=r.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function A(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function R(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(M,e))}function M(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,I(e)}function T(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(B,e,t))}function B(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(c("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function P(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function L(e){c("readable nexttick read 0"),e.read(0)}function C(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),I(e),t.flowing&&!t.reading&&e.read(0)}function I(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function q(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(N,t,e))}function N(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function U(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}x.prototype.read=function(e){c("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?q(this):R(this),null;if(0===(e=A(e,t))&&t.ended)return 0===t.length&&q(this),null;var n,i=t.needReadable;return c("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",i=!0),t.ended||t.reading?c("reading or ended",i=!1):i&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=A(r,t))),null===(n=e>0?D(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&q(this)),null!==n&&this.emit("data",n),n},x.prototype._read=function(e){k(this,new m("_read()"))},x.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?u:g;function s(t,r){c("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),e.removeListener("close",p),e.removeListener("finish",y),e.removeListener("drain",f),e.removeListener("error",d),e.removeListener("unpipe",s),n.removeListener("end",u),n.removeListener("end",g),n.removeListener("data",h),l=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function u(){c("onend"),e.end()}i.endEmitted?r.nextTick(a):n.once("end",a),e.on("unpipe",s);var f=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,I(e))}}(n);e.on("drain",f);var l=!1;function h(t){c("ondata");var r=e.write(t);c("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==U(i.pipes,e))&&!l&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function d(t){c("onerror",t),g(),e.removeListener("error",d),0===o(e,"error")&&k(e,t)}function p(){e.removeListener("finish",y),g()}function y(){c("onfinish"),e.removeListener("close",p),g()}function g(){c("unpipe"),n.unpipe(e)}return n.on("data",h),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",d),e.once("close",p),e.once("finish",y),e.emit("pipe",n),i.flowing||(c("pipe resume"),n.resume()),e},x.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=U(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},x.prototype.on=function(e,t){var n=a.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?R(this):i.reading||r.nextTick(L,this))),n},x.prototype.addListener=x.prototype.on,x.prototype.removeListener=function(e,t){var n=a.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(P,this),n},x.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(P,this),t},x.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(C,e,t))}(this,e)),e.paused=!1,this},x.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},x.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<E.length;o++)e.on(E[o],this.emit.bind(this,E[o]));return this._read=function(t){c("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(x.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=e("./internal/streams/async_iterator")),h(this)}),Object.defineProperty(x.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(x.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(x.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),x._fromList=D,Object.defineProperty(x.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(x.from=function(t,r){return void 0===d&&(d=e("./internal/streams/from")),d(x,t,r)})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":52,"./_stream_duplex":53,"./internal/streams/async_iterator":58,"./internal/streams/buffer_list":59,"./internal/streams/destroy":60,"./internal/streams/from":62,"./internal/streams/state":64,"./internal/streams/stream":65,_process:93,buffer:4,events:33,inherits:45,"string_decoder/":122,util:3}],56:[function(e,t,r){"use strict";t.exports=f;var n=e("../errors").codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=e("./_stream_duplex");function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function f(e){if(!(this instanceof f))return new f(e);u.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",l)}function l(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,r){h(e,t,r)}))}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}e("inherits")(f,u),f.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},f.prototype._transform=function(e,t,r){r(new i("_transform()"))},f.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},f.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},f.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},{"../errors":52,"./_stream_duplex":53,inherits:45}],57:[function(e,t,r){(function(r,n){(function(){"use strict";function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var o;t.exports=x,x.WritableState=S;var a={deprecate:e("util-deprecate")},s=e("./internal/streams/stream"),u=e("buffer").Buffer,c=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var f,l=e("./internal/streams/destroy"),h=e("./internal/streams/state").getHighWaterMark,d=e("../errors").codes,p=d.ERR_INVALID_ARG_TYPE,y=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,v=d.ERR_STREAM_CANNOT_PIPE,b=d.ERR_STREAM_DESTROYED,_=d.ERR_STREAM_NULL_VALUES,m=d.ERR_STREAM_WRITE_AFTER_END,w=d.ERR_UNKNOWN_ENCODING,k=l.errorOrDestroy;function E(){}function S(t,n,a){o=o||e("./_stream_duplex"),t=t||{},"boolean"!=typeof a&&(a=n instanceof o),this.objectMode=!!t.objectMode,a&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=h(this,t,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,o=n.writecb;if("function"!=typeof o)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,o){--t.pendingcb,n?(r.nextTick(o,i),r.nextTick(T,e,t),e._writableState.errorEmitted=!0,k(e,i)):(o(i),e._writableState.errorEmitted=!0,k(e,i),T(e,t))}(e,n,i,t,o);else{var a=R(n)||e.destroyed;a||n.corked||n.bufferProcessing||!n.bufferedRequest||A(e,n),i?r.nextTick(O,e,n,a,o):O(e,n,a,o)}}(n,e)},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 x(t){var r=this instanceof(o=o||e("./_stream_duplex"));if(!r&&!f.call(x,this))return new x(t);this._writableState=new S(t,this,r),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)),s.call(this)}function j(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function O(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),T(e,t)}function A(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)o[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;o.allBuffers=u,j(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,l=r.callback;if(j(e,t,!1,t.objectMode?1:c.length,c,f,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function R(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function M(e,t){e._final((function(r){t.pendingcb--,r&&k(e,r),t.prefinished=!0,e.emit("prefinish"),T(e,t)}))}function T(e,t){var n=R(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,r.nextTick(M,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return n}e("inherits")(x,s),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(x,Symbol.hasInstance,{value:function(e){return!!f.call(this,e)||this===x&&(e&&e._writableState instanceof S)}})):f=function(e){return e instanceof this},x.prototype.pipe=function(){k(this,new v)},x.prototype.write=function(e,t,n){var i,o=this._writableState,a=!1,s=!o.objectMode&&(i=e,u.isBuffer(i)||i instanceof c);return s&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=E),o.ending?function(e,t){var n=new m;k(e,n),r.nextTick(t,n)}(this,n):(s||function(e,t,n,i){var o;return null===n?o=new _:"string"==typeof n||t.objectMode||(o=new p("chunk",["string","Buffer"],n)),!o||(k(e,o),r.nextTick(i,o),!1)}(this,o,e,n))&&(o.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else j(e,t,!1,s,n,i,o);return c}(this,o,s,e,t,n)),a},x.prototype.cork=function(){this._writableState.corked++},x.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||A(this,e))},x.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(x.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(x.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),x.prototype._write=function(e,t,r){r(new y("_write()"))},x.prototype._writev=null,x.prototype.end=function(e,t,n){var i=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,T(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(x.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),x.prototype.destroy=l.destroy,x.prototype._undestroy=l.undestroy,x.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":52,"./_stream_duplex":53,"./internal/streams/destroy":60,"./internal/streams/state":64,"./internal/streams/stream":65,_process:93,buffer:4,inherits:45,"util-deprecate":140}],58:[function(e,t,r){(function(r){(function(){"use strict";var n;function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=e("./end-of-stream"),a=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),f=Symbol("lastPromise"),l=Symbol("handlePromise"),h=Symbol("stream");function d(e,t){return{value:e,done:t}}function p(e){var t=e[a];if(null!==t){var r=e[h].read();null!==r&&(e[f]=null,e[a]=null,e[s]=null,t(d(r,!1)))}}function y(e){r.nextTick(p,e)}var g=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(d(void 0,!0));if(this[h].destroyed)return new Promise((function(t,n){r.nextTick((function(){e[u]?n(e[u]):t(d(void 0,!0))}))}));var n,i=this[f];if(i)n=new Promise(function(e,t){return function(r,n){e.then((function(){t[c]?r(d(void 0,!0)):t[l](r,n)}),n)}}(i,this));else{var o=this[h].read();if(null!==o)return Promise.resolve(d(o,!1));n=new Promise(this[l])}return this[f]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[h].destroy(null,(function(e){e?r(e):t(d(void 0,!0))}))}))})),n),g);t.exports=function(e){var t,r=Object.create(v,(i(t={},h,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,c,{value:e._readableState.endEmitted,writable:!0}),i(t,l,{value:function(e,t){var n=r[h].read();n?(r[f]=null,r[a]=null,r[s]=null,e(d(n,!1))):(r[a]=e,r[s]=t)},writable:!0}),t));return r[f]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[s];return null!==t&&(r[f]=null,r[a]=null,r[s]=null,t(e)),void(r[u]=e)}var n=r[a];null!==n&&(r[f]=null,r[a]=null,r[s]=null,n(d(void 0,!0))),r[c]=!0})),e.on("readable",y.bind(null,r)),r}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":61,_process:93}],59:[function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e,t,r){return(t=s(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var u=e("buffer").Buffer,c=e("util").inspect,f=c&&c.custom||"inspect";t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,n;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t,r,n,i=u.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=i,n=a,u.prototype.copy.call(t,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:f,value:function(e,t){return c(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&a(t.prototype,r),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},{buffer:4,util:3}],60:[function(e,t,r){(function(e){(function(){"use strict";function r(e,t){i(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}t.exports={destroy:function(t,o){var a=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(o?o(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){!o&&t?a._writableState?a._writableState.errorEmitted?e.nextTick(n,a):(a._writableState.errorEmitted=!0,e.nextTick(r,a,t)):e.nextTick(r,a,t):o?(e.nextTick(n,a),o(t)):e.nextTick(n,a)})),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(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this)}).call(this,e("_process"))},{_process:93}],61:[function(e,t,r){"use strict";var n=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(o||i);var a=r.readable||!1!==r.readable&&t.readable,s=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||f()},c=t._writableState&&t._writableState.finished,f=function(){s=!1,c=!0,a||o.call(t)},l=t._readableState&&t._readableState.endEmitted,h=function(){a=!1,l=!0,s||o.call(t)},d=function(e){o.call(t,e)},p=function(){var e;return a&&!l?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):s&&!c?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},y=function(){t.req.on("finish",f)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?s&&!t._writableState&&(t.on("end",u),t.on("close",u)):(t.on("complete",f),t.on("abort",p),t.req?y():t.on("request",y)),t.on("end",h),t.on("finish",f),!1!==r.error&&t.on("error",d),t.on("close",p),function(){t.removeListener("complete",f),t.removeListener("abort",p),t.removeListener("request",y),t.req&&t.req.removeListener("finish",f),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",f),t.removeListener("end",h),t.removeListener("error",d),t.removeListener("close",p)}}},{"../../../errors":52}],62:[function(e,t,r){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],63:[function(e,t,r){"use strict";var n;var i=e("../../../errors").codes,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(t,r,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;t.on("close",(function(){s=!0})),void 0===n&&(n=e("./end-of-stream")),n(t,{readable:r,writable:i},(function(e){if(e)return o(e);s=!0,o()}));var u=!1;return function(e){if(!s&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new a("pipe"))}}function c(e){e()}function f(e,t){return e.pipe(t)}function l(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}t.exports=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=l(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var a=t.map((function(e,r){var o=r<t.length-1;return u(e,o,r>0,(function(e){n||(n=e),e&&a.forEach(c),o||(a.forEach(c),i(n))}))}));return t.reduce(f)}},{"../../../errors":52,"./end-of-stream":61}],64:[function(e,t,r){"use strict";var n=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},{"../../../errors":52}],65:[function(e,t,r){t.exports=e("events").EventEmitter},{events:33}],66:[function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),r.finished=e("./lib/internal/streams/end-of-stream.js"),r.pipeline=e("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":53,"./lib/_stream_passthrough.js":54,"./lib/_stream_readable.js":55,"./lib/_stream_transform.js":56,"./lib/_stream_writable.js":57,"./lib/internal/streams/end-of-stream.js":61,"./lib/internal/streams/pipeline.js":63}],67:[function(e,t,r){"use strict";var n=e("xtend"),i=e("xtend/mutable");t.exports=function(){var e=n.apply(null,arguments);return i(e,{bufferKeys:e.bufferKeys||!1,snapshots:e.snapshots||!1,permanence:e.permanence||!1,seek:e.seek||!1,clear:e.clear||!1,status:e.status||!1,createIfMissing:e.createIfMissing||!1,errorIfExists:e.errorIfExists||!1,deferredOpen:e.deferredOpen||!1,openCallback:e.openCallback||!1,promises:e.promises||!1,streams:e.streams||!1,encodings:e.encodings||!1,additionalMethods:n(e.additionalMethods)})}},{xtend:160,"xtend/mutable":161}],68:[function(e,t,r){var n=e("level-errors").WriteError,i=e("./promisify"),o=e("./common").getCallback,a=e("./common").getOptions;function s(e){this.db=this._levelup=e,this.batch=e.db.batch(),this.ops=[],this.length=0}s.prototype.put=function(e,t){try{this.batch.put(e,t)}catch(e){throw new n(e)}return this.ops.push({type:"put",key:e,value:t}),this.length++,this},s.prototype.del=function(e){try{this.batch.del(e)}catch(e){throw new n(e)}return this.ops.push({type:"del",key:e}),this.length++,this},s.prototype.clear=function(){try{this.batch.clear()}catch(e){throw new n(e)}return this.ops=[],this.length=0,this},s.prototype.write=function(e,t){var r,s=this._levelup,u=this.ops;(t=o(e,t))||(r=(t=i()).promise),e=a(e);try{this.batch.write(e,(function(e){if(e)return t(new n(e));s.emit("batch",u),t()}))}catch(e){throw new n(e)}return r},t.exports=s},{"./common":69,"./promisify":71,"level-errors":50}],69:[function(e,t,r){r.getCallback=function(e,t){return"function"==typeof e?e:t},r.getOptions=function(e){return"object"==typeof e&&null!==e?e:{}}},{}],70:[function(e,t,r){(function(r){(function(){var n=e("events").EventEmitter,i=e("util").inherits,o=e("xtend"),a=e("deferred-leveldown"),s=e("level-iterator-stream"),u=e("./batch"),c=e("level-errors"),f=e("level-supports"),l=e("assert"),h=e("./promisify"),d=e("./common").getCallback,p=e("./common").getOptions,y=c.WriteError,g=c.ReadError,v=c.NotFoundError,b=c.OpenError,_=c.InitializationError;function m(e,t,i){if(!(this instanceof m))return new m(e,t,i);var o,s=this;if(n.call(this),this.setMaxListeners(1/0),"function"==typeof t&&(i=t,t={}),t=t||{},!e||"object"!=typeof e){if(o=new _("First argument must be an abstract-leveldown compliant store"),"function"==typeof i)return r.nextTick(i,o);throw o}l.strictEqual(typeof e.status,"string",".status required, old abstract-leveldown"),this.options=p(t),this._db=e,this.db=new a(e),this.open(i||function(e){e&&s.emit("error",e)}),this.supports=f(this.db.supports,{status:!1,deferredOpen:!0,openCallback:!0,promises:!0,streams:!0}),Object.keys(this.supports.additionalMethods).forEach((function(e){null==this[e]&&(this[e]=function(){return this.db[e].apply(this.db,arguments)})}),this)}function w(e,t){if(!e._isOpening()&&!e.isOpen())return r.nextTick(t,new g("Database is not open")),!0}m.prototype.emit=n.prototype.emit,m.prototype.once=n.prototype.once,i(m,n),m.prototype.open=function(e,t){var n,i=this;return"function"==typeof e&&(t=e,e=null),t||(n=(t=h()).promise),e||(e=this.options),this.isOpen()?(r.nextTick(t,null,i),n):this._isOpening()?(this.once("open",(function(){t(null,i)})),n):(this.emit("opening"),this.db.open(e,(function(e){if(e)return t(new b(e));i.db=i._db,t(null,i),i.emit("open"),i.emit("ready")})),n)},m.prototype.close=function(e){var t,n=this;return e||(t=(e=h()).promise),this.isOpen()?(this.db.close((function(){n.emit("closed"),e.apply(null,arguments)})),this.emit("closing"),this.db=new a(this._db)):this.isClosed()?r.nextTick(e):"closing"===this.db.status?this.once("closed",e):this._isOpening()&&this.once("open",(function(){n.close(e)})),t},m.prototype.isOpen=function(){return"open"===this.db.status},m.prototype._isOpening=function(){return"opening"===this.db.status},m.prototype.isClosed=function(){return/^clos|new/.test(this.db.status)},m.prototype.get=function(e,t,r){var n;return(r=d(t,r))||(n=(r=h()).promise),w(this,r)||(t=p(t),this.db.get(e,t,(function(t,n){if(t)return t=/notfound/i.test(t)||t.notFound?new v("Key not found in database ["+e+"]",t):new g(t),r(t);r(null,n)}))),n},m.prototype.put=function(e,t,r,n){var i,o=this;return(n=d(r,n))||(i=(n=h()).promise),w(this,n)||(r=p(r),this.db.put(e,t,r,(function(r){if(r)return n(new y(r));o.emit("put",e,t),n()}))),i},m.prototype.del=function(e,t,r){var n,i=this;return(r=d(t,r))||(n=(r=h()).promise),w(this,r)||(t=p(t),this.db.del(e,t,(function(t){if(t)return r(new y(t));i.emit("del",e),r()}))),n},m.prototype.batch=function(e,t,r){if(!arguments.length)return new u(this);var n,i=this;return(r="function"==typeof e?e:d(t,r))||(n=(r=h()).promise),w(this,r)||(t=p(t),this.db.batch(e,t,(function(t){if(t)return r(new y(t));i.emit("batch",e),r()}))),n},m.prototype.iterator=function(e){return this.db.iterator(e)},m.prototype.clear=function(e,t){var r,n=this;return t=d(e,t),e=p(e),t||(r=(t=h()).promise),w(this,t)||this.db.clear(e,(function(r){if(r)return t(new y(r));n.emit("clear",e),t()})),r},m.prototype.readStream=m.prototype.createReadStream=function(e){return"number"!=typeof(e=o({keys:!0,values:!0},e)).limit&&(e.limit=-1),new s(this.db.iterator(e),e)},m.prototype.keyStream=m.prototype.createKeyStream=function(e){return this.createReadStream(o(e,{keys:!0,values:!1}))},m.prototype.valueStream=m.prototype.createValueStream=function(e){return this.createReadStream(o(e,{keys:!1,values:!0}))},m.prototype.toString=function(){return"LevelUP"},m.prototype.type="levelup",m.errors=c,t.exports=m.default=m}).call(this)}).call(this,e("_process"))},{"./batch":68,"./common":69,"./promisify":71,_process:93,assert:1,"deferred-leveldown":9,events:33,"level-errors":50,"level-iterator-stream":51,"level-supports":67,util:143,xtend:160}],71:[function(e,t,r){t.exports=function(){var e,t=new Promise((function(t,r){e=function(e,n){e?r(e):t(n)}}));return e.promise=t,e}},{}],72:[function(e,t,r){(function(e){(function(){function t(e){return void 0!==e&&""!==e}function n(e,t){return Object.hasOwnProperty.call(e,t)}function i(e,t){return Object.hasOwnProperty.call(e,t)&&t}r.compare=function(t,r){if(e.isBuffer(t)){for(var n=Math.min(t.length,r.length),i=0;i<n;i++){var o=t[i]-r[i];if(o)return o}return t.length-r.length}return t<r?-1:t>r?1:0};var o=r.lowerBoundKey=function(e){return i(e,"gt")||i(e,"gte")||i(e,"min")||(e.reverse?i(e,"end"):i(e,"start"))||void 0},a=r.lowerBound=function(e,t){var r=o(e);return r?e[r]:t},s=r.lowerBoundInclusive=function(e){return!n(e,"gt")},u=r.upperBoundInclusive=function(e){return!n(e,"lt")},c=r.lowerBoundExclusive=function(e){return!s(e)},f=r.upperBoundExclusive=function(e){return!u(e)},l=r.upperBoundKey=function(e){return i(e,"lt")||i(e,"lte")||i(e,"max")||(e.reverse?i(e,"start"):i(e,"end"))||void 0},h=r.upperBound=function(e,t){var r=l(e);return r?e[r]:t};function d(e){return e}r.start=function(e,t){return e.reverse?h(e,t):a(e,t)},r.end=function(e,t){return e.reverse?a(e,t):h(e,t)},r.startInclusive=function(e){return e.reverse?u(e):s(e)},r.endInclusive=function(e){return e.reverse?s(e):u(e)},r.toLtgt=function(e,t,i,o,a){t=t||{},i=i||d;var s=arguments.length>3,u=r.lowerBoundKey(e),c=r.upperBoundKey(e);return u?"gt"===u?t.gt=i(e.gt,!1):t.gte=i(e[u],!1):s&&(t.gte=i(o,!1)),c?"lt"===c?t.lt=i(e.lt,!0):t.lte=i(e[c],!0):s&&(t.lte=i(a,!0)),null!=e.reverse&&(t.reverse=!!e.reverse),n(t,"max")&&delete t.max,n(t,"min")&&delete t.min,n(t,"start")&&delete t.start,n(t,"end")&&delete t.end,t},r.contains=function(e,n,i){i=i||r.compare;var o=a(e);if(t(o)&&((s=i(n,o))<0||0===s&&c(e)))return!1;var s,u=h(e);if(t(u)&&((s=i(n,u))>0||0===s&&f(e)))return!1;return!0},r.filter=function(e,t){return function(n){return r.contains(e,n,t)}}}).call(this)}).call(this,{isBuffer:e("../is-buffer/index.js")})},{"../is-buffer/index.js":46}],73:[function(e,t,r){arguments[4][14][0].apply(r,arguments)},{dup:14,immediate:80}],74:[function(e,t,r){var n=e("inherits"),i=e("abstract-leveldown").AbstractLevelDOWN,o=e("abstract-leveldown").AbstractIterator,a=e("ltgt"),s=e("functional-red-black-tree"),u=e("safe-buffer").Buffer,c={},f=e("./immediate");function l(e){return a.compare(e,this._end)>0}function h(e){return a.compare(e,this._end)>=0}function d(e){return a.compare(e,this._end)<0}function p(e){return a.compare(e,this._end)<=0}function y(e,t){o.call(this,e),this._limit=t.limit,-1===this._limit&&(this._limit=1/0);var r=e._store[e._location];this.keyAsBuffer=!1!==t.keyAsBuffer,this.valueAsBuffer=!1!==t.valueAsBuffer,this._reverse=t.reverse,this._options=t,this._done=0,this._reverse?(this._incr="prev",this._start=a.upperBound(t),this._end=a.lowerBound(t),void 0===this._start?this._tree=r.end:a.upperBoundInclusive(t)?this._tree=r.le(this._start):this._tree=r.lt(this._start),this._end&&(a.lowerBoundInclusive(t)?this._test=h:this._test=l)):(this._incr="next",this._start=a.lowerBound(t),this._end=a.upperBound(t),void 0===this._start?this._tree=r.begin:a.lowerBoundInclusive(t)?this._tree=r.ge(this._start):this._tree=r.gt(this._start),this._end&&(a.upperBoundInclusive(t)?this._test=p:this._test=d))}function g(e){if(!(this instanceof g))return new g(e);i.call(this,"string"==typeof e?e:""),this._location=this.location?"$"+this.location:"_tree",this._store=this.location?c:this,this._store[this._location]=this._store[this._location]||s(a.compare)}n(y,o),y.prototype._next=function(e){var t,r;return this._done++>=this._limit?f(e):this._tree.valid?(t=this._tree.key,r=this._tree.value,this._test(t)?(this.keyAsBuffer&&(t=u.from(t)),this.valueAsBuffer&&(r=u.from(r)),this._tree[this._incr](),void f((function(){e(null,t,r)}))):f(e)):f(e)},y.prototype._test=function(){return!0},g.clearGlobalStore=function(e){e?Object.keys(c).forEach((function(e){delete c[e]})):c={}},n(g,i),g.prototype._open=function(e,t){var r=this;f((function(){t(null,r)}))},g.prototype._put=function(e,t,r,n){null==t&&(t="");var i=this._store[this._location].find(e);i.valid?this._store[this._location]=i.update(t):this._store[this._location]=this._store[this._location].insert(e,t),f(n)},g.prototype._get=function(e,t,r){var n=this._store[this._location].get(e);if(void 0===n)return f((function(){r(new Error("NotFound"))}));!1===t.asBuffer||this._isBuffer(n)||(n=u.from(String(n))),f((function(){r(null,n)}))},g.prototype._del=function(e,t,r){this._store[this._location]=this._store[this._location].remove(e),f(r)},g.prototype._batch=function(e,t,r){for(var n,i,o,a=-1,s=e.length,u=this._store[this._location];++a<s;)e[a]&&(n=this._isBuffer(e[a].key)?e[a].key:String(e[a].key),o=u.find(n),"put"===e[a].type?(i=this._isBuffer(e[a].value)?e[a].value:String(e[a].value),u=o.valid?o.update(i):u.insert(n,i)):u=o.remove());this._store[this._location]=u,f(r)},g.prototype._iterator=function(e){return new y(this,e)},g.prototype._isBuffer=function(e){return u.isBuffer(e)},g.destroy=function(e,t){var r="$"+e;r in c&&delete c[r],f(t)},t.exports=g.default=g},{"./immediate":73,"abstract-leveldown":78,"functional-red-black-tree":36,inherits:45,ltgt:72,"safe-buffer":86}],75:[function(e,t,r){(function(e){(function(){function r(e){this._db=e,this._operations=[],this._written=!1}r.prototype._serializeKey=function(e){return this._db._serializeKey(e)},r.prototype._serializeValue=function(e){return this._db._serializeValue(e)},r.prototype._checkWritten=function(){if(this._written)throw new Error("write() already called on this batch")},r.prototype.put=function(e,t){this._checkWritten();var r=this._db._checkKey(e,"key",this._db._isBuffer);if(r)throw r;return e=this._serializeKey(e),t=this._serializeValue(t),"function"==typeof this._put?this._put(e,t):this._operations.push({type:"put",key:e,value:t}),this},r.prototype.del=function(e){this._checkWritten();var t=this._db._checkKey(e,"key",this._db._isBuffer);if(t)throw t;return e=this._serializeKey(e),"function"==typeof this._del?this._del(e):this._operations.push({type:"del",key:e}),this},r.prototype.clear=function(){return this._checkWritten(),this._operations=[],"function"==typeof this._clear&&this._clear(),this},r.prototype.write=function(t,r){if(this._checkWritten(),"function"==typeof t&&(r=t),"function"!=typeof r)throw new Error("write() requires a callback argument");return"object"!=typeof t&&(t={}),this._written=!0,"function"==typeof this._write?this._write(r):"function"==typeof this._db._batch?this._db._batch(this._operations,t,r):void e.nextTick(r)},t.exports=r}).call(this)}).call(this,e("_process"))},{_process:93}],76:[function(e,t,r){(function(e){(function(){function r(e){this.db=e,this._ended=!1,this._nexting=!1}r.prototype.next=function(t){var r=this;if("function"!=typeof t)throw new Error("next() requires a callback argument");return r._ended?t(new Error("cannot call next() after end()")):r._nexting?t(new Error("cannot call next() before previous next() has completed")):(r._nexting=!0,"function"==typeof r._next?r._next((function(){r._nexting=!1,t.apply(null,arguments)})):void e.nextTick((function(){r._nexting=!1,t()})))},r.prototype.end=function(t){if("function"!=typeof t)throw new Error("end() requires a callback argument");return this._ended?t(new Error("end() already called on iterator")):(this._ended=!0,"function"==typeof this._end?this._end(t):void e.nextTick(t))},t.exports=r}).call(this)}).call(this,e("_process"))},{_process:93}],77:[function(e,t,r){(function(r,n){(function(){var i=e("xtend"),o=e("./abstract-iterator"),a=e("./abstract-chained-batch");function s(e){if(!arguments.length||void 0===e)throw new Error("constructor requires at least a location argument");if("string"!=typeof e)throw new Error("constructor requires a location string argument");this.location=e,this.status="new"}s.prototype.open=function(e,t){var r=this,i=this.status;if("function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("open() requires a callback argument");"object"!=typeof e&&(e={}),e.createIfMissing=0!=e.createIfMissing,e.errorIfExists=!!e.errorIfExists,"function"==typeof this._open?(this.status="opening",this._open(e,(function(e){if(e)return r.status=i,t(e);r.status="open",t()}))):(this.status="open",n.nextTick(t))},s.prototype.close=function(e){var t=this,r=this.status;if("function"!=typeof e)throw new Error("close() requires a callback argument");"function"==typeof this._close?(this.status="closing",this._close((function(n){if(n)return t.status=r,e(n);t.status="closed",e()}))):(this.status="closed",n.nextTick(e))},s.prototype.get=function(e,t,r){var i;if("function"==typeof t&&(r=t),"function"!=typeof r)throw new Error("get() requires a callback argument");return(i=this._checkKey(e,"key"))?r(i):(e=this._serializeKey(e),"object"!=typeof t&&(t={}),t.asBuffer=0!=t.asBuffer,"function"==typeof this._get?this._get(e,t,r):void n.nextTick((function(){r(new Error("NotFound"))})))},s.prototype.put=function(e,t,r,i){var o;if("function"==typeof r&&(i=r),"function"!=typeof i)throw new Error("put() requires a callback argument");return(o=this._checkKey(e,"key"))?i(o):(e=this._serializeKey(e),t=this._serializeValue(t),"object"!=typeof r&&(r={}),"function"==typeof this._put?this._put(e,t,r,i):void n.nextTick(i))},s.prototype.del=function(e,t,r){var i;if("function"==typeof t&&(r=t),"function"!=typeof r)throw new Error("del() requires a callback argument");return(i=this._checkKey(e,"key"))?r(i):(e=this._serializeKey(e),"object"!=typeof t&&(t={}),"function"==typeof this._del?this._del(e,t,r):void n.nextTick(r))},s.prototype.batch=function(e,t,r){if(!arguments.length)return this._chainedBatch();if("function"==typeof t&&(r=t),"function"==typeof e&&(r=e),"function"!=typeof r)throw new Error("batch(array) requires a callback argument");if(!Array.isArray(e))return r(new Error("batch(array) requires an array argument"));t&&"object"==typeof t||(t={});for(var i,o,a=0,s=e.length;a<s;a++)if("object"==typeof(i=e[a])){if(o=this._checkKey(i.type,"type"))return r(o);if(o=this._checkKey(i.key,"key"))return r(o)}if("function"==typeof this._batch)return this._batch(e,t,r);n.nextTick(r)},s.prototype.approximateSize=function(e,t,r){if(null==e||null==t||"function"==typeof e||"function"==typeof t)throw new Error("approximateSize() requires valid `start`, `end` and `callback` arguments");if("function"!=typeof r)throw new Error("approximateSize() requires a callback argument");if(e=this._serializeKey(e),t=this._serializeKey(t),"function"==typeof this._approximateSize)return this._approximateSize(e,t,r);n.nextTick((function(){r(null,0)}))},s.prototype._setupIteratorOptions=function(e){var t=this;return e=i(e),["start","end","gt","gte","lt","lte"].forEach((function(r){e[r]&&t._isBuffer(e[r])&&0===e[r].length&&delete e[r]})),e.reverse=!!e.reverse,e.keys=0!=e.keys,e.values=0!=e.values,e.limit="limit"in e?e.limit:-1,e.keyAsBuffer=0!=e.keyAsBuffer,e.valueAsBuffer=0!=e.valueAsBuffer,e},s.prototype.iterator=function(e){return"object"!=typeof e&&(e={}),e=this._setupIteratorOptions(e),"function"==typeof this._iterator?this._iterator(e):new o(this)},s.prototype._chainedBatch=function(){return new a(this)},s.prototype._isBuffer=function(e){return r.isBuffer(e)},s.prototype._serializeKey=function(e){return this._isBuffer(e)?e:String(e)},s.prototype._serializeValue=function(e){return null==e?"":this._isBuffer(e)||n.browser?e:String(e)},s.prototype._checkKey=function(e,t){return null==e?new Error(t+" cannot be `null` or `undefined`"):this._isBuffer(e)&&0===e.length?new Error(t+" cannot be an empty Buffer"):""===String(e)?new Error(t+" cannot be an empty String"):void 0},t.exports=s}).call(this)}).call(this,{isBuffer:e("../../../is-buffer/index.js")},e("_process"))},{"../../../is-buffer/index.js":46,"./abstract-chained-batch":75,"./abstract-iterator":76,_process:93,xtend:160}],78:[function(e,t,r){r.AbstractLevelDOWN=e("./abstract-leveldown"),r.AbstractIterator=e("./abstract-iterator"),r.AbstractChainedBatch=e("./abstract-chained-batch"),r.isLevelDOWN=e("./is-leveldown")},{"./abstract-chained-batch":75,"./abstract-iterator":76,"./abstract-leveldown":77,"./is-leveldown":79}],79:[function(e,t,r){var n=e("./abstract-leveldown");t.exports=function(e){return!(!e||"object"!=typeof e)&&Object.keys(n.prototype).filter((function(e){return"_"!=e[0]&&"approximateSize"!=e})).every((function(t){return"function"==typeof e[t]}))}},{"./abstract-leveldown":77}],80:[function(e,t,r){arguments[4][15][0].apply(r,arguments)},{"./messageChannel":81,"./mutation.js":82,"./nextTick":3,"./queueMicrotask":83,"./stateChange":84,"./timeout":85,dup:15}],81:[function(e,t,r){arguments[4][16][0].apply(r,arguments)},{dup:16}],82:[function(e,t,r){arguments[4][17][0].apply(r,arguments)},{dup:17}],83:[function(e,t,r){arguments[4][18][0].apply(r,arguments)},{dup:18}],84:[function(e,t,r){arguments[4][19][0].apply(r,arguments)},{dup:19}],85:[function(e,t,r){arguments[4][20][0].apply(r,arguments)},{dup:20}],86:[function(e,t,r){var n=e("buffer"),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,r),r.Buffer=a),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:4}],87:[function(e,t,r){"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=e("./isArguments"),s=Object.prototype.propertyIsEnumerable,u=!s.call({toString:null},"toString"),c=s.call((function(){}),"prototype"),f=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(e){var t=e.constructor;return t&&t.prototype===e},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},d=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!h["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{l(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===o.call(e),n=a(e),s=t&&"[object String]"===o.call(e),h=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var p=c&&r;if(s&&e.length>0&&!i.call(e,0))for(var y=0;y<e.length;++y)h.push(String(y));if(n&&e.length>0)for(var g=0;g<e.length;++g)h.push(String(g));else for(var v in e)p&&"prototype"===v||!i.call(e,v)||h.push(String(v));if(u)for(var b=function(e){if("undefined"==typeof window||!d)return l(e);try{return l(e)}catch(e){return!1}}(e),_=0;_<f.length;++_)b&&"constructor"===f[_]||!i.call(e,f[_])||h.push(f[_]);return h}}t.exports=n},{"./isArguments":89}],88:[function(e,t,r){"use strict";var n=Array.prototype.slice,i=e("./isArguments"),o=Object.keys,a=o?function(e){return o(e)}:e("./implementation"),s=Object.keys;a.shim=function(){Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return i(e)?s(n.call(e)):s(e)}):Object.keys=a;return Object.keys||a},t.exports=a},{"./implementation":87,"./isArguments":89}],89:[function(e,t,r){"use strict";var n=Object.prototype.toString;t.exports=function(e){var t=n.call(e),r="[object Arguments]"===t;return r||(r="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===n.call(e.callee)),r}},{}],90:[function(e,t,r){"use strict";var n=e("object-keys"),i=e("has-symbols/shams")(),o=e("call-bind/callBound"),a=Object,s=o("Array.prototype.push"),u=o("Object.prototype.propertyIsEnumerable"),c=i?Object.getOwnPropertySymbols:null;t.exports=function(e,t){if(null==e)throw new TypeError("target must be an object");var r=a(e);if(1===arguments.length)return r;for(var o=1;o<arguments.length;++o){var f=a(arguments[o]),l=n(f),h=i&&(Object.getOwnPropertySymbols||c);if(h)for(var d=h(f),p=0;p<d.length;++p){var y=d[p];u(f,y)&&s(l,y)}for(var g=0;g<l.length;++g){var v=l[g];if(u(f,v)){var b=f[v];r[v]=b}}}return r}},{"call-bind/callBound":5,"has-symbols/shams":42,"object-keys":88}],91:[function(e,t,r){"use strict";var n=e("./implementation");t.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n<t.length;++n)r[t[n]]=t[n];var i=Object.assign({},r),o="";for(var a in i)o+=a;return e!==o}()||function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch(t){return"y"===e[1]}return!1}()?n:Object.assign:n}},{"./implementation":90}],92:[function(e,t,r){(function(e){(function(){"use strict";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,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,r)}));case 3:return e.nextTick((function(){t.call(null,r,n)}));case 4:return e.nextTick((function(){t.call(null,r,n,i)}));default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return e.nextTick((function(){t.apply(null,o)}))}}}:t.exports=e}).call(this)}).call(this,e("_process"))},{_process:93}],93:[function(e,t,r){var n,i,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,f=[],l=!1,h=-1;function d(){l&&c&&(l=!1,c.length?f=c.concat(f):h=-1,f.length&&p())}function p(){if(!l){var e=u(d);l=!0;for(var t=f.length;t;){for(c=f,f=[];++h<t;)c&&c[h].run();h=-1,t=f.length}c=null,l=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function g(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];f.push(new y(e,t)),1!==f.length||l||u(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],94:[function(e,t,r){
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 | var n,i;n=this,i=function(){var e="function"==typeof Object.defineProperty?function(e,t,r){return Object.defineProperty(e,t,r),e}:function(e,t,r){return e[t]=r.value,e};return function(t,r,n,i){var o;if(i=function(e,t){var r="object"==typeof t,n=!r&&"string"==typeof t,i=function(e){return r?!!t[e]:!!n&&t.indexOf(e[0])>-1};return{enumerable:i("enumerable"),configurable:i("configurable"),writable:i("writable"),value:e}}(n,i),"object"==typeof r){for(o in r)Object.hasOwnProperty.call(r,o)&&(i.value=r[o],e(t,o,i));return t}return e(t,r,i)}},void 0!==t&&t.exports?t.exports=i():n.prr=i()},{}],95:[function(e,t,r){(function(r){(function(){t.exports=s;var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t},i=e("core-util-is");i.inherits=e("inherits");var o=e("./_stream_readable"),a=e("./_stream_writable");function s(e){if(!(this instanceof s))return new s(e);o.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",u)}function u(){this.allowHalfOpen||this._writableState.ended||r.nextTick(this.end.bind(this))}i.inherits(s,o),function(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r],r)}(n(a.prototype),(function(e){s.prototype[e]||(s.prototype[e]=a.prototype[e])}))}).call(this)}).call(this,e("_process"))},{"./_stream_readable":97,"./_stream_writable":99,_process:93,"core-util-is":7,inherits:45}],96:[function(e,t,r){t.exports=o;var n=e("./_stream_transform"),i=e("core-util-is");function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}i.inherits=e("inherits"),i.inherits(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":98,"core-util-is":7,inherits:45}],97:[function(e,t,r){(function(r){(function(){t.exports=l;var n=e("isarray"),i=e("buffer").Buffer;l.ReadableState=f;var o=e("events").EventEmitter;o.listenerCount||(o.listenerCount=function(e,t){return e.listeners(t).length});var a,s=e("stream"),u=e("core-util-is");u.inherits=e("inherits");var c=e("util");function f(t,r){var n=e("./_stream_duplex"),i=(t=t||{}).highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.highWaterMark=~~this.highWaterMark,this.buffer=[],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.objectMode=!!t.objectMode,r instanceof n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(a||(a=e("string_decoder/").StringDecoder),this.decoder=new a(t.encoding),this.encoding=t.encoding)}function l(t){e("./_stream_duplex");if(!(this instanceof l))return new l(t);this._readableState=new f(t,this),this.readable=!0,s.call(this)}function h(e,t,n,i,o){var a=function(e,t){var r=null;u.isBuffer(t)||u.isString(t)||u.isNullOrUndefined(t)||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));return r}(t,n);if(a)e.emit("error",a);else if(u.isNullOrUndefined(n))t.reading=!1,t.ended||function(e,t){if(t.decoder&&!t.ended){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,p(e)}(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!o){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&o){s=new Error("stream.unshift() after end event");e.emit("error",s)}else!t.decoder||o||i||(n=t.decoder.write(n)),o||(t.reading=!1),t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,o?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&p(e)),function(e,t){t.readingMore||(t.readingMore=!0,r.nextTick((function(){!function(e,t){var r=t.length;for(;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(c("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}(e,t)})))}(e,t);else o||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}c=c&&c.debuglog?c.debuglog("stream"):function(){},u.inherits(l,s),l.prototype.push=function(e,t){var r=this._readableState;return u.isString(e)&&!r.objectMode&&(t=t||r.defaultEncoding)!==r.encoding&&(e=new i(e,t),t=""),h(this,r,e,t,!1)},l.prototype.unshift=function(e){return h(this,this._readableState,e,"",!0)},l.prototype.setEncoding=function(t){return a||(a=e("string_decoder/").StringDecoder),this._readableState.decoder=new a(t),this._readableState.encoding=t,this};function d(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:isNaN(e)||u.isNull(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>=8388608)e=8388608;else{e--;for(var t=1;t<32;t<<=1)e|=e>>t;e++}return e}(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function p(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?r.nextTick((function(){y(e)})):y(e))}function y(e){c("emit readable"),e.emit("readable"),g(e)}function g(e){var t=e._readableState;if(c("flow",t.flowing),t.flowing)do{var r=e.read()}while(null!==r&&t.flowing)}function v(e,t){var r,n=t.buffer,o=t.length,a=!!t.decoder,s=!!t.objectMode;if(0===n.length)return null;if(0===o)r=null;else if(s)r=n.shift();else if(!e||e>=o)r=a?n.join(""):i.concat(n,o),n.length=0;else{if(e<n[0].length)r=(l=n[0]).slice(0,e),n[0]=l.slice(e);else if(e===n[0].length)r=n.shift();else{r=a?"":new i(e);for(var u=0,c=0,f=n.length;c<f&&u<e;c++){var l=n[0],h=Math.min(e-u,l.length);a?r+=l.slice(0,h):l.copy(r,u,0,h),h<l.length?n[0]=l.slice(h):n.shift(),u+=h}}}return r}function b(e){var t=e._readableState;if(t.length>0)throw new Error("endReadable called on non-empty stream");t.endEmitted||(t.ended=!0,r.nextTick((function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))})))}l.prototype.read=function(e){c("read",e);var t=this._readableState,r=e;if((!u.isNumber(e)||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?b(this):p(this),null;if(0===(e=d(e,t))&&t.ended)return 0===t.length&&b(this),null;var n,i=t.needReadable;return c("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",i=!0),(t.ended||t.reading)&&c("reading or ended",i=!1),i&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),i&&!t.reading&&(e=d(r,t)),n=e>0?v(e,t):null,u.isNull(n)&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),r!==e&&t.ended&&0===t.length&&b(this),u.isNull(n)||this.emit("data",n),n},l.prototype._read=function(e){this.emit("error",new Error("not implemented"))},l.prototype.pipe=function(e,t){var i=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,c("pipe count=%d opts=%j",a.pipesCount,t);var s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?f:h;function u(e){c("onunpipe"),e===i&&h()}function f(){c("onend"),e.end()}a.endEmitted?r.nextTick(s):i.once("end",s),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o.listenerCount(e,"data")&&(t.flowing=!0,g(e))}}(i);function h(){c("cleanup"),e.removeListener("close",y),e.removeListener("finish",v),e.removeListener("drain",l),e.removeListener("error",p),e.removeListener("unpipe",u),i.removeListener("end",f),i.removeListener("end",h),i.removeListener("data",d),!a.awaitDrain||e._writableState&&!e._writableState.needDrain||l()}function d(t){c("ondata"),!1===e.write(t)&&(c("false write response, pause",i._readableState.awaitDrain),i._readableState.awaitDrain++,i.pause())}function p(t){c("onerror",t),b(),e.removeListener("error",p),0===o.listenerCount(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",v),b()}function v(){c("onfinish"),e.removeListener("close",y),b()}function b(){c("unpipe"),i.unpipe(e)}return e.on("drain",l),i.on("data",d),e._events&&e._events.error?n(e._events.error)?e._events.error.unshift(p):e._events.error=[p,e._events.error]:e.on("error",p),e.once("close",y),e.once("finish",v),e.emit("pipe",i),a.flowing||(c("pipe resume"),i.resume()),e},l.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<n;i++)r[i].emit("unpipe",this);return this}return-1===(i=function(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}(t.pipes,e))||(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},l.prototype.on=function(e,t){var n=s.prototype.on.call(this,e,t);if("data"===e&&!1!==this._readableState.flowing&&this.resume(),"readable"===e&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&p(this);else{var o=this;r.nextTick((function(){c("readable nexttick read 0"),o.read(0)}))}}return n},l.prototype.addListener=l.prototype.on,l.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!0,e.reading||(c("resume read 0"),this.read(0)),function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick((function(){!function(e,t){t.resumeScheduled=!1,e.emit("resume"),g(e),t.flowing&&!t.reading&&e.read(0)}(e,t)})))}(this,e)),this},l.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},l.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;for(var i in e.on("end",(function(){if(c("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)})),e.on("data",(function(i){(c("wrapped data"),t.decoder&&(i=t.decoder.write(i)),i&&(t.objectMode||i.length))&&(n.push(i)||(r=!0,e.pause()))})),e)u.isFunction(e[i])&&u.isUndefined(this[i])&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));return function(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r],r)}(["error","close","destroy","pause","resume"],(function(t){e.on(t,n.emit.bind(n,t))})),n._read=function(t){c("wrapped _read",t),r&&(r=!1,e.resume())},n},l._fromList=v}).call(this)}).call(this,e("_process"))},{"./_stream_duplex":95,_process:93,buffer:4,"core-util-is":7,events:33,inherits:45,isarray:47,stream:105,"string_decoder/":100,util:3}],98:[function(e,t,r){t.exports=a;var n=e("./_stream_duplex"),i=e("core-util-is");function o(e,t){this.afterTransform=function(e,r){return function(e,t,r){var n=e._transformState;n.transforming=!1;var o=n.writecb;if(!o)return e.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,i.isNullOrUndefined(r)||e.push(r);o&&o(t);var a=e._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&e._read(a.highWaterMark)}(t,e,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function a(e){if(!(this instanceof a))return new a(e);n.call(this,e),this._transformState=new o(e,this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",(function(){i.isFunction(this._flush)?this._flush((function(e){s(t,e)})):s(t)}))}function s(e,t){if(t)return e.emit("error",t);var r=e._writableState,n=e._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}i.inherits=e("inherits"),i.inherits(a,n),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,r){throw new Error("not implemented")},a.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;i.isNull(t.writechunk)||!t.writecb||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))}},{"./_stream_duplex":95,"core-util-is":7,inherits:45}],99:[function(e,t,r){(function(r){(function(){t.exports=u;var n=e("buffer").Buffer;u.WritableState=s;var i=e("core-util-is");i.inherits=e("inherits");var o=e("stream");function a(e,t,r){this.chunk=e,this.encoding=t,this.callback=r}function s(t,n){var i=e("./_stream_duplex"),o=(t=t||{}).highWaterMark,a=t.objectMode?16:16384;this.highWaterMark=o||0===o?o:a,this.objectMode=!!t.objectMode,n instanceof i&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,o=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,o){n?r.nextTick((function(){t.pendingcb--,o(i)})):(t.pendingcb--,o(i));e._writableState.errorEmitted=!0,e.emit("error",i)}(e,n,i,t,o);else{var a=h(e,n);a||n.corked||n.bufferProcessing||!n.buffer.length||l(e,n),i?r.nextTick((function(){f(e,n,a,o)})):f(e,n,a,o)}}(n,e)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function u(t){var r=e("./_stream_duplex");if(!(this instanceof u||this instanceof r))return new u(t);this._writableState=new s(t,this),this.writable=!0,o.call(this)}function c(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function f(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),p(e,t)}function l(e,t){if(t.bufferProcessing=!0,e._writev&&t.buffer.length>1){for(var r=[],n=0;n<t.buffer.length;n++)r.push(t.buffer[n].callback);t.pendingcb++,c(e,t,!0,t.length,t.buffer,"",(function(e){for(var n=0;n<r.length;n++)t.pendingcb--,r[n](e)})),t.buffer=[]}else{for(n=0;n<t.buffer.length;n++){var i=t.buffer[n],o=i.chunk,a=i.encoding,s=i.callback,u=t.objectMode?1:o.length;if(c(e,t,!1,u,o,a,s),t.writing){n++;break}}n<t.buffer.length?t.buffer=t.buffer.slice(n):t.buffer.length=0}t.bufferProcessing=!1}function h(e,t){return t.ending&&0===t.length&&!t.finished&&!t.writing}function d(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function p(e,t){var r=h(0,t);return r&&(0===t.pendingcb?(d(e,t),t.finished=!0,e.emit("finish")):d(e,t)),r}i.inherits(u,o),u.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},u.prototype.write=function(e,t,o){var s=this._writableState,u=!1;return i.isFunction(t)&&(o=t,t=null),i.isBuffer(e)?t="buffer":t||(t=s.defaultEncoding),i.isFunction(o)||(o=function(){}),s.ended?function(e,t,n){var i=new Error("write after end");e.emit("error",i),r.nextTick((function(){n(i)}))}(this,0,o):function(e,t,n,o){var a=!0;if(!(i.isBuffer(n)||i.isString(n)||i.isNullOrUndefined(n)||t.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");e.emit("error",s),r.nextTick((function(){o(s)})),a=!1}return a}(this,s,e,o)&&(s.pendingcb++,u=function(e,t,r,o,s){r=function(e,t,r){!e.objectMode&&!1!==e.decodeStrings&&i.isString(t)&&(t=new n(t,r));return t}(t,r,o),i.isBuffer(r)&&(o="buffer");var u=t.objectMode?1:r.length;t.length+=u;var f=t.length<t.highWaterMark;f||(t.needDrain=!0);t.writing||t.corked?t.buffer.push(new a(r,o,s)):c(e,t,!1,u,r,o,s);return f}(this,s,e,t,o)),u},u.prototype.cork=function(){this._writableState.corked++},u.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.buffer.length||l(this,e))},u.prototype._write=function(e,t,r){r(new Error("not implemented"))},u.prototype._writev=null,u.prototype.end=function(e,t,n){var o=this._writableState;i.isFunction(e)?(n=e,e=null,t=null):i.isFunction(t)&&(n=t,t=null),i.isNullOrUndefined(e)||this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||o.finished||function(e,t,n){t.ending=!0,p(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0}(this,o,n)}}).call(this)}).call(this,e("_process"))},{"./_stream_duplex":95,_process:93,buffer:4,"core-util-is":7,inherits:45,stream:105}],100:[function(e,t,r){var n=e("buffer").Buffer,i=n.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};var o=r.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!i(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=s;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=u;break;default:return void(this.write=a)}this.charBuffer=new n(6),this.charReceived=0,this.charLength=0};function a(e){return e.toString(this.encoding)}function s(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function u(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}o.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";if(e=e.slice(r,e.length),!((i=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var n=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,n),n-=this.charReceived);var i;n=(t+=e.toString(this.encoding,0,n)).length-1;if((i=t.charCodeAt(n))>=55296&&i<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,n)}return t},o.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},o.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t}},{buffer:4}],101:[function(e,t,r){(function(n){(function(){(r=t.exports=e("./lib/_stream_readable.js")).Stream=e("stream"),r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),n.browser||"disable"!==n.env.READABLE_STREAM||(t.exports=e("stream"))}).call(this)}).call(this,e("_process"))},{"./lib/_stream_duplex.js":95,"./lib/_stream_passthrough.js":96,"./lib/_stream_readable.js":97,"./lib/_stream_transform.js":98,"./lib/_stream_writable.js":99,_process:93,stream:105}],102:[function(e,t,r){
|
38 |
|
39 | var n=e("buffer"),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,r),r.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:4}],103:[function(e,t,r){"use strict";var n=e("get-intrinsic"),i=e("define-data-property"),o=e("has-property-descriptors")(),a=e("gopd"),s=e("es-errors/type"),u=n("%Math.floor%");t.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||u(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in e&&a){var f=a(e,"length");f&&!f.configurable&&(n=!1),f&&!f.writable&&(c=!1)}return(n||c||!r)&&(o?i(e,"length",t,!0,!0):i(e,"length",t)),e}},{"define-data-property":21,"es-errors/type":31,"get-intrinsic":37,gopd:38,"has-property-descriptors":39}],104:[function(e,t,r){!function(e){if("object"==typeof r)t.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var n;try{n=window}catch(e){n=self}n.SparkMD5=e()}}((function(e){"use strict";var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function r(e,t){var r=e[0],n=e[1],i=e[2],o=e[3];n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&i|~n&o)+t[0]-680876936|0)<<7|r>>>25)+n|0)&n|~r&i)+t[1]-389564586|0)<<12|o>>>20)+r|0)&r|~o&n)+t[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&r)+t[3]-1044525330|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&i|~n&o)+t[4]-176418897|0)<<7|r>>>25)+n|0)&n|~r&i)+t[5]+1200080426|0)<<12|o>>>20)+r|0)&r|~o&n)+t[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&r)+t[7]-45705983|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&i|~n&o)+t[8]+1770035416|0)<<7|r>>>25)+n|0)&n|~r&i)+t[9]-1958414417|0)<<12|o>>>20)+r|0)&r|~o&n)+t[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&r)+t[11]-1990404162|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&i|~n&o)+t[12]+1804603682|0)<<7|r>>>25)+n|0)&n|~r&i)+t[13]-40341101|0)<<12|o>>>20)+r|0)&r|~o&n)+t[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&r)+t[15]+1236535329|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&o|i&~o)+t[1]-165796510|0)<<5|r>>>27)+n|0)&i|n&~i)+t[6]-1069501632|0)<<9|o>>>23)+r|0)&n|r&~n)+t[11]+643717713|0)<<14|i>>>18)+o|0)&r|o&~r)+t[0]-373897302|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&o|i&~o)+t[5]-701558691|0)<<5|r>>>27)+n|0)&i|n&~i)+t[10]+38016083|0)<<9|o>>>23)+r|0)&n|r&~n)+t[15]-660478335|0)<<14|i>>>18)+o|0)&r|o&~r)+t[4]-405537848|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&o|i&~o)+t[9]+568446438|0)<<5|r>>>27)+n|0)&i|n&~i)+t[14]-1019803690|0)<<9|o>>>23)+r|0)&n|r&~n)+t[3]-187363961|0)<<14|i>>>18)+o|0)&r|o&~r)+t[8]+1163531501|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n&o|i&~o)+t[13]-1444681467|0)<<5|r>>>27)+n|0)&i|n&~i)+t[2]-51403784|0)<<9|o>>>23)+r|0)&n|r&~n)+t[7]+1735328473|0)<<14|i>>>18)+o|0)&r|o&~r)+t[12]-1926607734|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n^i^o)+t[5]-378558|0)<<4|r>>>28)+n|0)^n^i)+t[8]-2022574463|0)<<11|o>>>21)+r|0)^r^n)+t[11]+1839030562|0)<<16|i>>>16)+o|0)^o^r)+t[14]-35309556|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n^i^o)+t[1]-1530992060|0)<<4|r>>>28)+n|0)^n^i)+t[4]+1272893353|0)<<11|o>>>21)+r|0)^r^n)+t[7]-155497632|0)<<16|i>>>16)+o|0)^o^r)+t[10]-1094730640|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n^i^o)+t[13]+681279174|0)<<4|r>>>28)+n|0)^n^i)+t[0]-358537222|0)<<11|o>>>21)+r|0)^r^n)+t[3]-722521979|0)<<16|i>>>16)+o|0)^o^r)+t[6]+76029189|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((o=((o+=((r=((r+=(n^i^o)+t[9]-640364487|0)<<4|r>>>28)+n|0)^n^i)+t[12]-421815835|0)<<11|o>>>21)+r|0)^r^n)+t[15]+530742520|0)<<16|i>>>16)+o|0)^o^r)+t[2]-995338651|0)<<23|n>>>9)+i|0,n=((n+=((o=((o+=(n^((r=((r+=(i^(n|~o))+t[0]-198630844|0)<<6|r>>>26)+n|0)|~i))+t[7]+1126891415|0)<<10|o>>>22)+r|0)^((i=((i+=(r^(o|~n))+t[14]-1416354905|0)<<15|i>>>17)+o|0)|~r))+t[5]-57434055|0)<<21|n>>>11)+i|0,n=((n+=((o=((o+=(n^((r=((r+=(i^(n|~o))+t[12]+1700485571|0)<<6|r>>>26)+n|0)|~i))+t[3]-1894986606|0)<<10|o>>>22)+r|0)^((i=((i+=(r^(o|~n))+t[10]-1051523|0)<<15|i>>>17)+o|0)|~r))+t[1]-2054922799|0)<<21|n>>>11)+i|0,n=((n+=((o=((o+=(n^((r=((r+=(i^(n|~o))+t[8]+1873313359|0)<<6|r>>>26)+n|0)|~i))+t[15]-30611744|0)<<10|o>>>22)+r|0)^((i=((i+=(r^(o|~n))+t[6]-1560198380|0)<<15|i>>>17)+o|0)|~r))+t[13]+1309151649|0)<<21|n>>>11)+i|0,n=((n+=((o=((o+=(n^((r=((r+=(i^(n|~o))+t[4]-145523070|0)<<6|r>>>26)+n|0)|~i))+t[11]-1120210379|0)<<10|o>>>22)+r|0)^((i=((i+=(r^(o|~n))+t[2]+718787259|0)<<15|i>>>17)+o|0)|~r))+t[9]-343485551|0)<<21|n>>>11)+i|0,e[0]=r+e[0]|0,e[1]=n+e[1]|0,e[2]=i+e[2]|0,e[3]=o+e[3]|0}function n(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return r}function i(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return r}function o(e){var t,i,o,a,s,u,c=e.length,f=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)r(f,n(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(r(f,o),t=0;t<16;t+=1)o[t]=0;return a=(a=8*c).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,o[14]=s,o[15]=u,r(f,o),f}function a(e){var r,n="";for(r=0;r<4;r+=1)n+=t[e>>8*r+4&15]+t[e>>8*r&15];return n}function s(e){var t;for(t=0;t<e.length;t+=1)e[t]=a(e[t]);return e.join("")}function u(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function c(e){var t,r=[],n=e.length;for(t=0;t<n-1;t+=2)r.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,r)}function f(){this.reset()}return"5d41402abc4b2a76b9719d911017c592"!==s(o("hello"))&&function(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r},"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(r,n){var i,o,a,s,u=this.byteLength,c=t(r,u),f=u;return n!==e&&(f=t(n,u)),c>f?new ArrayBuffer(0):(i=f-c,o=new ArrayBuffer(i),a=new Uint8Array(o),s=new Uint8Array(this,c,i),a.set(s),o)}}(),f.prototype.append=function(e){return this.appendBinary(u(e)),this},f.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)r(this._hash,n(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},f.prototype.end=function(e){var t,r,n=this._buff,i=n.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=n.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),r=s(this._hash),e&&(r=c(r)),this.reset(),r},f.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},f.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},f.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},f.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},f.prototype._finish=function(e,t){var n,i,o,a=t;if(e[a>>2]|=128<<(a%4<<3),a>55)for(r(this._hash,e),a=0;a<16;a+=1)e[a]=0;n=(n=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(n[2],16),o=parseInt(n[1],16)||0,e[14]=i,e[15]=o,r(this._hash,e)},f.hash=function(e,t){return f.hashBinary(u(e),t)},f.hashBinary=function(e,t){var r=s(o(e));return t?c(r):r},f.ArrayBuffer=function(){this.reset()},f.ArrayBuffer.prototype.append=function(e){var t,n,o,a,s,u=(n=this._buff.buffer,o=e,a=!0,(s=new Uint8Array(n.byteLength+o.byteLength)).set(new Uint8Array(n)),s.set(new Uint8Array(o),n.byteLength),a?s:s.buffer),c=u.length;for(this._length+=e.byteLength,t=64;t<=c;t+=64)r(this._hash,i(u.subarray(t-64,t)));return this._buff=t-64<c?new Uint8Array(u.buffer.slice(t-64)):new Uint8Array(0),this},f.ArrayBuffer.prototype.end=function(e){var t,r,n=this._buff,i=n.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=n[t]<<(t%4<<3);return this._finish(o,i),r=s(this._hash),e&&(r=c(r)),this.reset(),r},f.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},f.ArrayBuffer.prototype.getState=function(){var e,t=f.prototype.getState.call(this);return t.buff=(e=t.buff,String.fromCharCode.apply(null,new Uint8Array(e))),t},f.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var r,n=e.length,i=new ArrayBuffer(n),o=new Uint8Array(i);for(r=0;r<n;r+=1)o[r]=e.charCodeAt(r);return t?o:i}(e.buff,!0),f.prototype.setState.call(this,e)},f.ArrayBuffer.prototype.destroy=f.prototype.destroy,f.ArrayBuffer.prototype._finish=f.prototype._finish,f.ArrayBuffer.hash=function(e,t){var n=s(function(e){var t,n,o,a,s,u,c=e.length,f=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)r(f,i(e.subarray(t-64,t)));for(n=(e=t-64<c?e.subarray(t-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<n;t+=1)o[t>>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(r(f,o),t=0;t<16;t+=1)o[t]=0;return a=(a=8*c).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,o[14]=s,o[15]=u,r(f,o),f}(new Uint8Array(e)));return t?c(n):n},f}))},{}],105:[function(e,t,r){t.exports=i;var n=e("events").EventEmitter;function i(){n.call(this)}e("inherits")(i,n),i.Readable=e("readable-stream/readable.js"),i.Writable=e("readable-stream/writable.js"),i.Duplex=e("readable-stream/duplex.js"),i.Transform=e("readable-stream/transform.js"),i.PassThrough=e("readable-stream/passthrough.js"),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",u));var a=!1;function s(){a||(a=!0,e.end())}function u(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(f(),0===n.listenerCount(this,"error"))throw e}function f(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return r.on("error",c),e.on("error",c),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e}},{events:33,inherits:45,"readable-stream/duplex.js":107,"readable-stream/passthrough.js":116,"readable-stream/readable.js":117,"readable-stream/transform.js":118,"readable-stream/writable.js":119}],106:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],107:[function(e,t,r){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":108}],108:[function(e,t,r){"use strict";var n=e("process-nextick-args"),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=l;var o=Object.create(e("core-util-is"));o.inherits=e("inherits");var a=e("./_stream_readable"),s=e("./_stream_writable");o.inherits(l,a);for(var u=i(s.prototype),c=0;c<u.length;c++){var f=u[c];l.prototype[f]||(l.prototype[f]=s.prototype[f])}function l(e){if(!(this instanceof l))return new l(e);a.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||n.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),l.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},{"./_stream_readable":110,"./_stream_writable":112,"core-util-is":7,inherits:45,"process-nextick-args":92}],109:[function(e,t,r){"use strict";t.exports=o;var n=e("./_stream_transform"),i=Object.create(e("core-util-is"));function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}i.inherits=e("inherits"),i.inherits(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":111,"core-util-is":7,inherits:45}],110:[function(e,t,r){(function(r,n){(function(){"use strict";var i=e("process-nextick-args");t.exports=_;var o,a=e("isarray");_.ReadableState=b;e("events").EventEmitter;var s=function(e,t){return e.listeners(t).length},u=e("./internal/streams/stream"),c=e("safe-buffer").Buffer,f=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var l=Object.create(e("core-util-is"));l.inherits=e("inherits");var h=e("util"),d=void 0;d=h&&h.debuglog?h.debuglog("stream"):function(){};var p,y=e("./internal/streams/BufferList"),g=e("./internal/streams/destroy");l.inherits(_,u);var v=["error","close","destroy","pause","resume"];function b(t,r){t=t||{};var n=r instanceof(o=o||e("./_stream_duplex"));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,a=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,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&&(p||(p=e("string_decoder/").StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function _(t){if(o=o||e("./_stream_duplex"),!(this instanceof _))return new _(t);this._readableState=new b(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 m(e,t,r,n,i){var o,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,E(e)}(e,a)):(i||(o=function(e,t){var r;n=t,c.isBuffer(n)||n instanceof f||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?w(e,a,t,!1):x(e,a)):w(e,a,t,!1))):n||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function w(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&E(e)),x(e,t)}Object.defineProperty(_.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),_.prototype.destroy=g.destroy,_.prototype._undestroy=g.undestroy,_.prototype._destroy=function(e,t){this.push(null),t(e)},_.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=c.from(e,t),t=""),r=!0),m(this,e,t,!1,r)},_.prototype.unshift=function(e){return m(this,e,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(t){return p||(p=e("string_decoder/").StringDecoder),this._readableState.decoder=new p(t),this._readableState.encoding=t,this};function k(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function E(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(S,e):S(e))}function S(e){d("emit readable"),e.emit("readable"),R(e)}function x(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(j,e,t))}function j(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(d("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function O(e){d("readable nexttick read 0"),e.read(0)}function A(e,t){t.reading||(d("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),R(e),t.flowing&&!t.reading&&e.read(0)}function R(e){var t=e._readableState;for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function M(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;e-=i.length;for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=c.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function T(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(B,t,e))}function B(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}_.prototype.read=function(e){d("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?T(this):E(this),null;if(0===(e=k(e,t))&&t.ended)return 0===t.length&&T(this),null;var n,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&d("length less than watermark",i=!0),t.ended||t.reading?d("reading or ended",i=!1):i&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=k(r,t))),null===(n=e>0?M(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&T(this)),null!==n&&this.emit("data",n),n},_.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},_.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,t);var u=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?f:_;function c(t,r){d("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,d("cleanup"),e.removeListener("close",v),e.removeListener("finish",b),e.removeListener("drain",l),e.removeListener("error",g),e.removeListener("unpipe",c),n.removeListener("end",f),n.removeListener("end",_),n.removeListener("data",y),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function f(){d("onend"),e.end()}o.endEmitted?i.nextTick(u):n.once("end",u),e.on("unpipe",c);var l=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,R(e))}}(n);e.on("drain",l);var h=!1;var p=!1;function y(t){d("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==P(o.pipes,e))&&!h&&(d("false write response, pause",o.awaitDrain),o.awaitDrain++,p=!0),n.pause())}function g(t){d("onerror",t),_(),e.removeListener("error",g),0===s(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",b),_()}function b(){d("onfinish"),e.removeListener("close",v),_()}function _(){d("unpipe"),n.unpipe(e)}return n.on("data",y),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",g),e.once("close",v),e.once("finish",b),e.emit("pipe",n),o.flowing||(d("pipe resume"),n.resume()),e},_.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=P(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},_.prototype.on=function(e,t){var r=u.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&E(this):i.nextTick(O,this))}return r},_.prototype.addListener=_.prototype.on,_.prototype.resume=function(){var e=this._readableState;return e.flowing||(d("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(A,e,t))}(this,e)),this},_.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},_.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(d("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(d("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<v.length;o++)e.on(v[o],this.emit.bind(this,v[o]));return this._read=function(t){d("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),_._fromList=M}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":108,"./internal/streams/BufferList":113,"./internal/streams/destroy":114,"./internal/streams/stream":115,_process:93,"core-util-is":7,events:33,inherits:45,isarray:106,"process-nextick-args":92,"safe-buffer":120,"string_decoder/":121,util:3}],111:[function(e,t,r){"use strict";t.exports=a;var n=e("./_stream_duplex"),i=Object.create(e("core-util-is"));function o(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);n.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",s)}function s(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=e("inherits"),i.inherits(a,n),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}},{"./_stream_duplex":108,"core-util-is":7,inherits:45}],112:[function(e,t,r){(function(r,n,i){(function(){"use strict";var o=e("process-nextick-args");function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}t.exports=b;var s,u=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?i:o.nextTick;b.WritableState=v;var c=Object.create(e("core-util-is"));c.inherits=e("inherits");var f={deprecate:e("util-deprecate")},l=e("./internal/streams/stream"),h=e("safe-buffer").Buffer,d=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var p,y=e("./internal/streams/destroy");function g(){}function v(t,r){s=s||e("./_stream_duplex"),t=t||{};var n=r instanceof s;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(c||0===c)?c:f,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 l=!1===t.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),S(e,t))}(e,r,n,t,i);else{var a=k(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||w(e,r),n?u(m,e,r,a,i):m(e,r,a,i)}}(r,e)},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 a(this)}function b(t){if(s=s||e("./_stream_duplex"),!(p.call(b,this)||this instanceof s))return new b(t);this._writableState=new v(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)),l.call(this)}function _(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function m(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),S(e,t)}function w(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;i.allBuffers=u,_(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,l=r.callback;if(_(e,t,!1,t.objectMode?1:c.length,c,f,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function k(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function E(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),S(e,t)}))}function S(e,t){var r=k(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(E,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}c.inherits(b,l),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:f.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===b&&(e&&e._writableState instanceof v)}})):p=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,r){var n,i=this._writableState,a=!1,s=!i.objectMode&&(n=e,h.isBuffer(n)||n instanceof d);return s&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=g),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),o.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var i=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),o.nextTick(n,a),i=!1),i}(this,i,e,r))&&(i.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else _(e,t,!1,s,n,i,o);return u}(this,i,s,e,t,r)),a},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||w(this,e))},b.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,S(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=y.destroy,b.prototype._undestroy=y.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)},{"./_stream_duplex":108,"./internal/streams/destroy":114,"./internal/streams/stream":115,_process:93,"core-util-is":7,inherits:45,"process-nextick-args":92,"safe-buffer":120,timers:139,"util-deprecate":140}],113:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);for(var t,r,i,o=n.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=o,i=s,t.copy(r,i),s+=a.data.length,a=a.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":120,util:3}],114:[function(e,t,r){"use strict";var n=e("process-nextick-args");function i(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(i,this,e)):n.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n.nextTick(i,r,e)):n.nextTick(i,r,e):t&&t(e)})),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)}}},{"process-nextick-args":92}],115:[function(e,t,r){arguments[4][65][0].apply(r,arguments)},{dup:65,events:33}],116:[function(e,t,r){t.exports=e("./readable").PassThrough},{"./readable":117}],117:[function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":108,"./lib/_stream_passthrough.js":109,"./lib/_stream_readable.js":110,"./lib/_stream_transform.js":111,"./lib/_stream_writable.js":112}],118:[function(e,t,r){t.exports=e("./readable").Transform},{"./readable":117}],119:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":112}],120:[function(e,t,r){arguments[4][86][0].apply(r,arguments)},{buffer:4,dup:86}],121:[function(e,t,r){"use strict";var n=e("safe-buffer").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=f,this.end=l,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"\ufffd";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"\ufffd";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"\ufffd"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}r.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\ufffd":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=a(t[n]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=a(t[n]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":120}],122:[function(e,t,r){arguments[4][121][0].apply(r,arguments)},{dup:121,"safe-buffer":102}],123:[function(e,t,r){arguments[4][52][0].apply(r,arguments)},{dup:52}],124:[function(e,t,r){arguments[4][53][0].apply(r,arguments)},{"./_stream_readable":126,"./_stream_writable":128,_process:93,dup:53,inherits:45}],125:[function(e,t,r){arguments[4][54][0].apply(r,arguments)},{"./_stream_transform":127,dup:54,inherits:45}],126:[function(e,t,r){arguments[4][55][0].apply(r,arguments)},{"../errors":123,"./_stream_duplex":124,"./internal/streams/async_iterator":129,"./internal/streams/buffer_list":130,"./internal/streams/destroy":131,"./internal/streams/from":133,"./internal/streams/state":135,"./internal/streams/stream":136,_process:93,buffer:4,dup:55,events:33,inherits:45,"string_decoder/":122,util:3}],127:[function(e,t,r){arguments[4][56][0].apply(r,arguments)},{"../errors":123,"./_stream_duplex":124,dup:56,inherits:45}],128:[function(e,t,r){arguments[4][57][0].apply(r,arguments)},{"../errors":123,"./_stream_duplex":124,"./internal/streams/destroy":131,"./internal/streams/state":135,"./internal/streams/stream":136,_process:93,buffer:4,dup:57,inherits:45,"util-deprecate":140}],129:[function(e,t,r){arguments[4][58][0].apply(r,arguments)},{"./end-of-stream":132,_process:93,dup:58}],130:[function(e,t,r){arguments[4][59][0].apply(r,arguments)},{buffer:4,dup:59,util:3}],131:[function(e,t,r){arguments[4][60][0].apply(r,arguments)},{_process:93,dup:60}],132:[function(e,t,r){arguments[4][61][0].apply(r,arguments)},{"../../../errors":123,dup:61}],133:[function(e,t,r){arguments[4][62][0].apply(r,arguments)},{dup:62}],134:[function(e,t,r){arguments[4][63][0].apply(r,arguments)},{"../../../errors":123,"./end-of-stream":132,dup:63}],135:[function(e,t,r){arguments[4][64][0].apply(r,arguments)},{"../../../errors":123,dup:64}],136:[function(e,t,r){arguments[4][65][0].apply(r,arguments)},{dup:65,events:33}],137:[function(e,t,r){arguments[4][66][0].apply(r,arguments)},{"./lib/_stream_duplex.js":124,"./lib/_stream_passthrough.js":125,"./lib/_stream_readable.js":126,"./lib/_stream_transform.js":127,"./lib/_stream_writable.js":128,"./lib/internal/streams/end-of-stream.js":132,"./lib/internal/streams/pipeline.js":134,dup:66}],138:[function(e,t,r){(function(r){(function(){var n=e("readable-stream").Transform,i=e("inherits");function o(e){n.call(this,e),this._destroyed=!1}function a(e,t,r){r(null,e)}function s(e){return function(t,r,n){return"function"==typeof t&&(n=r,r=t,t={}),"function"!=typeof r&&(r=a),"function"!=typeof n&&(n=null),e(t,r,n)}}i(o,n),o.prototype.destroy=function(e){if(!this._destroyed){this._destroyed=!0;var t=this;r.nextTick((function(){e&&t.emit("error",e),t.emit("close")}))}},t.exports=s((function(e,t,r){var n=new o(e);return n._transform=t,r&&(n._flush=r),n})),t.exports.ctor=s((function(e,t,r){function n(t){if(!(this instanceof n))return new n(t);this.options=Object.assign({},e,t),o.call(this,this.options)}return i(n,o),n.prototype._transform=t,r&&(n.prototype._flush=r),n})),t.exports.obj=s((function(e,t,r){var n=new o(Object.assign({objectMode:!0,highWaterMark:16},e));return n._transform=t,r&&(n._flush=r),n}))}).call(this)}).call(this,e("_process"))},{_process:93,inherits:45,"readable-stream":137}],139:[function(e,t,r){(function(t,n){(function(){var i=e("process/browser.js").nextTick,o=Function.prototype.apply,a=Array.prototype.slice,s={},u=0;function c(e,t){this._id=e,this._clearFn=t}r.setTimeout=function(){return new c(o.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(o.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r.setImmediate="function"==typeof t?t:function(e){var t=u++,n=!(arguments.length<2)&&a.call(arguments,1);return s[t]=!0,i((function(){s[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))})),t},r.clearImmediate="function"==typeof n?n:function(e){delete s[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":93,timers:139}],140:[function(e,t,r){(function(e){(function(){function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],141:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],142:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],143:[function(e,t,r){(function(t,n){(function(){var i=/%[sdj%]/g;r.format=function(e){if(!v(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(s(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,o=n.length,a=String(e).replace(i,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),u=n[r];r<o;u=n[++r])y(u)||!m(u)?a+=" "+u:a+=" "+s(u);return a},r.deprecate=function(e,i){if(b(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var o=!1;return function(){if(!o){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),o=!0}return e.apply(this,arguments)}};var o,a={};function s(e,t){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(t)?n.showHidden=t:t&&r._extend(n,t),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),f(n,e,n.depth)}function u(e,t){var r=s.styles[t];return r?"\x1b["+s.colors[r][0]+"m"+e+"\x1b["+s.colors[r][1]+"m":e}function c(e,t){return e}function f(e,t,n){if(e.customInspect&&t&&E(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return v(i)||(i=f(e,i,n)),i}var o=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(g(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(y(t))return e.stylize("null","null")}(e,t);if(o)return o;var a=Object.keys(t),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),k(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(t);if(0===a.length){if(E(t)){var u=t.name?": "+t.name:"";return e.stylize("[Function"+u+"]","special")}if(_(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(w(t))return e.stylize(Date.prototype.toString.call(t),"date");if(k(t))return l(t)}var c,m="",S=!1,x=["{","}"];(d(t)&&(S=!0,x=["[","]"]),E(t))&&(m=" [Function"+(t.name?": "+t.name:"")+"]");return _(t)&&(m=" "+RegExp.prototype.toString.call(t)),w(t)&&(m=" "+Date.prototype.toUTCString.call(t)),k(t)&&(m=" "+l(t)),0!==a.length||S&&0!=t.length?n<0?_(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=S?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a<s;++a)A(t,String(a))?o.push(h(e,t,r,n,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(h(e,t,r,n,i,!0))})),o}(e,t,n,s,a):a.map((function(r){return h(e,t,n,s,r,S)})),e.seen.pop(),function(e,t,r){if(e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,m,x)):x[0]+m+x[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),A(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=y(r)?f(e,u.value,null):f(e,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),b(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function d(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function y(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function _(e){return m(e)&&"[object RegExp]"===S(e)}function m(e){return"object"==typeof e&&null!==e}function w(e){return m(e)&&"[object Date]"===S(e)}function k(e){return m(e)&&("[object Error]"===S(e)||e instanceof Error)}function E(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}function x(e){return e<10?"0"+e.toString(10):e.toString(10)}r.debuglog=function(e){if(b(o)&&(o=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!a[e])if(new RegExp("\\b"+e+"\\b","i").test(o)){var n=t.pid;a[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else a[e]=function(){};return a[e]},r.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=d,r.isBoolean=p,r.isNull=y,r.isNullOrUndefined=function(e){return null==e},r.isNumber=g,r.isString=v,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=b,r.isRegExp=_,r.isObject=m,r.isDate=w,r.isError=k,r.isFunction=E,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("./support/isBuffer");var j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(){var e=new Date,t=[x(e.getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":");return[e.getDate(),j[e.getMonth()],t].join(" ")}function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.log=function(){console.log("%s - %s",O(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!m(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":142,_process:93,inherits:141}],144:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"v1",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(r,"v3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(r,"v4",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(r,"v5",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(r,"NIL",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(r,"version",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(r,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(r,"parse",{enumerable:!0,get:function(){return l.default}});var n=h(e("./v1.js")),i=h(e("./v3.js")),o=h(e("./v4.js")),a=h(e("./v5.js")),s=h(e("./nil.js")),u=h(e("./version.js")),c=h(e("./validate.js")),f=h(e("./stringify.js")),l=h(e("./parse.js"));function h(e){return e&&e.__esModule?e:{default:e}}},{"./nil.js":146,"./parse.js":147,"./stringify.js":151,"./v1.js":152,"./v3.js":153,"./v4.js":155,"./v5.js":156,"./validate.js":157,"./version.js":158}],145:[function(e,t,r){"use strict";function n(e){return 14+(e+64>>>9<<4)+1}function i(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function o(e,t,r,n,o,a){return i((s=i(i(t,e),i(n,a)))<<(u=o)|s>>>32-u,r);var s,u}function a(e,t,r,n,i,a,s){return o(t&r|~t&n,e,t,i,a,s)}function s(e,t,r,n,i,a,s){return o(t&n|r&~n,e,t,i,a,s)}function u(e,t,r,n,i,a,s){return o(t^r^n,e,t,i,a,s)}function c(e,t,r,n,i,a,s){return o(r^(t|~n),e,t,i,a,s)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var f=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let r=0;r<t.length;++r)e[r]=t.charCodeAt(r)}return function(e){const t=[],r=32*e.length;for(let n=0;n<r;n+=8){const r=e[n>>5]>>>n%32&255,i=parseInt("0123456789abcdef".charAt(r>>>4&15)+"0123456789abcdef".charAt(15&r),16);t.push(i)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[n(t)-1]=t;let r=1732584193,o=-271733879,f=-1732584194,l=271733878;for(let t=0;t<e.length;t+=16){const n=r,h=o,d=f,p=l;r=a(r,o,f,l,e[t],7,-680876936),l=a(l,r,o,f,e[t+1],12,-389564586),f=a(f,l,r,o,e[t+2],17,606105819),o=a(o,f,l,r,e[t+3],22,-1044525330),r=a(r,o,f,l,e[t+4],7,-176418897),l=a(l,r,o,f,e[t+5],12,1200080426),f=a(f,l,r,o,e[t+6],17,-1473231341),o=a(o,f,l,r,e[t+7],22,-45705983),r=a(r,o,f,l,e[t+8],7,1770035416),l=a(l,r,o,f,e[t+9],12,-1958414417),f=a(f,l,r,o,e[t+10],17,-42063),o=a(o,f,l,r,e[t+11],22,-1990404162),r=a(r,o,f,l,e[t+12],7,1804603682),l=a(l,r,o,f,e[t+13],12,-40341101),f=a(f,l,r,o,e[t+14],17,-1502002290),o=a(o,f,l,r,e[t+15],22,1236535329),r=s(r,o,f,l,e[t+1],5,-165796510),l=s(l,r,o,f,e[t+6],9,-1069501632),f=s(f,l,r,o,e[t+11],14,643717713),o=s(o,f,l,r,e[t],20,-373897302),r=s(r,o,f,l,e[t+5],5,-701558691),l=s(l,r,o,f,e[t+10],9,38016083),f=s(f,l,r,o,e[t+15],14,-660478335),o=s(o,f,l,r,e[t+4],20,-405537848),r=s(r,o,f,l,e[t+9],5,568446438),l=s(l,r,o,f,e[t+14],9,-1019803690),f=s(f,l,r,o,e[t+3],14,-187363961),o=s(o,f,l,r,e[t+8],20,1163531501),r=s(r,o,f,l,e[t+13],5,-1444681467),l=s(l,r,o,f,e[t+2],9,-51403784),f=s(f,l,r,o,e[t+7],14,1735328473),o=s(o,f,l,r,e[t+12],20,-1926607734),r=u(r,o,f,l,e[t+5],4,-378558),l=u(l,r,o,f,e[t+8],11,-2022574463),f=u(f,l,r,o,e[t+11],16,1839030562),o=u(o,f,l,r,e[t+14],23,-35309556),r=u(r,o,f,l,e[t+1],4,-1530992060),l=u(l,r,o,f,e[t+4],11,1272893353),f=u(f,l,r,o,e[t+7],16,-155497632),o=u(o,f,l,r,e[t+10],23,-1094730640),r=u(r,o,f,l,e[t+13],4,681279174),l=u(l,r,o,f,e[t],11,-358537222),f=u(f,l,r,o,e[t+3],16,-722521979),o=u(o,f,l,r,e[t+6],23,76029189),r=u(r,o,f,l,e[t+9],4,-640364487),l=u(l,r,o,f,e[t+12],11,-421815835),f=u(f,l,r,o,e[t+15],16,530742520),o=u(o,f,l,r,e[t+2],23,-995338651),r=c(r,o,f,l,e[t],6,-198630844),l=c(l,r,o,f,e[t+7],10,1126891415),f=c(f,l,r,o,e[t+14],15,-1416354905),o=c(o,f,l,r,e[t+5],21,-57434055),r=c(r,o,f,l,e[t+12],6,1700485571),l=c(l,r,o,f,e[t+3],10,-1894986606),f=c(f,l,r,o,e[t+10],15,-1051523),o=c(o,f,l,r,e[t+1],21,-2054922799),r=c(r,o,f,l,e[t+8],6,1873313359),l=c(l,r,o,f,e[t+15],10,-30611744),f=c(f,l,r,o,e[t+6],15,-1560198380),o=c(o,f,l,r,e[t+13],21,1309151649),r=c(r,o,f,l,e[t+4],6,-145523070),l=c(l,r,o,f,e[t+11],10,-1120210379),f=c(f,l,r,o,e[t+2],15,718787259),o=c(o,f,l,r,e[t+9],21,-343485551),r=i(r,n),o=i(o,h),f=i(f,d),l=i(l,p)}return[r,o,f,l]}(function(e){if(0===e.length)return[];const t=8*e.length,r=new Uint32Array(n(t));for(let n=0;n<t;n+=8)r[n>>5]|=(255&e[n/8])<<n%32;return r}(e),8*e.length))};r.default=f},{}],146:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default="00000000-0000-0000-0000-000000000000"},{}],147:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,i=(n=e("./validate.js"))&&n.__esModule?n:{default:n};var o=function(e){if(!(0,i.default)(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r};r.default=o},{"./validate.js":157}],148:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},{}],149:[function(e,t,r){"use strict";let n;Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){if(!n&&(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),!n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(i)};const i=new Uint8Array(16)},{}],150:[function(e,t,r){"use strict";function n(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}function i(e,t){return e<<t|e>>>32-t}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=function(e){const t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const o=e.length/4+2,a=Math.ceil(o/16),s=new Array(a);for(let t=0;t<a;++t){const r=new Uint32Array(16);for(let n=0;n<16;++n)r[n]=e[64*t+4*n]<<24|e[64*t+4*n+1]<<16|e[64*t+4*n+2]<<8|e[64*t+4*n+3];s[t]=r}s[a-1][14]=8*(e.length-1)/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<a;++e){const o=new Uint32Array(80);for(let t=0;t<16;++t)o[t]=s[e][t];for(let e=16;e<80;++e)o[e]=i(o[e-3]^o[e-8]^o[e-14]^o[e-16],1);let a=r[0],u=r[1],c=r[2],f=r[3],l=r[4];for(let e=0;e<80;++e){const r=Math.floor(e/20),s=i(a,5)+n(r,u,c,f)+l+t[r]+o[e]>>>0;l=f,f=c,c=i(u,30)>>>0,u=a,a=s}r[0]=r[0]+a>>>0,r[1]=r[1]+u>>>0,r[2]=r[2]+c>>>0,r[3]=r[3]+f>>>0,r[4]=r[4]+l>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]};r.default=o},{}],151:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,i=(n=e("./validate.js"))&&n.__esModule?n:{default:n};const o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).substr(1));var a=function(e,t=0){const r=(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase();if(!(0,i.default)(r))throw TypeError("Stringified UUID is invalid");return r};r.default=a},{"./validate.js":157}],152:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=o(e("./rng.js")),i=o(e("./stringify.js"));function o(e){return e&&e.__esModule?e:{default:e}}let a,s,u=0,c=0;var f=function(e,t,r){let o=t&&r||0;const f=t||new Array(16);let l=(e=e||{}).node||a,h=void 0!==e.clockseq?e.clockseq:s;if(null==l||null==h){const t=e.random||(e.rng||n.default)();null==l&&(l=a=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==h&&(h=s=16383&(t[6]<<8|t[7]))}let d=void 0!==e.msecs?e.msecs:Date.now(),p=void 0!==e.nsecs?e.nsecs:c+1;const y=d-u+(p-c)/1e4;if(y<0&&void 0===e.clockseq&&(h=h+1&16383),(y<0||d>u)&&void 0===e.nsecs&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=d,c=p,s=h,d+=122192928e5;const g=(1e4*(268435455&d)+p)%4294967296;f[o++]=g>>>24&255,f[o++]=g>>>16&255,f[o++]=g>>>8&255,f[o++]=255&g;const v=d/4294967296*1e4&268435455;f[o++]=v>>>8&255,f[o++]=255&v,f[o++]=v>>>24&15|16,f[o++]=v>>>16&255,f[o++]=h>>>8|128,f[o++]=255&h;for(let e=0;e<6;++e)f[o+e]=l[e];return t||(0,i.default)(f)};r.default=f},{"./rng.js":149,"./stringify.js":151}],153:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=o(e("./v35.js")),i=o(e("./md5.js"));function o(e){return e&&e.__esModule?e:{default:e}}var a=(0,n.default)("v3",48,i.default);r.default=a},{"./md5.js":145,"./v35.js":154}],154:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t,r){function o(e,o,a,s){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof o&&(o=(0,i.default)(o)),16!==o.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+e.length);if(u.set(o),u.set(e,o.length),u=r(u),u[6]=15&u[6]|t,u[8]=63&u[8]|128,a){s=s||0;for(let e=0;e<16;++e)a[s+e]=u[e];return a}return(0,n.default)(u)}try{o.name=e}catch(e){}return o.DNS=a,o.URL=s,o},r.URL=r.DNS=void 0;var n=o(e("./stringify.js")),i=o(e("./parse.js"));function o(e){return e&&e.__esModule?e:{default:e}}const a="6ba7b810-9dad-11d1-80b4-00c04fd430c8";r.DNS=a;const s="6ba7b811-9dad-11d1-80b4-00c04fd430c8";r.URL=s},{"./parse.js":147,"./stringify.js":151}],155:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=o(e("./rng.js")),i=o(e("./stringify.js"));function o(e){return e&&e.__esModule?e:{default:e}}var a=function(e,t,r){const o=(e=e||{}).random||(e.rng||n.default)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=o[e];return t}return(0,i.default)(o)};r.default=a},{"./rng.js":149,"./stringify.js":151}],156:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=o(e("./v35.js")),i=o(e("./sha1.js"));function o(e){return e&&e.__esModule?e:{default:e}}var a=(0,n.default)("v5",80,i.default);r.default=a},{"./sha1.js":150,"./v35.js":154}],157:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,i=(n=e("./regex.js"))&&n.__esModule?n:{default:n};var o=function(e){return"string"==typeof e&&i.default.test(e)};r.default=o},{"./regex.js":148}],158:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,i=(n=e("./validate.js"))&&n.__esModule?n:{default:n};var o=function(e){if(!(0,i.default)(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)};r.default=o},{"./validate.js":157}],159:[function(e,t,r){"use strict";function n(e,t,r){var n=r[r.length-1];e===n.element&&(r.pop(),n=r[r.length-1]);var i=n.element,o=n.index;if(Array.isArray(i))i.push(e);else if(o===t.length-2){i[t.pop()]=e}else t.push(e)}r.stringify=function(e){var t=[];t.push({obj:e});for(var r,n,i,o,a,s,u,c,f,l,h="";r=t.pop();)if(n=r.obj,h+=r.prefix||"",i=r.val||"")h+=i;else if("object"!=typeof n)h+=void 0===n?null:JSON.stringify(n);else if(null===n)h+="null";else if(Array.isArray(n)){for(t.push({val:"]"}),o=n.length-1;o>=0;o--)a=0===o?"":",",t.push({obj:n[o],prefix:a});t.push({val:"["})}else{for(u in s=[],n)n.hasOwnProperty(u)&&s.push(u);for(t.push({val:"}"}),o=s.length-1;o>=0;o--)f=n[c=s[o]],l=o>0?",":"",l+=JSON.stringify(c)+":",t.push({obj:f,prefix:l});t.push({val:"{"})}return h},r.parse=function(e){for(var t,r,i,o,a,s,u,c,f,l=[],h=[],d=0;;)if("}"!==(t=e[d++])&&"]"!==t&&void 0!==t)switch(t){case" ":case"\t":case"\n":case":":case",":break;case"n":d+=3,n(null,l,h);break;case"t":d+=3,n(!0,l,h);break;case"f":d+=4,n(!1,l,h);break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"-":for(r="",d--;;){if(i=e[d++],!/[\d\.\-e\+]/.test(i)){d--;break}r+=i}n(parseFloat(r),l,h);break;case'"':for(o="",a=void 0,s=0;'"'!==(u=e[d++])||"\\"===a&&s%2==1;)o+=u,"\\"===(a=u)?s++:s=0;n(JSON.parse('"'+o+'"'),l,h);break;case"[":c={element:[],index:l.length},l.push(c.element),h.push(c);break;case"{":f={element:{},index:l.length},l.push(f.element),h.push(f);break;default:throw new Error("unexpectedly reached end of input: "+t)}else{if(1===l.length)return l.pop();n(l.pop(),l,h)}}},{}],160:[function(e,t,r){t.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var i in r)n.call(r,i)&&(e[i]=r[i])}return e};var n=Object.prototype.hasOwnProperty},{}],161:[function(e,t,r){t.exports=function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)n.call(r,i)&&(e[i]=r[i])}return e};var n=Object.prototype.hasOwnProperty},{}],162:[function(e,t,r){(function(t){(function(){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var n=r(e("levelup")),i=r(e("ltgt")),o=r(e("level-codec")),a=r(e("readable-stream")),s=e("through2"),u=r(e("double-ended-queue")),c=r(e("spark-md5")),f=r(e("events")),l=e("uuid"),h=r(e("vuvuzela")),d=r(e("memdown"));function p(e){return function(e){return"function"==typeof e}(e.prefix)?e.prefix():e}class y extends Error{constructor(){super(),this.name="NotFoundError"}}var g=f.EventEmitter,v=new y,b=function(e,t,r,n){var i=new g;function o(e){var t,r={};if(n)for(t in n)void 0!==n[t]&&(r[t]=n[t]);if(e)for(t in e)void 0!==e[t]&&(r[t]=e[t]);return r}return i.sublevels={},i.options=n,i.version="6.5.4",i.methods={},t=t||[],i.put=function(r,n,a,s){"function"==typeof a&&(s=a,a={}),e.apply([{key:r,value:n,prefix:t.slice(),type:"put"}],o(a),(function(e){if(e)return s(e);i.emit("put",r,n),s(null)}))},i.prefix=function(){return t.slice()},i.batch=function(r,n,a){"function"==typeof n&&(a=n,n={}),r=r.map((function(e){return{key:e.key,value:e.value,prefix:e.prefix||t,keyEncoding:e.keyEncoding,valueEncoding:e.valueEncoding,type:e.type}})),e.apply(r,o(n),(function(e){if(e)return a(e);i.emit("batch",r),a(null)}))},i.get=function(r,n,i){"function"==typeof n&&(i=n,n={}),e.get(r,t,o(n),(function(e,t){e?i(v):i(null,t)}))},i.sublevel=function(n,a){return i.sublevels[n]=i.sublevels[n]||b(e,t.concat(n),r,o(a))},i.readStream=i.createReadStream=function(n){var i;(n=o(n)).prefix=t;var a=e.iterator(n);return(i=r(n,e.createDecoder(n))).setIterator(a),i},i.close=function(t){e.close(t)},i.isOpen=e.isOpen,i.isClosed=e.isClosed,i},_=a.Readable;class m extends _{constructor(e,t){super({objectMode:!0,highWaterMark:e.highWaterMark}),this._setup(e,t)}_setup(e,t){super.constructor({objectMode:!0,highWaterMark:e.highWaterMark}),this._waiting=!1,this._options=e,this._makeData=t}setIterator(e){return this._iterator=e,this._destroyed?e.end((function(){})):this._waiting?(this._waiting=!1,this._read()):this}_cleanup(e){if(!this._destroyed){this._destroyed=!0;var t=this;e&&"iterator has ended"!==e.message&&t.emit("error",e),t._iterator?t._iterator.end((function(){t._iterator=null,t.emit("close")})):t.emit("close")}}destroy(){this._cleanup()}_read(){var e=this;if(!e._destroyed)return e._iterator?void e._iterator.next((function(t,r,n){if(t||void 0===r&&void 0===n)return t||e._destroyed||e.push(null),e._cleanup(t);n=e._makeData(r,n),e._destroyed||e.push(n)})):this._waiting=!0}}const w=function(e,t){let r=function(...e){if(!(this instanceof r))return new r(...e);t.apply(this,e)};return r.prototype=Object.create(e.prototype,{constructor:{value:r}}),r}(m,(function(e,t){m.prototype._setup.call(this,e,t)}));var k={encode:function(e){return"\xff"+e[0]+"\xff"+e[1]},decode:function(e){var t=e.toString(),r=t.indexOf("\xff",1);return[t.substring(1,r),t.substring(r+1)]},lowerBound:"\0",upperBound:"\xff"},E=new o;function S(e){return b(function(e,t,r){function n(e,n,i,o){return t.encode([e,r.encodeKey(n,i,o)])}function o(e,t){return t&&t.options&&(e.keyEncoding=e.keyEncoding||t.options.keyEncoding,e.valueEncoding=e.valueEncoding||t.options.valueEncoding),e}return e.open((function(){})),{apply:function(t,i,a){i=i||{};for(var s=[],u=-1,c=t.length;++u<c;){var f=t[u];o(f,f.prefix),f.prefix=p(f.prefix),s.push({key:n(f.prefix,f.key,i,f),value:"del"!==f.type&&r.encodeValue(f.value,i,f),type:f.type})}e.db.batch(s,i,a)},get:function(t,i,o,a){return o.asBuffer=r.valueAsBuffer(o),e.db.get(n(i,t,o),o,(function(e,t){e?a(e):a(null,r.decodeValue(t,o))}))},createDecoder:function(e){return function(n,i){return{key:r.decodeKey(t.decode(n)[1],e),value:r.decodeValue(i,e)}}},isClosed:function(){return e.isClosed()},close:function(t){return e.close(t)},iterator:function(o){var a,s=function(e){var t={};for(var r in e)t[r]=e[r];return t}(o||{}),u=o.prefix||[];return i.toLtgt(o,s,(function(e){return n(u,e,s,{})}),t.lowerBound,t.upperBound),s.prefix=null,s.keyAsBuffer=s.valueAsBuffer=!1,"number"!=typeof s.limit&&(s.limit=-1),s.keyAsBuffer=t.buffer,s.valueAsBuffer=r.valueAsBuffer(s),a=e.db.iterator(s),{next:function(e){return a.next(e)},end:function(e){a.end(e)}}}}}(e,k,E),[],w,e.options)}var x=Function.prototype.toString,j=x.call(Object);function O(e){var t,r,n;if(!e||"object"!=typeof e)return e;if(Array.isArray(e)){for(t=[],r=0,n=e.length;r<n;r++)t[r]=O(e[r]);return t}if(e instanceof Date&&isFinite(e))return e.toISOString();if(function(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer||"undefined"!=typeof Blob&&e instanceof Blob}(e))return function(e){return e instanceof ArrayBuffer?e.slice(0):e.slice(0,e.size,e.type)}(e);if(!function(e){var t=Object.getPrototypeOf(e);if(null===t)return!0;var r=t.constructor;return"function"==typeof r&&r instanceof r&&x.call(r)==j}(e))return e;for(r in t={},e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=O(e[r]);void 0!==i&&(t[r]=i)}return t}function A(e){var t=!1;return function(...r){if(t)throw new Error("once called more than once");t=!0,e.apply(this,r)}}function R(e,t){return r=function(...r){if(this._closed)return Promise.reject(new Error("database is closed"));if(this._destroyed)return Promise.reject(new Error("database is destroyed"));var n=this;return function(e,t,r){if(e.constructor.listeners("debug").length){for(var n=["api",e.name,t],i=0;i<r.length-1;i++)n.push(r[i]);e.constructor.emit("debug",n);var o=r[r.length-1];r[r.length-1]=function(r,n){var i=["api",e.name,t];i=i.concat(r?["error",r]:["success",n]),e.constructor.emit("debug",i),o(r,n)}}}(n,e,r),this.taskqueue.isReady?t.apply(this,r):new Promise((function(t,i){n.taskqueue.addTask((function(o){o?i(o):t(n[e].apply(n,r))}))}))},function(...e){e=O(e);var t=this,n="function"==typeof e[e.length-1]&&e.pop(),i=new Promise((function(n,i){var o;try{var a=A((function(e,t){e?i(e):n(t)}));e.push(a),(o=r.apply(t,e))&&"function"==typeof o.then&&n(o)}catch(e){i(e)}}));return n&&i.then((function(e){n(null,e)}),n),i};var r}function M(e,t){for(var r={},n=0,i=t.length;n<i;n++){var o=t[n];o in e&&(r[o]=e[o])}return r}var T;function B(e){return e}function P(e){return[{ok:e}]}function L(e,t,r){var n=t.docs,i=new Map;n.forEach((function(e){i.has(e.id)?i.get(e.id).push(e):i.set(e.id,[e])}));var o=i.size,a=0,s=new Array(o);function u(){var e;++a===o&&(e=[],s.forEach((function(t){t.docs.forEach((function(r){e.push({id:t.id,docs:[r]})}))})),r(null,{results:e}))}var c=[];i.forEach((function(e,t){c.push(t)}));var f=0;function l(){if(!(f>=c.length)){var r=Math.min(f+6,c.length),n=c.slice(f,r);!function(r,n){r.forEach((function(r,o){var a=n+o,c=i.get(r),f=M(c[0],["atts_since","attachments"]);f.open_revs=c.map((function(e){return e.rev})),f.open_revs=f.open_revs.filter(B);var h=B;0===f.open_revs.length&&(delete f.open_revs,h=P),["revs","attachments","binary","ajax","latest"].forEach((function(e){e in t&&(f[e]=t[e])})),e.get(r,f,(function(e,t){var n,i,o;n=e?[{error:e}]:h(t),i=r,o=n,s[a]={id:i,docs:o},u(),l()}))}))}(n,f),f+=n.length}}l()}try{localStorage.setItem("_pouch_check_localstorage",1),T=!!localStorage.getItem("_pouch_check_localstorage")}catch(e){T=!1}function C(){return T}const I="function"==typeof queueMicrotask?queueMicrotask:function(e){Promise.resolve().then(e)};function D(e){if("undefined"!=typeof console&&"function"==typeof console[e]){var t=Array.prototype.slice.call(arguments,1);console[e].apply(console,t)}}class q extends Error{constructor(e,t,r){super(),this.status=e,this.name=t,this.message=r,this.error=!0}toString(){return JSON.stringify({status:this.status,name:this.name,message:this.message,reason:this.reason})}}new q(401,"unauthorized","Name or password is incorrect.");var N=new q(400,"bad_request","Missing JSON list of 'docs'"),U=new q(404,"not_found","missing"),F=new q(409,"conflict","Document update conflict"),$=new q(400,"bad_request","_id field must contain a string"),W=new q(412,"missing_id","_id is required for puts"),z=new q(400,"bad_request","Only reserved document ids may start with underscore."),K=new q(412,"precondition_failed","Database not open"),V=new q(500,"unknown_error","Database encountered an unknown error"),H=new q(500,"badarg","Some query argument is invalid"),G=(new q(400,"invalid_request","Request was invalid"),new q(400,"query_parse_error","Some query parameter is invalid")),J=new q(500,"doc_validation","Bad special document member"),Y=new q(400,"bad_request","Something wrong with the request"),Q=new q(400,"bad_request","Document must be a JSON object"),X=(new q(404,"not_found","Database not found"),new q(500,"indexed_db_went_bad","unknown"),new q(500,"web_sql_went_bad","unknown"),new q(500,"levelDB_went_went_bad","unknown"),new q(403,"forbidden","Forbidden by design doc validate_doc_update function"),new q(400,"bad_request","Invalid rev format")),Z=(new q(412,"file_exists","The database could not be created, the file already exists."),new q(412,"missing_stub","A pre-existing attachment stub wasn't found"));new q(413,"invalid_url","Provided URL is invalid");function ee(e,t){function r(t){for(var r=Object.getOwnPropertyNames(e),n=0,i=r.length;n<i;n++)"function"!=typeof e[r[n]]&&(this[r[n]]=e[r[n]]);void 0===this.stack&&(this.stack=(new Error).stack),void 0!==t&&(this.reason=t)}return r.prototype=q.prototype,new r(t)}function te(e){if("object"!=typeof e){var t=e;(e=V).data=t}return"error"in e&&"conflict"===e.error&&(e.name="conflict",e.status=409),"name"in e||(e.name=e.error||"unknown"),"status"in e||(e.status=500),"message"in e||(e.message=e.message||e.reason),"stack"in e||(e.stack=(new Error).stack),e}function re(e){var t={},r=e.filter&&"function"==typeof e.filter;return t.query=e.query_params,function(n){n.doc||(n.doc={});var i=r&&function(e,t,r){try{return!e(t,r)}catch(e){var n="Filter function threw: "+e.toString();return ee(Y,n)}}(e.filter,n.doc,t);if("object"==typeof i)return i;if(i)return!1;if(e.include_docs){if(!e.attachments)for(var o in n.doc._attachments)Object.prototype.hasOwnProperty.call(n.doc._attachments,o)&&(n.doc._attachments[o].stub=!0)}else delete n.doc;return!0}}var ne=function(){}.name?function(e){return e.name}:function(e){var t=e.toString().match(/^\s*function\s*(?:(\S+)\s*)?\(/);return t&&t[1]?t[1]:""};function ie(e){var t;if(e?"string"!=typeof e?t=ee($):/^_/.test(e)&&!/^_(design|local)/.test(e)&&(t=ee(z)):t=ee(W),t)throw t}function oe(e){return"boolean"==typeof e._remote?e._remote:"function"==typeof e.type&&(D("warn","db.type() is deprecated and will be removed in a future version of PouchDB"),"http"===e.type())}function ae(e){if(!e)return null;var t=e.split("/");return 2===t.length?t:1===t.length?[e,e]:null}function se(e){var t=ae(e);return t?t.join("/"):null}function ue(e,t){var r=[],n=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r.push(i),n.push(t[i]));return r.push(e),Function.apply(null,r).apply(null,n)}function ce(e,t,r){return e.get(t).catch((function(e){if(404!==e.status)throw e;return{}})).then((function(n){var i=n._rev,o=r(n);return o?(o._id=t,o._rev=i,function(e,t,r){return e.put(t).then((function(e){return{updated:!0,rev:e.rev}}),(function(n){if(409!==n.status)throw n;return ce(e,t._id,r)}))}(e,o,r)):{updated:!1,rev:i}}))}function fe(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var r=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<e.length;n+=1)r.append(e[n]);return r.getBlob(t.type)}}function le(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i<t;i++)n[i]=e.charCodeAt(i);return r}function he(e,t){var r=new FileReader,n="function"==typeof r.readAsBinaryString;r.onloadend=function(e){var r=e.target.result||"";if(n)return t(r);t(function(e){for(var t="",r=new Uint8Array(e),n=r.byteLength,i=0;i<n;i++)t+=String.fromCharCode(r[i]);return t}(r))},n?r.readAsBinaryString(e):r.readAsArrayBuffer(e)}var de=self.setImmediate||self.setTimeout;function pe(e){return btoa(e)}function ye(e,t,r,n,i){(r>0||n<t.size)&&(t=t.slice(r,n)),function(e,t){var r=new FileReader;r.onloadend=function(e){var r=e.target.result||new ArrayBuffer(0);t(r)},r.readAsArrayBuffer(e)}(t,(function(t){e.append(t),i()}))}function ge(e,t,r,n,i){(r>0||n<t.length)&&(t=t.substring(r,n)),e.appendBinary(t),i()}function ve(e,t){if(!t)return l.v4().replace(/-/g,"").toLowerCase();var r,n=Object.assign({},e);return delete n._rev_tree,r=JSON.stringify(n),c.hash(r)}var be=l.v4;function _e(e){for(var t,r,n,i,o=e.rev_tree.slice();i=o.pop();){var a=i.ids,s=a[2],u=i.pos;if(s.length)for(var c=0,f=s.length;c<f;c++)o.push({pos:u+1,ids:s[c]});else{var l=!!a[1].deleted,h=a[0];t&&!(n!==l?n:r!==u?r<u:t<h)||(t=h,r=u,n=l)}}return r+"-"+t}function me(e,t){for(var r,n=e.slice();r=n.pop();)for(var i=r.pos,o=r.ids,a=o[2],s=t(0===a.length,i,o[0],r.ctx,o[1]),u=0,c=a.length;u<c;u++)n.push({pos:i+1,ids:a[u],ctx:s})}function we(e,t){return e.pos-t.pos}function ke(e){var t=[];me(e,(function(e,r,n,i,o){e&&t.push({rev:r+"-"+n,pos:r,opts:o})})),t.sort(we).reverse();for(var r=0,n=t.length;r<n;r++)delete t[r].pos;return t}function Ee(e){for(var t=_e(e),r=ke(e.rev_tree),n=[],i=0,o=r.length;i<o;i++){var a=r[i];a.rev===t||a.opts.deleted||n.push(a.rev)}return n}function Se(e){for(var t,r=[],n=e.slice();t=n.pop();){var i=t.pos,o=t.ids,a=o[0],s=o[1],u=o[2],c=0===u.length,f=t.history?t.history.slice():[];f.push({id:a,opts:s}),c&&r.push({pos:i+1-f.length,ids:f});for(var l=0,h=u.length;l<h;l++)n.push({pos:i+1,ids:u[l],history:f})}return r.reverse()}function xe(e,t){return e.pos-t.pos}function je(e,t,r){var n=function(e,t,r){for(var n,i=0,o=e.length;i<o;)r(e[n=i+o>>>1],t)<0?i=n+1:o=n;return i}(e,t,r);e.splice(n,0,t)}function Oe(e,t){for(var r,n,i=t,o=e.length;i<o;i++){var a=e[i],s=[a.id,a.opts,[]];n?(n[2].push(s),n=s):r=n=s}return r}function Ae(e,t){return e[0]<t[0]?-1:1}function Re(e,t){for(var r=[{tree1:e,tree2:t}],n=!1;r.length>0;){var i=r.pop(),o=i.tree1,a=i.tree2;(o[1].status||a[1].status)&&(o[1].status="available"===o[1].status||"available"===a[1].status?"available":"missing");for(var s=0;s<a[2].length;s++)if(o[2][0]){for(var u=!1,c=0;c<o[2].length;c++)o[2][c][0]===a[2][s][0]&&(r.push({tree1:o[2][c],tree2:a[2][s]}),u=!0);u||(n="new_branch",je(o[2],a[2][s],Ae))}else n="new_leaf",o[2][0]=a[2][s]}return{conflicts:n,tree:e}}function Me(e,t,r){var n,i=[],o=!1,a=!1;if(!e.length)return{tree:[t],conflicts:"new_leaf"};for(var s=0,u=e.length;s<u;s++){var c=e[s];if(c.pos===t.pos&&c.ids[0]===t.ids[0])n=Re(c.ids,t.ids),i.push({pos:c.pos,ids:n.tree}),o=o||n.conflicts,a=!0;else if(!0!==r){var f=c.pos<t.pos?c:t,l=c.pos<t.pos?t:c,h=l.pos-f.pos,d=[],p=[];for(p.push({ids:f.ids,diff:h,parent:null,parentIdx:null});p.length>0;){var y=p.pop();if(0!==y.diff)for(var g=y.ids[2],v=0,b=g.length;v<b;v++)p.push({ids:g[v],diff:y.diff-1,parent:y.ids,parentIdx:v});else y.ids[0]===l.ids[0]&&d.push(y)}var _=d[0];_?(n=Re(_.ids,l.ids),_.parent[2][_.parentIdx]=n.tree,i.push({pos:f.pos,ids:f.ids}),o=o||n.conflicts,a=!0):i.push(c)}else i.push(c)}return a||i.push(t),i.sort(xe),{tree:i,conflicts:o||"internal_node"}}function Te(e,t,r){var n=Me(e,t),i=function(e,t){for(var r,n,i=Se(e),o=0,a=i.length;o<a;o++){var s,u=i[o],c=u.ids;if(c.length>t){r||(r={});var f=c.length-t;s={pos:u.pos+f,ids:Oe(c,f)};for(var l=0;l<f;l++){var h=u.pos+l+"-"+c[l].id;r[h]=!0}}else s={pos:u.pos,ids:Oe(c,0)};n=n?Me(n,s,!0).tree:[s]}return r&&me(n,(function(e,t,n){delete r[t+"-"+n]})),{tree:n,revs:r?Object.keys(r):[]}}(n.tree,r);return{tree:i.tree,stemmedRevs:i.revs,conflicts:n.conflicts}}function Be(e){return e.ids}function Pe(e,t){t||(t=_e(e));for(var r,n=t.substring(t.indexOf("-")+1),i=e.rev_tree.map(Be);r=i.pop();){if(r[0]===n)return!!r[1].deleted;i=i.concat(r[2])}}function Le(e){return"string"==typeof e&&e.startsWith("_local/")}function Ce(e,t,r){var n=[{rev:e._rev}];"all_docs"===r.style&&(n=ke(t.rev_tree).map((function(e){return{rev:e.rev}})));var i={id:t.id,changes:n,doc:e};return Pe(t,e._rev)&&(i.deleted=!0),r.conflicts&&(i.doc._conflicts=Ee(t),i.doc._conflicts.length||delete i.doc._conflicts),i}class Ie extends f{constructor(e,t,r){super(),this.db=e;var n=(t=t?O(t):{}).complete=A((t,r)=>{var n,o;t?(o="error",("listenerCount"in(n=this)?n.listenerCount(o):f.listenerCount(n,o))>0&&this.emit("error",t)):this.emit("complete",r),this.removeAllListeners(),e.removeListener("destroyed",i)});r&&(this.on("complete",(function(e){r(null,e)})),this.on("error",r));const i=()=>{this.cancel()};e.once("destroyed",i),t.onChange=(e,t,r)=>{this.isCancelled||function(e,t,r,n){try{e.emit("change",t,r,n)}catch(e){D("error",'Error in .on("change", function):',e)}}(this,e,t,r)};var o=new Promise((function(e,r){t.complete=function(t,n){t?r(t):e(n)}}));this.once("cancel",(function(){e.removeListener("destroyed",i),t.complete(null,{status:"cancelled"})})),this.then=o.then.bind(o),this.catch=o.catch.bind(o),this.then((function(e){n(null,e)}),n),e.taskqueue.isReady?this.validateChanges(t):e.taskqueue.addTask(e=>{e?t.complete(e):this.isCancelled?this.emit("cancel"):this.validateChanges(t)})}cancel(){this.isCancelled=!0,this.db.taskqueue.isReady&&this.emit("cancel")}validateChanges(e){var t=e.complete;He._changesFilterPlugin?He._changesFilterPlugin.validate(e,r=>{if(r)return t(r);this.doChanges(e)}):this.doChanges(e)}doChanges(e){var t=e.complete;if("live"in(e=O(e))&&!("continuous"in e)&&(e.continuous=e.live),e.processChange=Ce,"latest"===e.since&&(e.since="now"),e.since||(e.since=0),"now"!==e.since){if(He._changesFilterPlugin){if(He._changesFilterPlugin.normalize(e),He._changesFilterPlugin.shouldFilter(this,e))return He._changesFilterPlugin.filter(this,e)}else["doc_ids","filter","selector","view"].forEach((function(t){t in e&&D("warn",'The "'+t+'" option was passed in to changes/replicate, but pouchdb-changes-filter plugin is not installed, so it was ignored. Please install the plugin to enable filtering.')}));"descending"in e||(e.descending=!1),e.limit=0===e.limit?1:e.limit,e.complete=t;var r=this.db._changes(e);if(r&&"function"==typeof r.cancel){const e=this.cancel;this.cancel=(...t)=>{r.cancel(),e.apply(this,t)}}}else this.db.info().then(r=>{this.isCancelled?t(null,{status:"cancelled"}):(e.since=r.update_seq,this.doChanges(e))},t)}}function De(e,t){return function(r,n){r||n[0]&&n[0].error?((r=r||n[0]).docId=t,e(r)):e(null,n.length?n[0]:n)}}function qe(e,t){if(e._id===t._id){return(e._revisions?e._revisions.start:0)-(t._revisions?t._revisions.start:0)}return e._id<t._id?-1:1}function Ne(e,t,r){return e.get("_local/purges").then((function(e){const n=e.purgeSeq+1;return e.purges.push({docId:t,rev:r,purgeSeq:n}),e.purges.length>self.purged_infos_limit&&e.purges.splice(0,e.purges.length-self.purged_infos_limit),e.purgeSeq=n,e})).catch((function(e){if(404!==e.status)throw e;return{_id:"_local/purges",purges:[{docId:t,rev:r,purgeSeq:0}],purgeSeq:0}})).then((function(t){return e.put(t)}))}function Ue(e){return null===e||"object"!=typeof e||Array.isArray(e)}const Fe=/^\d+-[^-]*$/;function $e(e){return"string"==typeof e&&Fe.test(e)}class We extends f{_setup(){this.post=R("post",(function(e,t,r){if("function"==typeof t&&(r=t,t={}),Ue(e))return r(ee(Q));this.bulkDocs({docs:[e]},t,De(r,e._id))})).bind(this),this.put=R("put",(function(e,t,r){if("function"==typeof t&&(r=t,t={}),Ue(e))return r(ee(Q));if(ie(e._id),"_rev"in e&&!$e(e._rev))return r(ee(X));if(Le(e._id)&&"function"==typeof this._putLocal)return e._deleted?this._removeLocal(e,r):this._putLocal(e,r);const n=r=>{"function"==typeof this._put&&!1!==t.new_edits?this._put(e,t,r):this.bulkDocs({docs:[e]},t,De(r,e._id))};var i,o,a,s;t.force&&e._rev?(i=e._rev.split("-"),o=i[1],a=parseInt(i[0],10)+1,s=ve(),e._revisions={start:a,ids:[s,o]},e._rev=a+"-"+s,t.new_edits=!1,n((function(t){var n=t?null:{ok:!0,id:e._id,rev:e._rev};r(t,n)}))):n(r)})).bind(this),this.putAttachment=R("putAttachment",(function(e,t,r,n,i){var o=this;function a(e){var r="_rev"in e?parseInt(e._rev,10):0;return e._attachments=e._attachments||{},e._attachments[t]={content_type:i,data:n,revpos:++r},o.put(e)}return"function"==typeof i&&(i=n,n=r,r=null),void 0===i&&(i=n,n=r,r=null),i||D("warn","Attachment",t,"on document",e,"is missing content_type"),o.get(e).then((function(e){if(e._rev!==r)throw ee(F);return a(e)}),(function(t){if(t.reason===U.message)return a({_id:e});throw t}))})).bind(this),this.removeAttachment=R("removeAttachment",(function(e,t,r,n){this.get(e,(e,i)=>{if(e)n(e);else if(i._rev===r){if(!i._attachments)return n();delete i._attachments[t],0===Object.keys(i._attachments).length&&delete i._attachments,this.put(i,n)}else n(ee(F))})})).bind(this),this.remove=R("remove",(function(e,t,r,n){var i;"string"==typeof t?(i={_id:e,_rev:t},"function"==typeof r&&(n=r,r={})):(i=e,"function"==typeof t?(n=t,r={}):(n=r,r=t)),(r=r||{}).was_delete=!0;var o={_id:i._id,_rev:i._rev||r.rev,_deleted:!0};if(Le(o._id)&&"function"==typeof this._removeLocal)return this._removeLocal(i,n);this.bulkDocs({docs:[o]},r,De(n,o._id))})).bind(this),this.revsDiff=R("revsDiff",(function(e,t,r){"function"==typeof t&&(r=t,t={});var n=Object.keys(e);if(!n.length)return r(null,{});var i=0,o=new Map;function a(e,t){o.has(e)||o.set(e,{missing:[]}),o.get(e).missing.push(t)}n.forEach((function(t){this._getRevisionTree(t,(function(s,u){if(s&&404===s.status&&"missing"===s.message)o.set(t,{missing:e[t]});else{if(s)return r(s);!function(t,r){var n=e[t].slice(0);me(r,(function(e,r,i,o,s){var u=r+"-"+i,c=n.indexOf(u);-1!==c&&(n.splice(c,1),"available"!==s.status&&a(t,u))})),n.forEach((function(e){a(t,e)}))}(t,u)}if(++i===n.length){var c={};return o.forEach((function(e,t){c[t]=e})),r(null,c)}}))}),this)})).bind(this),this.bulkGet=R("bulkGet",(function(e,t){L(this,e,t)})).bind(this),this.compactDocument=R("compactDocument",(function(e,t,r){this._getRevisionTree(e,(n,i)=>{if(n)return r(n);var o=function(e){var t={},r=[];return me(e,(function(e,n,i,o){var a=n+"-"+i;return e&&(t[a]=0),void 0!==o&&r.push({from:o,to:a}),a})),r.reverse(),r.forEach((function(e){void 0===t[e.from]?t[e.from]=1+t[e.to]:t[e.from]=Math.min(t[e.from],1+t[e.to])})),t}(i),a=[],s=[];Object.keys(o).forEach((function(e){o[e]>t&&a.push(e)})),me(i,(function(e,t,r,n,i){var o=t+"-"+r;"available"===i.status&&-1!==a.indexOf(o)&&s.push(o)})),this._doCompaction(e,s,r)})})).bind(this),this.compact=R("compact",(function(e,t){"function"==typeof e&&(t=e,e={}),e=e||{},this._compactionQueue=this._compactionQueue||[],this._compactionQueue.push({opts:e,callback:t}),1===this._compactionQueue.length&&function e(t){var r=t._compactionQueue[0],n=r.opts,i=r.callback;t.get("_local/compaction").catch((function(){return!1})).then((function(r){r&&r.last_seq&&(n.last_seq=r.last_seq),t._compact(n,(function(r,n){r?i(r):i(null,n),I((function(){t._compactionQueue.shift(),t._compactionQueue.length&&e(t)}))}))}))}(this)})).bind(this),this.get=R("get",(function(e,t,r){if("function"==typeof t&&(r=t,t={}),t=t||{},"string"!=typeof e)return r(ee($));if(Le(e)&&"function"==typeof this._getLocal)return this._getLocal(e,r);var n=[];const i=()=>{var i=[],o=n.length;if(!o)return r(null,i);n.forEach(n=>{this.get(e,{rev:n,revs:t.revs,latest:t.latest,attachments:t.attachments,binary:t.binary},(function(e,t){if(e)i.push({missing:n});else{for(var a,s=0,u=i.length;s<u;s++)if(i[s].ok&&i[s].ok._rev===t._rev){a=!0;break}a||i.push({ok:t})}--o||r(null,i)}))})};if(!t.open_revs)return this._get(e,t,(n,i)=>{if(n)return n.docId=e,r(n);var o=i.doc,a=i.metadata,s=i.ctx;if(t.conflicts){var u=Ee(a);u.length&&(o._conflicts=u)}if(Pe(a,o._rev)&&(o._deleted=!0),t.revs||t.revs_info){for(var c=o._rev.split("-"),f=parseInt(c[0],10),l=c[1],h=Se(a.rev_tree),d=null,p=0;p<h.length;p++){var y=h[p];const e=y.ids.findIndex(e=>e.id===l);(e===f-1||!d&&-1!==e)&&(d=y)}if(!d)return(n=new Error("invalid rev tree")).docId=e,r(n);const i=o._rev.split("-")[1],s=d.ids.findIndex(e=>e.id===i)+1;var g=d.ids.length-s;if(d.ids.splice(s,g),d.ids.reverse(),t.revs&&(o._revisions={start:d.pos+d.ids.length-1,ids:d.ids.map((function(e){return e.id}))}),t.revs_info){var v=d.pos+d.ids.length;o._revs_info=d.ids.map((function(e){return{rev:--v+"-"+e.id,status:e.opts.status}}))}}if(t.attachments&&o._attachments){var b=o._attachments,_=Object.keys(b).length;if(0===_)return r(null,o);Object.keys(b).forEach(e=>{this._getAttachment(o._id,e,b[e],{binary:t.binary,metadata:a,ctx:s},(function(t,n){var i=o._attachments[e];i.data=n,delete i.stub,delete i.length,--_||r(null,o)}))})}else{if(o._attachments)for(var m in o._attachments)Object.prototype.hasOwnProperty.call(o._attachments,m)&&(o._attachments[m].stub=!0);r(null,o)}});if("all"===t.open_revs)this._getRevisionTree(e,(function(e,t){if(e)return r(e);n=ke(t).map((function(e){return e.rev})),i()}));else{if(!Array.isArray(t.open_revs))return r(ee(V,"function_clause"));n=t.open_revs;for(var o=0;o<n.length;o++){if(!$e(n[o]))return r(ee(X))}i()}})).bind(this),this.getAttachment=R("getAttachment",(function(e,t,r,n){r instanceof Function&&(n=r,r={}),this._get(e,r,(i,o)=>i?n(i):o.doc._attachments&&o.doc._attachments[t]?(r.ctx=o.ctx,r.binary=!0,r.metadata=o.metadata,void this._getAttachment(e,t,o.doc._attachments[t],r,n)):n(ee(U)))})).bind(this),this.allDocs=R("allDocs",(function(e,t){if("function"==typeof e&&(t=e,e={}),e.skip=void 0!==e.skip?e.skip:0,e.start_key&&(e.startkey=e.start_key),e.end_key&&(e.endkey=e.end_key),"keys"in e){if(!Array.isArray(e.keys))return t(new TypeError("options.keys must be an array"));var r=["startkey","endkey","key"].filter((function(t){return t in e}))[0];if(r)return void t(ee(G,"Query parameter `"+r+"` is not compatible with multi-get"));if(!oe(this)&&(function(e){var t="limit"in e?e.keys.slice(e.skip,e.limit+e.skip):e.skip>0?e.keys.slice(e.skip):e.keys;e.keys=t,e.skip=0,delete e.limit,e.descending&&(t.reverse(),e.descending=!1)}(e),0===e.keys.length))return this._allDocs({limit:0},t)}return this._allDocs(e,t)})).bind(this),this.close=R("close",(function(e){return this._closed=!0,this.emit("closed"),this._close(e)})).bind(this),this.info=R("info",(function(e){this._info((t,r)=>{if(t)return e(t);r.db_name=r.db_name||this.name,r.auto_compaction=!(!this.auto_compaction||oe(this)),r.adapter=this.adapter,e(null,r)})})).bind(this),this.id=R("id",(function(e){return this._id(e)})).bind(this),this.bulkDocs=R("bulkDocs",(function(e,t,r){if("function"==typeof t&&(r=t,t={}),t=t||{},Array.isArray(e)&&(e={docs:e}),!e||!e.docs||!Array.isArray(e.docs))return r(ee(N));for(var n=0;n<e.docs.length;++n){const t=e.docs[n];if(Ue(t))return r(ee(Q));if("_rev"in t&&!$e(t._rev))return r(ee(X))}var i;if(e.docs.forEach((function(e){e._attachments&&Object.keys(e._attachments).forEach((function(t){i=i||function(e){return"_"===e.charAt(0)&&e+" is not a valid attachment name, attachment names cannot start with '_'"}(t),e._attachments[t].content_type||D("warn","Attachment",t,"on document",e._id,"is missing content_type")}))})),i)return r(ee(Y,i));"new_edits"in t||(t.new_edits=!("new_edits"in e)||e.new_edits);var o=this;t.new_edits||oe(o)||e.docs.sort(qe),function(e){for(var t=0;t<e.length;t++){var r=e[t];if(r._deleted)delete r._attachments;else if(r._attachments)for(var n=Object.keys(r._attachments),i=0;i<n.length;i++){var o=n[i];r._attachments[o]=M(r._attachments[o],["data","digest","content_type","length","revpos","stub"])}}}(e.docs);var a=e.docs.map((function(e){return e._id}));this._bulkDocs(e,t,(function(e,n){if(e)return r(e);if(t.new_edits||(n=n.filter((function(e){return e.error}))),!oe(o))for(var i=0,s=n.length;i<s;i++)n[i].id=n[i].id||a[i];r(null,n)}))})).bind(this),this.registerDependentDatabase=R("registerDependentDatabase",(function(e,t){var r=O(this.__opts);this.__opts.view_adapter&&(r.adapter=this.__opts.view_adapter);var n=new this.constructor(e,r);ce(this,"_local/_pouch_dependentDbs",(function(t){return t.dependentDbs=t.dependentDbs||{},!t.dependentDbs[e]&&(t.dependentDbs[e]=!0,t)})).then((function(){t(null,{db:n})})).catch(t)})).bind(this),this.destroy=R("destroy",(function(e,t){"function"==typeof e&&(t=e,e={});var r=!("use_prefix"in this)||this.use_prefix;const n=()=>{this._destroy(e,(e,r)=>{if(e)return t(e);this._destroyed=!0,this.emit("destroyed"),t(null,r||{ok:!0})})};if(oe(this))return n();this.get("_local/_pouch_dependentDbs",(e,i)=>{if(e)return 404!==e.status?t(e):n();var o=i.dependentDbs,a=this.constructor,s=Object.keys(o).map(e=>{var t=r?e.replace(new RegExp("^"+a.prefix),""):e;return new a(t,this.__opts).destroy()});Promise.all(s).then(n,t)})})).bind(this)}_compact(e,t){var r,n={return_docs:!1,last_seq:e.last_seq||0,since:e.last_seq||0},i=[],o=0;const a=e=>{this.activeTasks.update(r,{completed_items:++o}),i.push(this.compactDocument(e.id,0))},s=e=>{this.activeTasks.remove(r,e),t(e)},u=e=>{var n=e.last_seq;Promise.all(i).then(()=>ce(this,"_local/compaction",e=>(!e.last_seq||e.last_seq<n)&&(e.last_seq=n,e))).then(()=>{this.activeTasks.remove(r),t(null,{ok:!0})}).catch(s)};this.info().then(e=>{r=this.activeTasks.add({name:"database_compaction",total_items:e.update_seq-n.last_seq}),this.changes(n).on("change",a).on("complete",u).on("error",s)})}changes(e,t){return"function"==typeof e&&(t=e,e={}),(e=e||{}).return_docs="return_docs"in e?e.return_docs:!e.live,new Ie(this,e,t)}type(){return"function"==typeof this._type?this._type():this.adapter}}We.prototype.purge=R("_purge",(function(e,t,r){if(void 0===this._purge)return r(ee(V,"Purge is not implemented in the "+this.adapter+" adapter."));var n=this;n._getRevisionTree(e,(i,o)=>{if(i)return r(i);if(!o)return r(ee(U));let a;try{a=function(e,t){let r=[];const n=e.slice();let i;for(;i=n.pop();){const{pos:e,ids:o}=i,a=`${e}-${o[0]}`,s=o[2];if(r.push(a),a===t){if(0!==s.length)throw new Error("The requested revision is not a leaf");return r.reverse()}(0===s.length||s.length>1)&&(r=[]);for(let t=0,r=s.length;t<r;t++)n.push({pos:e+1,ids:s[t]})}if(0===r.length)throw new Error("The requested revision does not exist");return r.reverse()}(o,t)}catch(i){return r(i.message||i)}n._purge(e,a,(i,o)=>{if(i)return r(i);Ne(n,e,t).then((function(){return r(null,o)}))})})}));class ze{constructor(){this.isReady=!1,this.failed=!1,this.queue=[]}execute(){var e;if(this.failed)for(;e=this.queue.shift();)e(this.failed);else for(;e=this.queue.shift();)e()}fail(e){this.failed=e,this.execute()}ready(e){this.isReady=!0,this.db=e,this.execute()}addTask(e){this.queue.push(e),this.failed&&this.execute()}}function Ke(e,t){let r=function(...e){if(!(this instanceof r))return new r(...e);t.apply(this,e)};var n,i;return i=e,(n=r).prototype=Object.create(i.prototype,{constructor:{value:n}}),r}class Ve extends We{constructor(e,t){super(),this._setup(e,t)}_setup(e,t){if(super._setup(),t=t||{},e&&"object"==typeof e&&(e=(t=e).name,delete t.name),void 0===t.deterministic_revs&&(t.deterministic_revs=!0),this.__opts=t=O(t),this.auto_compaction=t.auto_compaction,this.purged_infos_limit=t.purged_infos_limit||1e3,this.prefix=He.prefix,"string"!=typeof e)throw new Error("Missing/invalid DB name");var r=function(e,t){var r=e.match(/([a-z-]*):\/\/(.*)/);if(r)return{name:/https?/.test(r[1])?r[1]+"://"+r[2]:r[2],adapter:r[1]};var n=He.adapters,i=He.preferredAdapters,o=He.prefix,a=t.adapter;if(!a)for(var s=0;s<i.length&&("idb"===(a=i[s])&&"websql"in n&&C()&&localStorage["_pouch__websqldb_"+o+e]);++s)D("log",'PouchDB is downgrading "'+e+'" to WebSQL to avoid data loss, because it was already opened with WebSQL.');var u=n[a];return{name:!u||!("use_prefix"in u)||u.use_prefix?o+e:e,adapter:a}}((t.prefix||"")+e,t);if(t.name=r.name,t.adapter=t.adapter||r.adapter,this.name=e,this._adapter=t.adapter,He.emit("debug",["adapter","Picked adapter: ",t.adapter]),!He.adapters[t.adapter]||!He.adapters[t.adapter].valid())throw new Error("Invalid Adapter: "+t.adapter);if(t.view_adapter&&(!He.adapters[t.view_adapter]||!He.adapters[t.view_adapter].valid()))throw new Error("Invalid View Adapter: "+t.view_adapter);this.taskqueue=new ze,this.adapter=t.adapter,He.adapters[t.adapter].call(this,t,e=>{if(e)return this.taskqueue.fail(e);!function(e){function t(t){e.removeListener("closed",r),t||e.constructor.emit("destroyed",e.name)}function r(){e.removeListener("destroyed",t),e.constructor.emit("unref",e)}e.once("destroyed",t),e.once("closed",r),e.constructor.emit("ref",e)}(this),this.emit("created",this),He.emit("created",this.name),this.taskqueue.ready(this)})}}const He=Ke(Ve,(function(e,t){Ve.prototype._setup.call(this,e,t)}));var Ge=fetch;He.adapters={},He.preferredAdapters=[],He.prefix="_pouch_";var Je=new f;!function(e){Object.keys(f.prototype).forEach((function(t){"function"==typeof f.prototype[t]&&(e[t]=Je[t].bind(Je))}));var t=e._destructionListeners=new Map;e.on("ref",(function(e){t.has(e.name)||t.set(e.name,[]),t.get(e.name).push(e)})),e.on("unref",(function(e){if(t.has(e.name)){var r=t.get(e.name),n=r.indexOf(e);n<0||(r.splice(n,1),r.length>1?t.set(e.name,r):t.delete(e.name))}})),e.on("destroyed",(function(e){if(t.has(e)){var r=t.get(e);t.delete(e),r.forEach((function(e){e.emit("destroyed",!0)}))}}))}(He),He.adapter=function(e,t,r){t.valid()&&(He.adapters[e]=t,r&&He.preferredAdapters.push(e))},He.plugin=function(e){if("function"==typeof e)e(He);else{if("object"!=typeof e||0===Object.keys(e).length)throw new Error('Invalid plugin: got "'+e+'", expected an object or a function');Object.keys(e).forEach((function(t){He.prototype[t]=e[t]}))}return this.__defaults&&(He.__defaults=Object.assign({},this.__defaults)),He},He.defaults=function(e){let t=Ke(He,(function(e,r){r=r||{},e&&"object"==typeof e&&(e=(r=e).name,delete r.name),r=Object.assign({},t.__defaults,r),He.call(this,e,r)}));return t.preferredAdapters=He.preferredAdapters.slice(),Object.keys(He).forEach((function(e){e in t||(t[e]=He[e])})),t.__defaults=Object.assign({},this.__defaults,e),t},He.fetch=function(e,t){return Ge(e,t)},He.prototype.activeTasks=He.activeTasks=new class{constructor(){this.tasks={}}list(){return Object.values(this.tasks)}add(e){const t=l.v4();return this.tasks[t]={id:t,name:e.name,total_items:e.total_items,created_at:(new Date).toJSON()},t}get(e){return this.tasks[e]}remove(e,t){return delete this.tasks[e],this.tasks}update(e,t){const r=this.tasks[e];if(void 0!==r){const n={id:r.id,name:r.name,created_at:r.created_at,total_items:t.total_items||r.total_items,completed_items:t.completed_items||r.completed_items,updated_at:(new Date).toJSON()};this.tasks[e]=n}return this.tasks}};function Ye(e,t){for(var r=e,n=0,i=t.length;n<i;n++){if(!(r=r[t[n]]))break}return r}function Qe(e){for(var t=[],r="",n=0,i=e.length;n<i;n++){var o=e[n];n>0&&"\\"===e[n-1]&&("$"===o||"."===o)?r=r.substring(0,r.length-1)+o:"."===o?(t.push(r),r=""):r+=o}return t.push(r),t}var Xe=["$or","$nor","$not"];function Ze(e){return Xe.indexOf(e)>-1}function et(e){return Object.keys(e)[0]}function tt(e){var t={},r={$or:!0,$nor:!0};return e.forEach((function(e){Object.keys(e).forEach((function(n){var i=e[n];if("object"!=typeof i&&(i={$eq:i}),Ze(n))if(i instanceof Array){if(r[n])return r[n]=!1,void(t[n]=i);var o=[];t[n].forEach((function(e){Object.keys(i).forEach((function(t){var r=i[t],n=Math.max(Object.keys(e).length,Object.keys(r).length),a=tt([e,r]);Object.keys(a).length<=n||o.push(a)}))})),t[n]=o}else t[n]=tt([i]);else{var a=t[n]=t[n]||{};Object.keys(i).forEach((function(e){var t=i[e];return"$gt"===e||"$gte"===e?function(e,t,r){if(void 0!==r.$eq)return;void 0!==r.$gte?"$gte"===e?t>r.$gte&&(r.$gte=t):t>=r.$gte&&(delete r.$gte,r.$gt=t):void 0!==r.$gt?"$gte"===e?t>r.$gt&&(delete r.$gt,r.$gte=t):t>r.$gt&&(r.$gt=t):r[e]=t}(e,t,a):"$lt"===e||"$lte"===e?function(e,t,r){if(void 0!==r.$eq)return;void 0!==r.$lte?"$lte"===e?t<r.$lte&&(r.$lte=t):t<=r.$lte&&(delete r.$lte,r.$lt=t):void 0!==r.$lt?"$lte"===e?t<r.$lt&&(delete r.$lt,r.$lte=t):t<r.$lt&&(r.$lt=t):r[e]=t}(e,t,a):"$ne"===e?function(e,t){"$ne"in t?t.$ne.push(e):t.$ne=[e]}(t,a):"$eq"===e?function(e,t){delete t.$gt,delete t.$gte,delete t.$lt,delete t.$lte,delete t.$ne,t.$eq=e}(t,a):"$regex"===e?function(e,t){"$regex"in t?t.$regex.push(e):t.$regex=[e]}(t,a):void(a[e]=t)}))}}))})),t}function rt(e){var t=O(e);(function e(t,r){for(var n in t){"$and"===n&&(r=!0);var i=t[n];"object"==typeof i&&(r=e(i,r))}return r})(t,!1)&&"$and"in(t=function e(t){for(var r in t){if(Array.isArray(t))for(var n in t)t[n].$and&&(t[n]=tt(t[n].$and));var i=t[r];"object"==typeof i&&e(i)}return t}(t))&&(t=tt(t.$and)),["$or","$nor"].forEach((function(e){e in t&&t[e].forEach((function(e){for(var t=Object.keys(e),r=0;r<t.length;r++){var n=t[r],i=e[n];"object"==typeof i&&null!==i||(e[n]={$eq:i})}}))})),"$not"in t&&(t.$not=tt([t.$not]));for(var r=Object.keys(t),n=0;n<r.length;n++){var i=r[n],o=t[i];"object"==typeof o&&null!==o||(o={$eq:o}),t[i]=o}return function e(t){Object.keys(t).forEach((function(r){var n=t[r];Array.isArray(n)?n.forEach((function(t){t&&"object"==typeof t&&e(t)})):"$ne"===r?t.$ne=[n]:"$regex"===r?t.$regex=[n]:n&&"object"==typeof n&&e(n)}))}(t),t}function nt(e,t){if(e===t)return 0;e=it(e),t=it(t);var r=ot(e),n=ot(t);if(r-n!=0)return r-n;switch(typeof e){case"number":return e-t;case"boolean":return e<t?-1:1;case"string":return function(e,t){return e===t?0:e>t?1:-1}(e,t)}return Array.isArray(e)?function(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++){var i=nt(e[n],t[n]);if(0!==i)return i}return e.length===t.length?0:e.length>t.length?1:-1}(e,t):function(e,t){for(var r=Object.keys(e),n=Object.keys(t),i=Math.min(r.length,n.length),o=0;o<i;o++){var a=nt(r[o],n[o]);if(0!==a)return a;if(0!==(a=nt(e[r[o]],t[n[o]])))return a}return r.length===n.length?0:r.length>n.length?1:-1}(e,t)}function it(e){switch(typeof e){case"undefined":return null;case"number":return e===1/0||e===-1/0||isNaN(e)?null:e;case"object":var t=e;if(Array.isArray(e)){var r=e.length;e=new Array(r);for(var n=0;n<r;n++)e[n]=it(t[n])}else{if(e instanceof Date)return e.toJSON();if(null!==e)for(var i in e={},t)if(Object.prototype.hasOwnProperty.call(t,i)){var o=t[i];void 0!==o&&(e[i]=it(o))}}}return e}function ot(e){var t=["boolean","number","string","object"].indexOf(typeof e);return~t?null===e?1:Array.isArray(e)?5:t<3?t+2:t+3:Array.isArray(e)?5:void 0}function at(e,t,r){if(e=e.filter((function(e){return st(e.doc,t.selector,r)})),t.sort){var n=function(e){function t(t){return e.map((function(e){var r=Qe(et(e));return Ye(t,r)}))}return function(e,r){var n,i,o=nt(t(e.doc),t(r.doc));return 0!==o?o:(n=e.doc._id,i=r.doc._id,n<i?-1:n>i?1:0)}}(t.sort);e=e.sort(n),"string"!=typeof t.sort[0]&&"desc"===(i=t.sort[0])[et(i)]&&(e=e.reverse())}var i;if("limit"in t||"skip"in t){var o=t.skip||0,a=("limit"in t?t.limit:e.length)+o;e=e.slice(o,a)}return e}function st(e,t,r){return r.every((function(r){var n=t[r],i=Qe(r),o=Ye(e,i);return Ze(r)?function(e,t,r){if("$or"===e)return t.some((function(e){return st(r,e,Object.keys(e))}));if("$not"===e)return!st(r,t,Object.keys(t));return!t.find((function(e){return st(r,e,Object.keys(e))}))}(r,n,e):ut(n,e,i,o)}))}function ut(e,t,r,n){return!e||("object"==typeof e?Object.keys(e).every((function(i){var o=e[i];if(0===i.indexOf("$"))return ct(i,t,o,r,n);var a=Qe(i);if(void 0===n&&"object"!=typeof o&&a.length>0)return!1;var s=Ye(n,a);return"object"==typeof o?ut(o,t,r,s):ct("$eq",t,o,a,s)})):e===n)}function ct(e,t,r,n,i){if(!dt[e])throw new Error('unknown operator "'+e+'" - should be one of $eq, $lte, $lt, $gt, $gte, $exists, $ne, $in, $nin, $size, $mod, $regex, $elemMatch, $type, $allMatch or $all');return dt[e](t,r,n,i)}function ft(e){return null!=e}function lt(e){return void 0!==e}function ht(e,t){return t.some((function(t){return e instanceof Array?e.some((function(e){return 0===nt(t,e)})):0===nt(t,e)}))}var dt={$elemMatch:function(e,t,r,n){return!!Array.isArray(n)&&(0!==n.length&&("object"==typeof n[0]&&null!==n[0]?n.some((function(e){return st(e,t,Object.keys(t))})):n.some((function(n){return ut(t,e,r,n)}))))},$allMatch:function(e,t,r,n){return!!Array.isArray(n)&&(0!==n.length&&("object"==typeof n[0]&&null!==n[0]?n.every((function(e){return st(e,t,Object.keys(t))})):n.every((function(n){return ut(t,e,r,n)}))))},$eq:function(e,t,r,n){return lt(n)&&0===nt(n,t)},$gte:function(e,t,r,n){return lt(n)&&nt(n,t)>=0},$gt:function(e,t,r,n){return lt(n)&&nt(n,t)>0},$lte:function(e,t,r,n){return lt(n)&&nt(n,t)<=0},$lt:function(e,t,r,n){return lt(n)&&nt(n,t)<0},$exists:function(e,t,r,n){return t?lt(n):!lt(n)},$mod:function(e,t,r,n){return ft(n)&&function(e,t){return"number"==typeof e&&parseInt(e,10)===e&&e%t[0]===t[1]}(n,t)},$ne:function(e,t,r,n){return t.every((function(e){return 0!==nt(n,e)}))},$in:function(e,t,r,n){return ft(n)&&ht(n,t)},$nin:function(e,t,r,n){return ft(n)&&!ht(n,t)},$size:function(e,t,r,n){return ft(n)&&Array.isArray(n)&&function(e,t){return e.length===t}(n,t)},$all:function(e,t,r,n){return Array.isArray(n)&&function(e,t){return t.every((function(t){return e.some((function(e){return 0===nt(t,e)}))}))}(n,t)},$regex:function(e,t,r,n){return ft(n)&&"string"==typeof n&&t.every((function(e){return function(e,t){return new RegExp(t).test(e)}(n,e)}))},$type:function(e,t,r,n){return function(e,t){switch(t){case"null":return null===e;case"boolean":return"boolean"==typeof e;case"number":return"number"==typeof e;case"string":return"string"==typeof e;case"array":return e instanceof Array;case"object":return"[object Object]"==={}.toString.call(e)}}(n,t)}};function pt(e,t){if(e.selector&&e.filter&&"_selector"!==e.filter){var r="string"==typeof e.filter?e.filter:"function";return t(new Error('selector invalid for filter "'+r+'"'))}t()}function yt(e){e.view&&!e.filter&&(e.filter="_view"),e.selector&&!e.filter&&(e.filter="_selector"),e.filter&&"string"==typeof e.filter&&("_view"===e.filter?e.view=se(e.view):e.filter=se(e.filter))}function gt(e,t){return t.filter&&"string"==typeof t.filter&&!t.doc_ids&&!oe(e.db)}function vt(e,t){var r=t.complete;if("_view"===t.filter){if(!t.view||"string"!=typeof t.view){var n=ee(Y,"`view` filter parameter not found or invalid.");return r(n)}var i=ae(t.view);e.db.get("_design/"+i[0],(function(n,o){if(e.isCancelled)return r(null,{status:"cancelled"});if(n)return r(te(n));var a=o&&o.views&&o.views[i[1]]&&o.views[i[1]].map;if(!a)return r(ee(U,o.views?"missing json key: "+i[1]:"missing json key: views"));t.filter=ue(["return function(doc) {",' "use strict";'," var emitted = false;"," var emit = function (a, b) {"," emitted = true;"," };"," var view = "+a+";"," view(doc);"," if (emitted) {"," return true;"," }","};"].join("\n"),{}),e.doChanges(t)}))}else if(t.selector)t.filter=function(e){return function(e,t){if("object"!=typeof t)throw new Error("Selector error: expected a JSON object");var r=at([{doc:e}],{selector:t=rt(t)},Object.keys(t));return r&&1===r.length}(e,t.selector)},e.doChanges(t);else{var o=ae(t.filter);e.db.get("_design/"+o[0],(function(n,i){if(e.isCancelled)return r(null,{status:"cancelled"});if(n)return r(te(n));var a=i&&i.filters&&i.filters[o[1]];if(!a)return r(ee(U,i&&i.filters?"missing json key: "+o[1]:"missing json key: filters"));t.filter=ue('"use strict";\nreturn '+a+";",{}),e.doChanges(t)}))}}function bt(e){return e.reduce((function(e,t){return e[t]=!0,e}),{})}He.plugin((function(e){e._changesFilterPlugin={validate:pt,normalize:yt,shouldFilter:gt,filter:vt}})),He.version="9.0.0";var _t=bt(["_id","_rev","_access","_attachments","_deleted","_revisions","_revs_info","_conflicts","_deleted_conflicts","_local_seq","_rev_tree","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats","_removed"]),mt=bt(["_access","_attachments","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats"]);function wt(e){if(!/^\d+-/.test(e))return ee(X);var t=e.indexOf("-"),r=e.substring(0,t),n=e.substring(t+1);return{prefix:parseInt(r,10),id:n}}function kt(e,t,r){var n,i,o;r||(r={deterministic_revs:!0});var a={status:"available"};if(e._deleted&&(a.deleted=!0),t)if(e._id||(e._id=be()),i=ve(e,r.deterministic_revs),e._rev){if((o=wt(e._rev)).error)return o;e._rev_tree=[{pos:o.prefix,ids:[o.id,{status:"missing"},[[i,a,[]]]]}],n=o.prefix+1}else e._rev_tree=[{pos:1,ids:[i,a,[]]}],n=1;else if(e._revisions&&(e._rev_tree=function(e,t){for(var r=e.start-e.ids.length+1,n=e.ids,i=[n[0],t,[]],o=1,a=n.length;o<a;o++)i=[n[o],{status:"missing"},[i]];return[{pos:r,ids:i}]}(e._revisions,a),n=e._revisions.start,i=e._revisions.ids[0]),!e._rev_tree){if((o=wt(e._rev)).error)return o;n=o.prefix,i=o.id,e._rev_tree=[{pos:n,ids:[i,a,[]]}]}ie(e._id),e._rev=n+"-"+i;var s={metadata:{},data:{}};for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var c="_"===u[0];if(c&&!_t[u]){var f=ee(J,u);throw f.message=J.message+": "+u,f}c&&!mt[u]?s.metadata[u.slice(1)]=e[u]:s.data[u]=e[u]}return s}function Et(e,t,r,n,i,o,a,s){if(function(e,t){for(var r,n=e.slice(),i=t.split("-"),o=parseInt(i[0],10),a=i[1];r=n.pop();){if(r.pos===o&&r.ids[0]===a)return!0;for(var s=r.ids[2],u=0,c=s.length;u<c;u++)n.push({pos:r.pos+1,ids:s[u]})}return!1}(t.rev_tree,r.metadata.rev)&&!s)return n[i]=r,o();var u=t.winningRev||_e(t),c="deleted"in t?t.deleted:Pe(t,u),f="deleted"in r.metadata?r.metadata.deleted:Pe(r.metadata),l=/^1-/.test(r.metadata.rev);if(c&&!f&&s&&l){var h=r.data;h._rev=u,h._id=r.metadata.id,r=kt(h,s)}var d=Te(t.rev_tree,r.metadata.rev_tree[0],e);if(s&&(c&&f&&"new_leaf"!==d.conflicts||!c&&"new_leaf"!==d.conflicts||c&&!f&&"new_branch"===d.conflicts)){var p=ee(F);return n[i]=p,o()}var y=r.metadata.rev;r.metadata.rev_tree=d.tree,r.stemmedRevs=d.stemmedRevs||[],t.rev_map&&(r.metadata.rev_map=t.rev_map);var g=_e(r.metadata),v=Pe(r.metadata,g),b=c===v?0:c<v?-1:1;a(r,g,v,y===g?v:Pe(r.metadata,y),!0,b,i,o)}function St(e,t,r,n,i,o,a,s,u){e=e||1e3;var c=s.new_edits,f=new Map,l=0,h=t.length;function d(){++l===h&&u&&u()}t.forEach((function(e,t){if(e._id&&Le(e._id)){var n=e._deleted?"_removeLocal":"_putLocal";r[n](e,{ctx:i},(function(e,r){o[t]=e||r,d()}))}else{var a=e.metadata.id;f.has(a)?(h--,f.get(a).push([e,t])):f.set(a,[[e,t]])}})),f.forEach((function(t,r){var i=0;function u(){++i<t.length?f():d()}function f(){var f=t[i],l=f[0],h=f[1];if(n.has(r))Et(e,n.get(r),l,o,h,u,a,c);else{var d=Te([],l.metadata.rev_tree[0],e);l.metadata.rev_tree=d.tree,l.stemmedRevs=d.stemmedRevs||[],function(e,t,r){var n=_e(e.metadata),i=Pe(e.metadata,n);if("was_delete"in s&&i)return o[t]=ee(U,"deleted"),r();if(c&&function(e){return"missing"===e.metadata.rev_tree[0].ids[1].status}(e)){var u=ee(F);return o[t]=u,r()}a(e,n,i,i,!1,i?0:1,t,r)}(l,h,u)}}f()}))}function xt(e,t){return fe([new Uint8Array(e)],{type:t})}function jt(e,t){var r=t.prefix()[0],n=e._cache,i=n.get(r);return i||(i=new Map,n.set(r,i)),i}class Ot{constructor(){this._batch=[],this._cache=new Map}get(e,t,r){var n=jt(this,e),i=n.get(t);return i?I((function(){r(null,i)})):null===i?I((function(){r({name:"NotFoundError"})})):void e.get(t,(function(e,i){if(e)return"NotFoundError"===e.name&&n.set(t,null),r(e);n.set(t,i),r(null,i)}))}batch(e){for(var t=0,r=e.length;t<r;t++){var n=e[t],i=jt(this,n.prefix);"put"===n.type?i.set(n.key,n.value):i.set(n.key,null)}this._batch=this._batch.concat(e)}execute(e,t){for(var r=new Set,n=[],i=this._batch.length-1;i>=0;i--){var o=this._batch[i],a=o.prefix.prefix()[0]+"\xff"+o.key;r.has(a)||(r.add(a),n.push(o))}e.batch(n,t)}}var At=new Map,Rt={encode:function(e){try{return JSON.stringify(e)}catch(t){return h.stringify(e)}},decode:function(e){try{return JSON.parse(e)}catch(t){return h.parse(e)}},buffer:!1,type:"cheap-json"},Mt=new class extends f{constructor(){super(),this._listeners={},C()&&addEventListener("storage",e=>{this.emit(e.key)})}addListener(e,t,r,n){if(!this._listeners[t]){var i=!1,o=this;this._listeners[t]=a,this.on(e,a)}function a(){if(o._listeners[t])if(i)i="waiting";else{i=!0;var e=M(n,["style","include_docs","attachments","conflicts","filter","doc_ids","view","since","query_params","binary","return_docs"]);r.changes(e).on("change",(function(e){e.seq>n.since&&!n.cancelled&&(n.since=e.seq,n.onChange(e))})).on("complete",(function(){"waiting"===i&&I(a),i=!1})).on("error",(function(){i=!1}))}}}removeListener(e,t){t in this._listeners&&(super.removeListener(e,this._listeners[t]),delete this._listeners[t])}notifyLocalWindows(e){C()&&(localStorage[e]="a"===localStorage[e]?"b":"a")}notify(e){this.emit(e),this.notifyLocalWindows(e)}};function Tt(e){return"winningRev"in e?e.winningRev:_e(e)}function Bt(e,t){return"deleted"in e?e.deleted:Pe(e,t)}function Pt(e,t,r){var n=e.content_type;return new Promise((function(i,o){t.binaryStore.get(e.digest,(function(t,a){var s;if(t){if("NotFoundError"!==t.name)return o(t);s=r.binary?function(e,t){return fe([le(e)],{type:t})}("",n):""}else s=r.binary?xt(a,n):a.toString("base64");delete e.stub,delete e.length,e.data=s,i()}))}))}function Lt(e,t,r){var n=[];return e.forEach((function(e){e.doc&&e.doc._attachments&&Object.keys(e.doc._attachments).forEach((function(t){var r=e.doc._attachments[t];"data"in r||n.push(r)}))})),Promise.all(n.map((function(e){return Pt(e,t,r)})))}function Ct(e,r){e=O(e);var i,o,a=this,f={},l=e.revs_limit,h=e.name;void 0===e.createIfMissing&&(e.createIfMissing=!0);var d,p=e.db,y=ne(p);function g(){f.docStore=o.sublevel("document-store",{valueEncoding:Rt}),f.bySeqStore=o.sublevel("by-sequence",{valueEncoding:"json"}),f.attachmentStore=o.sublevel("attach-store",{valueEncoding:"json"}),f.binaryStore=o.sublevel("attach-binary-store",{valueEncoding:"binary"}),f.localStore=o.sublevel("local-store",{valueEncoding:"json"}),f.metaStore=o.sublevel("meta-store",{valueEncoding:"json"}),"object"==typeof e.migrate?e.migrate.doMigrationTwo(o,f,v):v()}function v(){f.metaStore.get("_local_last_update_seq",(function(e,t){void 0===o._updateSeq&&(o._updateSeq=t||0),f.metaStore.get("_local_doc_count",(function(e,t){o._docCount=e?0:t,f.metaStore.get("_local_uuid",(function(e,t){i=e?be():t,f.metaStore.put("_local_uuid",i,(function(){I((function(){r(null,a)}))}))}))}))}))}function b(e,t){try{e.apply(null,t)}catch(e){t[t.length-1](e)}}function _(){var e=o._queue.peekFront();"read"===e.type?function(e){var t=[e],r=1,n=o._queue.get(r);for(;void 0!==n&&"read"===n.type;)t.push(n),r++,n=o._queue.get(r);var i=0;t.forEach((function(e){var r=e.args,n=r[r.length-1];r[r.length-1]=function(...e){n.apply(null,e),++i===t.length&&I((function(){t.forEach((function(){o._queue.shift()})),o._queue.length&&_()}))},b(e.fun,r)}))}(e):function(e){var t=e.args,r=t[t.length-1];t[t.length-1]=function(...e){r.apply(null,e),I((function(){o._queue.shift(),o._queue.length&&_()}))},b(e.fun,t)}(e)}function m(e){return function(...t){o._queue.push({fun:e,args:t,type:"write"}),1===o._queue.length&&I(_)}}function w(e){return function(...t){o._queue.push({fun:e,args:t,type:"read"}),1===o._queue.length&&I(_)}}function k(e){return("0000000000000000"+e).slice(-16)}function E(e,t){"destroy"in p?p.destroy(e,t):t(null)}At.has(y)?d=At.get(y):(d=new Map,At.set(y,d)),d.has(h)?(o=d.get(h),g()):d.set(h,S(n(p(h),e,(function(t){if(t)return d.delete(h),r(t);(o=d.get(h))._docCount=-1,o._queue=new u,"object"==typeof e.migrate?e.migrate.doMigrationOne(h,o,g):g()})))),a._remote=!1,a.type=function(){return"leveldb"},a._id=function(e){e(null,i)},a._info=function(e){var t={doc_count:o._docCount,update_seq:o._updateSeq,backend_adapter:ne(p)};return I((function(){e(null,t)}))},a._get=w((function(e,t,r){t=O(t),f.docStore.get(e,(function(e,n){if(e||!n)return r(ee(U,"missing"));var i;if(t.rev)i=t.latest?function(e,t){for(var r,n=t.rev_tree.slice();r=n.pop();){var i=r.pos,o=r.ids,a=o[0],s=o[1],u=o[2],c=0===u.length,f=r.history?r.history.slice():[];if(f.push({id:a,pos:i,opts:s}),c)for(var l=0,h=f.length;l<h;l++){var d=f[l];if(d.pos+"-"+d.id===e)return i+"-"+a}for(var p=0,y=u.length;p<y;p++)n.push({pos:i+1,ids:u[p],history:f})}throw new Error("Unable to resolve latest revision for id "+t.id+", rev "+e)}(t.rev,n):t.rev;else if(i=Tt(n),Bt(n,i))return r(ee(U,"deleted"));var o=n.rev_map[i];f.bySeqStore.get(k(o),(function(e,t){if(!t)return r(ee(U));if("_id"in t&&t._id!==n.id)return r(new Error("wrong doc returned"));if(t._id=n.id,"_rev"in t){if(t._rev!==i)return r(new Error("wrong doc returned"))}else t._rev=i;return r(null,{doc:t,metadata:n})}))}))})),a._getAttachment=function(e,t,r,n,i){var o=r.digest,a=r.content_type;f.binaryStore.get(o,(function(e,t){if(e)return"NotFoundError"!==e.name?i(e):i(null,n.binary?function(e){return fe([""],{type:e})}(a):"");n.binary?i(null,xt(t,a)):i(null,t.toString("base64"))}))},a._bulkDocs=m((function(e,r,n){var i=r.new_edits,s=new Array(e.docs.length),u=new Map,d=new Map,p=new Ot,y=0,g=o._updateSeq,v=e.docs,b=v.map((function(e){if(e._id&&Le(e._id))return e;var t=kt(e,i,a.__opts);return t.metadata&&!t.metadata.rev_map&&(t.metadata.rev_map={}),t})),_=b.filter((function(e){return e.error}));if(_.length)return n(_[0]);function m(e,t){var r=Promise.resolve();e.forEach((function(e,t){r=r.then((function(){return new Promise((function(r,n){a._doCompactionNoLock(t,e,{ctx:p},(function(e){if(e)return n(e);r()}))}))}))})),r.then((function(){t()}),t)}function w(e){var t=new Map;u.forEach((function(e,r){t.set(r,function(e){var t=[];return me(e.rev_tree,(function(e,r,n,i,o){"available"!==o.status||e||(t.push(r+"-"+n),o.status="missing")})),t}(e))})),m(t,e)}function E(){m(d,(function(e){if(e&&O(e),a.auto_compaction)return w(O);O()}))}function S(e,r,i,o,a,l,h,v){y+=l;var b=null,_=0;e.metadata.winningRev=r,e.metadata.deleted=i,e.data._id=e.metadata.id,e.data._rev=e.metadata.rev,o&&(e.data._deleted=!0),e.stemmedRevs.length&&d.set(e.metadata.id,e.stemmedRevs);var m,w,E,S=e.data._attachments?Object.keys(e.data._attachments):[];function x(e){_++,b||(e?v(b=e):_===S.length&&P())}function O(e,r,n,i){return function(o){!function(e,r,n,i,o){var a=e.data._attachments[n];delete a.data,a.digest=r,a.length=i.length;var s=e.metadata.id,u=e.metadata.rev;a.revpos=parseInt(u,10),j(s,u,r,(function(e,n){return e||0===i.length?o(e):n?(p.batch([{type:"put",prefix:f.binaryStore,key:r,value:t.from(i,"binary")}]),void o()):o(e)}))}(e,"md5-"+o,r,n,i)}}function A(e,t,r){return function(n){!function(e,t){var r="string"==typeof e,n=r?e.length:e.size,i=Math.min(32768,n),o=Math.ceil(n/i),a=0,s=r?new c:new c.ArrayBuffer,u=r?ge:ye;function f(){de(h)}function l(){var e=pe(s.end(!0));t(e),s.destroy()}function h(){var t=a*i,r=t+i;a++,u(s,e,t,r,a<o?f:l)}h()}(n,O(e,t,n,r))}}for(var R=0;R<S.length;R++){var M,T=S[R],B=e.data._attachments[T];if(B.stub)j(e.data._id,e.data._rev,B.digest,x);else if("string"==typeof B.data){try{E=B.data,M=atob(E)}catch(e){return void n(ee(H,"Attachment is not a valid base64 string"))}A(e,T,x)(M)}else m=B.data,w=A(e,T,x),he(m,w)}function P(){var t=e.metadata.rev_map[e.metadata.rev];if(t)return v();t=++g,e.metadata.rev_map[e.metadata.rev]=e.metadata.seq=t;var r=[{key:k(t),value:e.data,prefix:f.bySeqStore,type:"put"},{key:e.metadata.id,value:e.metadata,prefix:f.docStore,type:"put"}];p.batch(r),s[h]={ok:!0,id:e.metadata.id,rev:e.metadata.rev},u.set(e.metadata.id,e.metadata),v()}S.length||P()}var x={};function j(e,t,r,n){function i(n){var i=[e,t].join("@"),o={};return n?n.refs&&(o.refs=n.refs,o.refs[i]=!0):(o.refs={},o.refs[i]=!0),new Promise((function(e){p.batch([{type:"put",prefix:f.attachmentStore,key:r,value:o}]),e(!n)}))}var o=x[r]||Promise.resolve();x[r]=o.then((function(){return new Promise((function(e,t){p.get(f.attachmentStore,r,(function(r,n){if(r&&"NotFoundError"!==r.name)return t(r);e(n)}))})).then(i).then((function(e){n(null,e)}),n)}))}function O(e){if(e)return I((function(){n(e)}));p.batch([{prefix:f.metaStore,type:"put",key:"_local_last_update_seq",value:g},{prefix:f.metaStore,type:"put",key:"_local_doc_count",value:o._docCount+y}]),p.execute(o,(function(e){if(e)return n(e);o._docCount+=y,o._updateSeq=g,Mt.notify(h),I((function(){n(null,s)}))}))}if(!b.length)return n(null,[]);!function(e){var t=[];if(v.forEach((function(e){e&&e._attachments&&Object.keys(e._attachments).forEach((function(r){var n=e._attachments[r];n.stub&&t.push(n.digest)}))})),!t.length)return e();var r,n=0;t.forEach((function(i){!function(e,t){p.get(f.attachmentStore,e,(function(r){if(r){var n=ee(Z,"unknown stub attachment with digest "+e);t(n)}else t()}))}(i,(function(i){i&&!r&&(r=i),++n===t.length&&e(r)}))}))}((function(e){if(e)return n(e);!function(e){var t,r=0;function n(){if(++r===v.length)return e(t)}v.forEach((function(e){if(e._id&&Le(e._id))return n();p.get(f.docStore,e._id,(function(r,i){r?"NotFoundError"!==r.name&&(t=r):u.set(e._id,i),n()}))}))}((function(e){if(e)return n(e);St(l,b,a,u,p,s,S,r,E)}))}))})),a._allDocs=function(e,t){return"keys"in e?function(e,t){var r=t.keys,n={offset:t.skip};return Promise.all(r.map((function(r){var i=Object.assign({key:r,deleted:"ok"},t);return["limit","skip","keys"].forEach((function(e){delete i[e]})),new Promise((function(o,a){e._allDocs(i,(function(e,i){if(e)return a(e);t.update_seq&&void 0!==i.update_seq&&(n.update_seq=i.update_seq),n.total_rows=i.total_rows,o(i.rows[0]||{key:r,error:"not_found"})}))}))}))).then((function(e){return n.rows=e,n}))}(this,e):w((function(e,t){e=O(e),function(e){o.isClosed()?e(new Error("database is closed")):e(null,o._docCount)}((function(r,n){if(r)return t(r);var i,a={},u=e.skip||0;if(e.startkey&&(a.gte=e.startkey),e.endkey&&(a.lte=e.endkey),e.key&&(a.gte=a.lte=e.key),e.descending){a.reverse=!0;var c=a.lte;a.lte=a.gte,a.gte=c}if("number"==typeof e.limit&&(i=e.limit),0===i||"gte"in a&&"lte"in a&&a.gte>a.lte){var l={total_rows:n,offset:e.skip,rows:[]};return e.update_seq&&(l.update_seq=o._updateSeq),t(null,l)}var h=[],d=f.docStore.readStream(a),p=s.obj((function(t,r,n){var o=t.value,a=Tt(o),s=Bt(o,a);if(s){if("ok"!==e.deleted)return void n()}else{if(u-- >0)return void n();if("number"==typeof i&&i--<=0)return d.unpipe(),d.destroy(),void n()}function c(t){var r={id:o.id,key:o.id,value:{rev:a}};if(e.include_docs){if(r.doc=t,r.doc._rev=r.value.rev,e.conflicts){var i=Ee(o);i.length&&(r.doc._conflicts=i)}for(var u in r.doc._attachments)Object.prototype.hasOwnProperty.call(r.doc._attachments,u)&&(r.doc._attachments[u].stub=!0)}if(!1===e.inclusive_end&&o.id===e.endkey)return n();if(s){if("ok"!==e.deleted)return n();r.value.deleted=!0,r.doc=null}h.push(r),n()}if(e.include_docs){var l=o.rev_map[a];f.bySeqStore.get(k(l),(function(e,t){c(t)}))}else c()}),(function(r){Promise.resolve().then((function(){if(e.include_docs&&e.attachments)return Lt(h,f,e)})).then((function(){var r={total_rows:n,offset:e.skip,rows:h};e.update_seq&&(r.update_seq=o._updateSeq),t(null,r)}),t),r()})).on("unpipe",(function(){p.end()}));d.on("error",t),d.pipe(p)}))}))(e,t)},a._changes=function(e){if((e=O(e)).continuous){var t=h+":"+be();return Mt.addListener(h,t,a,e),Mt.notify(h),{cancel:function(){Mt.removeListener(h,t)}}}var r,n=e.descending,i=[],u=e.since||0,c=0,l={reverse:n};"limit"in e&&e.limit>0&&(r=e.limit),l.reverse||(l.start=k(e.since||0));var d=e.doc_ids&&new Set(e.doc_ids),p=re(e),y=new Map;function g(){e.done=!0,e.return_docs&&e.limit&&e.limit<i.length&&(i.length=e.limit),v.unpipe(b),v.destroy(),e.continuous||e.cancelled||(e.include_docs&&e.attachments&&e.return_docs?Lt(i,f,e).then((function(){e.complete(null,{results:i,last_seq:u})})):e.complete(null,{results:i,last_seq:u}))}var v=f.bySeqStore.readStream(l),b=s.obj((function(t,a,s){if(r&&c>=r)return g(),s();if(e.cancelled||e.done)return s();var l,h,v=(l=t.key,parseInt(l,10)),b=t.value;if(v===e.since&&!n)return s();if(d&&!d.has(b._id))return s();function _(t){var r=Tt(t);function n(r){var n=e.processChange(r,t,e);n.seq=t.seq;var o=p(n);if("object"==typeof o)return e.complete(o);o&&(c++,e.attachments&&e.include_docs?Lt([n],f,e).then((function(){e.onChange(n)})):e.onChange(n),e.return_docs&&i.push(n)),s()}if(t.seq!==v)return s();if(u=v,r===b._rev)return n(b);var o=t.rev_map[r];f.bySeqStore.get(k(o),(function(e,t){n(t)}))}if(h=y.get(b._id))return _(h);f.docStore.get(b._id,(function(t,r){if(e.cancelled||e.done||o.isClosed()||Le(r.id))return s();y.set(b._id,r),_(r)}))}),(function(t){if(e.cancelled)return t();e.return_docs&&e.limit&&e.limit<i.length&&(i.length=e.limit),t()})).on("unpipe",(function(){b.end(),g()}));return v.pipe(b),{cancel:function(){e.cancelled=!0,g()}}},a._close=function(e){if(o.isClosed())return e(ee(K));o.close((function(t){if(t)e(t);else{d.delete(h);var r=ne(p),n=At.get(r),i=He.prefix+h+"-mrview-";[...n.keys()].filter(e=>e.includes(i)).forEach(e=>{var t=n.get(e);t.removeAllListeners(),t.close(),n.delete(e)}),e()}}))},a._getRevisionTree=function(e,t){f.docStore.get(e,(function(e,r){e?t(ee(U)):t(null,r.rev_tree)}))},a._doCompaction=m((function(e,t,r,n){a._doCompactionNoLock(e,t,r,n)})),a._doCompactionNoLock=function(e,t,r,n){if("function"==typeof r&&(n=r,r={}),!t.length)return n();var i=r.ctx||new Ot;i.get(f.docStore,e,(function(a,s){if(a)return n(a);var u=t.map((function(e){var t=s.rev_map[e];return delete s.rev_map[e],t}));me(s.rev_tree,(function(e,r,n,i,o){var a=r+"-"+n;-1!==t.indexOf(a)&&(o.status="missing")}));var c=[];c.push({key:s.id,value:s,type:"put",prefix:f.docStore});var l,h={},d=0;function p(r){if(r&&(l=r),++d===t.length){if(l)return n(l);!function(){var r=Object.keys(h);if(!r.length)return y();var n,o=0;function a(e){e&&(n=e),++o===r.length&&y(n)}var s=new Map;t.forEach((function(t){s.set(e+"@"+t,!0)})),r.forEach((function(e){i.get(f.attachmentStore,e,(function(t,r){if(t)return"NotFoundError"===t.name?a():a(t);var n=Object.keys(r.refs||{}).filter((function(e){return!s.has(e)})),i={};n.forEach((function(e){i[e]=!0})),n.length?c.push({key:e,type:"put",value:{refs:i},prefix:f.attachmentStore}):c=c.concat([{key:e,type:"del",prefix:f.attachmentStore},{key:e,type:"del",prefix:f.binaryStore}]),a()}))}))}()}}function y(e){return e?n(e):(i.batch(c),r.ctx?n():void i.execute(o,n))}u.forEach((function(e){c.push({key:k(e),type:"del",prefix:f.bySeqStore}),i.get(f.bySeqStore,k(e),(function(e,t){if(e)return"NotFoundError"===e.name?p():p(e);Object.keys(t._attachments||{}).forEach((function(e){var r=t._attachments[e].digest;h[r]=!0})),p()}))}))}))},a._getLocal=function(e,t){f.localStore.get(e,(function(e,r){e?t(ee(U)):t(null,r)}))},a._putLocal=function(e,t,r){"function"==typeof t&&(r=t,t={}),t.ctx?a._putLocalNoLock(e,t,r):a._putLocalWithLock(e,t,r)},a._putLocalWithLock=m((function(e,t,r){a._putLocalNoLock(e,t,r)})),a._putLocalNoLock=function(e,t,r){delete e._revisions;var n=e._rev,i=e._id,a=t.ctx||new Ot;a.get(f.localStore,i,(function(s,u){if(s&&n)return r(ee(F));if(u&&u._rev!==n)return r(ee(F));e._rev=n?"0-"+(parseInt(n.split("-")[1],10)+1):"0-1";var c=[{type:"put",prefix:f.localStore,key:i,value:e}];a.batch(c);var l={ok:!0,id:e._id,rev:e._rev};if(t.ctx)return r(null,l);a.execute(o,(function(e){if(e)return r(e);r(null,l)}))}))},a._removeLocal=function(e,t,r){"function"==typeof t&&(r=t,t={}),t.ctx?a._removeLocalNoLock(e,t,r):a._removeLocalWithLock(e,t,r)},a._removeLocalWithLock=m((function(e,t,r){a._removeLocalNoLock(e,t,r)})),a._removeLocalNoLock=function(e,t,r){var n=t.ctx||new Ot;n.get(f.localStore,e._id,(function(i,a){if(i)return"NotFoundError"!==i.name?r(i):r(ee(U));if(a._rev!==e._rev)return r(ee(F));n.batch([{prefix:f.localStore,type:"del",key:e._id}]);var s={ok:!0,id:e._id,rev:"0-0"};if(t.ctx)return r(null,s);n.execute(o,(function(e){if(e)return r(e);r(null,s)}))}))},a._destroy=function(e,t){var r,n=ne(p);if(!At.has(n))return E(h,t);(r=At.get(n)).has(h)?(Mt.removeAllListeners(h),r.get(h).close((function(){r.delete(h),E(h,t)}))):E(h,t)}}function It(e,t){var r=Object.assign({db:d},e);Ct.call(this,r,t)}It.valid=function(){return!0},It.use_prefix=!1,"undefined"==typeof PouchDB?D("error",'memory adapter plugin error: Cannot find global "PouchDB" object! Did you remember to include pouchdb.js?'):PouchDB.plugin((function(e){e.adapter("memory",It,!0)}))}).call(this)}).call(this,e("buffer").Buffer)},{buffer:4,"double-ended-queue":22,events:33,"level-codec":48,levelup:70,ltgt:72,memdown:74,"readable-stream":101,"spark-md5":104,through2:138,uuid:144,vuvuzela:159}]},{},[162]);
|
40 | //# sourceMappingURL=pouchdb.memory.min.js.map |
\ | No newline at end of file |