UNPKG

227 kBJavaScriptView Raw
1// PouchDB in-memory plugin 7.1.1
2// Based on MemDOWN: https://github.com/rvagg/memdown
3//
4// (c) 2012-2019 Dale Harvey and the PouchDB team
5// PouchDB may be freely distributed under the Apache license, version 2.0.
6// For all details and documentation:
7// http://pouchdb.com
8!function o(a,s,u){function f(t,e){if(!s[t]){if(!a[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(c)return c(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var i=s[t]={exports:{}};a[t][0].call(i.exports,function(e){return f(a[t][1][e]||e)},i,i.exports,o,a,s,u)}return s[t].exports}for(var c="function"==typeof require&&require,e=0;e<u.length;e++)f(u[e]);return f}({1:[function(e,t,n){"use strict";t.exports=function(r){return function(){var e=arguments.length;if(e){for(var t=[],n=-1;++n<e;)t[n]=arguments[n];return r.call(this,t)}return r.call(this,[])}}},{}],2:[function(E,k,e){(function(t){"use strict";var e=E(69);function o(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0}function a(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var c=E(5),r=Object.prototype.hasOwnProperty,l=Array.prototype.slice,n="foo"===function(){}.name;function s(e){return Object.prototype.toString.call(e)}function u(e){return!a(e)&&("function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}var f=k.exports=y,i=/\s*function\s+([^\(\s]*)\s*/;function h(e){if(c.isFunction(e)){if(n)return e.name;var t=e.toString().match(i);return t&&t[1]}}function d(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function p(e){if(n||!c.isFunction(e))return c.inspect(e);var t=h(e);return"[Function"+(t?": "+t:"")+"]"}function g(e,t,n,r,i){throw new f.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function y(e,t){e||g(e,!0,t,"==",f.ok)}function v(e,t,n,r){if(e===t)return!0;if(a(e)&&a(t))return 0===o(e,t);if(c.isDate(e)&&c.isDate(t))return e.getTime()===t.getTime();if(c.isRegExp(e)&&c.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(u(e)&&u(t)&&s(e)===s(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===o(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(a(e)!==a(t))return!1;var i=(r=r||{actual:[],expected:[]}).actual.indexOf(e);return-1!==i&&i===r.expected.indexOf(t)||(r.actual.push(e),r.expected.push(t),function(e,t,n,r){if(null==e||null==t)return!1;if(c.isPrimitive(e)||c.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=b(e),o=b(t);if(i&&!o||!i&&o)return!1;if(i)return e=l.call(e),t=l.call(t),v(e,t,n);var a,s,u=w(e),f=w(t);if(u.length!==f.length)return!1;for(u.sort(),f.sort(),s=u.length-1;0<=s;s--)if(u[s]!==f[s])return!1;for(s=u.length-1;0<=s;s--)if(a=u[s],!v(e[a],t[a],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function b(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function _(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 m(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&g(i,n,"Missing expected exception"+r);var o="string"==typeof r,a=!e&&i&&!n;if((!e&&c.isError(i)&&o&&_(i,n)||a)&&g(i,n,"Got unwanted exception"+r),e&&i&&n&&!_(i,n)||!e&&i)throw i}f.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 d(p(e.actual),128)+" "+e.operator+" "+d(p(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=h(t),o=r.indexOf("\n"+i);if(0<=o){var a=r.indexOf("\n",o+1);r=r.substring(a+1)}this.stack=r}}},c.inherits(f.AssertionError,Error),f.fail=g,f.ok=y,f.equal=function(e,t,n){e!=t&&g(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&g(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){v(e,t,!1)||g(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){v(e,t,!0)||g(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){v(e,t,!1)&&g(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){v(t,n,!0)&&g(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&g(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&g(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){m(!0,e,t,n)},f.doesNotThrow=function(e,t,n){m(!1,e,t,n)},f.ifError=function(e){if(e)throw e},f.strict=e(function e(t,n){t||g(t,!0,n,"==",e)},f,{equal:f.strictEqual,deepEqual:f.deepStrictEqual,notEqual:f.notStrictEqual,notDeepEqual:f.notDeepStrictEqual}),f.strict.strict=f.strict;var w=Object.keys||function(e){var t=[];for(var n in e)r.call(e,n)&&t.push(n);return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{5:5,69:69}],3:[function(e,t,n){"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;function n(){}n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],4:[function(e,t,n){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],5:[function(R,e,O){(function(r,i){var s=/%[sdj%]/g;O.format=function(e){if(!_(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(u(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,o=String(e).replace(s,function(e){if("%%"===e)return"%";if(i<=n)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),a=r[n];n<i;a=r[++n])v(a)||!c(a)?o+=" "+a:o+=" "+u(a);return o},O.deprecate=function(e,t){if(m(i.process))return function(){return O.deprecate(e,t).apply(this,arguments)};if(!0===r.noDeprecation)return e;var n=!1;return function(){if(!n){if(r.throwDeprecation)throw new Error(t);r.traceDeprecation?console.trace(t):console.error(t),n=!0}return e.apply(this,arguments)}};var e,o={};function u(e,t){var n={seen:[],stylize:f};return 3<=arguments.length&&(n.depth=arguments[2]),4<=arguments.length&&(n.colors=arguments[3]),y(t)?n.showHidden=t:t&&O._extend(n,t),m(n.showHidden)&&(n.showHidden=!1),m(n.depth)&&(n.depth=2),m(n.colors)&&(n.colors=!1),m(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),h(n,e,n.depth)}function a(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function f(e,t){return e}function h(t,n,r){if(t.customInspect&&n&&S(n.inspect)&&n.inspect!==O.inspect&&(!n.constructor||n.constructor.prototype!==n)){var e=n.inspect(r,t);return _(e)||(e=h(t,e,r)),e}var i=function(e,t){if(m(t))return e.stylize("undefined","undefined");if(_(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(b(t))return e.stylize(""+t,"number");if(y(t))return e.stylize(""+t,"boolean");if(v(t))return e.stylize("null","null")}(t,n);if(i)return i;var o=Object.keys(n),a=function(e){var t={};return e.forEach(function(e){t[e]=!0}),t}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(n)),k(n)&&(0<=o.indexOf("message")||0<=o.indexOf("description")))return d(n);if(0===o.length){if(S(n)){var s=n.name?": "+n.name:"";return t.stylize("[Function"+s+"]","special")}if(w(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return t.stylize(Date.prototype.toString.call(n),"date");if(k(n))return d(n)}var u,f="",c=!1,l=["{","}"];g(n)&&(c=!0,l=["[","]"]),S(n)&&(f=" [Function"+(n.name?": "+n.name:"")+"]");return w(n)&&(f=" "+RegExp.prototype.toString.call(n)),E(n)&&(f=" "+Date.prototype.toUTCString.call(n)),k(n)&&(f=" "+d(n)),0!==o.length||c&&0!=n.length?r<0?w(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),u=c?function(t,n,r,i,e){for(var o=[],a=0,s=n.length;a<s;++a)x(n,String(a))?o.push(p(t,n,r,i,String(a),!0)):o.push("");return e.forEach(function(e){e.match(/^\d+$/)||o.push(p(t,n,r,i,e,!0))}),o}(t,n,r,a,o):o.map(function(e){return p(t,n,r,a,e,c)}),t.seen.pop(),function(e,t,n){if(60<e.reduce(function(e,t){return 0,0<=t.indexOf("\n")&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0))return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(u,f,l)):l[0]+f+l[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,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")),x(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?-1<(s=v(n)?h(e,u.value,null):h(e,u.value,n-1)).indexOf("\n")&&(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")),m(a)){if(o&&i.match(/^\d+$/))return s;a=(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),e.stylize(a,"string"))}return a+": "+s}function g(e){return Array.isArray(e)}function y(e){return"boolean"==typeof e}function v(e){return null===e}function b(e){return"number"==typeof e}function _(e){return"string"==typeof e}function m(e){return void 0===e}function w(e){return c(e)&&"[object RegExp]"===t(e)}function c(e){return"object"==typeof e&&null!==e}function E(e){return c(e)&&"[object Date]"===t(e)}function k(e){return c(e)&&("[object Error]"===t(e)||e instanceof Error)}function S(e){return"function"==typeof e}function t(e){return Object.prototype.toString.call(e)}function n(e){return e<10?"0"+e.toString(10):e.toString(10)}O.debuglog=function(t){if(m(e)&&(e=r.env.NODE_DEBUG||""),t=t.toUpperCase(),!o[t])if(new RegExp("\\b"+t+"\\b","i").test(e)){var n=r.pid;o[t]=function(){var e=O.format.apply(O,arguments);console.error("%s %d: %s",t,n,e)}}else o[t]=function(){};return o[t]},(O.inspect=u).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]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},O.isArray=g,O.isBoolean=y,O.isNull=v,O.isNullOrUndefined=function(e){return null==e},O.isNumber=b,O.isString=_,O.isSymbol=function(e){return"symbol"==typeof e},O.isUndefined=m,O.isRegExp=w,O.isObject=c,O.isDate=E,O.isError=k,O.isFunction=S,O.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},O.isBuffer=R(4);var l=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function x(e,t){return Object.prototype.hasOwnProperty.call(e,t)}O.log=function(){console.log("%s - %s",function(){var e=new Date,t=[n(e.getHours()),n(e.getMinutes()),n(e.getSeconds())].join(":");return[e.getDate(),l[e.getMonth()],t].join(" ")}(),O.format.apply(O,arguments))},O.inherits=R(3),O._extend=function(e,t){if(!t||!c(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,R(71),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{3:3,4:4,71:71}],6:[function(e,t,n){"use strict";n.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return 3*(n+r)/4-r},n.toByteArray=function(e){for(var t,n=l(e),r=n[0],i=n[1],o=new c(function(e,t,n){return 3*(t+n)/4-n}(0,r,i)),a=0,s=0<i?r-4:r,u=0;u<s;u+=4)t=f[e.charCodeAt(u)]<<18|f[e.charCodeAt(u+1)]<<12|f[e.charCodeAt(u+2)]<<6|f[e.charCodeAt(u+3)],o[a++]=t>>16&255,o[a++]=t>>8&255,o[a++]=255&t;2===i&&(t=f[e.charCodeAt(u)]<<2|f[e.charCodeAt(u+1)]>>4,o[a++]=255&t);1===i&&(t=f[e.charCodeAt(u)]<<10|f[e.charCodeAt(u+1)]<<4|f[e.charCodeAt(u+2)]>>2,o[a++]=t>>8&255,o[a++]=255&t);return o},n.fromByteArray=function(e){for(var t,n=e.length,r=n%3,i=[],o=0,a=n-r;o<a;o+=16383)i.push(u(e,o,a<o+16383?a:o+16383));1==r?(t=e[n-1],i.push(s[t>>2]+s[t<<4&63]+"==")):2==r&&(t=(e[n-2]<<8)+e[n-1],i.push(s[t>>10]+s[t>>4&63]+s[t<<2&63]+"="));return i.join("")};for(var s=[],f=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,o=r.length;i<o;++i)s[i]=r[i],f[r.charCodeAt(i)]=i;function l(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var r,i,o=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(s[(i=r)>>18&63]+s[i>>12&63]+s[i>>6&63]+s[63&i]);return o.join("")}f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63},{}],7:[function(e,t,n){},{}],8:[function(e,t,n){(function(i){var r=Object.prototype.toString,o="function"==typeof i.alloc&&"function"==typeof i.allocUnsafe&&"function"==typeof i.from;t.exports=function(e,t,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return function(e){return"ArrayBuffer"===r.call(e).slice(8,-1)}(e)?function(e,t,n){t>>>=0;var r=e.byteLength-t;if(r<0)throw new RangeError("'offset' is out of bounds");if(void 0===n)n=r;else if(r<(n>>>=0))throw new RangeError("'length' is out of bounds");return o?i.from(e.slice(t,t+n)):new i(new Uint8Array(e.slice(t,t+n)))}(e,t,n):"string"==typeof e?function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!i.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');return o?i.from(e,t):new i(e,t)}(e,t):o?i.from(e):new i(e)}}).call(this,e(9).Buffer)},{9:9}],9:[function(e,t,q){(function(l){"use strict";var r=e(6),o=e(23);q.Buffer=l,q.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},q.INSPECT_MAX_BYTES=50;var n=2147483647;function a(e){if(n<e)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=l.prototype,t}function l(e,t,n){if("number"!=typeof e)return i(e,t,n);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}function i(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|h(e,t),r=a(n),i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return f(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(C(e,ArrayBuffer)||e&&C(e.buffer,ArrayBuffer))return function(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n);return r.__proto__=l.prototype,r}(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return l.from(r,t,n);var i=function(e){if(l.isBuffer(e)){var t=0|c(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||N(e.length)?a(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 l.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function s(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 u(e){return s(e),a(e<0?0:0|c(e))}function f(e){for(var t=e.length<0?0:0|c(e.length),n=a(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function c(e){if(n<=e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|e}function h(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||C(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 n=e.length,r=2<arguments.length&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return M(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return j(e).length;default:if(i)return r?-1:M(e).length;t=(""+t).toLowerCase(),i=!0}}function d(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function p(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):2147483647<n?n=2147483647:n<-2147483648&&(n=-2147483648),N(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,i){var o,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s/=a=2,u/=2,n/=2}function f(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=n;o<s;o++)if(f(e,o)===f(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(s<n+u&&(n=s-u),o=n;0<=o;o--){for(var l=!0,h=0;h<u;h++)if(f(e,o+h)!==f(t,h)){l=!1;break}if(l)return o}return-1}function y(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?i<(r=Number(r))&&(r=i):r=i;var o=t.length;o/2<r&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(N(s))return a;e[n+a]=s}return a}function v(e,t,n,r){return L(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function b(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function _(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,u,f=e[i],c=null,l=239<f?4:223<f?3:191<f?2:1;if(i+l<=n)switch(l){case 1:f<128&&(c=f);break;case 2:128==(192&(o=e[i+1]))&&127<(u=(31&f)<<6|63&o)&&(c=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&2047<(u=(15&f)<<12|(63&o)<<6|63&a)&&(u<55296||57343<u)&&(c=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)&&65535<(u=(15&f)<<18|(63&o)<<12|(63&a)<<6|63&s)&&u<1114112&&(c=u)}null===c?(c=65533,l=1):65535<c&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=l}return function(e){var t=e.length;if(t<=m)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=m));return n}(r)}q.kMaxLength=n,(l.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}())||"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(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),l.poolSize=8192,l.from=function(e,t,n){return i(e,t,n)},l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,l.alloc=function(e,t,n){return function(e,t,n){return s(e),e<=0?a(e):void 0!==t?"string"==typeof n?a(e).fill(t,n):a(e).fill(t):a(e)}(e,t,n)},l.allocUnsafe=function(e){return u(e)},l.allocUnsafeSlow=function(e){return u(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(C(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),C(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},l.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}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var n;if(void 0===t)for(n=t=0;n<e.length;++n)t+=e[n].length;var r=l.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(C(o,Uint8Array)&&(o=l.from(o)),!l.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},l.byteLength=h,l.prototype._isBuffer=!0,l.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)d(this,t,t+1);return this},l.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)d(this,t,t+3),d(this,t+1,t+2);return this},l.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)d(this,t,t+7),d(this,t+1,t+6),d(this,t+2,t+5),d(this,t+3,t+4);return this},l.prototype.toLocaleString=l.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?_(this,0,e):function(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,n);case"utf8":case"utf-8":return _(this,t,n);case"ascii":return w(this,t,n);case"latin1":case"binary":return E(this,t,n);case"base64":return b(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",t=q.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},l.prototype.compare=function(e,t,n,r,i){if(C(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.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===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(i<=r&&n<=t)return 0;if(i<=r)return-1;if(n<=t)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),u=this.slice(r,i),f=e.slice(t,n),c=0;c<s;++c)if(u[c]!==f[c]){o=u[c],a=f[c];break}return o<a?-1:a<o?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return p(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return p(this,e,t,n,!1)},l.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||i<n)&&(n=i),0<e.length&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o,a,s,u,f,c,l,h,d,p=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return h=t,d=n,L(M(e,(l=this).length-h),l,h,d);case"ascii":return v(this,e,t,n);case"latin1":case"binary":return v(this,e,t,n);case"base64":return u=this,f=t,c=n,L(j(e),u,f,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a=t,s=n,L(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,(o=this).length-a),o,a,s);default:if(p)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),p=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var m=4096;function w(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function E(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function k(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||r<n)&&(n=r);for(var i="",o=t;o<n;++o)i+=B(e[o]);return i}function S(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function x(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(n<e+t)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(i<t||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function O(e,t,n,r){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function T(e,t,n,r,i){return t=+t,n>>>=0,i||O(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function A(e,t,n,r,i){return t=+t,n>>>=0,i||O(e,0,n,8),o.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):n<e&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):n<t&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return r.__proto__=l.prototype,r},l.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||x(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},l.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||x(e,t,this.length);for(var r=this[e+--t],i=1;0<t&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||x(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return(i*=128)<=r&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||x(e,t,this.length);for(var r=t,i=1,o=this[e+--r];0<r&&(i*=256);)o+=this[e+--r]*i;return(i*=128)<=o&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||x(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||x(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return e>>>=0,t||x(e,4,this.length),o.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||x(e,4,this.length),o.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||x(e,8,this.length),o.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||x(e,8,this.length),o.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||R(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},l.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||R(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;0<=--i&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(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},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(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},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;0<=--o&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(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},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(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},l.prototype.writeFloatLE=function(e,t,n){return T(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return T(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return A(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return A(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),0<r&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i=r-n;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,n,r);else if(this===e&&n<t&&t<r)for(var o=i-1;0<=o;--o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,r),t);return i},l.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var i=e.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(e=i)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=l.isBuffer(e)?e:l.from(e,r),s=a.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=a[o%s]}return this};var t=/[^+/0-9A-Za-z-_]/g;function B(e){return e<16?"0"+e.toString(16):e.toString(16)}function M(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if(55295<(n=e.charCodeAt(a))&&n<57344){if(!i){if(56319<n){-1<(t-=3)&&o.push(239,191,189);continue}if(a+1===r){-1<(t-=3)&&o.push(239,191,189);continue}i=n;continue}if(n<56320){-1<(t-=3)&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&-1<(t-=3)&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function j(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(t,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function L(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function C(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}}).call(this,e(9).Buffer)},{23:23,6:6,9:9}],10:[function(e,t,n){(function(e){function t(e){return Object.prototype.toString.call(e)}n.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},n.isBoolean=function(e){return"boolean"==typeof e},n.isNull=function(e){return null===e},n.isNullOrUndefined=function(e){return null==e},n.isNumber=function(e){return"number"==typeof e},n.isString=function(e){return"string"==typeof e},n.isSymbol=function(e){return"symbol"==typeof e},n.isUndefined=function(e){return void 0===e},n.isRegExp=function(e){return"[object RegExp]"===t(e)},n.isObject=function(e){return"object"==typeof e&&null!==e},n.isDate=function(e){return"[object Date]"===t(e)},n.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},n.isFunction=function(e){return"function"==typeof e},n.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},n.isBuffer=e.isBuffer}).call(this,{isBuffer:e(26)})},{26:26}],11:[function(e,t,n){var r=e(16).AbstractIterator;function i(e){r.call(this,e),this._options=e,this._iterator=null,this._operations=[]}e(25)(i,r),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)}}),t.exports=i},{16:16,25:25}],12:[function(e,t,n){var r=e(16).AbstractLevelDOWN,i=e(25),o=e(11),a="put get del batch".split(" ");function s(e){r.call(this,""),this._db=e,this._operations=[],this._iterators=[],u(this)}function u(t){a.forEach(function(e){t["_"+e]=function(){this._operations.push({method:e,args:arguments})}}),"function"==typeof t._db.approximateSize&&(t.approximateSize=function(){this._operations.push({method:"approximateSize",args:arguments})}),t._iterator=function(e){var t=new o(e);return this._iterators.push(t),t}}i(s,r),s.prototype._open=function(e,t){var n=this;this._db.open(e,function(e){if(e)return t(e);n._operations.forEach(function(e){n._db[e.method].apply(n._db,e.args)}),n._operations=[],n._iterators.forEach(function(e){e.setDb(n._db)}),n._iterators=[],function(t){a.concat("iterator").forEach(function(e){t["_"+e]=function(){return this._db[e].apply(this._db,arguments)}}),t._db.approximateSize&&(t.approximateSize=function(){return this._db.approximateSize.apply(this._db,arguments)})}(n),t()})},s.prototype._close=function(t){var n=this;this._db.close(function(e){if(e)return t(e);u(n),t()})},s.prototype._serializeKey=function(e){return e},s.prototype._serializeValue=function(e){return e},t.exports=s,t.exports.DeferredIterator=o},{11:11,16:16,25:25}],13:[function(e,t,n){function r(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}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 n=this.db._checkKey(e)||this.db._checkValue(t);if(n)throw n;return e=this.db._serializeKey(e),t=this.db._serializeValue(t),this._put(e,t),this},r.prototype._put=function(e,t){this._operations.push({type:"put",key:e,value:t})},r.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},r.prototype._del=function(e){this._operations.push({type:"del",key:e})},r.prototype.clear=function(){return this._checkWritten(),this._clear(),this},r.prototype._clear=function(){this._operations=[]},r.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)},r.prototype._write=function(e,t){this.db._batch(this._operations,e,t)},t.exports=r},{}],14:[function(e,t,n){(function(n){function e(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}e.prototype.next=function(e){var t=this;if("function"!=typeof e)throw new Error("next() requires a callback argument");return t._ended?n.nextTick(e,new Error("cannot call next() after end()")):t._nexting?n.nextTick(e,new Error("cannot call next() before previous next() has completed")):(t._nexting=!0,t._next(function(){t._nexting=!1,e.apply(null,arguments)})),t},e.prototype._next=function(e){n.nextTick(e)},e.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)},e.prototype._seek=function(e){},e.prototype.end=function(e){if("function"!=typeof e)throw new Error("end() requires a callback argument");if(this._ended)return n.nextTick(e,new Error("end() already called on iterator"));this._ended=!0,this._end(e)},e.prototype._end=function(e){n.nextTick(e)},t.exports=e}).call(this,e(71))},{71:71}],15:[function(i,o,e){(function(t,u){var f=i(17),n=i(14),e=i(13),a=Object.prototype.hasOwnProperty,s="start end gt gte lt lte".split(" ");function r(){this.status="new"}r.prototype.open=function(e,t){var n=this,r=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 n.status=r,t(e);n.status="open",t()})},r.prototype._open=function(e,t){u.nextTick(t)},r.prototype.close=function(t){var n=this,r=this.status;if("function"!=typeof t)throw new Error("close() requires a callback argument");this.status="closing",this._close(function(e){if(e)return n.status=r,t(e);n.status="closed",t()})},r.prototype._close=function(e){u.nextTick(e)},r.prototype.get=function(e,t,n){if("function"==typeof t&&(n=t),"function"!=typeof n)throw new Error("get() requires a callback argument");var r=this._checkKey(e);if(r)return u.nextTick(n,r);e=this._serializeKey(e),"object"==typeof t&&null!==t||(t={}),t.asBuffer=!1!==t.asBuffer,this._get(e,t,n)},r.prototype._get=function(e,t,n){u.nextTick(function(){n(new Error("NotFound"))})},r.prototype.put=function(e,t,n,r){if("function"==typeof n&&(r=n),"function"!=typeof r)throw new Error("put() requires a callback argument");var i=this._checkKey(e)||this._checkValue(t);if(i)return u.nextTick(r,i);e=this._serializeKey(e),t=this._serializeValue(t),"object"==typeof n&&null!==n||(n={}),this._put(e,t,n,r)},r.prototype._put=function(e,t,n,r){u.nextTick(r)},r.prototype.del=function(e,t,n){if("function"==typeof t&&(n=t),"function"!=typeof n)throw new Error("del() requires a callback argument");var r=this._checkKey(e);if(r)return u.nextTick(n,r);e=this._serializeKey(e),"object"==typeof t&&null!==t||(t={}),this._del(e,t,n)},r.prototype._del=function(e,t,n){u.nextTick(n)},r.prototype.batch=function(e,t,n){if(!arguments.length)return this._chainedBatch();if("function"==typeof t&&(n=t),"function"==typeof e&&(n=e),"function"!=typeof n)throw new Error("batch(array) requires a callback argument");if(!Array.isArray(e))return u.nextTick(n,new Error("batch(array) requires an array argument"));if(0===e.length)return u.nextTick(n);"object"==typeof t&&null!==t||(t={});for(var r=new Array(e.length),i=0;i<e.length;i++){if("object"!=typeof e[i]||null===e[i])return u.nextTick(n,new Error("batch(array) element must be an object and not `null`"));var o=f(e[i]);if("put"!==o.type&&"del"!==o.type)return u.nextTick(n,new Error("`type` must be 'put' or 'del'"));var a=this._checkKey(o.key);if(a)return u.nextTick(n,a);if(o.key=this._serializeKey(o.key),"put"===o.type){var s=this._checkValue(o.value);if(s)return u.nextTick(n,s);o.value=this._serializeValue(o.value)}r[i]=o}this._batch(r,t,n)},r.prototype._batch=function(e,t,n){u.nextTick(n)},r.prototype._setupIteratorOptions=function(e){return(e=function(e,t){var n={};for(var r in t)if(a.call(t,r)){var i=t[r];o=r,-1!==s.indexOf(o)&&(i=e._serializeKey(i)),n[r]=i}var o;return n}(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},r.prototype.iterator=function(e){return"object"==typeof e&&null!==e||(e={}),e=this._setupIteratorOptions(e),this._iterator(e)},r.prototype._iterator=function(e){return new n(this)},r.prototype._chainedBatch=function(){return new e(this)},r.prototype._serializeKey=function(e){return e},r.prototype._serializeValue=function(e){return e},r.prototype._checkKey=function(e){return null==e?new Error("key cannot be `null` or `undefined`"):t.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},r.prototype._checkValue=function(e){if(null==e)return new Error("value cannot be `null` or `undefined`")},o.exports=r}).call(this,{isBuffer:i(26)},i(71))},{13:13,14:14,17:17,26:26,71:71}],16:[function(e,t,n){n.AbstractLevelDOWN=e(15),n.AbstractIterator=e(14),n.AbstractChainedBatch=e(13)},{13:13,14:14,15:15}],17:[function(e,t,n){t.exports=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)i.call(n,r)&&(e[r]=n[r])}return e};var i=Object.prototype.hasOwnProperty},{}],18:[function(e,t,n){"use strict";function r(e){if(this._capacity=o(e),this._length=0,this._front=0,i(e)){for(var t=e.length,n=0;n<t;++n)this[n]=e[n];this._length=t}}r.prototype.toArray=function(){for(var e=this._length,t=new Array(e),n=this._front,r=this._capacity,i=0;i<e;++i)t[i]=this[n+i&r-1];return t},r.prototype.push=function(e){var t=arguments.length,n=this._length;if(1<t){var r=this._capacity;if(r<n+t){for(var i=0;i<t;++i){this._checkCapacity(n+1),this[o=this._front+n&this._capacity-1]=arguments[i],n++,this._length=n}return n}for(var o=this._front,i=0;i<t;++i)this[o+n&r-1]=arguments[i],o++;return this._length=n+t,n+t}return 0===t?n:(this._checkCapacity(n+1),this[i=this._front+n&this._capacity-1]=e,this._length=n+1,n+1)},r.prototype.pop=function(){var e=this._length;if(0!==e){var t=this._front+e-1&this._capacity-1,n=this[t];return this[t]=void 0,this._length=e-1,n}},r.prototype.shift=function(){var e=this._length;if(0!==e){var t=this._front,n=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length=e-1,n}},r.prototype.unshift=function(e){var t=this._length,n=arguments.length;if(1<n){if((i=this._capacity)<t+n){for(var r=n-1;0<=r;r--){this._checkCapacity(t+1);var i=this._capacity;this[a=(this._front-1&i-1^i)-i]=arguments[r],t++,this._length=t,this._front=a}return t}var o=this._front;for(r=n-1;0<=r;r--){var a;this[a=(o-1&i-1^i)-i]=arguments[r],o=a}return this._front=o,this._length=t+n,t+n}if(0===n)return t;this._checkCapacity(t+1);i=this._capacity;return this[r=(this._front-1&i-1^i)-i]=e,this._length=t+1,this._front=r,t+1},r.prototype.peekBack=function(){var e=this._length;if(0!==e)return this[this._front+e-1&this._capacity-1]},r.prototype.peekFront=function(){if(0!==this._length)return this[this._front]},r.prototype.get=function(e){var t=e;if(t===(0|t)){var n=this._length;if(t<0&&(t+=n),!(t<0||n<=t))return this[this._front+t&this._capacity-1]}},r.prototype.isEmpty=function(){return 0===this._length},r.prototype.clear=function(){for(var e=this._length,t=this._front,n=this._capacity,r=0;r<e;++r)this[t+r&n-1]=void 0;this._length=0,this._front=0},r.prototype.valueOf=r.prototype.toString=function(){return this.toArray().toString()},r.prototype.removeFront=r.prototype.shift,r.prototype.removeBack=r.prototype.pop,r.prototype.insertFront=r.prototype.unshift,r.prototype.insertBack=r.prototype.push,r.prototype.enqueue=r.prototype.push,r.prototype.dequeue=r.prototype.shift,r.prototype.toJSON=r.prototype.toArray,Object.defineProperty(r.prototype,"length",{get:function(){return this._length},set:function(){throw new RangeError("")}}),r.prototype._checkCapacity=function(e){this._capacity<e&&this._resizeTo(o(1.5*this._capacity+16))},r.prototype._resizeTo=function(e){var t=this._capacity;this._capacity=e;var n=this._front,r=this._length;t<n+r&&function(e,t,n,r,i){for(var o=0;o<i;++o)n[o+r]=e[o+t],e[o+t]=void 0}(this,0,this,t,n+r&t-1)};var i=Array.isArray;function o(e){if("number"!=typeof e){if(!i(e))return 16;e=e.length}return function(e){return e>>>=0,e-=1,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,(e|=e>>16)+1}(Math.min(Math.max(16,e),1073741824))}t.exports=r},{}],19:[function(e,t,n){var r=e(72);function o(e,t,n){t&&"string"!=typeof t&&(t=t.message||t.name),r(this,{type:e,name:e,cause:"string"!=typeof t?t:n,message:t},"ewr")}function a(e,t){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),o.call(this,"CustomError",e,t)}a.prototype=new Error,t.exports=function(n){function e(e,t){return function(n,r,e){var i=function(e,t){o.call(this,r,e,t),"FilesystemError"==r&&(this.code=this.cause.code,this.path=this.cause.path,this.errno=this.cause.errno,this.message=(n.errno[this.cause.errno]?n.errno[this.cause.errno].description:this.cause.message)+(this.cause.path?" ["+this.cause.path+"]":"")),Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,i)};return i.prototype=e?new e:new a,i}(n,e,t)}return{CustomError:a,FilesystemError:e("FilesystemError"),createError:e}}},{72:72}],20:[function(e,t,n){var r=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={},r.forEach(function(e){t.exports.errno[e.errno]=e,t.exports.code[e.code]=e}),t.exports.custom=e(19)(t.exports),t.exports.create=t.exports.custom.createError},{19:19}],21:[function(e,t,n){var u=Object.create||function(e){function t(){}return t.prototype=e,new t},a=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return n},o=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function r(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=u(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}((t.exports=r).EventEmitter=r).prototype._events=void 0,r.prototype._maxListeners=void 0;var i,s=10;try{var f={};Object.defineProperty&&Object.defineProperty(f,"x",{value:0}),i=0===f.x}catch(e){i=!1}function c(e){return void 0===e._maxListeners?r.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,o,a;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((o=e._events)?(o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]):(o=e._events=u(null),e._eventsCount=0),a){if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),!a.warned&&(i=c(e))&&0<i&&a.length>i){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",s.name,s.message)}}else a=o[t]=n,++e._eventsCount;return e}function h(){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 d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=o.call(h,r);return i.listener=n,r.wrapFn=i}function p(e,t,n){var r=e._events;if(!r)return[];var i=r[t];return i?"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):y(i,i.length):[]}function g(e){var t=this._events;if(t){var n=t[e];if("function"==typeof n)return 1;if(n)return n.length}return 0}function y(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}i?Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||e!=e)throw new TypeError('"defaultMaxListeners" must be a positive number');s=e}}):r.defaultMaxListeners=s,r.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},r.prototype.getMaxListeners=function(){return c(this)},r.prototype.emit=function(e,t,n,r){var i,o,a,s,u,f,c="error"===e;if(f=this._events)c=c&&null==f.error;else if(!c)return!1;if(c){if(1<arguments.length&&(i=t),i instanceof Error)throw i;var l=new Error('Unhandled "error" event. ('+i+")");throw l.context=i,l}if(!(o=f[e]))return!1;var h="function"==typeof o;switch(a=arguments.length){case 1:!function(e,t,n){if(t)e.call(n);else for(var r=e.length,i=y(e,r),o=0;o<r;++o)i[o].call(n)}(o,h,this);break;case 2:!function(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,o=y(e,i),a=0;a<i;++a)o[a].call(n,r)}(o,h,this,t);break;case 3:!function(e,t,n,r,i){if(t)e.call(n,r,i);else for(var o=e.length,a=y(e,o),s=0;s<o;++s)a[s].call(n,r,i)}(o,h,this,t,n);break;case 4:!function(e,t,n,r,i,o){if(t)e.call(n,r,i,o);else for(var a=e.length,s=y(e,a),u=0;u<a;++u)s[u].call(n,r,i,o)}(o,h,this,t,n,r);break;default:for(s=new Array(a-1),u=1;u<a;u++)s[u-1]=arguments[u];!function(e,t,n,r){if(t)e.apply(n,r);else for(var i=e.length,o=y(e,i),a=0;a<i;++a)o[a].apply(n,r)}(o,h,this,s)}return!0},r.prototype.on=r.prototype.addListener=function(e,t){return l(this,e,t,!1)},r.prototype.prependListener=function(e,t){return l(this,e,t,!0)},r.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,d(this,e,t)),this},r.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,d(this,e,t)),this},r.prototype.removeListener=function(e,t){var n,r,i,o,a;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=u(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;0<=o;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),r.removeListener&&this.emit("removeListener",e,a||t)}return this},r.prototype.removeAllListeners=function(e){var t,n,r;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=u(null),this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=u(null):delete n[e]),this;if(0===arguments.length){var i,o=a(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=u(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(t)for(r=t.length-1;0<=r;r--)this.removeListener(e,t[r]);return this},r.prototype.listeners=function(e){return p(this,e,!0)},r.prototype.rawListeners=function(e){return p(this,e,!1)},r.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},r.prototype.listenerCount=g,r.prototype.eventNames=function(){return 0<this._eventsCount?Reflect.ownKeys(this._events):[]}},{}],22:[function(e,t,n){"use strict";t.exports=function(e){return new g(e||o,null)};function h(e,t,n,r,i,o){this._color=e,this.key=t,this.value=n,this.left=r,this.right=i,this._count=o}function u(e){return new h(e._color,e.key,e.value,e.left,e.right,e._count)}function d(e,t){return new h(e,t.key,t.value,t.left,t.right,t._count)}function p(e){e._count=1+(e.left?e.left._count:0)+(e.right?e.right._count:0)}function g(e,t){this._compare=e,this.root=t}var r=g.prototype;function a(e,t){this.tree=e,this._stack=t}Object.defineProperty(r,"keys",{get:function(){var t=[];return this.forEach(function(e){t.push(e)}),t}}),Object.defineProperty(r,"values",{get:function(){var n=[];return this.forEach(function(e,t){n.push(t)}),n}}),Object.defineProperty(r,"length",{get:function(){return this.root?this.root._count:0}}),r.insert=function(e,t){for(var n=this._compare,r=this.root,i=[],o=[];r;){var a=n(e,r.key);i.push(r),o.push(a),r=a<=0?r.left:r.right}i.push(new h(0,e,t,null,null,1));for(var s=i.length-2;0<=s;--s){r=i[s];o[s]<=0?i[s]=new h(r._color,r.key,r.value,i[s+1],r.right,r._count+1):i[s]=new h(r._color,r.key,r.value,r.left,i[s+1],r._count+1)}for(s=i.length-1;1<s;--s){var u=i[s-1];r=i[s];if(1===u._color||1===r._color)break;var f=i[s-2];if(f.left===u)if(u.left===r){if(!(c=f.right)||0!==c._color){if(f._color=0,f.left=u.right,u._color=1,u.right=f,i[s-2]=u,i[s-1]=r,p(f),p(u),3<=s)(l=i[s-3]).left===f?l.left=u:l.right=u;break}u._color=1,f.right=d(1,c),f._color=0,s-=1}else{if(!(c=f.right)||0!==c._color){if(u.right=r.left,f._color=0,f.left=r.right,r._color=1,r.left=u,r.right=f,i[s-2]=r,i[s-1]=u,p(f),p(u),p(r),3<=s)(l=i[s-3]).left===f?l.left=r:l.right=r;break}u._color=1,f.right=d(1,c),f._color=0,s-=1}else if(u.right===r){if(!(c=f.left)||0!==c._color){if(f._color=0,f.right=u.left,u._color=1,u.left=f,i[s-2]=u,i[s-1]=r,p(f),p(u),3<=s)(l=i[s-3]).right===f?l.right=u:l.left=u;break}u._color=1,f.left=d(1,c),f._color=0,s-=1}else{var c;if(!(c=f.left)||0!==c._color){var l;if(u.left=r.right,f._color=0,f.right=r.left,r._color=1,r.right=u,r.left=f,i[s-2]=r,i[s-1]=u,p(f),p(u),p(r),3<=s)(l=i[s-3]).right===f?l.right=r:l.left=r;break}u._color=1,f.left=d(1,c),f._color=0,s-=1}}return i[0]._color=1,new g(n,i[0])},r.forEach=function(e,t,n){if(this.root)switch(arguments.length){case 1:return function e(t,n){var r;if(n.left&&(r=e(t,n.left)))return r;return(r=t(n.key,n.value))||(n.right?e(t,n.right):void 0)}(e,this.root);case 2:return function e(t,n,r,i){if(n(t,i.key)<=0){var o;if(i.left&&(o=e(t,n,r,i.left)))return o;if(o=r(i.key,i.value))return o}if(i.right)return e(t,n,r,i.right)}(t,this._compare,e,this.root);case 3:if(0<=this._compare(t,n))return;return function e(t,n,r,i,o){var a,s=r(t,o.key),u=r(n,o.key);if(s<=0){if(o.left&&(a=e(t,n,r,i,o.left)))return a;if(0<u&&(a=i(o.key,o.value)))return a}if(0<u&&o.right)return e(t,n,r,i,o.right)}(t,n,this._compare,e,this.root)}},Object.defineProperty(r,"begin",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.left;return new a(this,e)}}),Object.defineProperty(r,"end",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.right;return new a(this,e)}}),r.at=function(e){if(e<0)return new a(this,[]);for(var t=this.root,n=[];;){if(n.push(t),t.left){if(e<t.left._count){t=t.left;continue}e-=t.left._count}if(!e)return new a(this,n);if(e-=1,!t.right)break;if(e>=t.right._count)break;t=t.right}return new a(this,[])},r.ge=function(e){for(var t=this._compare,n=this.root,r=[],i=0;n;){var o=t(e,n.key);r.push(n),o<=0&&(i=r.length),n=o<=0?n.left:n.right}return r.length=i,new a(this,r)},r.gt=function(e){for(var t=this._compare,n=this.root,r=[],i=0;n;){var o=t(e,n.key);r.push(n),o<0&&(i=r.length),n=o<0?n.left:n.right}return r.length=i,new a(this,r)},r.lt=function(e){for(var t=this._compare,n=this.root,r=[],i=0;n;){var o=t(e,n.key);r.push(n),0<o&&(i=r.length),n=o<=0?n.left:n.right}return r.length=i,new a(this,r)},r.le=function(e){for(var t=this._compare,n=this.root,r=[],i=0;n;){var o=t(e,n.key);r.push(n),0<=o&&(i=r.length),n=o<0?n.left:n.right}return r.length=i,new a(this,r)},r.find=function(e){for(var t=this._compare,n=this.root,r=[];n;){var i=t(e,n.key);if(r.push(n),0===i)return new a(this,r);n=i<=0?n.left:n.right}return new a(this,[])},r.remove=function(e){var t=this.find(e);return t?t.remove():this},r.get=function(e){for(var t=this._compare,n=this.root;n;){var r=t(e,n.key);if(0===r)return n.value;n=r<=0?n.left:n.right}};var i=a.prototype;function f(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 o(e,t){return e<t?-1:t<e?1:0}Object.defineProperty(i,"valid",{get:function(){return 0<this._stack.length}}),Object.defineProperty(i,"node",{get:function(){return 0<this._stack.length?this._stack[this._stack.length-1]:null},enumerable:!0}),i.clone=function(){return new a(this.tree,this._stack.slice())},i.remove=function(){var e=this._stack;if(0===e.length)return this.tree;var t=new Array(e.length),n=e[e.length-1];t[t.length-1]=new h(n._color,n.key,n.value,n.left,n.right,n._count);for(var r=e.length-2;0<=r;--r){(n=e[r]).left===e[r+1]?t[r]=new h(n._color,n.key,n.value,t[r+1],n.right,n._count):t[r]=new h(n._color,n.key,n.value,n.left,t[r+1],n._count)}if((n=t[t.length-1]).left&&n.right){var i=t.length;for(n=n.left;n.right;)t.push(n),n=n.right;var o=t[i-1];t.push(new h(n._color,o.key,o.value,n.left,n.right,n._count)),t[i-1].key=n.key,t[i-1].value=n.value;for(r=t.length-2;i<=r;--r)n=t[r],t[r]=new h(n._color,n.key,n.value,n.left,t[r+1],n._count);t[i-1].left=t[i]}if(0===(n=t[t.length-1])._color){var a=t[t.length-2];a.left===n?a.left=null:a.right===n&&(a.right=null),t.pop();for(r=0;r<t.length;++r)t[r]._count--;return new g(this.tree._compare,t[0])}if(n.left||n.right){n.left?f(n,n.left):n.right&&f(n,n.right),n._color=1;for(r=0;r<t.length-1;++r)t[r]._count--;return new g(this.tree._compare,t[0])}if(1===t.length)return new g(this.tree._compare,null);for(r=0;r<t.length;++r)t[r]._count--;var s=t[t.length-2];return function(e){for(var t,n,r,i,o=e.length-1;0<=o;--o){if(t=e[o],0===o)return t._color=1;if((n=e[o-1]).left===t){if((r=n.right).right&&0===r.right._color){if(i=(r=n.right=u(r)).right=u(r.right),n.right=r.left,r.left=n,r.right=i,r._color=n._color,t._color=1,n._color=1,i._color=1,p(n),p(r),1<o)(a=e[o-2]).left===n?a.left=r:a.right=r;return e[o-1]=r}if(r.left&&0===r.left._color){if(i=(r=n.right=u(r)).left=u(r.left),n.right=i.left,r.left=i.right,i.left=n,i.right=r,i._color=n._color,n._color=1,r._color=1,t._color=1,p(n),p(r),p(i),1<o)(a=e[o-2]).left===n?a.left=i:a.right=i;return e[o-1]=i}if(1===r._color){if(0===n._color)return n._color=1,n.right=d(0,r);n.right=d(0,r);continue}r=u(r),n.right=r.left,r.left=n,r._color=n._color,n._color=0,p(n),p(r),1<o&&((a=e[o-2]).left===n?a.left=r:a.right=r),e[o-1]=r,e[o]=n,o+1<e.length?e[o+1]=t:e.push(t),o+=2}else{if((r=n.left).left&&0===r.left._color){if(i=(r=n.left=u(r)).left=u(r.left),n.left=r.right,r.right=n,r.left=i,r._color=n._color,t._color=1,n._color=1,i._color=1,p(n),p(r),1<o)(a=e[o-2]).right===n?a.right=r:a.left=r;return e[o-1]=r}if(r.right&&0===r.right._color){if(i=(r=n.left=u(r)).right=u(r.right),n.left=i.right,r.right=i.left,i.right=n,i.left=r,i._color=n._color,n._color=1,r._color=1,t._color=1,p(n),p(r),p(i),1<o)(a=e[o-2]).right===n?a.right=i:a.left=i;return e[o-1]=i}if(1===r._color){if(0===n._color)return n._color=1,n.left=d(0,r);n.left=d(0,r);continue}var a;r=u(r),n.left=r.right,r.right=n,r._color=n._color,n._color=0,p(n),p(r),1<o&&((a=e[o-2]).right===n?a.right=r:a.left=r),e[o-1]=r,e[o]=n,o+1<e.length?e[o+1]=t:e.push(t),o+=2}}}(t),s.left===n?s.left=null:s.right=null,new g(this.tree._compare,t[0])},Object.defineProperty(i,"key",{get:function(){if(0<this._stack.length)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(i,"value",{get:function(){if(0<this._stack.length)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(i,"index",{get:function(){var e=0,t=this._stack;if(0===t.length){var n=this.tree.root;return n?n._count:0}t[t.length-1].left&&(e=t[t.length-1].left._count);for(var r=t.length-2;0<=r;--r)t[r+1]===t[r].right&&(++e,t[r].left&&(e+=t[r].left._count));return e},enumerable:!0}),i.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();0<e.length&&e[e.length-1].right===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(i,"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;0<t;--t)if(e[t-1].left===e[t])return!0;return!1}}),i.update=function(e){var t=this._stack;if(0===t.length)throw new Error("Can't update empty node!");var n=new Array(t.length),r=t[t.length-1];n[n.length-1]=new h(r._color,r.key,e,r.left,r.right,r._count);for(var i=t.length-2;0<=i;--i)(r=t[i]).left===t[i+1]?n[i]=new h(r._color,r.key,r.value,n[i+1],r.right,r._count):n[i]=new h(r._color,r.key,r.value,r.left,n[i+1],r._count);return new g(this.tree._compare,n[0])},i.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();0<e.length&&e[e.length-1].left===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(i,"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;0<t;--t)if(e[t-1].right===e[t])return!0;return!1}})},{}],23:[function(e,t,n){n.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,f=u>>1,c=-7,l=n?i-1:0,h=n?-1:1,d=e[t+l];for(l+=h,o=d&(1<<-c)-1,d>>=-c,c+=s;0<c;o=256*o+e[t+l],l+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;0<c;a=256*a+e[t+l],l+=h,c-=8);if(0===o)o=1-f;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=f}return(d?-1:1)*a*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var a,s,u,f=8*o-i-1,c=(1<<f)-1,l=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,g=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=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),2<=(t+=1<=a+l?h/u:h*Math.pow(2,1-l))*u&&(a++,u/=2),c<=a+l?(s=0,a=c):1<=a+l?(s=(t*u-1)*Math.pow(2,i),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),a=0));8<=i;e[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,f+=i;0<f;e[n+d]=255&a,d+=p,a/=256,f-=8);e[n+d-p]|=128*g}},{}],24:[function(e,c,t){(function(t){"use strict";var n,r,e=t.MutationObserver||t.WebKitMutationObserver;if(e){var i=0,o=new e(f),a=t.document.createTextNode("");o.observe(a,{characterData:!0}),n=function(){a.data=i=++i%2}}else if(t.setImmediate||void 0===t.MessageChannel)n="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){f(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(f,0)};else{var s=new t.MessageChannel;s.port1.onmessage=f,n=function(){s.port2.postMessage(0)}}var u=[];function f(){var e,t;r=!0;for(var n=u.length;n;){for(t=u,u=[],e=-1;++e<n;)t[e]();n=u.length}r=!1}c.exports=function(e){1!==u.push(e)||r||n()}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],25:[function(e,t,n){arguments[4][3][0].apply(n,arguments)},{3:3}],26:[function(e,t,n){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}t.exports=function(e){return null!=e&&(r(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],27:[function(e,t,n){t.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},{}],28:[function(e,t,n){var r=e(29);function i(e){if(!(this instanceof i))return new i(e);this.opts=e||{},this.encodings=r}(t.exports=i).prototype._encoding=function(e){return"string"==typeof e&&(e=r[e]),e||(e=r.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,n){return this._keyEncoding(t,n).encode(e)},i.prototype.encodeValue=function(e,t,n){return this._valueEncoding(t,n).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,n){var r=this;return e.map(function(e){var t={type:e.type,key:r.encodeKey(e.key,n,e)};return r.keyAsBuffer(n,e)&&(t.keyEncoding="binary"),e.prefix&&(t.prefix=e.prefix),"value"in e&&(t.value=r.encodeValue(e.value,n,e),r.valueAsBuffer(n,e)&&(t.valueEncoding="binary")),t})};var o=["lt","gt","lte","gte","start","end"];i.prototype.encodeLtgt=function(t){var n=this,r={};return Object.keys(t).forEach(function(e){r[e]=-1<o.indexOf(e)?n.encodeKey(t[e],t):t[e]}),r},i.prototype.createStreamDecoder=function(n){var r=this;return n.keys&&n.values?function(e,t){return{key:r.decodeKey(e,n),value:r.decodeValue(t,n)}}:n.keys?function(e){return r.decodeKey(e,n)}:n.values?function(e,t){return r.decodeValue(t,n)}:function(){}},i.prototype.keyAsBuffer=function(e){return this._keyEncoding(e).buffer},i.prototype.valueAsBuffer=function(e){return this._valueEncoding(e).buffer}},{29:29}],29:[function(e,t,i){(function(n){i.utf8=i["utf-8"]={encode:function(e){return r(e)?e:String(e)},decode:e,buffer:!1,type:"utf8"},i.json={encode:JSON.stringify,decode:JSON.parse,buffer:!1,type:"json"},i.binary={encode:function(e){return r(e)?e:n.from(e)},decode:e,buffer:!0,type:"binary"},i.none={encode:e,decode:e,buffer:!1,type:"id"},i.id=i.none;function e(e){return e}function r(e){return null==e||n.isBuffer(e)}["hex","ascii","base64","ucs2","ucs-2","utf16le","utf-16le"].forEach(function(t){i[t]={encode:function(e){return r(e)?e:n.from(e,t)},decode:function(e){return e.toString(t)},buffer:!0,type:t}})}).call(this,e(9).Buffer)},{9:9}],30:[function(e,t,n){var r=e(20).create,i=r("LevelUPError"),o=r("NotFoundError",i);o.prototype.notFound=!0,o.prototype.status=404,t.exports={LevelUPError:i,InitializationError:r("InitializationError",i),OpenError:r("OpenError",i),ReadError:r("ReadError",i),WriteError:r("WriteError",i),NotFoundError:o,EncodingError:r("EncodingError",i)}},{20:20}],31:[function(e,t,n){var r=e(25),i=e(46).Readable,o=e(47);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))}r(t.exports=a,i),a.prototype._read=function(){var r=this,i=this._options;this.destroyed||this._iterator.next(function(e,t,n){if(!r.destroyed)return e?r.destroy(e):void(void 0===t&&void 0===n?r.push(null):!1!==i.keys&&!1===i.values?r.push(t):!1===i.keys&&!1!==i.values?r.push(n):r.push({key:t,value:n}))})},a.prototype._destroy=function(t,n){this._iterator.end(function(e){n(t||e)})}},{25:25,46:46,47:47}],32:[function(e,t,n){"use strict";var r={};function i(e,i,t){t||(t=Error);var n=function(r){function e(e,t,n){return r.call(this,function(e,t,n){return"string"==typeof i?i:i(e,t,n)}(e,t,n))||this}return function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}(e,r),e}(t);n.prototype.name=t.name,n.prototype.code=e,r[e]=n}function a(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map(function(e){return String(e)}),2<n?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"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,n){var r,i;if("string"==typeof t&&function(e,t,n){return e.substr(!n||n<0?0:+n,t.length)===t}(t,"not ")?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))i="The ".concat(e," ").concat(r," ").concat(a(t,"type"));else{var o=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(o," ").concat(r," ").concat(a(t,"type"))}return i+=". Received type ".concat(typeof n)},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=r},{}],33:[function(e,t,n){(function(n){"use strict";var r=new Set;t.exports.emitExperimentalWarning=n.emitWarning?function(e){if(!r.has(e)){var t=e+" is an experimental feature. This feature could change at any time";r.add(e),n.emitWarning(t,"ExperimentalWarning")}}:function(){}}).call(this,e(71))},{71:71}],34:[function(c,l,e){(function(e){"use strict";var t=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};l.exports=s;var n=c(36),r=c(38);c(25)(s,n);for(var i=t(r.prototype),o=0;o<i.length;o++){var a=i[o];s.prototype[a]||(s.prototype[a]=r.prototype[a])}function s(e){if(!(this instanceof s))return new s(e);n.call(this,e),r.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",u)))}function u(){this._writableState.ended||e.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(s.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(s.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(s.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,c(71))},{25:25,36:36,38:38,71:71}],35:[function(e,t,n){"use strict";t.exports=i;var r=e(37);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}e(25)(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},{25:25,37:37}],36:[function(D,U,e){(function(p,e){"use strict";var r;(U.exports=E).ReadableState=w;function g(e,t){return e.listeners(t).length}D(21).EventEmitter;var i=D(45),s=D(9).Buffer,u=e.Uint8Array||function(){};var y,t=D(7);y=t&&t.debuglog?t.debuglog("stream"):function(){};var o,n,a=D(40),f=D(41),c=D(44).getHighWaterMark,l=D(32).codes,h=l.ERR_INVALID_ARG_TYPE,d=l.ERR_STREAM_PUSH_AFTER_EOF,v=l.ERR_METHOD_NOT_IMPLEMENTED,b=l.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,_=D(33).emitExperimentalWarning;D(25)(E,i);var m=["error","close","destroy","pause","resume"];function w(e,t,n){r=r||D(34),e=e||{},"boolean"!=typeof n&&(n=t instanceof r),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=c(this,e,"readableHighWaterMark",n),this.buffer=new a,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!==e.emitClose,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(o||(o=D(98).StringDecoder),this.decoder=new o(e.encoding),this.encoding=e.encoding)}function E(e){if(r=r||D(34),!(this instanceof E))return new E(e);var t=this instanceof r;this._readableState=new w(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),i.call(this)}function k(e,t,n,r,i){y("readableAddChunk",t);var o,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,T(e)))}(e,a);else if(i||(o=function(e,t){var n;(function(e){return s.isBuffer(e)||e instanceof u})(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new h("chunk",["string","Buffer","Uint8Array"],t));return n}(a,t)),o)e.emit("error",o);else if(a.objectMode||t&&0<t.length)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)a.endEmitted?e.emit("error",new b):S(e,a,t,!0);else if(a.ended)e.emit("error",new d);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?S(e,a,t,!1):A(e,a)):S(e,a,t,!1)}else r||(a.reading=!1,A(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function S(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&O(e)),A(e,t)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=f.destroy,E.prototype._undestroy=f.undestroy,E.prototype._destroy=function(e,t){t(e)},E.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=s.from(e,t),t=""),n=!0),k(this,e,t,!1,n)},E.prototype.unshift=function(e){return k(this,e,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(e){return o||(o=D(98).StringDecoder),this._readableState.decoder=new o(e),this._readableState.encoding=this._readableState.decoder.encoding,this};var x=8388608;function R(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 x<=e?e=x:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(y("emitReadable",t.flowing),t.emittedReadable=!0,p.nextTick(T,e))}function T(e){var t=e._readableState;y("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||e.emit("readable"),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,C(e)}function A(e,t){t.readingMore||(t.readingMore=!0,p.nextTick(B,e,t))}function B(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(y("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function M(e){var t=e._readableState;t.readableListening=0<e.listenerCount("readable"),t.resumeScheduled&&!t.paused?t.flowing=!0:0<e.listenerCount("data")&&e.resume()}function j(e){y("readable nexttick read 0"),e.read(0)}function L(e,t){y("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),C(e),t.flowing&&!t.reading&&e.read(0)}function C(e){var t=e._readableState;for(y("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function q(e){var t=e._readableState;y("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,p.nextTick(I,t,e))}function I(e,t){y("endReadableNT",e.endEmitted,e.length),e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}E.prototype.read=function(e){y("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:0<t.length)||t.ended))return y("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?q(this):O(this),null;if(0===(e=R(e,t))&&t.ended)return 0===t.length&&q(this),null;var r,i=t.needReadable;return y("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&y("length less than watermark",i=!0),t.ended||t.reading?y("reading or ended",i=!1):i&&(y("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=R(n,t))),null===(r=0<e?N(e,t):null)?(t.needReadable=!0,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&q(this)),null!==r&&this.emit("data",r),r},E.prototype._read=function(e){this.emit("error",new v("_read()"))},E.prototype.pipe=function(n,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=n;break;case 1:i.pipes=[i.pipes,n];break;default:i.pipes.push(n)}i.pipesCount+=1,y("pipe count=%d opts=%j",i.pipesCount,e);var t=(!e||!1!==e.end)&&n!==p.stdout&&n!==p.stderr?a:d;function o(e,t){y("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,y("cleanup"),n.removeListener("close",l),n.removeListener("finish",h),n.removeListener("drain",s),n.removeListener("error",c),n.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",d),r.removeListener("data",f),u=!0,!i.awaitDrain||n._writableState&&!n._writableState.needDrain||s())}function a(){y("onend"),n.end()}i.endEmitted?p.nextTick(t):r.once("end",t),n.on("unpipe",o);var s=function(t){return function(){var e=t._readableState;y("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&g(t,"data")&&(e.flowing=!0,C(t))}}(r);n.on("drain",s);var u=!1;function f(e){y("ondata");var t=n.write(e);y("dest.write",t),!1===t&&((1===i.pipesCount&&i.pipes===n||1<i.pipesCount&&-1!==P(i.pipes,n))&&!u&&(y("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function c(e){y("onerror",e),d(),n.removeListener("error",c),0===g(n,"error")&&n.emit("error",e)}function l(){n.removeListener("finish",h),d()}function h(){y("onfinish"),n.removeListener("close",l),d()}function d(){y("unpipe"),r.unpipe(n)}return r.on("data",f),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(n,"error",c),n.once("close",l),n.once("finish",h),n.emit("pipe",r),i.flowing||(y("pipe resume"),r.resume()),n},E.prototype.unpipe=function(e){var t=this._readableState,n={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,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[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,n)),this},E.prototype.addListener=E.prototype.on=function(e,t){var n=i.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=0<this.listenerCount("readable"),!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,y("on readable",r.length,r.reading),r.length?O(this):r.reading||p.nextTick(j,this))),n},E.prototype.removeListener=function(e,t){var n=i.prototype.removeListener.call(this,e,t);return"readable"===e&&p.nextTick(M,this),n},E.prototype.removeAllListeners=function(e){var t=i.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||p.nextTick(M,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(y("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,p.nextTick(L,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return y("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(y("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(t){var n=this,r=this._readableState,i=!1;for(var e in t.on("end",function(){if(y("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),t.on("data",function(e){y("wrapped data"),r.decoder&&(e=r.decoder.write(e)),r.objectMode&&null==e||(r.objectMode||e&&e.length)&&(n.push(e)||(i=!0,t.pause()))}),t)void 0===this[e]&&"function"==typeof t[e]&&(this[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e));for(var o=0;o<m.length;o++)t.on(m[o],this.emit.bind(this,m[o]));return this._read=function(e){y("wrapped _read",e),i&&(i=!1,t.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return _("Readable[Symbol.asyncIterator]"),void 0===n&&(n=D(39)),n(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),E._fromList=N,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}})}).call(this,D(71),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{21:21,25:25,32:32,33:33,34:34,39:39,40:40,41:41,44:44,45:45,7:7,71:71,9:9,98:98}],37:[function(e,t,n){"use strict";t.exports=f;var r=e(32).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,u=e(34);function f(e){if(!(this instanceof f))return new f(e);u.call(this,e),this._transformState={afterTransform:function(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,(n.writecb=null)!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}.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",c)}function c(){var n=this;"function"!=typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush(function(e,t){l(n,e,t)})}function l(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}e(25)(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,n){n(new i("_transform()"))},f.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.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)})}},{25:25,32:32,34:34}],38:[function(A,B,e){(function(a,e){"use strict";function l(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var i;(B.exports=E).WritableState=w;var t={deprecate:A(116)},n=A(45),c=A(9).Buffer,s=e.Uint8Array||function(){};var r,o=A(41),u=A(44).getHighWaterMark,f=A(32).codes,h=f.ERR_INVALID_ARG_TYPE,d=f.ERR_METHOD_NOT_IMPLEMENTED,p=f.ERR_MULTIPLE_CALLBACK,g=f.ERR_STREAM_CANNOT_PIPE,y=f.ERR_STREAM_DESTROYED,v=f.ERR_STREAM_NULL_VALUES,b=f.ERR_STREAM_WRITE_AFTER_END,_=f.ERR_UNKNOWN_ENCODING;function m(){}function w(e,t,n){i=i||A(34),e=e||{},"boolean"!=typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=u(this,e,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var r=(this.destroyed=!1)===e.decodeStrings;this.decodeStrings=!r,this.defaultEncoding=e.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,r=n.sync,i=n.writecb;if("function"!=typeof i)throw new p;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(a.nextTick(i,r),a.nextTick(T,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),T(e,t))}(e,n,r,t,i);else{var o=R(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||x(e,n),r?a.nextTick(S,e,n,o,i):S(e,n,o,i)}}(t,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!==e.emitClose,this.bufferedRequestCount=0,this.corkedRequestsFree=new l(this)}function E(e){var t=this instanceof(i=i||A(34));if(!t&&!r.call(E,this))return new E(e);this._writableState=new w(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),n.call(this)}function k(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function S(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),T(e,t)}function x(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0,s=!0;n;)(i[a]=n).isBuf||(s=!1),n=n.next,a+=1;i.allBuffers=s,k(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 l(t),t.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,f=n.encoding,c=n.callback;if(k(e,t,!1,t.objectMode?1:u.length,u,f,c),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function R(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(t,n){t._final(function(e){n.pendingcb--,e&&t.emit("error",e),n.prefinished=!0,t.emit("prefinish"),T(t,n)})}function T(e,t){var n=R(t);return 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,a.nextTick(O,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}A(25)(E,n),w.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(w.prototype,"buffer",{get:t.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]?(r=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(e){return!!r.call(this,e)||this===E&&(e&&e._writableState instanceof w)}})):r=function(e){return e instanceof this},E.prototype.pipe=function(){this.emit("error",new g)},E.prototype.write=function(e,t,n){var r=this._writableState,i=!1,o=!r.objectMode&&function(e){return c.isBuffer(e)||e instanceof s}(e);return o&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=m),r.ending?function(e,t){var n=new b;e.emit("error",n),a.nextTick(t,n)}(this,n):(o||function(e,t,n,r){var i;return null===n?i=new v:"string"==typeof n||t.objectMode||(i=new h("chunk",["string","Buffer"],n)),!i||(e.emit("error",i),a.nextTick(r,i),!1)}(this,r,e,n))&&(r.pendingcb++,i=function(e,t,n,r,i,o){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,n));return t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else k(e,t,!1,s,r,i,o);return u}(this,r,o,e,t,n)),i},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||x(this,e))},E.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(-1<["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,n){n(new d("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,t=e=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,T(e,t),n&&(t.finished?a.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=o.destroy,E.prototype._undestroy=o.undestroy,E.prototype._destroy=function(e,t){t(e)}}).call(this,A(71),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{116:116,25:25,32:32,34:34,41:41,44:44,45:45,71:71,9:9}],39:[function(r,y,e){(function(o){"use strict";var e;function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=r(42),a=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),f=Symbol("ended"),c=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 n=e[h].read();null!==n&&(e[c]=null,e[a]=null,e[s]=null,t(d(n,!1)))}}var t=Object.getPrototypeOf(function(){}),g=Object.setPrototypeOf((n(e={get stream(){return this[h]},next:function(){var n=this,e=this[u];if(null!==e)return Promise.reject(e);if(this[f])return Promise.resolve(d(void 0,!0));if(this[h].destroyed)return new Promise(function(e,t){o.nextTick(function(){n[u]?t(n[u]):e(d(void 0,!0))})});var t,r=this[c];if(r)t=new Promise(function(n,r){return function(e,t){n.then(function(){r[f]?e(d(void 0,!0)):r[l](e,t)},t)}}(r,this));else{var i=this[h].read();if(null!==i)return Promise.resolve(d(i,!1));t=new Promise(this[l])}return this[c]=t}},Symbol.asyncIterator,function(){return this}),n(e,"return",function(){var e=this;return new Promise(function(t,n){e[h].destroy(null,function(e){e?n(e):t(d(void 0,!0))})})}),e),t);y.exports=function(e){var t,r=Object.create(g,(n(t={},h,{value:e,writable:!0}),n(t,a,{value:null,writable:!0}),n(t,s,{value:null,writable:!0}),n(t,u,{value:null,writable:!0}),n(t,f,{value:e._readableState.endEmitted,writable:!0}),n(t,l,{value:function(e,t){var n=r[h].read();n?(r[c]=null,r[a]=null,r[s]=null,e(d(n,!1))):(r[a]=e,r[s]=t)},writable:!0}),t));return r[c]=null,i(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[s];return null!==t&&(r[c]=null,r[a]=null,r[s]=null,t(e)),void(r[u]=e)}var n=r[a];null!==n&&(r[c]=null,r[a]=null,n(d(void 0,!(r[s]=null)))),r[f]=!0}),e.on("readable",function(e){o.nextTick(p,e)}.bind(null,r)),r}}).call(this,r(71))},{42:42,71:71}],40:[function(e,t,n){"use strict";function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=e(9).Buffer,r=e(7).inspect,o=r&&r.custom||"inspect";t.exports=function(){function e(){this.head=null,this.tail=null,this.length=0}var t=e.prototype;return t.push=function(e){var t={data:e,next:null};0<this.length?this.tail.next=t:this.head=t,this.tail=t,++this.length},t.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},t.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}},t.clear=function(){this.head=this.tail=null,this.length=0},t.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},t.concat=function(e){if(0===this.length)return s.alloc(0);for(var t,n,r,i=s.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,n=i,r=a,s.prototype.copy.call(t,n,r),a+=o.data.length,o=o.next;return i},t.consume=function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n},t.first=function(){return this.head.data},t._getString=function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?r+=i:r+=i.slice(0,e),0===(e-=o)){o===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t).data=i.slice(o);break}++n}return this.length-=n,r},t._getBuffer=function(e){var t=s.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0===(e-=o)){o===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n).data=i.slice(o);break}++r}return this.length-=r,t},t[o]=function(e,t){return r(this,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(e){i(t,e,n[e])})}return t}({},t,{depth:0,customInspect:!1}))},e}()},{7:7,9:9}],41:[function(e,t,n){(function(o){"use strict";function a(e,t){u(e,t),s(e)}function s(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function u(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var n=this,r=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return r||i?t?t(e):!e||this._writableState&&this._writableState.errorEmitted||o.nextTick(u,this,e):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(o.nextTick(a,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t?(o.nextTick(s,n),t(e)):o.nextTick(s,n)})),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)}}}).call(this,e(71))},{71:71}],42:[function(e,t,n){"use strict";var p=e(32).codes.ERR_STREAM_PREMATURE_CLOSE;function g(){}t.exports=function e(t,n,r){if("function"==typeof n)return e(t,null,n);n||(n={}),r=function(r){var i=!1;return function(){if(!i){i=!0;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.apply(this,t)}}}(r||g);function i(){t.writable||h()}function o(){d=!(f=!1),c||r.call(t)}function a(e){r.call(t,e)}function s(){var e;return f&&!d?(t._readableState&&t._readableState.ended||(e=new p),r.call(t,e)):c&&!l?(t._writableState&&t._writableState.ended||(e=new p),r.call(t,e)):void 0}function u(){t.req.on("finish",h)}var f=n.readable||!1!==n.readable&&t.readable,c=n.writable||!1!==n.writable&&t.writable,l=t._writableState&&t._writableState.finished,h=function(){l=!(c=!1),f||r.call(t)},d=t._readableState&&t._readableState.endEmitted;return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",h),t.on("abort",s),t.req?u():t.on("request",u)):c&&!t._writableState&&(t.on("end",i),t.on("close",i)),t.on("end",o),t.on("finish",h),!1!==n.error&&t.on("error",a),t.on("close",s),function(){t.removeListener("complete",h),t.removeListener("abort",s),t.removeListener("request",u),t.req&&t.req.removeListener("finish",h),t.removeListener("end",i),t.removeListener("close",i),t.removeListener("finish",h),t.removeListener("end",o),t.removeListener("error",a),t.removeListener("close",s)}}},{32:32}],43:[function(s,e,t){"use strict";var u;var n=s(32).codes,f=n.ERR_MISSING_ARGS,c=n.ERR_STREAM_DESTROYED;function l(e){if(e)throw e}function h(e){e()}function d(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];var i,o=function(e){return e.length?"function"!=typeof e[e.length-1]?l:e.pop():l}(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new f("streams");var a=r.map(function(e,t){var n=t<r.length-1;return function(t,e,n,r){r=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(r);var i=!1;t.on("close",function(){i=!0}),void 0===u&&(u=s(42)),u(t,{readable:e,writable:n},function(e){if(e)return r(e);i=!0,r()});var o=!1;return function(e){if(!i&&!o)return o=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void r(e||new c("pipe"))}}(e,n,0<t,function(e){i||(i=e),e&&a.forEach(h),n||(a.forEach(h),o(i))})});return r.reduce(d)}},{32:32,42:42}],44:[function(e,t,n){"use strict";var o=e(32).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,n,r){var i=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,r,n);if(null==i)return e.objectMode?16:16384;if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new o(r?n:"highWaterMark",i);return Math.floor(i)}}},{32:32}],45:[function(e,t,n){t.exports=e(21).EventEmitter},{21:21}],46:[function(e,t,n){(((n=t.exports=e(36)).Stream=n).Readable=n).Writable=e(38),n.Duplex=e(34),n.Transform=e(37),n.PassThrough=e(35),n.finished=e(42),n.pipeline=e(43)},{34:34,35:35,36:36,37:37,38:38,42:42,43:43}],47:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{17:17}],48:[function(e,t,n){var o=e(30).WriteError,a=e(51),s=e(49).getCallback,u=e(49).getOptions;function r(e){this._levelup=e,this.batch=e.db.batch(),this.ops=[],this.length=0}r.prototype.put=function(e,t){try{this.batch.put(e,t)}catch(e){throw new o(e)}return this.ops.push({type:"put",key:e,value:t}),this.length++,this},r.prototype.del=function(e){try{this.batch.del(e)}catch(e){throw new o(e)}return this.ops.push({type:"del",key:e}),this.length++,this},r.prototype.clear=function(){try{this.batch.clear()}catch(e){throw new o(e)}return this.ops=[],this.length=0,this},r.prototype.write=function(e,t){var n,r=this._levelup,i=this.ops;(t=s(e,t))||(n=(t=a()).promise),e=u(e);try{this.batch.write(e,function(e){if(e)return t(new o(e));r.emit("batch",i),t()})}catch(e){throw new o(e)}return n},t.exports=r},{30:30,49:49,51:51}],49:[function(e,t,n){n.getCallback=function(e,t){return"function"==typeof e?e:t},n.getOptions=function(e){return"object"==typeof e&&null!==e?e:{}}},{}],50:[function(_,m,e){(function(i){var o=_(21).EventEmitter,e=_(118).inherits,t=_(52),a=_(12),n=_(31),s=_(48),r=_(30),u=_(2),f=_(51),c=_(49).getCallback,l=_(49).getOptions,h=r.WriteError,d=r.ReadError,p=r.NotFoundError,g=r.OpenError,y=r.InitializationError;function v(e,t,n){if(!(this instanceof v))return new v(e,t,n);var r;if(o.call(this),this.setMaxListeners(1/0),"function"==typeof t&&(n=t,t={}),t=t||{},!e||"object"!=typeof e){if(r=new y("First argument must be an abstract-leveldown compliant store"),"function"==typeof n)return i.nextTick(n,r);throw r}u.strictEqual(typeof e.status,"string",".status required, old abstract-leveldown"),this.options=l(t),this._db=e,this.db=new a(e),this.open(n)}function b(e,t){if(!e._isOpening()&&!e.isOpen())return i.nextTick(t,new d("Database is not open")),!0}v.prototype.emit=o.prototype.emit,v.prototype.once=o.prototype.once,e(v,o),v.prototype.open=function(t){var e,n=this;return t||(e=(t=f()).promise),this.isOpen()?i.nextTick(t,null,n):this._isOpening()?this.once("open",function(){t(null,n)}):(this.emit("opening"),this.db.open(this.options,function(e){if(e)return t(new g(e));n.db=n._db,t(null,n),n.emit("open"),n.emit("ready")})),e},v.prototype.close=function(e){var t,n=this;return e||(t=(e=f()).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()?i.nextTick(e):"closing"===this.db.status?this.once("closed",e):this._isOpening()&&this.once("open",function(){n.close(e)}),t},v.prototype.isOpen=function(){return"open"===this.db.status},v.prototype._isOpening=function(){return"opening"===this.db.status},v.prototype.isClosed=function(){return/^clos|new/.test(this.db.status)},v.prototype.get=function(n,e,r){if(null==n)throw new d("get() requires a key argument");var t;return(r=c(e,r))||(t=(r=f()).promise),b(this,r)||(e=l(e),this.db.get(n,e,function(e,t){if(e)return e=/notfound/i.test(e)||e.notFound?new p("Key not found in database ["+n+"]",e):new d(e),r(e);r(null,t)})),t},v.prototype.put=function(t,n,e,r){if(null==t)throw new h("put() requires a key argument");var i,o=this;return(r=c(e,r))||(i=(r=f()).promise),b(this,r)||(e=l(e),this.db.put(t,n,e,function(e){if(e)return r(new h(e));o.emit("put",t,n),r()})),i},v.prototype.del=function(t,e,n){if(null==t)throw new h("del() requires a key argument");var r,i=this;return(n=c(e,n))||(r=(n=f()).promise),b(this,n)||(e=l(e),this.db.del(t,e,function(e){if(e)return n(new h(e));i.emit("del",t),n()})),r},v.prototype.batch=function(t,e,n){if(!arguments.length)return new s(this);if(!Array.isArray(t))throw new h("batch() requires an array argument");var r,i=this;return(n=c(e,n))||(r=(n=f()).promise),b(this,n)||(e=l(e),this.db.batch(t,e,function(e){if(e)return n(new h(e));i.emit("batch",t),n()})),r},v.prototype.iterator=function(e){return this.db.iterator(e)},v.prototype.readStream=v.prototype.createReadStream=function(e){return"number"!=typeof(e=t({keys:!0,values:!0},e)).limit&&(e.limit=-1),new n(this.db.iterator(e),e)},v.prototype.keyStream=v.prototype.createKeyStream=function(e){return this.createReadStream(t(e,{keys:!0,values:!1}))},v.prototype.valueStream=v.prototype.createValueStream=function(e){return this.createReadStream(t(e,{keys:!1,values:!0}))},v.prototype.toString=function(){return"LevelUP"},v.errors=r,m.exports=v.default=v}).call(this,_(71))},{118:118,12:12,2:2,21:21,30:30,31:31,48:48,49:49,51:51,52:52,71:71}],51:[function(e,t,n){t.exports=function(){var e,t=new Promise(function(n,r){e=function(e,t){e?r(e):n(t)}});return e.promise=t,e}},{}],52:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{17:17}],53:[function(e,t,p){(function(o){function a(e){return void 0!==e&&""!==e}function u(e,t){return Object.hasOwnProperty.call(e,t)}function t(e,t){return Object.hasOwnProperty.call(e,t)&&t}p.compare=function(e,t){if(o.isBuffer(e)){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var i=e[r]-t[r];if(i)return i}return e.length-t.length}return e<t?-1:t<e?1:0};var r=p.lowerBoundKey=function(e){return t(e,"gt")||t(e,"gte")||t(e,"min")||(e.reverse?t(e,"end"):t(e,"start"))||void 0},s=p.lowerBound=function(e,t){var n=r(e);return n?e[n]:t},n=p.lowerBoundInclusive=function(e){return!u(e,"gt")},i=p.upperBoundInclusive=function(e){return!u(e,"lt")},f=p.lowerBoundExclusive=function(e){return!n(e)},c=p.upperBoundExclusive=function(e){return!i(e)},l=p.upperBoundKey=function(e){return t(e,"lt")||t(e,"lte")||t(e,"max")||(e.reverse?t(e,"start"):t(e,"end"))||void 0},h=p.upperBound=function(e,t){var n=l(e);return n?e[n]:t};function d(e){return e}p.start=function(e,t){return e.reverse?h(e,t):s(e,t)},p.end=function(e,t){return e.reverse?s(e,t):h(e,t)},p.startInclusive=function(e){return e.reverse?i(e):n(e)},p.endInclusive=function(e){return e.reverse?n(e):i(e)},p.toLtgt=function(e,t,n,r,i){t=t||{},n=n||d;var o=3<arguments.length,a=p.lowerBoundKey(e),s=p.upperBoundKey(e);return a?"gt"===a?t.gt=n(e.gt,!1):t.gte=n(e[a],!1):o&&(t.gte=n(r,!1)),s?"lt"===s?t.lt=n(e.lt,!0):t.lte=n(e[s],!0):o&&(t.lte=n(i,!0)),null!=e.reverse&&(t.reverse=!!e.reverse),u(t,"max")&&delete t.max,u(t,"min")&&delete t.min,u(t,"start")&&delete t.start,u(t,"end")&&delete t.end,t},p.contains=function(e,t,n){n=n||p.compare;var r=s(e);if(a(r)&&((i=n(t,r))<0||0===i&&f(e)))return!1;var i,o=h(e);if(a(o)&&(0<(i=n(t,o))||0===i&&c(e)))return!1;return!0},p.filter=function(t,n){return function(e){return p.contains(t,e,n)}}}).call(this,{isBuffer:e(26)})},{26:26}],54:[function(e,t,n){t.exports=e(61)},{61:61}],55:[function(p,g,e){(function(i){var e=p(25),t=p(59).AbstractLevelDOWN,r=p(59).AbstractIterator,o=p(67),n=p(22),a={},f=p(54);function s(e){return 0<o.compare(e,this._end)}function u(e){return 0<=o.compare(e,this._end)}function c(e){return o.compare(e,this._end)<0}function l(e){return o.compare(e,this._end)<=0}function h(e,t){r.call(this,e),this._limit=t.limit,-1===this._limit&&(this._limit=1/0);var n=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=o.upperBound(t),this._end=o.lowerBound(t),void 0===this._start?this._tree=n.end:o.upperBoundInclusive(t)?this._tree=n.le(this._start):this._tree=n.lt(this._start),this._end&&(o.lowerBoundInclusive(t)?this._test=u:this._test=s)):(this._incr="next",this._start=o.lowerBound(t),this._end=o.upperBound(t),void 0===this._start?this._tree=n.begin:o.lowerBoundInclusive(t)?this._tree=n.ge(this._start):this._tree=n.gt(this._start),this._end&&(o.upperBoundInclusive(t)?this._test=l:this._test=c))}function d(e){if(!(this instanceof d))return new d(e);t.call(this,"string"==typeof e?e:""),this._location=this.location?"$"+this.location:"_tree",this._store=this.location?a:this,this._store[this._location]=this._store[this._location]||n(o.compare)}e(h,r),h.prototype._next=function(e){var t,n;return this._done++>=this._limit?f(e):this._tree.valid?(t=this._tree.key,n=this._tree.value,this._test(t)?(this.keyAsBuffer&&(t=new i(t)),this.valueAsBuffer&&(n=new i(n)),this._tree[this._incr](),void f(function(){e(null,t,n)})):f(e)):f(e)},h.prototype._test=function(){return!0},d.clearGlobalStore=function(e){e?Object.keys(a).forEach(function(e){delete a[e]}):a={}},e(d,t),d.prototype._open=function(e,t){var n=this;f(function(){t(null,n)})},d.prototype._put=function(e,t,n,r){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(r)},d.prototype._get=function(e,t,n){var r=this._store[this._location].get(e);if(void 0===r)return f(function(){n(new Error("NotFound"))});!1===t.asBuffer||this._isBuffer(r)||(r=new i(String(r))),f(function(){n(null,r)})},d.prototype._del=function(e,t,n){this._store[this._location]=this._store[this._location].remove(e),f(n)},d.prototype._batch=function(e,t,n){for(var r,i,o,a=-1,s=e.length,u=this._store[this._location];++a<s;)e[a]&&(r=this._isBuffer(e[a].key)?e[a].key:String(e[a].key),o=u.find(r),u="put"===e[a].type?(i=this._isBuffer(e[a].value)?e[a].value:String(e[a].value),o.valid?o.update(i):u.insert(r,i)):o.remove());this._store[this._location]=u,f(n)},d.prototype._iterator=function(e){return new h(this,e)},d.prototype._isBuffer=function(e){return i.isBuffer(e)},d.destroy=function(e,t){var n="$"+e;n in a&&delete a[n],f(t)},g.exports=d}).call(this,p(9).Buffer)},{22:22,25:25,54:54,59:59,67:67,9:9}],56:[function(e,t,n){(function(n){function e(e){this._db=e,this._operations=[],this._written=!1}e.prototype._checkWritten=function(){if(this._written)throw new Error("write() already called on this batch")},e.prototype.put=function(e,t){this._checkWritten();var n=this._db._checkKey(e,"key",this._db._isBuffer);if(n)throw n;return this._db._isBuffer(e)||(e=String(e)),this._db._isBuffer(t)||(t=String(t)),"function"==typeof this._put?this._put(e,t):this._operations.push({type:"put",key:e,value:t}),this},e.prototype.del=function(e){this._checkWritten();var t=this._db._checkKey(e,"key",this._db._isBuffer);if(t)throw t;return this._db._isBuffer(e)||(e=String(e)),"function"==typeof this._del?this._del(e):this._operations.push({type:"del",key:e}),this},e.prototype.clear=function(){return this._checkWritten(),this._operations=[],"function"==typeof this._clear&&this._clear(),this},e.prototype.write=function(e,t){if(this._checkWritten(),"function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("write() requires a callback argument");return"object"!=typeof e&&(e={}),this._written=!0,"function"==typeof this._write?this._write(t):"function"==typeof this._db._batch?this._db._batch(this._operations,e,t):void n.nextTick(t)},t.exports=e}).call(this,e(71))},{71:71}],57:[function(e,t,n){(function(n){function e(e){this.db=e,this._ended=!1,this._nexting=!1}e.prototype.next=function(e){var t=this;if("function"!=typeof e)throw new Error("next() requires a callback argument");return t._ended?e(new Error("cannot call next() after end()")):t._nexting?e(new Error("cannot call next() before previous next() has completed")):(t._nexting=!0,"function"==typeof t._next?t._next(function(){t._nexting=!1,e.apply(null,arguments)}):void n.nextTick(function(){t._nexting=!1,e()}))},e.prototype.end=function(e){if("function"!=typeof e)throw new Error("end() requires a callback argument");return this._ended?e(new Error("end() already called on iterator")):(this._ended=!0,"function"==typeof this._end?this._end(e):void n.nextTick(e))},t.exports=e}).call(this,e(71))},{71:71}],58:[function(o,a,e){(function(t,s){var e=o(68),n=o(57),r=o(56);function i(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"}i.prototype.open=function(e,t){var n=this,r=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 n.status=r,t(e);n.status="open",t()})):(this.status="open",s.nextTick(t))},i.prototype.close=function(t){var n=this,r=this.status;if("function"!=typeof t)throw new Error("close() requires a callback argument");"function"==typeof this._close?(this.status="closing",this._close(function(e){if(e)return n.status=r,t(e);n.status="closed",t()})):(this.status="closed",s.nextTick(t))},i.prototype.get=function(e,t,n){var r;if("function"==typeof t&&(n=t),"function"!=typeof n)throw new Error("get() requires a callback argument");return(r=this._checkKey(e,"key",this._isBuffer))?n(r):(this._isBuffer(e)||(e=String(e)),"object"!=typeof t&&(t={}),t.asBuffer=0!=t.asBuffer,"function"==typeof this._get?this._get(e,t,n):void s.nextTick(function(){n(new Error("NotFound"))}))},i.prototype.put=function(e,t,n,r){var i;if("function"==typeof n&&(r=n),"function"!=typeof r)throw new Error("put() requires a callback argument");return(i=this._checkKey(e,"key",this._isBuffer))?r(i):(this._isBuffer(e)||(e=String(e)),null==t||this._isBuffer(t)||s.browser||(t=String(t)),"object"!=typeof n&&(n={}),"function"==typeof this._put?this._put(e,t,n,r):void s.nextTick(r))},i.prototype.del=function(e,t,n){var r;if("function"==typeof t&&(n=t),"function"!=typeof n)throw new Error("del() requires a callback argument");return(r=this._checkKey(e,"key",this._isBuffer))?n(r):(this._isBuffer(e)||(e=String(e)),"object"!=typeof t&&(t={}),"function"==typeof this._del?this._del(e,t,n):void s.nextTick(n))},i.prototype.batch=function(e,t,n){if(!arguments.length)return this._chainedBatch();if("function"==typeof t&&(n=t),"function"==typeof e&&(n=e),"function"!=typeof n)throw new Error("batch(array) requires a callback argument");if(!Array.isArray(e))return n(new Error("batch(array) requires an array argument"));t&&"object"==typeof t||(t={});for(var r,i,o=0,a=e.length;o<a;o++)if("object"==typeof(r=e[o])){if(i=this._checkKey(r.type,"type",this._isBuffer))return n(i);if(i=this._checkKey(r.key,"key",this._isBuffer))return n(i)}if("function"==typeof this._batch)return this._batch(e,t,n);s.nextTick(n)},i.prototype.approximateSize=function(e,t,n){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 n)throw new Error("approximateSize() requires a callback argument");if(this._isBuffer(e)||(e=String(e)),this._isBuffer(t)||(t=String(t)),"function"==typeof this._approximateSize)return this._approximateSize(e,t,n);s.nextTick(function(){n(null,0)})},i.prototype._setupIteratorOptions=function(t){var n=this;return t=e(t),["start","end","gt","gte","lt","lte"].forEach(function(e){t[e]&&n._isBuffer(t[e])&&0===t[e].length&&delete t[e]}),t.reverse=!!t.reverse,t.keys=0!=t.keys,t.values=0!=t.values,t.limit="limit"in t?t.limit:-1,t.keyAsBuffer=0!=t.keyAsBuffer,t.valueAsBuffer=0!=t.valueAsBuffer,t},i.prototype.iterator=function(e){return"object"!=typeof e&&(e={}),e=this._setupIteratorOptions(e),"function"==typeof this._iterator?this._iterator(e):new n(this)},i.prototype._chainedBatch=function(){return new r(this)},i.prototype._isBuffer=function(e){return t.isBuffer(e)},i.prototype._checkKey=function(e,t){if(null==e)return new Error(t+" cannot be `null` or `undefined`");if(this._isBuffer(e)){if(0===e.length)return new Error(t+" cannot be an empty Buffer")}else if(""===String(e))return new Error(t+" cannot be an empty String")},a.exports=i}).call(this,{isBuffer:o(26)},o(71))},{26:26,56:56,57:57,68:68,71:71}],59:[function(e,t,n){n.AbstractLevelDOWN=e(58),n.AbstractIterator=e(57),n.AbstractChainedBatch=e(56),n.isLevelDOWN=e(60)},{56:56,57:57,58:58,60:60}],60:[function(e,t,n){var r=e(58);t.exports=function(t){return!(!t||"object"!=typeof t)&&Object.keys(r.prototype).filter(function(e){return"_"!=e[0]&&"approximateSize"!=e}).every(function(e){return"function"==typeof t[e]})}},{58:58}],61:[function(e,t,n){"use strict";var r,i,o,a=[e(64),e(63),e(62),e(65),e(66)],s=-1,u=[],f=!1;function c(){r&&i&&(r=!1,i.length?u=i.concat(u):s=-1,u.length&&l())}function l(){if(!r){r=!(f=!1);for(var e=u.length,t=setTimeout(c);e;){for(i=u,u=[];i&&++s<e;)i[s].run();s=-1,e=u.length}i=null,r=!(s=-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(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),f||r||(f=!0,o())}},{62:62,63:63,64:64,65:65,66:66}],62:[function(e,t,r){(function(n){"use strict";r.test=function(){return!n.setImmediate&&void 0!==n.MessageChannel},r.install=function(e){var t=new n.MessageChannel;return t.port1.onmessage=e,function(){t.port2.postMessage(0)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],63:[function(e,t,n){(function(i){"use strict";var o=i.MutationObserver||i.WebKitMutationObserver;n.test=function(){return o},n.install=function(e){var t=0,n=new o(e),r=i.document.createTextNode("");return n.observe(r,{characterData:!0}),function(){r.data=t=++t%2}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],64:[function(e,t,n){(function(t){"use strict";n.test=function(){return void 0!==t&&!t.browser},n.install=function(e){return function(){t.nextTick(e)}}}).call(this,e(71))},{71:71}],65:[function(e,t,r){(function(n){"use strict";r.test=function(){return"document"in n&&"onreadystatechange"in n.document.createElement("script")},r.install=function(t){return function(){var e=n.document.createElement("script");return e.onreadystatechange=function(){t(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},n.document.documentElement.appendChild(e),t}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],66:[function(e,t,n){"use strict";n.test=function(){return!0},n.install=function(e){return function(){setTimeout(e,0)}}},{}],67:[function(e,t,p){(function(o){function u(e,t){return Object.hasOwnProperty.call(e,t)}function a(e){return void 0!==e&&""!==e}function u(e,t){return Object.hasOwnProperty.call(e,t)}function t(e,t){return Object.hasOwnProperty.call(e,t)&&t}p.compare=function(e,t){if(o.isBuffer(e)){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var i=e[r]-t[r];if(i)return i}return e.length-t.length}return e<t?-1:t<e?1:0};var n=p.lowerBoundKey=function(e){return t(e,"gt")||t(e,"gte")||t(e,"min")||(e.reverse?t(e,"end"):t(e,"start"))||void 0},s=p.lowerBound=function(e){var t=n(e);return t&&e[t]},r=p.lowerBoundInclusive=function(e){return!u(e,"gt")},i=p.upperBoundInclusive=function(e){return!u(e,"lt")},f=p.lowerBoundExclusive=function(e){return!r(e)},c=p.upperBoundExclusive=function(e){return!i(e)},l=p.upperBoundKey=function(e){return t(e,"lt")||t(e,"lte")||t(e,"max")||(e.reverse?t(e,"start"):t(e,"end"))||void 0},h=p.upperBound=function(e){var t=l(e);return t&&e[t]};function d(e){return e}p.toLtgt=function(e,t,n,r,i){t=t||{},n=n||d;var o=3<arguments.length,a=p.lowerBoundKey(e),s=p.upperBoundKey(e);return a?"gt"===a?t.gt=n(e.gt,!1):t.gte=n(e[a],!1):o&&(t.gte=n(r,!1)),s?"lt"===s?t.lt=n(e.lt,!0):t.lte=n(e[s],!0):o&&(t.lte=n(i,!0)),null!=e.reverse&&(t.reverse=!!e.reverse),u(t,"max")&&delete t.max,u(t,"min")&&delete t.min,u(t,"start")&&delete t.start,u(t,"end")&&delete t.end,t},p.contains=function(e,t,n){n=n||p.compare;var r=s(e);if(a(r)&&((i=n(t,r))<0||0===i&&f(e)))return!1;var i,o=h(e);if(a(o)&&(0<(i=n(t,o))||0===i&&c(e)))return!1;return!0},p.filter=function(t,n){return function(e){return p.contains(t,e,n)}}}).call(this,{isBuffer:e(26)})},{26:26}],68:[function(e,t,n){arguments[4][17][0].apply(n,arguments)},{17:17}],69:[function(e,t,n){"use strict";var u=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,i=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),o=1;o<arguments.length;o++){for(var a in n=Object(arguments[o]))f.call(n,a)&&(i[a]=n[a]);if(u){r=u(n);for(var s=0;s<r.length;s++)c.call(n,r[s])&&(i[r[s]]=n[r[s]])}}return i}},{}],70:[function(e,t,n){(function(s){"use strict";!s.version||0===s.version.indexOf("v0.")||0===s.version.indexOf("v1.")&&0!==s.version.indexOf("v1.8.")?t.exports={nextTick:function(e,t,n,r){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,o,a=arguments.length;switch(a){case 0:case 1:return s.nextTick(e);case 2:return s.nextTick(function(){e.call(null,t)});case 3:return s.nextTick(function(){e.call(null,t,n)});case 4:return s.nextTick(function(){e.call(null,t,n,r)});default:for(i=new Array(a-1),o=0;o<i.length;)i[o++]=arguments[o];return s.nextTick(function(){e.apply(null,i)})}}}:t.exports=s}).call(this,e(71))},{71:71}],71:[function(e,t,n){var r,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(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var f,c=[],l=!1,h=-1;function d(){l&&f&&(l=!1,f.length?c=f.concat(c):h=-1,c.length&&p())}function p(){if(!l){var e=u(d);l=!0;for(var t=c.length;t;){for(f=c,c=[];++h<t;)f&&f[h].run();h=-1,t=c.length}f=null,l=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function y(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new g(e,t)),1!==c.length||l||u(p)},g.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=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,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}},{}],72:[function(e,t,n){var r,i;r=this,i=function(){var o="function"==typeof Object.defineProperty?function(e,t,n){return Object.defineProperty(e,t,n),e}:function(e,t,n){return e[t]=n.value,e};return function(e,t,n,r){var i;if(r=function(e,t){function n(e){return r?!!t[e]:i&&-1<t.indexOf(e[0])}var r="object"==typeof t,i=!r&&"string"==typeof t;return{enumerable:n("enumerable"),configurable:n("configurable"),writable:n("writable"),value:e}}(n,r),"object"!=typeof t)return o(e,t,r);for(i in t)Object.hasOwnProperty.call(t,i)&&(r.value=t[i],o(e,i,r));return e}},void 0!==t&&t.exports?t.exports=i():r.prr=i()},{}],73:[function(s,u,e){(function(e){u.exports=o;var t=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t},n=s(10);n.inherits=s(25);var r=s(75),i=s(77);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e),i.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",a)}function a(){this.allowHalfOpen||this._writableState.ended||e.nextTick(this.end.bind(this))}n.inherits(o,r),function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}(t(i.prototype),function(e){o.prototype[e]||(o.prototype[e]=i.prototype[e])})}).call(this,s(71))},{10:10,25:25,71:71,75:75,77:77}],74:[function(e,t,n){t.exports=o;var r=e(76),i=e(10);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=e(25),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},{10:10,25:25,76:76}],75:[function(m,w,e){(function(d){w.exports=n;var p=m(27),h=m(9).Buffer;n.ReadableState=t;var g=m(21).EventEmitter;g.listenerCount||(g.listenerCount=function(e,t){return e.listeners(t).length});var r,i=m(82),e=m(10);function t(e,t){var n=(e=e||{}).highWaterMark;this.highWaterMark=n||0===n?n:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!e.objectMode,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(r||(r=m(78).StringDecoder),this.decoder=new r(e.encoding),this.encoding=e.encoding)}function n(e){if(!(this instanceof n))return new n(e);this._readableState=new t(e,this),this.readable=!0,i.call(this)}function o(e,t,n,r,i){var o=function(e,t){var n=null;h.isBuffer(t)||"string"==typeof t||null==t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));return n}(t,n);if(o)e.emit("error",o);else if(null==n)t.reading=!1,t.ended||function(e,t){if(t.decoder&&!t.ended){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,0<t.length?u(e):b(e)}(e,t);else if(t.objectMode||n&&0<n.length)if(t.ended&&!i){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){a=new Error("stream.unshift() after end event");e.emit("error",a)}else!t.decoder||i||r||(n=t.decoder.write(n)),t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):(t.reading=!1,t.buffer.push(n)),t.needReadable&&u(e),function(e,t){t.readingMore||(t.readingMore=!0,d.nextTick(function(){!function(e,t){var n=t.length;for(;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}(e,t)}))}(e,t);else i||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}e.inherits=m(25),e.inherits(n,i),n.prototype.push=function(e,t){var n=this._readableState;return"string"!=typeof e||n.objectMode||(t=t||n.defaultEncoding)!==n.encoding&&(e=new h(e,t),t=""),o(this,n,e,t,!1)},n.prototype.unshift=function(e){return o(this,this._readableState,e,"",!0)},n.prototype.setEncoding=function(e){r||(r=m(78).StringDecoder),this._readableState.decoder=new r(e),this._readableState.encoding=e};var a=8388608;function s(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:null===e||isNaN(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=function(e){if(a<=e)e=a;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 u(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,t.sync?d.nextTick(function(){f(e)}):f(e))}function f(e){e.emit("readable")}function y(e){var r,i=e._readableState;function t(e,t,n){!1===e.write(r)&&i.awaitDrain++}for(i.awaitDrain=0;i.pipesCount&&null!==(r=e.read());)if(1===i.pipesCount?t(i.pipes):_(i.pipes,t),e.emit("data",r),0<i.awaitDrain)return;if(0===i.pipesCount)return i.flowing=!1,void(0<g.listenerCount(e,"data")&&c(e));i.ranOut=!0}function v(){this._readableState.ranOut&&(this._readableState.ranOut=!1,y(this))}function c(t,e){if(t._readableState.flowing)throw new Error("Cannot switch to old mode now.");var n=e||!1,r=!1;t.readable=!0,t.pipe=i.prototype.pipe,t.on=t.addListener=i.prototype.on,t.on("readable",function(){var e;for(r=!0;!n&&null!==(e=t.read());)t.emit("data",e);null===e&&(r=!1,t._readableState.needReadable=!0)}),t.pause=function(){n=!0,this.emit("pause")},t.resume=function(){n=!1,r?d.nextTick(function(){t.emit("readable")}):this.read(0),this.emit("resume")},t.emit("readable")}function l(e,t){var n,r=t.buffer,i=t.length,o=!!t.decoder,a=!!t.objectMode;if(0===r.length)return null;if(0===i)n=null;else if(a)n=r.shift();else if(!e||i<=e)n=o?r.join(""):h.concat(r,i),r.length=0;else{if(e<r[0].length)n=(c=r[0]).slice(0,e),r[0]=c.slice(e);else if(e===r[0].length)n=r.shift();else{n=o?"":new h(e);for(var s=0,u=0,f=r.length;u<f&&s<e;u++){var c=r[0],l=Math.min(e-s,c.length);o?n+=c.slice(0,l):c.copy(n,s,0,l),l<c.length?r[0]=c.slice(l):r.shift(),s+=l}}}return n}function b(e){var t=e._readableState;if(0<t.length)throw new Error("endReadable called on non-empty stream");!t.endEmitted&&t.calledRead&&(t.ended=!0,d.nextTick(function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function _(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}n.prototype.read=function(e){var t=this._readableState;t.calledRead=!0;var n,r=e;if(("number"!=typeof e||0<e)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return u(this),null;if(0===(e=s(e,t))&&t.ended)return n=null,0<t.length&&t.decoder&&(n=l(e,t),t.length-=n.length),0===t.length&&b(this),n;var i=t.needReadable;return t.length-e<=t.highWaterMark&&(i=!0),(t.ended||t.reading)&&(i=!1),i&&(t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),i&&!t.reading&&(e=s(r,t)),null===(n=0<e?l(e,t):null)&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),t.ended&&!t.endEmitted&&0===t.length&&b(this),n},n.prototype._read=function(e){this.emit("error",new Error("not implemented"))},n.prototype.pipe=function(t,e){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=t;break;case 1:r.pipes=[r.pipes,t];break;default:r.pipes.push(t)}r.pipesCount+=1;var i=(!e||!1!==e.end)&&t!==d.stdout&&t!==d.stderr?a:u;function o(e){e===n&&u()}function a(){t.end()}r.endEmitted?d.nextTick(i):n.once("end",i),t.on("unpipe",o);var s=function(t){return function(){var e=t._readableState;e.awaitDrain--,0===e.awaitDrain&&y(t)}}(n);function u(){t.removeListener("close",c),t.removeListener("finish",l),t.removeListener("drain",s),t.removeListener("error",f),t.removeListener("unpipe",o),n.removeListener("end",a),n.removeListener("end",u),t._writableState&&!t._writableState.needDrain||s()}function f(e){h(),t.removeListener("error",f),0===g.listenerCount(t,"error")&&t.emit("error",e)}function c(){t.removeListener("finish",l),h()}function l(){t.removeListener("close",c),h()}function h(){n.unpipe(t)}return t.on("drain",s),t._events&&t._events.error?p(t._events.error)?t._events.error.unshift(f):t._events.error=[f,t._events.error]:t.on("error",f),t.once("close",c),t.once("finish",l),t.emit("pipe",n),r.flowing||(this.on("readable",v),r.flowing=!0,d.nextTick(function(){y(n)})),t},n.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,this.removeListener("readable",v),t.flowing=!1,e&&e.emit("unpipe",this)),this;if(e)return-1===(i=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;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;var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,this.removeListener("readable",v),t.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this},n.prototype.addListener=n.prototype.on=function(e,t){var n=i.prototype.on.call(this,e,t);if("data"!==e||this._readableState.flowing||c(this),"readable"===e&&this.readable){var r=this._readableState;r.readableListening||(r.readableListening=!0,r.emittedReadable=!1,r.needReadable=!0,r.reading?r.length&&u(this):this.read(0))}return n},n.prototype.resume=function(){c(this),this.read(0),this.emit("resume")},n.prototype.pause=function(){c(this,!0),this.emit("pause")},n.prototype.wrap=function(t){var n=this._readableState,r=!1,i=this;for(var e in t.on("end",function(){if(n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&i.push(e)}i.push(null)}),t.on("data",function(e){n.decoder&&(e=n.decoder.write(e)),n.objectMode&&null==e||(n.objectMode||e&&e.length)&&(i.push(e)||(r=!0,t.pause()))}),t)"function"==typeof t[e]&&void 0===this[e]&&(this[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e));return _(["error","close","destroy","pause","resume"],function(e){t.on(e,i.emit.bind(i,e))}),i._read=function(e){r&&(r=!1,t.resume())},i},n._fromList=l}).call(this,m(71))},{10:10,21:21,25:25,27:27,71:71,78:78,82:82,9:9}],76:[function(e,t,n){t.exports=a;var r=e(73),i=e(10);function o(e,n){this.afterTransform=function(e,t){return function(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,(r.writecb=null)!=n&&e.push(n);i&&i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}(n,e,t)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function a(e){if(!(this instanceof a))return new a(e);r.call(this,e);this._transformState=new o(e,this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("finish",function(){"function"==typeof this._flush?this._flush(function(e){s(t,e)}):s(t)})}function s(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=(e._readableState,e._transformState);if(n.length)throw new Error("calling transform done when ws.length != 0");if(r.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}i.inherits=e(25),i.inherits(a,r),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,n){throw new Error("not implemented")},a.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.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}},{10:10,25:25,73:73}],77:[function(h,t,e){(function(a){t.exports=i;var s=h(9).Buffer;i.WritableState=r;var e=h(10);e.inherits=h(25);var n=h(82);function u(e,t,n){this.chunk=e,this.encoding=t,this.callback=n}function r(e,t){var n=(e=e||{}).highWaterMark;this.highWaterMark=n||0===n?n:16384,this.objectMode=!!e.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1;var r=(this.finished=!1)===e.decodeStrings;this.decodeStrings=!r,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){n?a.nextTick(function(){i(r)}):i(r);e._writableState.errorEmitted=!0,e.emit("error",r)}(e,0,r,t,i);else{var o=l(e,n);o||n.bufferProcessing||!n.buffer.length||function(e,t){t.bufferProcessing=!0;for(var n=0;n<t.buffer.length;n++){var r=t.buffer[n],i=r.chunk,o=r.encoding,a=r.callback,s=t.objectMode?1:i.length;if(f(e,t,s,i,o,a),t.writing){n++;break}}t.bufferProcessing=!1,n<t.buffer.length?t.buffer=t.buffer.slice(n):t.buffer.length=0}(e,n),r?a.nextTick(function(){c(e,n,o,i)}):c(e,n,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.buffer=[],this.errorEmitted=!1}function i(e){var t=h(73);if(!(this instanceof i||this instanceof t))return new i(e);this._writableState=new r(e,this),this.writable=!0,n.call(this)}function f(e,t,n,r,i,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,e._write(r,i,t.onwrite),t.sync=!1}function c(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),r(),n&&o(e,t)}function l(e,t){return t.ending&&0===t.length&&!t.finished&&!t.writing}function o(e,t){var n=l(0,t);return n&&(t.finished=!0,e.emit("finish")),n}e.inherits(i,n),i.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},i.prototype.write=function(e,t,n){var r=this._writableState,i=!1;return"function"==typeof t&&(n=t,t=null),s.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=function(){}),r.ended?function(e,t,n){var r=new Error("write after end");e.emit("error",r),a.nextTick(function(){n(r)})}(this,0,n):function(e,t,n,r){var i=!0;if(!s.isBuffer(n)&&"string"!=typeof n&&null!=n&&!t.objectMode){var o=new TypeError("Invalid non-string/buffer chunk");e.emit("error",o),a.nextTick(function(){r(o)}),i=!1}return i}(this,r,e,n)&&(i=function(e,t,n,r,i){n=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=new s(t,n));return t}(t,n,r),s.isBuffer(n)&&(r="buffer");var o=t.objectMode?1:n.length;t.length+=o;var a=t.length<t.highWaterMark;a||(t.needDrain=!0);t.writing?t.buffer.push(new u(n,r,i)):f(e,t,o,n,r,i);return a}(this,r,e,t,n)),i},i.prototype._write=function(e,t,n){n(new Error("not implemented"))},i.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,t=e=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.ending||r.finished||function(e,t,n){t.ending=!0,o(e,t),n&&(t.finished?a.nextTick(n):e.once("finish",n));t.ended=!0}(this,r,n)}}).call(this,h(71))},{10:10,25:25,71:71,73:73,82:82,9:9}],78:[function(e,t,n){var r=e(9).Buffer,i=r.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=n.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 r(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 n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(e=e.slice(n,e.length),!(55296<=(i=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))&&i<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var r=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,r),r-=this.charReceived);var i;r=(t+=e.toString(this.encoding,0,r)).length-1;if(55296<=(i=t.charCodeAt(r))&&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,r)}return t},o.prototype.detectIncompleteChar=function(e){for(var t=3<=e.length?3:e.length;0<t;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>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 n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t}},{9:9}],79:[function(e,t,n){var r=e(82);(n=t.exports=e(75)).Stream=r,(n.Readable=n).Writable=e(77),n.Duplex=e(73),n.Transform=e(76),n.PassThrough=e(74)},{73:73,74:74,75:75,76:76,77:77,82:82}],80:[function(e,t,n){var r=e(9),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,n),n.Buffer=a),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},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 r.SlowBuffer(e)}},{9:9}],81:[function(e,n,r){!function(e){if("object"==typeof r)n.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var t;try{t=window}catch(e){t=self}t.SparkMD5=e()}}(function(f){"use strict";var r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function c(e,t){var n=e[0],r=e[1],i=e[2],o=e[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+t[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+t[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+t[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+t[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=o+e[3]|0}function l(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function h(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function i(e){var t,n,r,i,o,a,s=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=s;t+=64)c(u,l(e.substring(t-64,t)));for(n=(e=e.substring(t-64)).length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<n;t+=1)r[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(r[t>>2]|=128<<(t%4<<3),55<t)for(c(u,r),t=0;t<16;t+=1)r[t]=0;return i=(i=8*s).toString(16).match(/(.*?)(.{0,8})$/),o=parseInt(i[2],16),a=parseInt(i[1],16)||0,r[14]=o,r[15]=a,c(u,r),u}function n(e){var t,n="";for(t=0;t<4;t+=1)n+=r[e>>8*t+4&15]+r[e>>8*t&15];return n}function a(e){var t;for(t=0;t<e.length;t+=1)e[t]=n(e[t]);return e.join("")}function d(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}function o(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function s(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function u(){this.reset()}return"5d41402abc4b2a76b9719d911017c592"!==a(i("hello"))&&function(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n},"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(e,t){var n,r,i,o,a=this.byteLength,s=d(e,a),u=a;return t!==f&&(u=d(t,a)),u<s?new ArrayBuffer(0):(n=u-s,r=new ArrayBuffer(n),i=new Uint8Array(r),o=new Uint8Array(this,s,n),i.set(o),r)}),u.prototype.append=function(e){return this.appendBinary(o(e)),this},u.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,n=this._buff.length;for(t=64;t<=n;t+=64)c(this._hash,l(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},u.prototype.end=function(e){var t,n,r=this._buff,i=r.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]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),n=a(this._hash),e&&(n=s(n)),this.reset(),n},u.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},u.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash}},u.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},u.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},u.prototype._finish=function(e,t){var n,r,i,o=t;if(e[o>>2]|=128<<(o%4<<3),55<o)for(c(this._hash,e),o=0;o<16;o+=1)e[o]=0;n=(n=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),r=parseInt(n[2],16),i=parseInt(n[1],16)||0,e[14]=r,e[15]=i,c(this._hash,e)},u.hash=function(e,t){return u.hashBinary(o(e),t)},u.hashBinary=function(e,t){var n=a(i(e));return t?s(n):n},(u.ArrayBuffer=function(){this.reset()}).prototype.append=function(e){var t,n=function(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}(this._buff.buffer,e,!0),r=n.length;for(this._length+=e.byteLength,t=64;t<=r;t+=64)c(this._hash,h(n.subarray(t-64,t)));return this._buff=t-64<r?new Uint8Array(n.buffer.slice(t-64)):new Uint8Array(0),this},u.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,i=r.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]|=r[t]<<(t%4<<3);return this._finish(o,i),n=a(this._hash),e&&(n=s(n)),this.reset(),n},u.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},u.ArrayBuffer.prototype.getState=function(){var e=u.prototype.getState.call(this);return e.buff=function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}(e.buff),e},u.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var n,r=e.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=e.charCodeAt(n);return t?o:i}(e.buff,!0),u.prototype.setState.call(this,e)},u.ArrayBuffer.prototype.destroy=u.prototype.destroy,u.ArrayBuffer.prototype._finish=u.prototype._finish,u.ArrayBuffer.hash=function(e,t){var n=a(function(e){var t,n,r,i,o,a,s=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=s;t+=64)c(u,h(e.subarray(t-64,t)));for(n=(e=t-64<s?e.subarray(t-64):new Uint8Array(0)).length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<n;t+=1)r[t>>2]|=e[t]<<(t%4<<3);if(r[t>>2]|=128<<(t%4<<3),55<t)for(c(u,r),t=0;t<16;t+=1)r[t]=0;return i=(i=8*s).toString(16).match(/(.*?)(.{0,8})$/),o=parseInt(i[2],16),a=parseInt(i[1],16)||0,r[14]=o,r[15]=a,c(u,r),u}(new Uint8Array(e)));return t?s(n):n},u})},{}],82:[function(e,t,n){t.exports=r;var c=e(21).EventEmitter;function r(){c.call(this)}e(25)(r,c),r.Readable=e(94),r.Writable=e(96),r.Duplex=e(84),r.Transform=e(95),r.PassThrough=e(93),(r.Stream=r).prototype.pipe=function(t,e){var n=this;function r(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function i(){n.readable&&n.resume&&n.resume()}n.on("data",r),t.on("drain",i),t._isStdio||e&&!1===e.end||(n.on("end",a),n.on("close",s));var o=!1;function a(){o||(o=!0,t.end())}function s(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function u(e){if(f(),0===c.listenerCount(this,"error"))throw e}function f(){n.removeListener("data",r),t.removeListener("drain",i),n.removeListener("end",a),n.removeListener("close",s),n.removeListener("error",u),t.removeListener("error",u),n.removeListener("end",f),n.removeListener("close",f),t.removeListener("close",f)}return n.on("error",u),t.on("error",u),n.on("end",f),n.on("close",f),t.on("close",f),t.emit("pipe",n),t}},{21:21,25:25,84:84,93:93,94:94,95:95,96:96}],83:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],84:[function(e,t,n){t.exports=e(85)},{85:85}],85:[function(e,t,n){"use strict";var r=e(70),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=l;var o=e(10);o.inherits=e(25);var a=e(87),s=e(89);o.inherits(l,a);for(var u=i(s.prototype),f=0;f<u.length;f++){var c=u[f];l.prototype[c]||(l.prototype[c]=s.prototype[c])}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||r.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(),r.nextTick(t,e)}},{10:10,25:25,70:70,87:87,89:89}],86:[function(e,t,n){"use strict";t.exports=o;var r=e(88),i=e(10);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=e(25),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},{10:10,25:25,88:88}],87:[function(L,C,e){(function(g,e){"use strict";var y=L(70);C.exports=h;var a,v=L(83);h.ReadableState=o;function b(e,t){return e.listeners(t).length}L(21).EventEmitter;var i=L(92),s=L(80).Buffer,u=e.Uint8Array||function(){};var t=L(10);t.inherits=L(25);var n=L(7),_=void 0;_=n&&n.debuglog?n.debuglog("stream"):function(){};var f,c=L(90),r=L(91);t.inherits(h,i);var l=["error","close","destroy","pause","resume"];function o(e,t){e=e||{};var n=t instanceof(a=a||L(85));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=e.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n&&(i||0===i)?i:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new c,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=L(97).StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function h(e){if(a=a||L(85),!(this instanceof h))return new h(e);this._readableState=new o(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),i.call(this)}function d(e,t,n,r,i){var o,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,E(e)}(e,a)):(i||(o=function(e,t){var n;(function(e){return s.isBuffer(e)||e instanceof u})(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));return n}(a,t)),o?e.emit("error",o):a.objectMode||t&&0<t.length?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):p(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?p(e,a,t,!1):S(e,a)):p(e,a,t,!1))):r||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function p(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&E(e)),S(e,t)}Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),h.prototype.destroy=r.destroy,h.prototype._undestroy=r.undestroy,h.prototype._destroy=function(e,t){this.push(null),t(e)},h.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=s.from(e,t),t=""),n=!0),d(this,e,t,!1,n)},h.prototype.unshift=function(e){return d(this,e,null,!0,!1)},h.prototype.isPaused=function(){return!1===this._readableState.flowing},h.prototype.setEncoding=function(e){return f||(f=L(97).StringDecoder),this._readableState.decoder=new f(e),this._readableState.encoding=e,this};var m=8388608;function w(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 m<=e?e=m:(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||(_("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?y.nextTick(k,e):k(e))}function k(e){_("emit readable"),e.emit("readable"),T(e)}function S(e,t){t.readingMore||(t.readingMore=!0,y.nextTick(x,e,t))}function x(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(_("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function R(e){_("readable nexttick read 0"),e.read(0)}function O(e,t){t.reading||(_("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),T(e),t.flowing&&!t.reading&&e.read(0)}function T(e){var t=e._readableState;for(_("flow",t.flowing);t.flowing&&null!==e.read(););}function A(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;e-=i.length;for(;n=n.next;){var o=n.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?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n).data=o.slice(a);break}++r}return t.length-=r,i}(e,t):function(e,t){var n=s.allocUnsafe(e),r=t.head,i=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,a),0===(e-=a)){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r).data=o.slice(a);break}++i}return t.length-=i,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function B(e){var t=e._readableState;if(0<t.length)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,y.nextTick(M,t,e))}function M(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function j(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}h.prototype.read=function(e){_("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return _("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?B(this):E(this),null;if(0===(e=w(e,t))&&t.ended)return 0===t.length&&B(this),null;var r,i=t.needReadable;return _("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&_("length less than watermark",i=!0),t.ended||t.reading?_("reading or ended",i=!1):i&&(_("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=w(n,t))),null===(r=0<e?A(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&B(this)),null!==r&&this.emit("data",r),r},h.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},h.prototype.pipe=function(n,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=n;break;case 1:i.pipes=[i.pipes,n];break;default:i.pipes.push(n)}i.pipesCount+=1,_("pipe count=%d opts=%j",i.pipesCount,e);var t=(!e||!1!==e.end)&&n!==g.stdout&&n!==g.stderr?a:p;function o(e,t){_("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,_("cleanup"),n.removeListener("close",h),n.removeListener("finish",d),n.removeListener("drain",s),n.removeListener("error",l),n.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",p),r.removeListener("data",c),u=!0,!i.awaitDrain||n._writableState&&!n._writableState.needDrain||s())}function a(){_("onend"),n.end()}i.endEmitted?y.nextTick(t):r.once("end",t),n.on("unpipe",o);var s=function(t){return function(){var e=t._readableState;_("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&b(t,"data")&&(e.flowing=!0,T(t))}}(r);n.on("drain",s);var u=!1;var f=!1;function c(e){_("ondata"),(f=!1)!==n.write(e)||f||((1===i.pipesCount&&i.pipes===n||1<i.pipesCount&&-1!==j(i.pipes,n))&&!u&&(_("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,f=!0),r.pause())}function l(e){_("onerror",e),p(),n.removeListener("error",l),0===b(n,"error")&&n.emit("error",e)}function h(){n.removeListener("finish",d),p()}function d(){_("onfinish"),n.removeListener("close",h),p()}function p(){_("unpipe"),r.unpipe(n)}return r.on("data",c),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?v(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(n,"error",l),n.once("close",h),n.once("finish",d),n.emit("pipe",r),i.flowing||(_("pipe resume"),r.resume()),n},h.prototype.unpipe=function(e){var t=this._readableState,n={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,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var a=j(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,n)),this},h.prototype.addListener=h.prototype.on=function(e,t){var n=i.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&E(this):y.nextTick(R,this))}return n},h.prototype.resume=function(){var e=this._readableState;return e.flowing||(_("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,y.nextTick(O,e,t))}(this,e)),this},h.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this},h.prototype.wrap=function(t){var n=this,r=this._readableState,i=!1;for(var e in t.on("end",function(){if(_("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),t.on("data",function(e){_("wrapped data"),r.decoder&&(e=r.decoder.write(e)),r.objectMode&&null==e||(r.objectMode||e&&e.length)&&(n.push(e)||(i=!0,t.pause()))}),t)void 0===this[e]&&"function"==typeof t[e]&&(this[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e));for(var o=0;o<l.length;o++)t.on(l[o],this.emit.bind(this,l[o]));return this._read=function(e){_("wrapped _read",e),i&&(i=!1,t.resume())},this},Object.defineProperty(h.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),h._fromList=A}).call(this,L(71),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,21:21,25:25,7:7,70:70,71:71,80:80,83:83,85:85,90:90,91:91,92:92,97:97}],88:[function(e,t,n){"use strict";t.exports=o;var r=e(85),i=e(10);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e),this._transformState={afterTransform:function(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,(n.writecb=null)!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}.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",a)}function a(){var n=this;"function"==typeof this._flush?this._flush(function(e,t){s(n,e,t)}):s(this,null,null)}function s(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),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(25),i.inherits(o,r),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.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},o.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},{10:10,25:25,85:85}],89:[function(k,S,e){(function(e,t,n){"use strict";var s=k(70);function l(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}S.exports=y;var u,f=!e.browser&&-1<["v0.10","v0.9."].indexOf(e.version.slice(0,5))?n:s.nextTick;y.WritableState=g;var r=k(10);r.inherits=k(25);var i={deprecate:k(116)},o=k(92),c=k(80).Buffer,a=t.Uint8Array||function(){};var h,d=k(91);function p(){}function g(e,t){u=u||k(85),e=e||{};var n=t instanceof u;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,i=e.writableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n&&(i||0===i)?i:o,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var a=(this.destroyed=!1)===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.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,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(s.nextTick(i,r),s.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),E(e,t))}(e,n,r,t,i);else{var o=m(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||_(e,n),r?f(b,e,n,o,i):b(e,n,o,i)}}(t,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 l(this)}function y(e){if(u=u||k(85),!(h.call(y,this)||this instanceof u))return new y(e);this._writableState=new g(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),o.call(this)}function v(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function b(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),E(e,t)}function _(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0,s=!0;n;)(i[a]=n).isBuf||(s=!1),n=n.next,a+=1;i.allBuffers=s,v(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 l(t),t.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,f=n.encoding,c=n.callback;if(v(e,t,!1,t.objectMode?1:u.length,u,f,c),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function m(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function w(t,n){t._final(function(e){n.pendingcb--,e&&t.emit("error",e),n.prefinished=!0,t.emit("prefinish"),E(t,n)})}function E(e,t){var n=m(t);return n&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,s.nextTick(w,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}r.inherits(y,o),g.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(g.prototype,"buffer",{get:i.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]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===y&&(e&&e._writableState instanceof g)}})):h=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,n){var r=this._writableState,i=!1,o=!r.objectMode&&function(e){return c.isBuffer(e)||e instanceof a}(e);return o&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=p),r.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),s.nextTick(t,n)}(this,n):(o||function(e,t,n,r){var i=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),s.nextTick(r,o),i=!1),i}(this,r,e,n))&&(r.pendingcb++,i=function(e,t,n,r,i,o){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,n));return t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else v(e,t,!1,s,r,i,o);return u}(this,r,o,e,t,n)),i},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||_(this,e))},y.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(-1<["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,t=e=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,E(e,t),n&&(t.finished?s.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=d.destroy,y.prototype._undestroy=d.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,k(71),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},k(115).setImmediate)},{10:10,115:115,116:116,25:25,70:70,71:71,80:80,85:85,91:91,92:92}],90:[function(e,t,n){"use strict";var s=e(80).Buffer,r=e(7);function i(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.head=null,this.tail=null,this.length=0}t.exports=(i.prototype.push=function(e){var t={data:e,next:null};0<this.length?this.tail.next=t:this.head=t,this.tail=t,++this.length},i.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},i.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}},i.prototype.clear=function(){this.head=this.tail=null,this.length=0},i.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},i.prototype.concat=function(e){if(0===this.length)return s.alloc(0);if(1===this.length)return this.head.data;for(var t,n,r,i=s.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,n=i,r=a,t.copy(n,r),a+=o.data.length,o=o.next;return i},i),r&&r.inspect&&r.inspect.custom&&(t.exports.prototype[r.inspect.custom]=function(){var e=r.inspect({length:this.length});return this.constructor.name+" "+e})},{7:7,80:80}],91:[function(e,t,n){"use strict";var o=e(70);function a(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var n=this,r=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return r||i?t?t(e):!e||this._writableState&&this._writableState.errorEmitted||o.nextTick(a,this,e):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(o.nextTick(a,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):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.finished=!1,this._writableState.errorEmitted=!1)}}},{70:70}],92:[function(e,t,n){arguments[4][45][0].apply(n,arguments)},{21:21,45:45}],93:[function(e,t,n){t.exports=e(94).PassThrough},{94:94}],94:[function(e,t,n){(((n=t.exports=e(87)).Stream=n).Readable=n).Writable=e(89),n.Duplex=e(85),n.Transform=e(88),n.PassThrough=e(86)},{85:85,86:86,87:87,88:88,89:89}],95:[function(e,t,n){t.exports=e(94).Transform},{94:94}],96:[function(e,t,n){t.exports=e(89)},{89:89}],97:[function(e,t,n){"use strict";var r=e(80).Buffer,i=r.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&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=f,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=l,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.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,n=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(1<e.lastNeed&&1<t.length){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(2<e.lastNeed&&2<t.length&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n: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)return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1);var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(55296<=r&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}function f(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function c(e,t){var n=(e.length-t)%3;return 0==n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1==n?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-n))}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):""}(n.StringDecoder=o).prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=a(t[r]);if(0<=i)return 0<i&&(e.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if(0<=(i=a(t[r])))return 0<i&&(e.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if(0<=(i=a(t[r])))return 0<i&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},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}},{80:80}],98:[function(e,t,n){arguments[4][97][0].apply(n,arguments)},{80:80,97:97}],99:[function(e,t,n){arguments[4][32][0].apply(n,arguments)},{32:32}],100:[function(e,t,n){arguments[4][33][0].apply(n,arguments)},{33:33,71:71}],101:[function(e,t,n){arguments[4][34][0].apply(n,arguments)},{103:103,105:105,25:25,34:34,71:71}],102:[function(e,t,n){arguments[4][35][0].apply(n,arguments)},{104:104,25:25,35:35}],103:[function(e,t,n){arguments[4][36][0].apply(n,arguments)},{100:100,101:101,106:106,107:107,108:108,111:111,112:112,21:21,25:25,36:36,7:7,71:71,9:9,98:98,99:99}],104:[function(e,t,n){arguments[4][37][0].apply(n,arguments)},{101:101,25:25,37:37,99:99}],105:[function(e,t,n){arguments[4][38][0].apply(n,arguments)},{101:101,108:108,111:111,112:112,116:116,25:25,38:38,71:71,9:9,99:99}],106:[function(e,t,n){arguments[4][39][0].apply(n,arguments)},{109:109,39:39,71:71}],107:[function(e,t,n){arguments[4][40][0].apply(n,arguments)},{40:40,7:7,9:9}],108:[function(e,t,n){arguments[4][41][0].apply(n,arguments)},{41:41,71:71}],109:[function(e,t,n){arguments[4][42][0].apply(n,arguments)},{42:42,99:99}],110:[function(e,t,n){arguments[4][43][0].apply(n,arguments)},{109:109,43:43,99:99}],111:[function(e,t,n){arguments[4][44][0].apply(n,arguments)},{44:44,99:99}],112:[function(e,t,n){arguments[4][45][0].apply(n,arguments)},{21:21,45:45}],113:[function(e,t,n){arguments[4][46][0].apply(n,arguments)},{101:101,102:102,103:103,104:104,105:105,109:109,110:110,46:46}],114:[function(r,s,e){(function(n){var t=r(113).Transform,i=r(118).inherits;function o(e){t.call(this,e),this._destroyed=!1}function a(e,t,n){n(null,e)}function e(r){return function(e,t,n){return"function"==typeof e&&(n=t,t=e,e={}),"function"!=typeof t&&(t=a),"function"!=typeof n&&(n=null),r(e,t,n)}}i(o,t),o.prototype.destroy=function(e){if(!this._destroyed){this._destroyed=!0;var t=this;n.nextTick(function(){e&&t.emit("error",e),t.emit("close")})}},s.exports=e(function(e,t,n){var r=new o(e);return r._transform=t,n&&(r._flush=n),r}),s.exports.ctor=e(function(t,e,n){function r(e){if(!(this instanceof r))return new r(e);this.options=Object.assign({},t,e),o.call(this,this.options)}return i(r,o),r.prototype._transform=e,n&&(r.prototype._flush=n),r}),s.exports.obj=e(function(e,t,n){var r=new o(Object.assign({objectMode:!0,highWaterMark:16},e));return r._transform=t,n&&(r._flush=n),r})}).call(this,r(71))},{113:113,118:118,71:71}],115:[function(u,e,f){(function(e,t){var r=u(71).nextTick,n=Function.prototype.apply,i=Array.prototype.slice,o={},a=0;function s(e,t){this._id=e,this._clearFn=t}f.setTimeout=function(){return new s(n.call(setTimeout,window,arguments),clearTimeout)},f.setInterval=function(){return new s(n.call(setInterval,window,arguments),clearInterval)},f.clearTimeout=f.clearInterval=function(e){e.close()},s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(window,this._id)},f.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},f.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},f._unrefActive=f.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},f.setImmediate="function"==typeof e?e:function(e){var t=a++,n=!(arguments.length<2)&&i.call(arguments,1);return o[t]=!0,r(function(){o[t]&&(n?e.apply(null,n):e.call(null),f.clearImmediate(t))}),t},f.clearImmediate="function"==typeof t?t:function(e){delete o[e]}}).call(this,u(115).setImmediate,u(115).clearImmediate)},{115:115,71:71}],116:[function(e,t,n){(function(n){function r(e){try{if(!n.localStorage)return!1}catch(e){return!1}var t=n.localStorage[e];return null!=t&&"true"===String(t).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,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],117:[function(e,t,n){arguments[4][4][0].apply(n,arguments)},{4:4}],118:[function(e,t,n){arguments[4][5][0].apply(n,arguments)},{117:117,25:25,5:5,71:71}],119:[function(e,t,n){var r=e(122),i=e(123),o=i;o.v1=r,o.v4=i,t.exports=o},{122:122,123:123}],120:[function(e,t,n){for(var i=[],r=0;r<256;++r)i[r]=(r+256).toString(16).substr(1);t.exports=function(e,t){var n=t||0,r=i;return r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]}},{}],121:[function(e,t,n){var r="undefined"!=typeof crypto&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&msCrypto.getRandomValues.bind(msCrypto);if(r){var i=new Uint8Array(16);t.exports=function(){return r(i),i}}else{var o=new Array(16);t.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},{}],122:[function(e,t,n){var p,g,y=e(121),v=e(120),b=0,_=0;t.exports=function(e,t,n){var r=t&&n||0,i=t||[],o=(e=e||{}).node||p,a=void 0!==e.clockseq?e.clockseq:g;if(null==o||null==a){var s=y();null==o&&(o=p=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==a&&(a=g=16383&(s[6]<<8|s[7]))}var u=void 0!==e.msecs?e.msecs:(new Date).getTime(),f=void 0!==e.nsecs?e.nsecs:_+1,c=u-b+(f-_)/1e4;if(c<0&&void 0===e.clockseq&&(a=a+1&16383),(c<0||b<u)&&void 0===e.nsecs&&(f=0),1e4<=f)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");b=u,g=a;var l=(1e4*(268435455&(u+=122192928e5))+(_=f))%4294967296;i[r++]=l>>>24&255,i[r++]=l>>>16&255,i[r++]=l>>>8&255,i[r++]=255&l;var h=u/4294967296*1e4&268435455;i[r++]=h>>>8&255,i[r++]=255&h,i[r++]=h>>>24&15|16,i[r++]=h>>>16&255,i[r++]=a>>>8|128,i[r++]=255&a;for(var d=0;d<6;++d)i[r+d]=o[d];return t||v(i)}},{120:120,121:121}],123:[function(e,t,n){var a=e(121),s=e(120);t.exports=function(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var i=(e=e||{}).random||(e.rng||a)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var o=0;o<16;++o)t[r+o]=i[o];return t||s(i)}},{120:120,121:121}],124:[function(e,t,n){"use strict";function d(e,t,n){var r=n[n.length-1];e===r.element&&(n.pop(),r=n[n.length-1]);var i=r.element,o=r.index;if(Array.isArray(i))i.push(e);else if(o===t.length-2){i[t.pop()]=e}else t.push(e)}n.stringify=function(e){var t=[];t.push({obj:e});for(var n,r,i,o,a,s,u,f,c,l,h="";n=t.pop();)if(r=n.obj,h+=n.prefix||"",i=n.val||"")h+=i;else if("object"!=typeof r)h+=void 0===r?null:JSON.stringify(r);else if(null===r)h+="null";else if(Array.isArray(r)){for(t.push({val:"]"}),o=r.length-1;0<=o;o--)a=0===o?"":",",t.push({obj:r[o],prefix:a});t.push({val:"["})}else{for(u in s=[],r)r.hasOwnProperty(u)&&s.push(u);for(t.push({val:"}"}),o=s.length-1;0<=o;o--)c=r[f=s[o]],l=0<o?",":"",l+=JSON.stringify(f)+":",t.push({obj:c,prefix:l});t.push({val:"{"})}return h},n.parse=function(e){for(var t,n,r,i,o,a,s,u,f,c=[],l=[],h=0;;)if("}"!==(t=e[h++])&&"]"!==t&&void 0!==t)switch(t){case" ":case"\t":case"\n":case":":case",":break;case"n":h+=3,d(null,c,l);break;case"t":h+=3,d(!0,c,l);break;case"f":h+=4,d(!1,c,l);break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"-":for(n="",h--;;){if(r=e[h++],!/[\d\.\-e\+]/.test(r)){h--;break}n+=r}d(parseFloat(n),c,l);break;case'"':for(i="",o=void 0,a=0;'"'!==(s=e[h++])||"\\"===o&&a%2==1;)i+=s,"\\"===(o=s)?a++:a=0;d(JSON.parse('"'+i+'"'),c,l);break;case"[":u={element:[],index:c.length},c.push(u.element),l.push(u);break;case"{":f={element:{},index:c.length},c.push(f.element),l.push(f);break;default:throw new Error("unexpectedly reached end of input: "+t)}else{if(1===c.length)return c.pop();d(c.pop(),c,l)}}},{}],125:[function(et,e,t){(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var p=t(et(24)),r=t(et(119)),h=t(et(81)),g=t(et(50)),o=t(et(53)),n=et(21),i=t(n),a=t(et(28)),s=t(et(79)),u=t(et(25)),m=et(114),y=t(et(1)),w=t(et(18)),M=t(et(8)),f=t(et(124)),c=t(et(55));function l(e){if(e instanceof ArrayBuffer)return function(e){if("function"==typeof e.slice)return e.slice(0);var t=new ArrayBuffer(e.byteLength),n=new Uint8Array(t),r=new Uint8Array(e);return n.set(r),t}(e);var t=e.size,n=e.type;return"function"==typeof e.slice?e.slice(0,t,n):e.webkitSlice(0,t,n)}var E,j,d,v=Function.prototype.toString,b=v.call(Object);function k(e){var t,n,r;if(!e||"object"!=typeof e)return e;if(Array.isArray(e)){for(t=[],n=0,r=e.length;n<r;n++)t[n]=k(e[n]);return t}if(e instanceof Date)return e.toISOString();if(function(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer||"undefined"!=typeof Blob&&e instanceof Blob}(e))return l(e);if(!function(e){var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&v.call(n)==b}(e))return e;for(n in t={},e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=k(e[n]);void 0!==i&&(t[n]=i)}return t}function _(e){return"$"+e}function S(){this._store={}}function x(e){if(this._store=new S,e&&Array.isArray(e))for(var t=0,n=e.length;t<n;t++)this.add(e[t])}S.prototype.get=function(e){var t=_(e);return this._store[t]},S.prototype.set=function(e,t){var n=_(e);return this._store[n]=t,!0},S.prototype.has=function(e){return _(e)in this._store},S.prototype.delete=function(e){var t=_(e),n=t in this._store;return delete this._store[t],n},S.prototype.forEach=function(e){for(var t=Object.keys(this._store),n=0,r=t.length;n<r;n++){var i=t[n];e(this._store[i],i=i.substring(1))}},Object.defineProperty(S.prototype,"size",{get:function(){return Object.keys(this._store).length}}),x.prototype.add=function(e){return this._store.set(e,!0)},x.prototype.has=function(e){return this._store.has(e)},x.prototype.forEach=function(n){this._store.forEach(function(e,t){n(t)})},Object.defineProperty(x.prototype,"size",{get:function(){return this._store.size}}),j=function(){if("undefined"==typeof Symbol||"undefined"==typeof Map||"undefined"==typeof Set)return!1;var e=Object.getOwnPropertyDescriptor(Map,Symbol.species);return e&&"get"in e&&Map[Symbol.species]===Map}()?(E=Set,Map):(E=x,S);try{localStorage.setItem("_pouch_check_localstorage",1),d=!!localStorage.getItem("_pouch_check_localstorage")}catch(e){d=!1}function R(){return d}function O(){n.EventEmitter.call(this),this._listeners={},function(t){R()&&addEventListener("storage",function(e){t.emit(e.key)})}(this)}u(O,n.EventEmitter),O.prototype.addListener=function(e,t,n,r){if(!this._listeners[t]){var i=this,o=!1;this._listeners[t]=a,this.on(e,a)}function a(){if(i._listeners[t])if(o)o="waiting";else{o=!0;var e=function(e,t){for(var n={},r=0,i=t.length;r<i;r++){var o=t[r];o in e&&(n[o]=e[o])}return n}(r,["style","include_docs","attachments","conflicts","filter","doc_ids","view","since","query_params","binary","return_docs"]);n.changes(e).on("change",function(e){e.seq>r.since&&!r.cancelled&&(r.since=e.seq,r.onChange(e))}).on("complete",function(){"waiting"===o&&p(a),o=!1}).on("error",function(){o=!1})}}},O.prototype.removeListener=function(e,t){t in this._listeners&&(n.EventEmitter.prototype.removeListener.call(this,e,this._listeners[t]),delete this._listeners[t])},O.prototype.notifyLocalWindows=function(e){R()&&(localStorage[e]="a"===localStorage[e]?"b":"a")},O.prototype.notify=function(e){this.emit(e),this.notifyLocalWindows(e)};var T="function"==typeof Object.assign?Object.assign:function(e){for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t};function A(e,t,n){Error.call(this,n),this.status=e,this.name=t,this.message=n,this.error=!0}u(A,Error),A.prototype.toString=function(){return JSON.stringify({status:this.status,name:this.name,message:this.message,reason:this.reason})};new A(401,"unauthorized","Name or password is incorrect."),new A(400,"bad_request","Missing JSON list of 'docs'");var L=new A(404,"not_found","missing"),C=new A(409,"conflict","Document update conflict"),B=new A(400,"bad_request","_id field must contain a string"),N=new A(412,"missing_id","_id is required for puts"),q=new A(400,"bad_request","Only reserved document ids may start with underscore."),I=new A(412,"precondition_failed","Database not open"),P=(new A(500,"unknown_error","Database encountered an unknown error"),new A(500,"badarg","Some query argument is invalid")),D=(new A(400,"invalid_request","Request was invalid"),new A(400,"query_parse_error","Some query parameter is invalid"),new A(500,"doc_validation","Bad special document member")),U=new A(400,"bad_request","Something wrong with the request"),W=(new A(400,"bad_request","Document must be a JSON object"),new A(404,"not_found","Database not found"),new A(500,"indexed_db_went_bad","unknown"),new A(500,"web_sql_went_bad","unknown"),new A(500,"levelDB_went_went_bad","unknown"),new A(403,"forbidden","Forbidden by design doc validate_doc_update function"),new A(400,"bad_request","Invalid rev format")),F=(new A(412,"file_exists","The database could not be created, the file already exists."),new A(412,"missing_stub","A pre-existing attachment stub wasn't found"));new A(413,"invalid_url","Provided URL is invalid");function z(n,e){function t(e){for(var t in n)"function"!=typeof n[t]&&(this[t]=n[t]);void 0!==e&&(this.reason=e)}return t.prototype=A.prototype,new t(e)}function K(r){var i={},o=r.filter&&"function"==typeof r.filter;return i.query=r.query_params,function(e){e.doc||(e.doc={});var t=o&&function(e,t,n){try{return!e(t,n)}catch(e){var r="Filter function threw: "+e.toString();return z(U,r)}}(r.filter,e.doc,i);if("object"==typeof t)return t;if(t)return!1;if(r.include_docs){if(!r.attachments)for(var n in e.doc._attachments)e.doc._attachments.hasOwnProperty(n)&&(e.doc._attachments[n].stub=!0)}else delete e.doc;return!0}}var H=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]:""};var V=function(e){return atob(e)},J=function(e){return btoa(e)};function G(t,n){t=t||[],n=n||{};try{return new Blob(t,n)}catch(e){if("TypeError"!==e.name)throw e;for(var r=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),i=0;i<t.length;i+=1)r.append(t[i]);return r.getBlob(n.type)}}function Y(e,t){return G([function(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i<t;i++)r[i]=e.charCodeAt(i);return n}(e)],{type:t})}function $(e,n){var t=new FileReader,r="function"==typeof t.readAsBinaryString;t.onloadend=function(e){var t=e.target.result||"";if(r)return n(t);n(function(e){for(var t="",n=new Uint8Array(e),r=n.byteLength,i=0;i<r;i++)t+=String.fromCharCode(n[i]);return t}(t))},r?t.readAsBinaryString(e):t.readAsArrayBuffer(e)}var X=e.setImmediate||e.setTimeout,Z=32768;function Q(t,e,n,r,i){(0<n||r<e.size)&&(e=function(e,t,n){return e.webkitSlice?e.webkitSlice(t,n):e.slice(t,n)}(e,n,r)),function(e,n){var t=new FileReader;t.onloadend=function(e){var t=e.target.result||new ArrayBuffer(0);n(t)},t.readAsArrayBuffer(e)}(e,function(e){t.append(e),i()})}function ee(e,t,n,r,i){(0<n||r<t.length)&&(t=t.substring(n,r)),e.appendBinary(t),i()}function te(n,t){var e="string"==typeof n,r=e?n.length:n.size,i=Math.min(Z,r),o=Math.ceil(r/i),a=0,s=e?new h:new h.ArrayBuffer,u=e?ee:Q;function f(){X(l)}function c(){var e=function(e){return J(e)}(s.end(!0));t(e),s.destroy()}function l(){var e=a*i,t=e+i;u(s,n,e,t,++a<o?f:c)}l()}function ne(e,t){var n=k(e);return t?(delete n._rev_tree,function(e){return h.hash(e)}(JSON.stringify(n))):r.v4().replace(/-/g,"").toLowerCase()}var re=r.v4;function ie(){Error.call(this)}u(ie,Error),ie.prototype.name="NotFoundError";var oe=i.EventEmitter,ae=new ie,se=function(i,o,r,a){var s=new oe;function u(e){var t,n={};if(a)for(t in a)void 0!==a[t]&&(n[t]=a[t]);if(e)for(t in e)void 0!==e[t]&&(n[t]=e[t]);return n}return s.sublevels={},s.options=a,s.version="6.5.4",s.methods={},o=o||[],s.put=function(t,n,e,r){"function"==typeof e&&(r=e,e={}),i.apply([{key:t,value:n,prefix:o.slice(),type:"put"}],u(e),function(e){if(e)return r(e);s.emit("put",t,n),r(null)})},s.prefix=function(){return o.slice()},s.batch=function(t,e,n){"function"==typeof e&&(n=e,e={}),t=t.map(function(e){return{key:e.key,value:e.value,prefix:e.prefix||o,keyEncoding:e.keyEncoding,valueEncoding:e.valueEncoding,type:e.type}}),i.apply(t,u(e),function(e){if(e)return n(e);s.emit("batch",t),n(null)})},s.get=function(e,t,n){"function"==typeof t&&(n=t,t={}),i.get(e,o,u(t),function(e,t){e?n(ae):n(null,t)})},s.sublevel=function(e,t){return s.sublevels[e]=s.sublevels[e]||se(i,o.concat(e),r,u(t))},s.readStream=s.createReadStream=function(e){var t;(e=u(e)).prefix=o;var n=i.iterator(e);return(t=r(e,i.createDecoder(e))).setIterator(n),t},s.close=function(e){i.close(e)},s.isOpen=i.isOpen,s.isClosed=i.isClosed,s},ue=s.Readable;function fe(e,t){if(!(this instanceof fe))return new fe(e,t);ue.call(this,{objectMode:!0,highWaterMark:e.highWaterMark}),this._waiting=!1,this._options=e,this._makeData=t}u(fe,ue),fe.prototype.setIterator=function(e){return this._iterator=e,this._destroyed?e.end(function(){}):this._waiting?(this._waiting=!1,this._read()):this},fe.prototype._read=function(){var r=this;if(!r._destroyed)return r._iterator?void r._iterator.next(function(e,t,n){if(e||void 0===t&&void 0===n)return e||r._destroyed||r.push(null),r._cleanup(e);n=r._makeData(t,n),r._destroyed||r.push(n)}):this._waiting=!0},fe.prototype._cleanup=function(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")}},fe.prototype.destroy=function(){this._cleanup()};var ce={encode:function(e){return"ÿ"+e[0]+"ÿ"+e[1]},decode:function(e){var t=e.toString(),n=t.indexOf("ÿ",1);return[t.substring(1,n),t.substring(n+1)]},lowerBound:"\0",upperBound:"ÿ"},le=new a;function he(e){return se(function(c,i,l){function h(e,t,n,r){return i.encode([e,l.encodeKey(t,n,r)])}return c.open(function(){}),{apply:function(e,t,n){t=t||{};for(var r,i,o,a=[],s=-1,u=e.length;++s<u;){var f=e[s];(o=(i=f).prefix)&&o.options&&(i.keyEncoding=i.keyEncoding||o.options.keyEncoding,i.valueEncoding=i.valueEncoding||o.options.valueEncoding),f.prefix=function(e){return"function"==typeof e}((r=f.prefix).prefix)?r.prefix():r,a.push({key:h(f.prefix,f.key,t,f),value:"del"!==f.type&&l.encodeValue(f.value,t,f),type:f.type})}c.db.batch(a,t,n)},get:function(e,t,n,r){return n.asBuffer=l.valueAsBuffer(n),c.db.get(h(t,e,n),n,function(e,t){e?r(e):r(null,l.decodeValue(t,n))})},createDecoder:function(n){return function(e,t){return{key:l.decodeKey(i.decode(e)[1],n),value:l.decodeValue(t,n)}}},isClosed:function(){return c.isClosed()},close:function(e){return c.close(e)},iterator:function(e){var t,n=function(e){var t={};for(var n in e)t[n]=e[n];return t}(e||{}),r=e.prefix||[];return o.toLtgt(e,n,function(e){return h(r,e,n,{})},i.lowerBound,i.upperBound),n.prefix=null,n.keyAsBuffer=n.valueAsBuffer=!1,"number"!=typeof n.limit&&(n.limit=-1),n.keyAsBuffer=i.buffer,n.valueAsBuffer=l.valueAsBuffer(n),t=c.db.iterator(n),{next:function(e){return t.next(e)},end:function(e){t.end(e)}}}}}(e,ce,le),[],fe,e.options)}function de(e){return e.reduce(function(e,t){return e[t]=!0,e},{})}var pe=de(["_id","_rev","_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"]),ge=de(["_attachments","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats"]);function ye(e){if(!/^\d+-./.test(e))return z(W);var t=e.indexOf("-"),n=e.substring(0,t),r=e.substring(t+1);return{prefix:parseInt(n,10),id:r}}function ve(e,t,n){var r,i,o;n||(n={deterministic_revs:!0});var a={status:"available"};if(e._deleted&&(a.deleted=!0),t)if(e._id||(e._id=re()),i=ne(e,n.deterministic_revs),e._rev){if((o=ye(e._rev)).error)return o;e._rev_tree=[{pos:o.prefix,ids:[o.id,{status:"missing"},[[i,a,[]]]]}],r=o.prefix+1}else e._rev_tree=[{pos:1,ids:[i,a,[]]}],r=1;else if(e._revisions&&(e._rev_tree=function(e,t){for(var n=e.start-e.ids.length+1,r=e.ids,i=[r[0],t,[]],o=1,a=r.length;o<a;o++)i=[r[o],{status:"missing"},[i]];return[{pos:n,ids:i}]}(e._revisions,a),r=e._revisions.start,i=e._revisions.ids[0]),!e._rev_tree){if((o=ye(e._rev)).error)return o;r=o.prefix,i=o.id,e._rev_tree=[{pos:r,ids:[i,a,[]]}]}!function(e){var t;if(e?"string"!=typeof e?t=z(B):/^_/.test(e)&&!/^_(design|local)/.test(e)&&(t=z(q)):t=z(N),t)throw t}(e._id),e._rev=r+"-"+i;var s={metadata:{},data:{}};for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var f="_"===u[0];if(f&&!pe[u]){var c=z(D,u);throw c.message=D.message+": "+u,c}f&&!ge[u]?s.metadata[u.slice(1)]=e[u]:s.data[u]=e[u]}return s}function be(e){for(var t,n,r,i,o=e.rev_tree.slice();i=o.pop();){var a=i.ids,s=a[2],u=i.pos;if(s.length)for(var f=0,c=s.length;f<c;f++)o.push({pos:u+1,ids:s[f]});else{var l=!!a[1].deleted,h=a[0];t&&!(r!==l?r:n!==u?n<u:t<h)||(t=h,n=u,r=l)}}return n+"-"+t}function _e(e,t){for(var n,r=e.slice();n=r.pop();)for(var i=n.pos,o=n.ids,a=o[2],s=t(0===a.length,i,o[0],n.ctx,o[1]),u=0,f=a.length;u<f;u++)r.push({pos:i+1,ids:a[u],ctx:s})}function me(e,t){return e.pos-t.pos}function we(e){for(var t=be(e),n=function(e){var o=[];_e(e,function(e,t,n,r,i){e&&o.push({rev:t+"-"+n,pos:t,opts:i})}),o.sort(me).reverse();for(var t=0,n=o.length;t<n;t++)delete o[t].pos;return o}(e.rev_tree),r=[],i=0,o=n.length;i<o;i++){var a=n[i];a.rev===t||a.opts.deleted||r.push(a.rev)}return r}function Ee(e,t){return e.pos-t.pos}function ke(e,t){for(var n,r,i=t,o=e.length;i<o;i++){var a=e[i],s=[a.id,a.opts,[]];r?(r[2].push(s),r=s):n=r=s}return n}function Se(e,t){return e[0]<t[0]?-1:1}function xe(e,t){for(var n,r,i,o=[{tree1:e,tree2:t}],a=!1;0<o.length;){var s=o.pop(),u=s.tree1,f=s.tree2;(u[1].status||f[1].status)&&(u[1].status="available"===u[1].status||"available"===f[1].status?"available":"missing");for(var c=0;c<f[2].length;c++)if(u[2][0]){for(var l=!1,h=0;h<u[2].length;h++)u[2][h][0]===f[2][c][0]&&(o.push({tree1:u[2][h],tree2:f[2][c]}),l=!0);l||(a="new_branch",n=u[2],r=f[2][c],void 0,i=function(e,t,n){for(var r,i=0,o=e.length;i<o;)n(e[r=i+o>>>1],t)<0?i=1+r:o=r;return i}(n,r,Se),n.splice(i,0,r))}else a="new_leaf",u[2][0]=f[2][c]}return{conflicts:a,tree:e}}function Re(e,t,n){var r,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 f=e[s];if(f.pos===t.pos&&f.ids[0]===t.ids[0])r=xe(f.ids,t.ids),i.push({pos:f.pos,ids:r.tree}),o=o||r.conflicts,a=!0;else if(!0!==n){var c=f.pos<t.pos?f:t,l=f.pos<t.pos?t:f,h=l.pos-c.pos,d=[],p=[];for(p.push({ids:c.ids,diff:h,parent:null,parentIdx:null});0<p.length;){var g=p.pop();if(0!==g.diff)for(var y=g.ids[2],v=0,b=y.length;v<b;v++)p.push({ids:y[v],diff:g.diff-1,parent:g.ids,parentIdx:v});else g.ids[0]===l.ids[0]&&d.push(g)}var _=d[0];_?(r=xe(_.ids,l.ids),_.parent[2][_.parentIdx]=r.tree,i.push({pos:c.pos,ids:c.ids}),o=o||r.conflicts,a=!0):i.push(f)}else i.push(f)}return a||i.push(t),i.sort(Ee),{tree:i,conflicts:o||"internal_node"}}function Oe(e,t,n){var r=Re(e,t),i=function(e,t){for(var r,n,i=function(e){for(var t,n=[],r=e.slice();t=r.pop();){var i=t.pos,o=t.ids,a=o[0],s=o[1],u=o[2],f=0===u.length,c=t.history?t.history.slice():[];c.push({id:a,opts:s}),f&&n.push({pos:i+1-c.length,ids:c});for(var l=0,h=u.length;l<h;l++)r.push({pos:i+1,ids:u[l],history:c})}return n.reverse()}(e),o=0,a=i.length;o<a;o++){var s,u=i[o],f=u.ids;if(f.length>t){r||(r={});var c=f.length-t;s={pos:u.pos+c,ids:ke(f,c)};for(var l=0;l<c;l++){var h=u.pos+l+"-"+f[l].id;r[h]=!0}}else s={pos:u.pos,ids:ke(f,0)};n=n?Re(n,s,!0).tree:[s]}return r&&_e(n,function(e,t,n){delete r[t+"-"+n]}),{tree:n,revs:r?Object.keys(r):[]}}(r.tree,n);return{tree:i.tree,stemmedRevs:i.revs,conflicts:r.conflicts}}function Te(e){return e.ids}function Ae(e,t){t||(t=be(e));for(var n,r=t.substring(t.indexOf("-")+1),i=e.rev_tree.map(Te);n=i.pop();){if(n[0]===r)return!!n[1].deleted;i=i.concat(n[2])}}function Be(e){return/^_local/.test(e)}function Me(e,t,n,r,i,o,a,s){if(function(e,t){for(var n,r=e.slice(),i=t.split("-"),o=parseInt(i[0],10),a=i[1];n=r.pop();){if(n.pos===o&&n.ids[0]===a)return!0;for(var s=n.ids[2],u=0,f=s.length;u<f;u++)r.push({pos:n.pos+1,ids:s[u]})}return!1}(t.rev_tree,n.metadata.rev)&&!s)return r[i]=n,o();var u=t.winningRev||be(t),f="deleted"in t?t.deleted:Ae(t,u),c="deleted"in n.metadata?n.metadata.deleted:Ae(n.metadata),l=/^1-/.test(n.metadata.rev);if(f&&!c&&s&&l){var h=n.data;h._rev=u,h._id=n.metadata.id,n=ve(h,s)}var d=Oe(t.rev_tree,n.metadata.rev_tree[0],e);if(s&&(f&&c&&"new_leaf"!==d.conflicts||!f&&"new_leaf"!==d.conflicts||f&&!c&&"new_branch"===d.conflicts)){var p=z(C);return r[i]=p,o()}var g=n.metadata.rev;n.metadata.rev_tree=d.tree,n.stemmedRevs=d.stemmedRevs||[],t.rev_map&&(n.metadata.rev_map=t.rev_map);var y=be(n.metadata),v=Ae(n.metadata,y),b=f===v?0:f<v?-1:1;a(n,y,v,g===y?v:Ae(n.metadata,g),!0,b,i,o)}function je(u,e,i,f,o,c,l,h,t){u=u||1e3;var d=h.new_edits,a=new j,n=0,s=e.length;function p(){++n===s&&t&&t()}e.forEach(function(e,n){if(e._id&&Be(e._id)){var t=e._deleted?"_removeLocal":"_putLocal";i[t](e,{ctx:o},function(e,t){c[n]=e||t,p()})}else{var r=e.metadata.id;a.has(r)?(s--,a.get(r).push([e,n])):a.set(r,[[e,n]])}}),a.forEach(function(i,o){var a=0;function s(){++a<i.length?e():p()}function e(){var e=i[a],t=e[0],n=e[1];if(f.has(o))Me(u,f.get(o),t,c,n,s,l,d);else{var r=Oe([],t.metadata.rev_tree[0],u);t.metadata.rev_tree=r.tree,t.stemmedRevs=r.stemmedRevs||[],function(e,t,n){var r=be(e.metadata),i=Ae(e.metadata,r);if("was_delete"in h&&i)return c[t]=z(L,"deleted"),n();if(d&&function(e){return"missing"===e.metadata.rev_tree[0].ids[1].status}(e)){var o=z(C);return c[t]=o,n()}l(e,r,i,i,!1,i?0:1,t,n)}(t,n,s)}}e()})}function Le(e,t){return G([new Uint8Array(e)],{type:t})}function Ce(e,t){var n=t.prefix()[0],r=e._cache,i=r.get(n);return i||(i=new j,r.set(n,i)),i}function Ne(){this._batch=[],this._cache=new j}Ne.prototype.get=function(e,n,r){var i=Ce(this,e),t=i.get(n);return t?p(function(){r(null,t)}):null===t?p(function(){r({name:"NotFoundError"})}):void e.get(n,function(e,t){if(e)return"NotFoundError"===e.name&&i.set(n,null),r(e);i.set(n,t),r(null,t)})},Ne.prototype.batch=function(e){for(var t=0,n=e.length;t<n;t++){var r=e[t],i=Ce(this,r.prefix);"put"===r.type?i.set(r.key,r.value):i.set(r.key,null)}this._batch=this._batch.concat(e)},Ne.prototype.execute=function(e,t){for(var n=new E,r=[],i=this._batch.length-1;0<=i;i--){var o=this._batch[i],a=o.prefix.prefix()[0]+"ÿ"+o.key;n.has(a)||(n.add(a),r.push(o))}e.batch(r,t)};var qe="document-store",Ie="by-sequence",Pe="attach-store",De="attach-binary-store",Ue="local-store",We="meta-store",Fe=new j,ze="_local_last_update_seq",Ke="_local_doc_count",He="_local_uuid",Ve="md5-",Je={encode:function(t){try{return JSON.stringify(t)}catch(e){return f.stringify(t)}},decode:function(t){try{return JSON.parse(t)}catch(e){return f.parse(t)}},buffer:!1,type:"cheap-json"},Ge=new O;function Ye(e){return"winningRev"in e?e.winningRev:be(e)}function $e(e,t){return"deleted"in e?e.deleted:Ae(e,t)}function Xe(e,t,n){var r=[];return e.forEach(function(n){n.doc&&n.doc._attachments&&Object.keys(n.doc._attachments).forEach(function(e){var t=n.doc._attachments[e];"data"in t||r.push(t)})}),Promise.all(r.map(function(e){return function(o,e,a){var s=o.content_type;return new Promise(function(r,i){e.binaryStore.get(o.digest,function(e,t){var n;if(e){if("NotFoundError"!==e.name)return i(e);n=a.binary?Y("",s):""}else n=a.binary?Le(t,s):t.toString("base64");delete o.stub,delete o.length,o.data=n,r()})})}(e,t,n)}))}function Ze(t,n){t=k(t);var r,v,b=this,A={},h=t.revs_limit,_=t.name;void 0===t.createIfMissing&&(t.createIfMissing=!0);var i,o=t.db,e=H(o);function a(){A.docStore=v.sublevel(qe,{valueEncoding:Je}),A.bySeqStore=v.sublevel(Ie,{valueEncoding:"json"}),A.attachmentStore=v.sublevel(Pe,{valueEncoding:"json"}),A.binaryStore=v.sublevel(De,{valueEncoding:"binary"}),A.localStore=v.sublevel(Ue,{valueEncoding:"json"}),A.metaStore=v.sublevel(We,{valueEncoding:"json"}),"object"==typeof t.migrate?t.migrate.doMigrationTwo(v,A,s):s()}function s(){A.metaStore.get(ze,function(e,t){void 0===v._updateSeq&&(v._updateSeq=t||0),A.metaStore.get(Ke,function(e,t){v._docCount=e?0:t,A.metaStore.get(He,function(e,t){r=e?re():t,A.metaStore.put(He,r,function(){p(function(){n(null,b)})})})})})}function u(e,t){try{e.apply(null,t)}catch(e){t[t.length-1](e)}}function f(){var e=v._queue.peekFront();"read"===e.type?function(e){var r=[e],t=1,n=v._queue.get(t);for(;void 0!==n&&"read"===n.type;)r.push(n),t++,n=v._queue.get(t);var i=0;r.forEach(function(e){var t=e.args,n=t[t.length-1];t[t.length-1]=y(function(e){n.apply(null,e),++i===r.length&&p(function(){r.forEach(function(){v._queue.shift()}),v._queue.length&&f()})}),u(e.fun,t)})}(e):function(e){var t=e.args,n=t[t.length-1];t[t.length-1]=y(function(e){n.apply(null,e),p(function(){v._queue.shift(),v._queue.length&&f()})}),u(e.fun,t)}(e)}function c(t){return y(function(e){v._queue.push({fun:t,args:e,type:"write"}),1===v._queue.length&&p(f)})}function l(t){return y(function(e){v._queue.push({fun:t,args:e,type:"read"}),1===v._queue.length&&p(f)})}function B(e){return("0000000000000000"+e).slice(-16)}function d(e,t){"destroy"in o?o.destroy(e,t):t(null)}Fe.has(e)?i=Fe.get(e):(i=new j,Fe.set(e,i)),i.has(_)?(v=i.get(_),a()):i.set(_,he(g(o(_),t,function(e){if(e)return i.delete(_),n(e);(v=i.get(_))._docCount=-1,v._queue=new w,"object"==typeof t.migrate?t.migrate.doMigrationOne(_,v,a):a()}))),b._remote=!1,b.type=function(){return"leveldb"},b._id=function(e){e(null,r)},b._info=function(e){var t={doc_count:v._docCount,update_seq:v._updateSeq,backend_adapter:H(o)};return p(function(){e(null,t)})},b._get=l(function(e,i,o){i=k(i),A.docStore.get(e,function(e,n){if(e||!n)return o(z(L,"missing"));var r;if(i.rev)r=i.latest?function(e,t){for(var n,r=t.rev_tree.slice();n=r.pop();){var i=n.pos,o=n.ids,a=o[0],s=o[1],u=o[2],f=0===u.length,c=n.history?n.history.slice():[];if(c.push({id:a,pos:i,opts:s}),f)for(var l=0,h=c.length;l<h;l++){var d=c[l];if(d.pos+"-"+d.id===e)return i+"-"+a}for(var p=0,g=u.length;p<g;p++)r.push({pos:i+1,ids:u[p],history:c})}throw new Error("Unable to resolve latest revision for id "+t.id+", rev "+e)}(i.rev,n):i.rev;else if(r=Ye(n),$e(n,r))return o(z(L,"deleted"));var t=n.rev_map[r];A.bySeqStore.get(B(t),function(e,t){if(!t)return o(z(L));if("_id"in t&&t._id!==n.id)return o(new Error("wrong doc returned"));if(t._id=n.id,"_rev"in t){if(t._rev!==r)return o(new Error("wrong doc returned"))}else t._rev=r;return o(null,{doc:t,metadata:n})})})}),b._getAttachment=function(e,t,n,r,i){var o=n.digest,a=n.content_type;A.binaryStore.get(o,function(e,t){if(e)return"NotFoundError"!==e.name?i(e):i(null,r.binary?function(e){return G([""],{type:e})}(a):"");r.binary?i(null,Le(t,a)):i(null,t.toString("base64"))})},b._bulkDocs=c(function(e,t,w){var n=t.new_edits,E=new Array(e.docs.length),k=new j,S=new j,x=new Ne,R=0,O=v._updateSeq,o=e.docs,r=o.map(function(e){if(e._id&&Be(e._id))return e;var t=ve(e,n,b.__opts);return t.metadata&&!t.metadata.rev_map&&(t.metadata.rev_map={}),t}),i=r.filter(function(e){return e.error});if(i.length)return w(i[0]);function a(e,t){var n=Promise.resolve();e.forEach(function(e,r){n=n.then(function(){return new Promise(function(t,n){b._doCompactionNoLock(r,e,{ctx:x},function(e){if(e)return n(e);t()})})})}),n.then(function(){t()},t)}function s(e){var n=new j;k.forEach(function(e,t){n.set(t,function(e){var o=[];return _e(e.rev_tree,function(e,t,n,r,i){"available"!==i.status||e||(o.push(t+"-"+n),i.status="missing")}),o}(e))}),a(n,e)}function u(){a(S,function(e){if(e&&l(e),b.auto_compaction)return s(l);l()})}function f(n,e,t,r,i,o,a,s){R+=o;var u=null,f=0;n.metadata.winningRev=e,n.metadata.deleted=t,n.data._id=n.metadata.id,n.data._rev=n.metadata.rev,r&&(n.data._deleted=!0),n.stemmedRevs.length&&S.set(n.metadata.id,n.stemmedRevs);var c,l,h=n.data._attachments?Object.keys(n.data._attachments):[];function d(e){f++,u||(e?s(u=e):f===h.length&&m())}function p(t,n,r,i){return function(e){!function(e,n,t,r,i){var o=e.data._attachments[t];delete o.data,o.digest=n,o.length=r.length;var a=e.metadata.id,s=e.metadata.rev;o.revpos=parseInt(s,10),T(a,s,n,function(e,t){return e?i(e):0===r.length?i(e):t?(x.batch([{type:"put",prefix:A.binaryStore,key:n,value:M(r,"binary")}]),void i()):i(e)})}(t,Ve+e,n,r,i)}}function g(t,n,r){return function(e){te(e,p(t,n,e,r))}}for(var y=0;y<h.length;y++){var v,b=h[y],_=n.data._attachments[b];if(_.stub)T(n.data._id,n.data._rev,_.digest,d);else if("string"==typeof _.data){try{v=V(_.data)}catch(e){return void w(z(P,"Attachment is not a valid base64 string"))}g(n,b,d)(v)}else c=_.data,l=g(n,b,d),$(c,l)}function m(){var e=n.metadata.rev_map[n.metadata.rev];if(e)return s();e=++O,n.metadata.rev_map[n.metadata.rev]=n.metadata.seq=e;var t=[{key:B(e),value:n.data,prefix:A.bySeqStore,type:"put"},{key:n.metadata.id,value:n.metadata,prefix:A.docStore,type:"put"}];x.batch(t),E[a]={ok:!0,id:n.metadata.id,rev:n.metadata.rev},k.set(n.metadata.id,n.metadata),s()}h.length||m()}var c={};function T(r,i,o,t){function e(t){var e=[r,i].join("@"),n={};return t?t.refs&&(n.refs=t.refs,n.refs[e]=!0):(n.refs={},n.refs[e]=!0),new Promise(function(e){x.batch([{type:"put",prefix:A.attachmentStore,key:o,value:n}]),e(!t)})}var n=c[o]||Promise.resolve();c[o]=n.then(function(){return new Promise(function(n,r){x.get(A.attachmentStore,o,function(e,t){if(e&&"NotFoundError"!==e.name)return r(e);n(t)})}).then(e).then(function(e){t(null,e)},t)})}function l(e){if(e)return p(function(){w(e)});x.batch([{prefix:A.metaStore,type:"put",key:ze,value:O},{prefix:A.metaStore,type:"put",key:Ke,value:v._docCount+R}]),x.execute(v,function(e){if(e)return w(e);v._docCount+=R,v._updateSeq=O,Ge.notify(_),p(function(){w(null,E)})})}if(!r.length)return w(null,[]);!function(t){var r=[];if(o.forEach(function(n){n&&n._attachments&&Object.keys(n._attachments).forEach(function(e){var t=n._attachments[e];t.stub&&r.push(t.digest)})}),!r.length)return t();var n,i=0;r.forEach(function(e){!function(n,r){x.get(A.attachmentStore,n,function(e){if(e){var t=z(F,"unknown stub attachment with digest "+n);r(t)}else r()})}(e,function(e){e&&!n&&(n=e),++i===r.length&&t(n)})})}(function(e){if(e)return w(e);!function(e){var r,t=0;function i(){if(++t===o.length)return e(r)}o.forEach(function(n){if(n._id&&Be(n._id))return i();x.get(A.docStore,n._id,function(e,t){e?"NotFoundError"!==e.name&&(r=e):k.set(n._id,t),i()})})}(function(e){if(e)return w(e);je(h,r,b,k,x,E,f,t,u)})})}),b._allDocs=function(e,t){return"keys"in e?function(e,o){var t=o.keys,a={offset:o.skip};return Promise.all(t.map(function(i){var t=T({key:i,deleted:"ok"},o);return["limit","skip","keys"].forEach(function(e){delete t[e]}),new Promise(function(n,r){e._allDocs(t,function(e,t){if(e)return r(e);o.update_seq&&void 0!==t.update_seq&&(a.update_seq=t.update_seq),a.total_rows=t.total_rows,n(t.rows[0]||{key:i,error:"not_found"})})})})).then(function(e){return a.rows=e,a})}(this,e):l(function(h,a){h=k(h),function(e){v.isClosed()?e(new Error("database is closed")):e(null,v._docCount)}(function(e,t){if(e)return a(e);var u,n={},f=h.skip||0;if(h.startkey&&(n.gte=h.startkey),h.endkey&&(n.lte=h.endkey),h.key&&(n.gte=n.lte=h.key),h.descending){n.reverse=!0;var r=n.lte;n.lte=n.gte,n.gte=r}if("number"==typeof h.limit&&(u=h.limit),0===u||"gte"in n&&"lte"in n&&n.gte>n.lte){var i={total_rows:t,offset:h.skip,rows:[]};return h.update_seq&&(i.update_seq=v._updateSeq),a(null,i)}var c=[],l=A.docStore.readStream(n),o=m.obj(function(e,t,i){var o=e.value,a=Ye(o),s=$e(o,a);if(s){if("ok"!==h.deleted)return void i()}else{if(0<f--)return void i();if("number"==typeof u&&u--<=0)return l.unpipe(),l.destroy(),void i()}function n(e){var t={id:o.id,key:o.id,value:{rev:a}};if(h.include_docs){if(t.doc=e,t.doc._rev=t.value.rev,h.conflicts){var n=we(o);n.length&&(t.doc._conflicts=n)}for(var r in t.doc._attachments)t.doc._attachments.hasOwnProperty(r)&&(t.doc._attachments[r].stub=!0)}if(!1===h.inclusive_end&&o.id===h.endkey)return i();if(s){if("ok"!==h.deleted)return i();t.value.deleted=!0,t.doc=null}c.push(t),i()}if(h.include_docs){var r=o.rev_map[a];A.bySeqStore.get(B(r),function(e,t){n(t)})}else n()},function(e){Promise.resolve().then(function(){if(h.include_docs&&h.attachments)return Xe(c,A,h)}).then(function(){var e={total_rows:t,offset:h.skip,rows:c};h.update_seq&&(e.update_seq=v._updateSeq),a(null,e)},a),e()}).on("unpipe",function(){o.end()});l.on("error",a),l.pipe(o)})})(e,t)},b._changes=function(s){if((s=k(s)).continuous){var e=_+":"+re();return Ge.addListener(_,e,b,s),Ge.notify(_),{cancel:function(){Ge.removeListener(_,e)}}}var u,f=s.descending,c=[],l=s.since||0,h=0,t={reverse:f};"limit"in s&&0<s.limit&&(u=s.limit),t.reverse||(t.start=B(s.since||0));var d=s.doc_ids&&new E(s.doc_ids),p=K(s),g=new j;function y(){s.done=!0,s.return_docs&&s.limit&&s.limit<c.length&&(c.length=s.limit),n.unpipe(r),n.destroy(),s.continuous||s.cancelled||(s.include_docs&&s.attachments&&s.return_docs?Xe(c,A,s).then(function(){s.complete(null,{results:c,last_seq:l})}):s.complete(null,{results:c,last_seq:l}))}var n=A.bySeqStore.readStream(t),r=m.obj(function(e,t,i){if(u&&u<=h)return y(),i();if(s.cancelled||s.done)return i();var n,o=function(e){return parseInt(e,10)}(e.key),a=e.value;if(o===s.since&&!f)return i();if(d&&!d.has(a._id))return i();function r(r){var e=Ye(r);function n(e){var t=s.processChange(e,r,s);t.seq=r.seq;var n=p(t);if("object"==typeof n)return s.complete(n);n&&(h++,s.attachments&&s.include_docs?Xe([t],A,s).then(function(){s.onChange(t)}):s.onChange(t),s.return_docs&&c.push(t)),i()}if(r.seq!==o)return i();if(l=o,e===a._rev)return n(a);var t=r.rev_map[e];A.bySeqStore.get(B(t),function(e,t){n(t)})}if(n=g.get(a._id))return r(n);A.docStore.get(a._id,function(e,t){if(s.cancelled||s.done||v.isClosed()||Be(t.id))return i();g.set(a._id,t),r(t)})},function(e){if(s.cancelled)return e();s.return_docs&&s.limit&&s.limit<c.length&&(c.length=s.limit),e()}).on("unpipe",function(){r.end(),y()});return n.pipe(r),{cancel:function(){s.cancelled=!0,y()}}},b._close=function(t){if(v.isClosed())return t(z(I));v.close(function(e){e?t(e):(i.delete(_),t())})},b._getRevisionTree=function(e,n){A.docStore.get(e,function(e,t){e?n(z(L)):n(null,t.rev_tree)})},b._doCompaction=c(function(e,t,n,r){b._doCompactionNoLock(e,t,n,r)}),b._doCompactionNoLock=function(f,c,l,h){if("function"==typeof l&&(h=l,l={}),!c.length)return h();var d=l.ctx||new Ne;d.get(A.docStore,f,function(e,n){if(e)return h(e);var t=c.map(function(e){var t=n.rev_map[e];return delete n.rev_map[e],t});_e(n.rev_tree,function(e,t,n,r,i){var o=t+"-"+n;-1!==c.indexOf(o)&&(i.status="missing")});var s=[];s.push({key:n.id,value:n,type:"put",prefix:A.docStore});var r,i={},o=0;function a(e){if(e&&(r=e),++o===c.length){if(r)return h(r);!function(){var t=Object.keys(i);if(!t.length)return u();var n,r=0;function o(e){e&&(n=e),++r===t.length&&u(n)}var a=new j;c.forEach(function(e){a.set(f+"@"+e,!0)}),t.forEach(function(i){d.get(A.attachmentStore,i,function(e,t){if(e)return"NotFoundError"===e.name?o():o(e);var n=Object.keys(t.refs||{}).filter(function(e){return!a.has(e)}),r={};n.forEach(function(e){r[e]=!0}),n.length?s.push({key:i,type:"put",value:{refs:r},prefix:A.attachmentStore}):s=s.concat([{key:i,type:"del",prefix:A.attachmentStore},{key:i,type:"del",prefix:A.binaryStore}]),o()})})}()}}function u(e){return e?h(e):(d.batch(s),l.ctx?h():void d.execute(v,h))}t.forEach(function(e){s.push({key:B(e),type:"del",prefix:A.bySeqStore}),d.get(A.bySeqStore,B(e),function(e,n){if(e)return"NotFoundError"===e.name?a():a(e);Object.keys(n._attachments||{}).forEach(function(e){var t=n._attachments[e].digest;i[t]=!0}),a()})})})},b._getLocal=function(e,n){A.localStore.get(e,function(e,t){e?n(z(L)):n(null,t)})},b._putLocal=function(e,t,n){"function"==typeof t&&(n=t,t={}),t.ctx?b._putLocalNoLock(e,t,n):b._putLocalWithLock(e,t,n)},b._putLocalWithLock=c(function(e,t,n){b._putLocalNoLock(e,t,n)}),b._putLocalNoLock=function(i,o,a){delete i._revisions;var s=i._rev,u=i._id,f=o.ctx||new Ne;f.get(A.localStore,u,function(e,t){if(e&&s)return a(z(C));if(t&&t._rev!==s)return a(z(C));i._rev=s?"0-"+(parseInt(s.split("-")[1],10)+1):"0-1";var n=[{type:"put",prefix:A.localStore,key:u,value:i}];f.batch(n);var r={ok:!0,id:i._id,rev:i._rev};if(o.ctx)return a(null,r);f.execute(v,function(e){if(e)return a(e);a(null,r)})})},b._removeLocal=function(e,t,n){"function"==typeof t&&(n=t,t={}),t.ctx?b._removeLocalNoLock(e,t,n):b._removeLocalWithLock(e,t,n)},b._removeLocalWithLock=c(function(e,t,n){b._removeLocalNoLock(e,t,n)}),b._removeLocalNoLock=function(r,i,o){var a=i.ctx||new Ne;a.get(A.localStore,r._id,function(e,t){if(e)return"NotFoundError"!==e.name?o(e):o(z(L));if(t._rev!==r._rev)return o(z(C));a.batch([{prefix:A.localStore,type:"del",key:r._id}]);var n={ok:!0,id:r._id,rev:"0-0"};if(i.ctx)return o(null,n);a.execute(v,function(e){if(e)return o(e);o(null,n)})})},b._destroy=function(e,t){var n,r=H(o);if(!Fe.has(r))return d(_,t);(n=Fe.get(r)).has(_)?(Ge.removeAllListeners(_),n.get(_).close(function(){n.delete(_),d(_,t)})):d(_,t)}}function Qe(e,t){var n=T({db:c},e);Ze.call(this,n,t)}Qe.valid=function(){return!0},Qe.use_prefix=!1,"undefined"==typeof PouchDB?function(e){if("undefined"!=typeof console&&"function"==typeof console[e]){var t=Array.prototype.slice.call(arguments,1);console[e].apply(console,t)}}("error",'memory adapter plugin error: Cannot find global "PouchDB" object! Did you remember to include pouchdb.js?'):PouchDB.plugin(function(e){e.adapter("memory",Qe,!0)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{1:1,114:114,119:119,124:124,18:18,21:21,24:24,25:25,28:28,50:50,53:53,55:55,79:79,8:8,81:81}]},{},[125]);
\No newline at end of file