UNPKG

242 kBJavaScriptView Raw
1// PouchDB localStorage plugin 7.3.0
2// Based on localstorage-down: https://github.com/No9/localstorage-down
3//
4// (c) 2012-2022 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 e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){(function(e){(function(){function n(e){this._db=e,this._operations=[],this._written=!1}n.prototype._checkWritten=function(){if(this._written)throw new Error("write() already called on this batch")},n.prototype.put=function(e,t){this._checkWritten();var n=this._db._checkKeyValue(e,"key",this._db._isBuffer);if(n)throw n;if(n=this._db._checkKeyValue(t,"value",this._db._isBuffer))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},n.prototype.del=function(e){this._checkWritten();var t=this._db._checkKeyValue(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},n.prototype.clear=function(){return this._checkWritten(),this._operations=[],"function"==typeof this._clear&&this._clear(),this},n.prototype.write=function(t,n){if(this._checkWritten(),"function"==typeof t&&(n=t),"function"!=typeof n)throw new Error("write() requires a callback argument");return"object"!=typeof t&&(t={}),this._written=!0,"function"==typeof this._write?this._write(n):"function"==typeof this._db._batch?this._db._batch(this._operations,t,n):void e.nextTick(n)},t.exports=n}).call(this)}).call(this,e(73))},{73:73}],2:[function(e,t,n){(function(e){(function(){function n(e){this.db=e,this._ended=!1,this._nexting=!1}n.prototype.next=function(t){var n=this;if("function"!=typeof t)throw new Error("next() requires a callback argument");return n._ended?t(new Error("cannot call next() after end()")):n._nexting?t(new Error("cannot call next() before previous next() has completed")):(n._nexting=!0,"function"==typeof n._next?n._next((function(){n._nexting=!1,t.apply(null,arguments)})):void e.nextTick((function(){n._nexting=!1,t()})))},n.prototype.end=function(t){if("function"!=typeof t)throw new Error("end() requires a callback argument");return this._ended?t(new Error("end() already called on iterator")):(this._ended=!0,"function"==typeof this._end?this._end(t):void e.nextTick(t))},t.exports=n}).call(this)}).call(this,e(73))},{73:73}],3:[function(e,t,n){(function(n,r){(function(){var i=e(4),o=e(2),a=e(1);function s(e){if(!arguments.length||void 0===e)throw new Error("constructor requires at least a location argument");if("string"!=typeof e)throw new Error("constructor requires a location string argument");this.location=e}s.prototype.open=function(e,t){if("function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("open() requires a callback argument");if("object"!=typeof e&&(e={}),"function"==typeof this._open)return this._open(e,t);r.nextTick(t)},s.prototype.close=function(e){if("function"!=typeof e)throw new Error("close() requires a callback argument");if("function"==typeof this._close)return this._close(e);r.nextTick(e)},s.prototype.get=function(e,t,n){var i;if("function"==typeof t&&(n=t),"function"!=typeof n)throw new Error("get() requires a callback argument");return(i=this._checkKeyValue(e,"key",this._isBuffer))?n(i):(this._isBuffer(e)||(e=String(e)),"object"!=typeof t&&(t={}),"function"==typeof this._get?this._get(e,t,n):void r.nextTick((function(){n(new Error("NotFound"))})))},s.prototype.put=function(e,t,n,i){var o;if("function"==typeof n&&(i=n),"function"!=typeof i)throw new Error("put() requires a callback argument");return(o=this._checkKeyValue(e,"key",this._isBuffer))||(o=this._checkKeyValue(t,"value",this._isBuffer))?i(o):(this._isBuffer(e)||(e=String(e)),this._isBuffer(t)||r.browser||(t=String(t)),"object"!=typeof n&&(n={}),"function"==typeof this._put?this._put(e,t,n,i):void r.nextTick(i))},s.prototype.del=function(e,t,n){var i;if("function"==typeof t&&(n=t),"function"!=typeof n)throw new Error("del() requires a callback argument");return(i=this._checkKeyValue(e,"key",this._isBuffer))?n(i):(this._isBuffer(e)||(e=String(e)),"object"!=typeof t&&(t={}),"function"==typeof this._del?this._del(e,t,n):void r.nextTick(n))},s.prototype.batch=function(e,t,n){if(!arguments.length)return this._chainedBatch();if("function"==typeof t&&(n=t),"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"));"object"!=typeof t&&(t={});for(var i,o,a=0,s=e.length;a<s;a++)if("object"==typeof(i=e[a])){if(o=this._checkKeyValue(i.type,"type",this._isBuffer))return n(o);if(o=this._checkKeyValue(i.key,"key",this._isBuffer))return n(o);if("put"==i.type&&(o=this._checkKeyValue(i.value,"value",this._isBuffer)))return n(o)}if("function"==typeof this._batch)return this._batch(e,t,n);r.nextTick(n)},s.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);r.nextTick((function(){n(null,0)}))},s.prototype._setupIteratorOptions=function(e){var t=this;return e=i(e),["start","end","gt","gte","lt","lte"].forEach((function(n){e[n]&&t._isBuffer(e[n])&&0===e[n].length&&delete e[n]})),e.reverse=!!e.reverse,e.reverse&&e.lt&&(e.start=e.lt),e.reverse&&e.lte&&(e.start=e.lte),!e.reverse&&e.gt&&(e.start=e.gt),!e.reverse&&e.gte&&(e.start=e.gte),(e.reverse&&e.lt&&!e.lte||!e.reverse&&e.gt&&!e.gte)&&(e.exclusiveStart=!0),e},s.prototype.iterator=function(e){return"object"!=typeof e&&(e={}),e=this._setupIteratorOptions(e),"function"==typeof this._iterator?this._iterator(e):new o(this)},s.prototype._chainedBatch=function(){return new a(this)},s.prototype._isBuffer=function(e){return n.isBuffer(e)},s.prototype._checkKeyValue=function(e,t){if(null==e)return new Error(t+" cannot be `null` or `undefined`");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")},t.exports.AbstractLevelDOWN=s,t.exports.AbstractIterator=o,t.exports.AbstractChainedBatch=a}).call(this)}).call(this,{isBuffer:e(38)},e(73))},{1:1,2:2,38:38,4:4,73:73}],4:[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)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}},{}],5:[function(e,t,n){"use strict";t.exports=function(e){return function(){var t=arguments.length;if(t){for(var n=[],r=-1;++r<t;)n[r]=arguments[r];return e.call(this,n)}return e.call(this,[])}}},{}],6:[function(e,t,n){(function(n){(function(){"use strict";var r=e(71);
9/*!
10 * The buffer module from node.js, for the browser.
11 *
12 * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
13 * @license MIT
14 */function i(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 o(e){return n.Buffer&&"function"==typeof n.Buffer.isBuffer?n.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var a=e(9),s=Object.prototype.hasOwnProperty,u=Array.prototype.slice,f="foo"===function(){}.name;function c(e){return Object.prototype.toString.call(e)}function l(e){return!o(e)&&("function"==typeof n.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}var h=t.exports=v,d=/\s*function\s+([^\(\s]*)\s*/;function p(e){if(a.isFunction(e)){if(f)return e.name;var t=e.toString().match(d);return t&&t[1]}}function y(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function g(e){if(f||!a.isFunction(e))return a.inspect(e);var t=p(e);return"[Function"+(t?": "+t:"")+"]"}function b(e,t,n,r,i){throw new h.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function v(e,t){e||b(e,!0,t,"==",h.ok)}function _(e,t,n,r){if(e===t)return!0;if(o(e)&&o(t))return 0===i(e,t);if(a.isDate(e)&&a.isDate(t))return e.getTime()===t.getTime();if(a.isRegExp(e)&&a.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(l(e)&&l(t)&&c(e)===c(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===i(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(o(e)!==o(t))return!1;var s=(r=r||{actual:[],expected:[]}).actual.indexOf(e);return-1!==s&&s===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(a.isPrimitive(e)||a.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=w(e),o=w(t);if(i&&!o||!i&&o)return!1;if(i)return e=u.call(e),t=u.call(t),_(e,t,n);var s,f,c=S(e),l=S(t);if(c.length!==l.length)return!1;for(c.sort(),l.sort(),f=c.length-1;f>=0;f--)if(c[f]!==l[f])return!1;for(f=c.length-1;f>=0;f--)if(s=c[f],!_(e[s],t[s],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function w(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function m(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,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&&b(i,n,"Missing expected exception"+r);var o="string"==typeof r,s=!e&&i&&!n;if((!e&&a.isError(i)&&o&&m(i,n)||s)&&b(i,n,"Got unwanted exception"+r),e&&i&&n&&!m(i,n)||!e&&i)throw i}h.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return y(g(e.actual),128)+" "+e.operator+" "+y(g(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||b;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=p(t),o=r.indexOf("\n"+i);if(o>=0){var a=r.indexOf("\n",o+1);r=r.substring(a+1)}this.stack=r}}},a.inherits(h.AssertionError,Error),h.fail=b,h.ok=v,h.equal=function(e,t,n){e!=t&&b(e,t,n,"==",h.equal)},h.notEqual=function(e,t,n){e==t&&b(e,t,n,"!=",h.notEqual)},h.deepEqual=function(e,t,n){_(e,t,!1)||b(e,t,n,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,n){_(e,t,!0)||b(e,t,n,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,n){_(e,t,!1)&&b(e,t,n,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,n,r){_(t,n,!0)&&b(t,n,r,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,n){e!==t&&b(e,t,n,"===",h.strictEqual)},h.notStrictEqual=function(e,t,n){e===t&&b(e,t,n,"!==",h.notStrictEqual)},h.throws=function(e,t,n){E(!0,e,t,n)},h.doesNotThrow=function(e,t,n){E(!1,e,t,n)},h.ifError=function(e){if(e)throw e},h.strict=r((function e(t,n){t||b(t,!0,n,"==",e)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var S=Object.keys||function(e){var t=[];for(var n in e)s.call(e,n)&&t.push(n);return t}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{71:71,9:9}],7:[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;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],8:[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}},{}],9:[function(e,t,n){(function(t,r){(function(){var i=/%[sdj%]/g;n.format=function(e){if(!b(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(s(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(e).replace(i,(function(e){if("%%"===e)return"%";if(n>=o)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}})),u=r[n];n<o;u=r[++n])y(u)||!w(u)?a+=" "+u:a+=" "+s(u);return a},n.deprecate=function(e,i){if(v(r.process))return function(){return n.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var o=!1;return function(){if(!o){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),o=!0}return e.apply(this,arguments)}};var o,a={};function s(e,t){var r={seen:[],stylize:f};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),p(t)?r.showHidden=t:t&&n._extend(r,t),v(r.showHidden)&&(r.showHidden=!1),v(r.depth)&&(r.depth=2),v(r.colors)&&(r.colors=!1),v(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),c(r,e,r.depth)}function u(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function f(e,t){return e}function c(e,t,r){if(e.customInspect&&t&&S(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return b(i)||(i=c(e,i,r)),i}var o=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(g(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(y(t))return e.stylize("null","null")}(e,t);if(o)return o;var a=Object.keys(t),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),E(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(t);if(0===a.length){if(S(t)){var u=t.name?": "+t.name:"";return e.stylize("[Function"+u+"]","special")}if(_(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(m(t))return e.stylize(Date.prototype.toString.call(t),"date");if(E(t))return l(t)}var f,w="",k=!1,x=["{","}"];(d(t)&&(k=!0,x=["[","]"]),S(t))&&(w=" [Function"+(t.name?": "+t.name:"")+"]");return _(t)&&(w=" "+RegExp.prototype.toString.call(t)),m(t)&&(w=" "+Date.prototype.toUTCString.call(t)),E(t)&&(w=" "+l(t)),0!==a.length||k&&0!=t.length?r<0?_(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),f=k?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a<s;++a)A(t,String(a))?o.push(h(e,t,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(h(e,t,n,r,i,!0))})),o}(e,t,r,s,a):a.map((function(n){return h(e,t,r,s,n,k)})),e.seen.pop(),function(e,t,n){if(e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(f,w,x)):x[0]+w+x[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function h(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")),A(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=y(n)?c(e,u.value,null):c(e,u.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),v(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function d(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function y(e){return null===e}function g(e){return"number"==typeof e}function b(e){return"string"==typeof e}function v(e){return void 0===e}function _(e){return w(e)&&"[object RegExp]"===k(e)}function w(e){return"object"==typeof e&&null!==e}function m(e){return w(e)&&"[object Date]"===k(e)}function E(e){return w(e)&&("[object Error]"===k(e)||e instanceof Error)}function S(e){return"function"==typeof e}function k(e){return Object.prototype.toString.call(e)}function x(e){return e<10?"0"+e.toString(10):e.toString(10)}n.debuglog=function(e){if(v(o)&&(o=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!a[e])if(new RegExp("\\b"+e+"\\b","i").test(o)){var r=t.pid;a[e]=function(){var t=n.format.apply(n,arguments);console.error("%s %d: %s",e,r,t)}}else a[e]=function(){};return a[e]},n.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=d,n.isBoolean=p,n.isNull=y,n.isNullOrUndefined=function(e){return null==e},n.isNumber=g,n.isString=b,n.isSymbol=function(e){return"symbol"==typeof e},n.isUndefined=v,n.isRegExp=_,n.isObject=w,n.isDate=m,n.isError=E,n.isFunction=S,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(8);var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(){var e=new Date,t=[x(e.getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":");return[e.getDate(),O[e.getMonth()],t].join(" ")}function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.log=function(){console.log("%s - %s",R(),n.format.apply(n,arguments))},n.inherits=e(7),n._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this)}).call(this,e(73),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{7:7,73:73,8:8}],10:[function(e,t,n){"use strict";n.byteLength=function(e){var t=f(e),n=t[0],r=t[1];return 3*(n+r)/4-r},n.toByteArray=function(e){var t,n,r=f(e),a=r[0],s=r[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),c=0,l=s>0?a-4:a;for(n=0;n<l;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[c++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t);return u},n.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(c(e,a,a+16383>s?s:a+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function f(e){var t=e.length;if(t%4>0)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 c(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],11:[function(e,t,n){},{}],12:[function(e,t,n){(function(e){(function(){var n=Object.prototype.toString,r=void 0!==e&&"function"==typeof e.alloc&&"function"==typeof e.allocUnsafe&&"function"==typeof e.from;t.exports=function(t,i,o){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return a=t,"ArrayBuffer"===n.call(a).slice(8,-1)?function(t,n,i){n>>>=0;var o=t.byteLength-n;if(o<0)throw new RangeError("'offset' is out of bounds");if(void 0===i)i=o;else if((i>>>=0)>o)throw new RangeError("'length' is out of bounds");return r?e.from(t.slice(n,n+i)):new e(new Uint8Array(t.slice(n,n+i)))}(t,i,o):"string"==typeof t?function(t,n){if("string"==typeof n&&""!==n||(n="utf8"),!e.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');return r?e.from(t,n):new e(t,n)}(t,i):r?e.from(t):new e(t);var a}}).call(this)}).call(this,e(13).Buffer)},{13:13}],13:[function(e,t,n){(function(t){(function(){
15/*!
16 * The buffer module from node.js, for the browser.
17 *
18 * @author Feross Aboukhadijeh <https://feross.org>
19 * @license MIT
20 */
21"use strict";var t=e(10),r=e(30),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=a,n.SlowBuffer=function(e){+e!=e&&(e=0);return a.alloc(+e)},n.INSPECT_MAX_BYTES=50;function o(e){if(e>2147483647)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return s(e,t,n)}function s(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|d(e,t),r=o(n),i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(q(e,Uint8Array)){var t=new Uint8Array(e);return l(t.buffer,t.byteOffset,t.byteLength)}return c(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(q(e,ArrayBuffer)||e&&q(e.buffer,ArrayBuffer))return l(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(q(e,SharedArrayBuffer)||e&&q(e.buffer,SharedArrayBuffer)))return l(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 a.from(r,t,n);var i=function(e){if(a.isBuffer(e)){var t=0|h(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||D(e.length)?o(0):c(e);if("Buffer"===e.type&&Array.isArray(e.data))return c(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,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 u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return u(e),o(e<0?0:0|h(e))}function c(e){for(var t=e.length<0?0:0|h(e.length),n=o(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function l(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;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,a.prototype),r}function h(e){if(e>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|e}function d(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!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 I(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return N(e).length;default:if(i)return r?-1:I(e).length;t=(""+t).toLowerCase(),i=!0}}function p(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 R(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),D(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=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:b(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):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(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;a=2,s/=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(n+u>s&&(n=s-u),o=n;o>=0;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 v(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(D(s))return a;e[n+a]=s}return a}function _(e,t,n,r){return P(I(t,e.length-n),e,n,r)}function w(e,t,n,r){return P(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function m(e,t,n,r){return P(N(t),e,n,r)}function E(e,t,n,r){return P(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}(t,e.length-n),e,n,r)}function S(e,n,r){return 0===n&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function k(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=f>239?4:f>223?3:f>191?2:1;if(i+l<=n)switch(l){case 1:f<128&&(c=f);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&f)<<6|63&o)>127&&(c=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&f)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(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)&&(u=(15&f)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,l=1):c>65535&&(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<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}n.kMaxLength=2147483647,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,n){return s(e,t,n)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,n){return function(e,t,n){return u(e),e<=0?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}(e,t,n)},a.allocUnsafe=function(e){return f(e)},a.allocUnsafeSlow=function(e){return f(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(q(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),q(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var 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},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=a.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(q(o,Uint8Array))i+o.length>r.length?a.from(o).copy(r,i):Uint8Array.prototype.set.call(r,o,i);else{if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i)}i+=o.length}return r},a.byteLength=d,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?k(this,0,e):p.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},i&&(a.prototype[i]=a.prototype.inspect),a.prototype.compare=function(e,t,n,r,i){if(q(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===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(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),u=Math.min(o,s),f=this.slice(r,i),c=e.slice(t,n),l=0;l<u;++l)if(f[l]!==c[l]){o=f[l],s=c[l];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},a.prototype.indexOf=function(e,t,n){return g(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return g(this,e,t,n,!1)},a.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||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":case"latin1":case"binary":return w(this,e,t,n);case"base64":return m(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(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 O(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 R(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=U[e[o]];return i}function A(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length-1;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function j(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function T(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function M(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,i,o){return t=+t,n>>>=0,o||M(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function L(e,t,n,i,o){return t=+t,n>>>=0,o||M(e,0,n,8),r.write(e,t,n,i,52,8),n+8}a.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return Object.setPrototypeOf(r,a.prototype),r},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||j(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||j(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||j(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||j(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||j(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){e>>>=0,t||j(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||j(e,4,this.length),r.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||j(e,4,this.length),r.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||j(e,8,this.length),r.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||j(e,8,this.length),r.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||T(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},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||T(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);T(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},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);T(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||T(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(!a.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),r>0&&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;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},a.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&&!a.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:"boolean"==typeof e&&(e=Number(e));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 s=a.isBuffer(e)?e:a.from(e,r),u=s.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=s[o%u]}return this};var C=/[^+/0-9A-Za-z-_]/g;function I(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&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 N(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(C,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function P(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 q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function D(e){return e!=e}var U=function(){for(var e=new Array(256),t=0;t<16;++t)for(var n=16*t,r=0;r<16;++r)e[n+r]="0123456789abcdef"[t]+"0123456789abcdef"[r];return e}()}).call(this)}).call(this,e(13).Buffer)},{10:10,13:13,30:30}],14:[function(e,t,n){function r(e){return Object.prototype.toString.call(e)}n.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===r(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]"===r(e)},n.isObject=function(e){return"object"==typeof e&&null!==e},n.isDate=function(e){return"[object Date]"===r(e)},n.isError=function(e){return"[object Error]"===r(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(13).Buffer.isBuffer},{13:13}],15:[function(e,t,n){var r=e(13).Buffer,i=".PYFGCRLAOEUIDHTNSQJKXBMWVZ_pyfgcrlaoeuidhtnsqjkxbmwvz1234567890".split("").sort().join("");t.exports=function(e,t){if(t=t||{},64!==(e=e||i).length)throw new Error("a base 64 encoding requires 64 chars");var n=new r(128);n.fill();for(var o=0;o<64;o++){var a=e.charCodeAt(o);n[a]=o}return t.encode=function(t){for(var n="",r=t.length,i=0,o=0;o<r;o++){var a=t[o];switch(o%3){case 0:n+=e[a>>2],i=(3&a)<<4;break;case 1:n+=e[i|a>>4],i=(15&a)<<2;break;case 2:n+=e[i|a>>6],n+=e[63&a],i=0}}return r%3&&(n+=e[i]),n},t.decode=function(e){for(var t=e.length,i=0,o=new r(~~(t/4*3)),a=0,s=0;s<t;s++){var u=n[e.charCodeAt(s)];switch(s%4){case 0:a=u<<2;break;case 1:o[i++]=a|u>>4,a=u<<4&255;break;case 2:o[i++]=a|u>>2,a=u<<6&255;break;case 3:o[i++]=a|u}}return o},t},t.exports(i,t.exports)},{13:13}],16:[function(e,t,n){var r=e(21).AbstractIterator;function i(e,t){r.call(this,e),this._options=t,this._iterator=null,this._operations=[]}e(37)(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)}})),i.prototype.seek=function(){this._operation("seek",arguments)},t.exports=i},{21:21,37:37}],17:[function(e,t,n){var r=e(21).AbstractLevelDOWN,i=e(37),o=e(16),a="put get del batch clear".split(" "),s="approximateSize compactRange".split(" ");function u(e){r.call(this,e.supports||{}),s.forEach((function(t){"function"!=typeof e[t]||this.supports.additionalMethods[t]||(this.supports.additionalMethods[t]=!0)}),this),this._db=e,this._operations=[],f(this)}function f(e){a.forEach((function(t){e["_"+t]=function(){this._operations.push({method:t,args:arguments})}})),Object.keys(e.supports.additionalMethods).forEach((function(t){e[t]=function(){this._operations.push({method:t,args:arguments})}})),e._iterator=function(t){var n=new o(e,t);return this._operations.push({iterator:n}),n}}i(u,r),u.prototype.type="deferred-leveldown",u.prototype._open=function(e,t){var n=this;this._db.open(e,(function(e){if(e)return t(e);n._operations.forEach((function(e){e.iterator?e.iterator.setDb(n._db):n._db[e.method].apply(n._db,e.args)})),n._operations=[],function(e){a.concat("iterator").forEach((function(t){e["_"+t]=function(){return this._db[t].apply(this._db,arguments)}})),Object.keys(e.supports.additionalMethods).forEach((function(t){e[t]=function(){return this._db[t].apply(this._db,arguments)}}))}(n),t()}))},u.prototype._close=function(e){var t=this;this._db.close((function(n){if(n)return e(n);f(t),e()}))},u.prototype._serializeKey=function(e){return e},u.prototype._serializeValue=function(e){return e},t.exports=u,t.exports.DeferredIterator=o},{16:16,21:21,37:37}],18:[function(e,t,n){var r=e(22);function i(e){if("object"!=typeof e||null===e)throw new TypeError("First argument must be an abstract-leveldown compliant store");this.db=e,this._operations=[],this._written=!1}i.prototype._checkWritten=function(){if(this._written)throw new Error("write() already called on this batch")},i.prototype.put=function(e,t){this._checkWritten();var 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},i.prototype._put=function(e,t){this._operations.push({type:"put",key:e,value:t})},i.prototype.del=function(e){this._checkWritten();var t=this.db._checkKey(e);if(t)throw t;return e=this.db._serializeKey(e),this._del(e),this},i.prototype._del=function(e){this._operations.push({type:"del",key:e})},i.prototype.clear=function(){return this._checkWritten(),this._clear(),this},i.prototype._clear=function(){this._operations=[]},i.prototype.write=function(e,t){if(this._checkWritten(),"function"==typeof e&&(t=e),"function"!=typeof t)throw new Error("write() requires a callback argument");"object"==typeof e&&null!==e||(e={}),this._written=!0,this._write(e,t)},i.prototype._write=function(e,t){this.db._batch(this._operations,e,t)},i.prototype._nextTick=r,t.exports=i},{22:22}],19:[function(e,t,n){var r=e(22);function i(e){if("object"!=typeof e||null===e)throw new TypeError("First argument must be an abstract-leveldown compliant store");this.db=e,this._ended=!1,this._nexting=!1}i.prototype.next=function(e){var t=this;if("function"!=typeof e)throw new Error("next() requires a callback argument");return t._ended?(r(e,new Error("cannot call next() after end()")),t):t._nexting?(r(e,new Error("cannot call next() before previous next() has completed")),t):(t._nexting=!0,t._next((function(){t._nexting=!1,e.apply(null,arguments)})),t)},i.prototype._next=function(e){r(e)},i.prototype.seek=function(e){if(this._ended)throw new Error("cannot call seek() after end()");if(this._nexting)throw new Error("cannot call seek() before next() has completed");e=this.db._serializeKey(e),this._seek(e)},i.prototype._seek=function(e){},i.prototype.end=function(e){if("function"!=typeof e)throw new Error("end() requires a callback argument");if(this._ended)return r(e,new Error("end() already called on iterator"));this._ended=!0,this._end(e)},i.prototype._end=function(e){r(e)},i.prototype._nextTick=r,t.exports=i},{22:22}],20:[function(e,t,n){var r=e(141),i=e(58),o=e(13).Buffer,a=e(19),s=e(18),u=e(22),f=Object.prototype.hasOwnProperty,c="start end gt gte lt lte".split(" ");function l(e){this.status="new",this.supports=i(e,{status:!0})}function h(e,t){var n={};for(var r in t)if(f.call(t,r)){var i=t[r];d(r)&&(i=e._serializeKey(i)),n[r]=i}return n}function d(e){return-1!==c.indexOf(e)}l.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()}))},l.prototype._open=function(e,t){u(t)},l.prototype.close=function(e){var t=this,n=this.status;if("function"!=typeof e)throw new Error("close() requires a callback argument");this.status="closing",this._close((function(r){if(r)return t.status=n,e(r);t.status="closed",e()}))},l.prototype._close=function(e){u(e)},l.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(n,r);e=this._serializeKey(e),"object"==typeof t&&null!==t||(t={}),t.asBuffer=!1!==t.asBuffer,this._get(e,t,n)},l.prototype._get=function(e,t,n){u((function(){n(new Error("NotFound"))}))},l.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(r,i);e=this._serializeKey(e),t=this._serializeValue(t),"object"==typeof n&&null!==n||(n={}),this._put(e,t,n,r)},l.prototype._put=function(e,t,n,r){u(r)},l.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(n,r);e=this._serializeKey(e),"object"==typeof t&&null!==t||(t={}),this._del(e,t,n)},l.prototype._del=function(e,t,n){u(n)},l.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(n,new Error("batch(array) requires an array argument"));if(0===e.length)return u(n);"object"==typeof t&&null!==t||(t={});for(var i=new Array(e.length),o=0;o<e.length;o++){if("object"!=typeof e[o]||null===e[o])return u(n,new Error("batch(array) element must be an object and not `null`"));var a=r(e[o]);if("put"!==a.type&&"del"!==a.type)return u(n,new Error("`type` must be 'put' or 'del'"));var s=this._checkKey(a.key);if(s)return u(n,s);if(a.key=this._serializeKey(a.key),"put"===a.type){var f=this._checkValue(a.value);if(f)return u(n,f);a.value=this._serializeValue(a.value)}i[o]=a}this._batch(i,t,n)},l.prototype._batch=function(e,t,n){u(n)},l.prototype.clear=function(e,t){if("function"==typeof e)t=e;else if("function"!=typeof t)throw new Error("clear() requires a callback argument");(e=h(this,e)).reverse=!!e.reverse,e.limit="limit"in e?e.limit:-1,this._clear(e,t)},l.prototype._clear=function(e,t){e.keys=!0,e.values=!1,e.keyAsBuffer=!0,e.valueAsBuffer=!0;var n=this._iterator(e),r={},i=this,o=function(e){if(e)return n.end((function(){t(e)}));n.next((function(e,a){return e?o(e):void 0===a?n.end(t):void i._del(a,r,o)}))};o()},l.prototype._setupIteratorOptions=function(e){return(e=h(this,e)).reverse=!!e.reverse,e.keys=!1!==e.keys,e.values=!1!==e.values,e.limit="limit"in e?e.limit:-1,e.keyAsBuffer=!1!==e.keyAsBuffer,e.valueAsBuffer=!1!==e.valueAsBuffer,e},l.prototype.iterator=function(e){return"object"==typeof e&&null!==e||(e={}),e=this._setupIteratorOptions(e),this._iterator(e)},l.prototype._iterator=function(e){return new a(this)},l.prototype._chainedBatch=function(){return new s(this)},l.prototype._serializeKey=function(e){return e},l.prototype._serializeValue=function(e){return e},l.prototype._checkKey=function(e){return null==e?new Error("key cannot be `null` or `undefined`"):o.isBuffer(e)&&0===e.length?new Error("key cannot be an empty Buffer"):""===e?new Error("key cannot be an empty String"):Array.isArray(e)&&0===e.length?new Error("key cannot be an empty Array"):void 0},l.prototype._checkValue=function(e){if(null==e)return new Error("value cannot be `null` or `undefined`")},l.prototype._nextTick=u,t.exports=l},{13:13,141:141,18:18,19:19,22:22,58:58}],21:[function(e,t,n){n.AbstractLevelDOWN=e(20),n.AbstractIterator=e(19),n.AbstractChainedBatch=e(18)},{18:18,19:19,20:20}],22:[function(e,t,n){t.exports=e(31)},{31:31}],23:[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(t>1){var r=this._capacity;if(n+t>r){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(n>1){if(t+n>(i=this._capacity)){for(var r=n-1;r>=0;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;r>=0;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||t>=n))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.toString=function(){return this.toArray().toString()},r.prototype.valueOf=r.prototype.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;n+r>t&&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 t=Math.min(Math.max(16,e),1073741824),t>>>=0,t-=1,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,1+(t|=t>>16);var t}t.exports=r},{}],24:[function(e,t,n){var r=e(74);function i(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 o(e,t){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),i.call(this,"CustomError",e,t)}o.prototype=new Error,t.exports=function(e){var t=function(t,n){return function(e,t,n){var r=function(n,o){i.call(this,t,n,o),"FilesystemError"==t&&(this.code=this.cause.code,this.path=this.cause.path,this.errno=this.cause.errno,this.message=(e.errno[this.cause.errno]?e.errno[this.cause.errno].description:this.cause.message)+(this.cause.path?" ["+this.cause.path+"]":"")),Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,r)};return r.prototype=n?new n:new o,r}(e,t,n)};return{CustomError:o,FilesystemError:t("FilesystemError"),createError:t}}},{74:74}],25:[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(24)(t.exports),t.exports.create=t.exports.custom.createError},{24:24}],26:[function(e,t,n){var r=Object.create||function(e){var t=function(){};return t.prototype=e,new t},i=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 a(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=r(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}t.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._maxListeners=void 0;var s,u=10;try{var f={};Object.defineProperty&&Object.defineProperty(f,"x",{value:0}),s=0===f.x}catch(e){s=!1}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function l(e,t,n){if(t)e.call(n);else for(var r=e.length,i=m(e,r),o=0;o<r;++o)i[o].call(n)}function h(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,o=m(e,i),a=0;a<i;++a)o[a].call(n,r)}function d(e,t,n,r,i){if(t)e.call(n,r,i);else for(var o=e.length,a=m(e,o),s=0;s<o;++s)a[s].call(n,r,i)}function p(e,t,n,r,i,o){if(t)e.call(n,r,i,o);else for(var a=e.length,s=m(e,a),u=0;u<a;++u)s[u].call(n,r,i,o)}function y(e,t,n,r){if(t)e.apply(n,r);else for(var i=e.length,o=m(e,i),a=0;a<i;++a)o[a].apply(n,r)}function g(e,t,n,i){var o,a,s;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((a=e._events)?(a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),s=a[t]):(a=e._events=r(null),e._eventsCount=0),s){if("function"==typeof s?s=a[t]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),!s.warned&&(o=c(e))&&o>0&&s.length>o){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",u.name,u.message)}}else s=a[t]=n,++e._eventsCount;return e}function b(){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 v(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=o.call(b,r);return i.listener=n,r.wrapFn=i,i}function _(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):m(i,i.length):[]}function w(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 m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}s?Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||e!=e)throw new TypeError('"defaultMaxListeners" must be a positive number');u=e}}):a.defaultMaxListeners=u,a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){var t,n,r,i,o,a,s="error"===e;if(a=this._events)s=s&&null==a.error;else if(!s)return!1;if(s){if(arguments.length>1&&(t=arguments[1]),t instanceof Error)throw t;var u=new Error('Unhandled "error" event. ('+t+")");throw u.context=t,u}if(!(n=a[e]))return!1;var f="function"==typeof n;switch(r=arguments.length){case 1:l(n,f,this);break;case 2:h(n,f,this,arguments[1]);break;case 3:d(n,f,this,arguments[1],arguments[2]);break;case 4:p(n,f,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];y(n,f,this,i)}return!0},a.prototype.addListener=function(e,t){return g(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return g(this,e,t,!0)},a.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,v(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,v(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,i,o,a,s;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(i=this._events))return this;if(!(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=r(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){s=n[a].listener,o=a;break}if(o<0)return this;0===o?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,o),1===n.length&&(i[e]=n[0]),i.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.removeAllListeners=function(e){var t,n,o;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=r(null),this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=r(null):delete n[e]),this;if(0===arguments.length){var a,s=i(n);for(o=0;o<s.length;++o)"removeListener"!==(a=s[o])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=r(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(t)for(o=t.length-1;o>=0;o--)this.removeListener(e,t[o]);return this},a.prototype.listeners=function(e){return _(this,e,!0)},a.prototype.rawListeners=function(e){return _(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):w.call(e,t)},a.prototype.listenerCount=w,a.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],27:[function(e,t,n){"object"==typeof n&&(t.exports=function(){try{if("undefined"==typeof localStorage)return!1;if(localStorage.setItem("Storage-Test","1"),"1"!==localStorage.getItem("Storage-Test"))return!1;localStorage.removeItem("Storage-Test")}catch(e){return!1}return!0})},{}],28:[function(e,t,n){(function(n){(function(){var r=t.exports={},i=e(69);r.hasLocalStorage=e(27),r.create=function(){var e;return r.hasLocalStorage()?(e=n.localStorage,(e={get length(){return n.localStorage.length},getItem:n.localStorage.getItem.bind(n.localStorage),setItem:n.localStorage.setItem.bind(n.localStorage),removeItem:n.localStorage.removeItem.bind(n.localStorage),key:n.localStorage.key.bind(n.localStorage),clear:n.localStorage.clear.bind(n.localStorage)}).isPersistent=!0):(e=i).isPersistent=!1,e.getObject=r.getObject.bind(null,e),e.setObject=r.setObject.bind(null,e),e},r.setObject=function(e,t,n){return"object"!=typeof n?e.setItem(t,n):e.setItem(t,JSON.stringify(n))},r.getObject=function(e,t){var n=e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch(e){return n}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{27:27,69:69}],29:[function(e,t,n){var r=e(28);t.exports=r.create()},{28:28}],30:[function(e,t,n){
22/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
23n.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;c>0;o=256*o+e[t+l],l+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;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,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=c?(s=0,a=c):a+l>=1?(s=(t*u-1)*Math.pow(2,i),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,f+=i;f>0;e[n+d]=255&a,d+=p,a/=256,f-=8);e[n+d-p]|=128*y}},{}],31:[function(e,t,n){"use strict";var r,i,o,a=[e(11),e(34),e(33),e(32),e(35),e(36)],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){f=!1,r=!0;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,s=-1,r=!1,clearTimeout(t)}}for(var h=-1,d=a.length;++h<d;)if(a[h]&&a[h].test&&a[h].test()){o=a[h].install(l);break}function p(e,t){this.fun=e,this.array=t}p.prototype.run=function(){var e=this.fun,t=this.array;switch(t.length){case 0:return e();case 1:return e(t[0]);case 2:return e(t[0],t[1]);case 3:return e(t[0],t[1],t[2]);default:return e.apply(null,t)}},t.exports=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),f||r||(f=!0,o())}},{11:11,32:32,33:33,34:34,35:35,36:36}],32:[function(e,t,n){(function(e){(function(){"use strict";n.test=function(){return!e.setImmediate&&void 0!==e.MessageChannel},n.install=function(t){var n=new e.MessageChannel;return n.port1.onmessage=t,function(){n.port2.postMessage(0)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],33:[function(e,t,n){(function(e){(function(){"use strict";var t=e.MutationObserver||e.WebKitMutationObserver;n.test=function(){return t},n.install=function(n){var r=0,i=new t(n),o=e.document.createTextNode("");return i.observe(o,{characterData:!0}),function(){o.data=r=++r%2}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],34:[function(e,t,n){(function(e){(function(){"use strict";n.test=function(){return"function"==typeof e.queueMicrotask},n.install=function(t){return function(){e.queueMicrotask(t)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],35:[function(e,t,n){(function(e){(function(){"use strict";n.test=function(){return"document"in e&&"onreadystatechange"in e.document.createElement("script")},n.install=function(t){return function(){var n=e.document.createElement("script");return n.onreadystatechange=function(){t(),n.onreadystatechange=null,n.parentNode.removeChild(n),n=null},e.document.documentElement.appendChild(n),t}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],36:[function(e,t,n){"use strict";n.test=function(){return!0},n.install=function(e){return function(){setTimeout(e,0)}}},{}],37:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},{}],38:[function(e,t,n){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
24/*!
25 * Determine if an object is a Buffer
26 *
27 * @author Feross Aboukhadijeh <https://feross.org>
28 * @license MIT
29 */
30t.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)}},{}],39:[function(e,t,n){var r=e(40);function i(e){if(!(this instanceof i))return new i(e);this.opts=e||{},this.encodings=r}t.exports=i,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,t){var n=this;return e.map((function(e){var r={type:e.type,key:n.encodeKey(e.key,t,e)};return n.keyAsBuffer(t,e)&&(r.keyEncoding="binary"),e.prefix&&(r.prefix=e.prefix),"value"in e&&(r.value=n.encodeValue(e.value,t,e),n.valueAsBuffer(t,e)&&(r.valueEncoding="binary")),r}))};var o=["lt","gt","lte","gte","start","end"];i.prototype.encodeLtgt=function(e){var t=this,n={};return Object.keys(e).forEach((function(r){n[r]=o.indexOf(r)>-1?t.encodeKey(e[r],e):e[r]})),n},i.prototype.createStreamDecoder=function(e){var t=this;return e.keys&&e.values?function(n,r){return{key:t.decodeKey(n,e),value:t.decodeValue(r,e)}}:e.keys?function(n){return t.decodeKey(n,e)}:e.values?function(n,r){return t.decodeValue(r,e)}:function(){}},i.prototype.keyAsBuffer=function(e){return this._keyEncoding(e).buffer},i.prototype.valueAsBuffer=function(e){return this._valueEncoding(e).buffer}},{40:40}],40:[function(e,t,n){var r=e(13).Buffer;n.utf8=n["utf-8"]={encode:function(e){return o(e)?e:String(e)},decode:i,buffer:!1,type:"utf8"},n.json={encode:JSON.stringify,decode:JSON.parse,buffer:!1,type:"json"},n.binary={encode:function(e){return o(e)?e:r.from(e)},decode:i,buffer:!0,type:"binary"},n.none={encode:i,decode:i,buffer:!1,type:"id"},n.id=n.none;function i(e){return e}function o(e){return null==e||r.isBuffer(e)}["hex","ascii","base64","ucs2","ucs-2","utf16le","utf-16le"].forEach((function(e){n[e]={encode:function(t){return o(t)?t:r.from(t,e)},decode:function(t){return t.toString(e)},buffer:!0,type:e}}))},{13:13}],41:[function(e,t,n){var r=e(25).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)}},{25:25}],42:[function(e,t,n){var r=e(37),i=e(57).Readable,o=e(141);function a(e,t){if(!(this instanceof a))return new a(e,t);t=t||{},i.call(this,o(t,{objectMode:!0})),this._iterator=e,this._options=t,this.on("end",this.destroy.bind(this,null,null))}t.exports=a,r(a,i),a.prototype._read=function(){var e=this,t=this._options;this.destroyed||this._iterator.next((function(n,r,i){if(!e.destroyed)return n?e.destroy(n):void(void 0===r&&void 0===i?e.push(null):!1!==t.keys&&!1===t.values?e.push(r):!1===t.keys&&!1!==t.values?e.push(i):e.push({key:r,value:i}))}))},a.prototype._destroy=function(e,t){this._iterator.end((function(n){t(e||n)}))}},{141:141,37:37,57:57}],43:[function(e,t,n){"use strict";var r={};function i(e,t,n){n||(n=Error);var i=function(e){var n,r;function i(n,r,i){return e.call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,r,i))||this}return r=e,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);i.prototype.name=n.name,i.prototype.code=e,r[e]=i}function o(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"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,a,s;if("string"==typeof t&&(i="not ",t.substr(!a||a<0?0:+a,i.length)===i)?(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"))s="The ".concat(e," ").concat(r," ").concat(o(t,"type"));else{var u=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(r," ").concat(o(t,"type"))}return s+=". 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},{}],44:[function(e,t,n){(function(n){(function(){"use strict";var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=f;var i=e(46),o=e(48);e(37)(f,i);for(var a=r(o.prototype),s=0;s<a.length;s++){var u=a[s];f.prototype[u]||(f.prototype[u]=o.prototype[u])}function f(e){if(!(this instanceof f))return new f(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",c)))}function c(){this._writableState.ended||n.nextTick(l,this)}function l(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this)}).call(this,e(73))},{37:37,46:46,48:48,73:73}],45:[function(e,t,n){"use strict";t.exports=i;var r=e(47);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}e(37)(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},{37:37,47:47}],46:[function(e,t,n){(function(n,r){(function(){"use strict";var i;t.exports=x,x.ReadableState=k;e(26).EventEmitter;var o=function(e,t){return e.listeners(t).length},a=e(56),s=e(13).Buffer,u=r.Uint8Array||function(){};var f,c=e(11);f=c&&c.debuglog?c.debuglog("stream"):function(){};var l,h,d,p=e(50),y=e(51),g=e(55).getHighWaterMark,b=e(43).codes,v=b.ERR_INVALID_ARG_TYPE,_=b.ERR_STREAM_PUSH_AFTER_EOF,w=b.ERR_METHOD_NOT_IMPLEMENTED,m=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e(37)(x,a);var E=y.errorOrDestroy,S=["error","close","destroy","pause","resume"];function k(t,n,r){i=i||e(44),t=t||{},"boolean"!=typeof r&&(r=n instanceof i),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",r),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(l||(l=e(102).StringDecoder),this.decoder=new l(t.encoding),this.encoding=t.encoding)}function x(t){if(i=i||e(44),!(this instanceof x))return new x(t);var n=this instanceof i;this._readableState=new k(t,this,n),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function O(e,t,n,r,i){f("readableAddChunk",t);var o,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(f("onEofChunk"),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?j(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,T(e)))}(e,a);else if(i||(o=function(e,t){var n;r=t,s.isBuffer(r)||r instanceof u||"string"==typeof t||void 0===t||e.objectMode||(n=new v("chunk",["string","Buffer","Uint8Array"],t));var r;return n}(a,t)),o)E(e,o);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)a.endEmitted?E(e,new m):R(e,a,t,!0);else if(a.ended)E(e,new _);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?R(e,a,t,!1):M(e,a)):R(e,a,t,!1)}else r||(a.reading=!1,M(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function R(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&&j(e)),M(e,t)}Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),x.prototype.destroy=y.destroy,x.prototype._undestroy=y.undestroy,x.prototype._destroy=function(e,t){t(e)},x.prototype.push=function(e,t){var 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),O(this,e,t,!1,n)},x.prototype.unshift=function(e){return O(this,e,null,!0,!1)},x.prototype.isPaused=function(){return!1===this._readableState.flowing},x.prototype.setEncoding=function(t){l||(l=e(102).StringDecoder);var n=new l(t);this._readableState.decoder=n,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=n.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function A(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function j(e){var t=e._readableState;f("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(T,e))}function T(e){var t=e._readableState;f("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,N(e)}function M(e,t){t.readingMore||(t.readingMore=!0,n.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(f("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function L(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function C(e){f("readable nexttick read 0"),e.read(0)}function I(e,t){f("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),N(e),t.flowing&&!t.reading&&e.read(0)}function N(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function P(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;f("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(D,t,e))}function D(e,t){if(f("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function U(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}x.prototype.read=function(e){f("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:t.length>0)||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?q(this):j(this),null;if(0===(e=A(e,t))&&t.ended)return 0===t.length&&q(this),null;var r,i=t.needReadable;return f("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&f("length less than watermark",i=!0),t.ended||t.reading?f("reading or ended",i=!1):i&&(f("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=A(n,t))),null===(r=e>0?P(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&q(this)),null!==r&&this.emit("data",r),r},x.prototype._read=function(e){E(this,new w("_read()"))},x.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,f("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?u:g;function s(t,n){f("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,f("cleanup"),e.removeListener("close",p),e.removeListener("finish",y),e.removeListener("drain",c),e.removeListener("error",d),e.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",h),l=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function u(){f("onend"),e.end()}i.endEmitted?n.nextTick(a):r.once("end",a),e.on("unpipe",s);var c=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,N(e))}}(r);e.on("drain",c);var l=!1;function h(t){f("ondata");var n=e.write(t);f("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==U(i.pipes,e))&&!l&&(f("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(t){f("onerror",t),g(),e.removeListener("error",d),0===o(e,"error")&&E(e,t)}function p(){e.removeListener("finish",y),g()}function y(){f("onfinish"),e.removeListener("close",p),g()}function g(){f("unpipe"),r.unpipe(e)}return r.on("data",h),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)}(e,"error",d),e.once("close",p),e.once("finish",y),e.emit("pipe",r),i.flowing||(f("pipe resume"),r.resume()),e},x.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=U(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},x.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,f("on readable",i.length,i.reading),i.length?j(this):i.reading||n.nextTick(C,this))),r},x.prototype.addListener=x.prototype.on,x.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(L,this),r},x.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(L,this),t},x.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(I,e,t))}(this,e)),e.paused=!1,this},x.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},x.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(f("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(f("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<S.length;o++)e.on(S[o],this.emit.bind(this,S[o]));return this._read=function(t){f("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(x.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=e(49)),h(this)}),Object.defineProperty(x.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(x.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(x.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),x._fromList=P,Object.defineProperty(x.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(x.from=function(t,n){return void 0===d&&(d=e(53)),d(x,t,n)})}).call(this)}).call(this,e(73),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{102:102,11:11,13:13,26:26,37:37,43:43,44:44,49:49,50:50,51:51,53:53,55:55,56:56,73:73}],47:[function(e,t,n){"use strict";t.exports=c;var r=e(43).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(44);function f(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,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);u.call(this,e),this._transformState={afterTransform:f.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",l)}function l(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,n){h(e,t,n)}))}function h(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(37)(c,u),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,n){n(new i("_transform()"))},c.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)}},c.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))},c.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},{37:37,43:43,44:44}],48:[function(e,t,n){(function(n,r){(function(){"use strict";function i(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 o;t.exports=x,x.WritableState=k;var a={deprecate:e(121)},s=e(56),u=e(13).Buffer,f=r.Uint8Array||function(){};var c,l=e(51),h=e(55).getHighWaterMark,d=e(43).codes,p=d.ERR_INVALID_ARG_TYPE,y=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,b=d.ERR_STREAM_CANNOT_PIPE,v=d.ERR_STREAM_DESTROYED,_=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,m=d.ERR_UNKNOWN_ENCODING,E=l.errorOrDestroy;function S(){}function k(t,r,a){o=o||e(44),t=t||{},"boolean"!=typeof a&&(a=r instanceof o),this.objectMode=!!t.objectMode,a&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=h(this,t,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,o){--t.pendingcb,r?(n.nextTick(o,i),n.nextTick(M,e,t),e._writableState.errorEmitted=!0,E(e,i)):(o(i),e._writableState.errorEmitted=!0,E(e,i),M(e,t))}(e,r,i,t,o);else{var a=j(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||A(e,r),i?n.nextTick(R,e,r,a,o):R(e,r,a,o)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function x(t){var n=this instanceof(o=o||e(44));if(!n&&!c.call(x,this))return new x(t);this._writableState=new k(t,this,n),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),s.call(this)}function O(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new v("write")):n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function R(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),M(e,t)}function A(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var s=0,u=!0;n;)o[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;o.allBuffers=u,O(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;n;){var f=n.chunk,c=n.encoding,l=n.callback;if(O(e,t,!1,t.objectMode?1:f.length,f,c,l),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function j(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function T(e,t){e._final((function(n){t.pendingcb--,n&&E(e,n),t.prefinished=!0,e.emit("prefinish"),M(e,t)}))}function M(e,t){var r=j(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,n.nextTick(T,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}e(37)(x,s),k.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(k.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(x,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===x&&(e&&e._writableState instanceof k)}})):c=function(e){return e instanceof this},x.prototype.pipe=function(){E(this,new b)},x.prototype.write=function(e,t,r){var i,o=this._writableState,a=!1,s=!o.objectMode&&(i=e,u.isBuffer(i)||i instanceof f);return s&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=S),o.ending?function(e,t){var r=new w;E(e,r),n.nextTick(t,r)}(this,r):(s||function(e,t,r,i){var o;return null===r?o=new _:"string"==typeof r||t.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(E(e,o),n.nextTick(i,o),!1)}(this,o,e,r))&&(o.pendingcb++,a=function(e,t,n,r,i,o){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.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 f=t.length<t.highWaterMark;f||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else O(e,t,!1,s,r,i,o);return f}(this,o,s,e,t,r)),a},x.prototype.cork=function(){this._writableState.corked++},x.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||A(this,e))},x.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new m(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(x.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(x.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),x.prototype._write=function(e,t,n){n(new y("_write()"))},x.prototype._writev=null,x.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,M(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(x.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),x.prototype.destroy=l.destroy,x.prototype._undestroy=l.undestroy,x.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e(73),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{121:121,13:13,37:37,43:43,44:44,51:51,55:55,56:56,73:73}],49:[function(e,t,n){(function(n){(function(){"use strict";var r;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 o=e(52),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)))}}function y(e){n.nextTick(p,e)}var g=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((i(r={get stream(){return this[h]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[f])return Promise.resolve(d(void 0,!0));if(this[h].destroyed)return new Promise((function(t,r){n.nextTick((function(){e[u]?r(e[u]):t(d(void 0,!0))}))}));var r,i=this[c];if(i)r=new Promise(function(e,t){return function(n,r){e.then((function(){t[f]?n(d(void 0,!0)):t[l](n,r)}),r)}}(i,this));else{var o=this[h].read();if(null!==o)return Promise.resolve(d(o,!1));r=new Promise(this[l])}return this[c]=r,r}},Symbol.asyncIterator,(function(){return this})),i(r,"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))}))}))})),r),g);t.exports=function(e){var t,n=Object.create(b,(i(t={},h,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,f,{value:e._readableState.endEmitted,writable:!0}),i(t,l,{value:function(e,t){var r=n[h].read();r?(n[c]=null,n[a]=null,n[s]=null,e(d(r,!1))):(n[a]=e,n[s]=t)},writable:!0}),t));return n[c]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[s];return null!==t&&(n[c]=null,n[a]=null,n[s]=null,t(e)),void(n[u]=e)}var r=n[a];null!==r&&(n[c]=null,n[a]=null,n[s]=null,r(d(void 0,!0))),n[f]=!0})),e.on("readable",y.bind(null,n)),n}}).call(this)}).call(this,e(73))},{52:52,73:73}],50:[function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=e(13).Buffer,s=e(11).inspect,u=s&&s.custom||"inspect";t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,n,f;return t=e,(n=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,n,r,i=a.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,n=i,r=s,a.prototype.copy.call(t,n,r),s+=o.data.length,o=o.next;return i}},{key:"consume",value: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}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value: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,t.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=a.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,n.data=i.slice(o));break}++r}return this.length-=r,t}},{key:u,value:function(e,t){return s(this,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}])&&o(t.prototype,n),f&&o(t,f),e}()},{11:11,13:13}],51:[function(e,t,n){(function(e){(function(){"use strict";function n(e,t){i(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}t.exports={destroy:function(t,o){var a=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?a._writableState?a._writableState.errorEmitted?e.nextTick(r,a):(a._writableState.errorEmitted=!0,e.nextTick(n,a,t)):e.nextTick(n,a,t):o?(e.nextTick(r,a),o(t)):e.nextTick(r,a)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this)}).call(this,e(73))},{73:73}],52:[function(e,t,n){"use strict";var r=e(43).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function e(t,n,o){if("function"==typeof n)return e(t,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(o||i);var a=n.readable||!1!==n.readable&&t.readable,s=n.writable||!1!==n.writable&&t.writable,u=function(){t.writable||c()},f=t._writableState&&t._writableState.finished,c=function(){s=!1,f=!0,a||o.call(t)},l=t._readableState&&t._readableState.endEmitted,h=function(){a=!1,l=!0,s||o.call(t)},d=function(e){o.call(t,e)},p=function(){var e;return a&&!l?(t._readableState&&t._readableState.ended||(e=new r),o.call(t,e)):s&&!f?(t._writableState&&t._writableState.ended||(e=new r),o.call(t,e)):void 0},y=function(){t.req.on("finish",c)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?s&&!t._writableState&&(t.on("end",u),t.on("close",u)):(t.on("complete",c),t.on("abort",p),t.req?y():t.on("request",y)),t.on("end",h),t.on("finish",c),!1!==n.error&&t.on("error",d),t.on("close",p),function(){t.removeListener("complete",c),t.removeListener("abort",p),t.removeListener("request",y),t.req&&t.req.removeListener("finish",c),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",c),t.removeListener("end",h),t.removeListener("error",d),t.removeListener("close",p)}}},{43:43}],53:[function(e,t,n){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],54:[function(e,t,n){"use strict";var r;var i=e(43).codes,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(t,n,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;t.on("close",(function(){s=!0})),void 0===r&&(r=e(52)),r(t,{readable:n,writable:i},(function(e){if(e)return o(e);s=!0,o()}));var u=!1;return function(e){if(!s&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new a("pipe"))}}function f(e){e()}function c(e,t){return e.pipe(t)}function l(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}t.exports=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=l(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var a=t.map((function(e,n){var o=n<t.length-1;return u(e,o,n>0,(function(e){r||(r=e),e&&a.forEach(f),o||(a.forEach(f),i(r))}))}));return t.reduce(c)}},{43:43,52:52}],55:[function(e,t,n){"use strict";var r=e(43).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,n,i){var o=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(i?n:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},{43:43}],56:[function(e,t,n){t.exports=e(26).EventEmitter},{26:26}],57:[function(e,t,n){(n=t.exports=e(46)).Stream=n,n.Readable=n,n.Writable=e(48),n.Duplex=e(44),n.Transform=e(47),n.PassThrough=e(45),n.finished=e(52),n.pipeline=e(54)},{44:44,45:45,46:46,47:47,48:48,52:52,54:54}],58:[function(e,t,n){"use strict";var r=e(141),i=e(142);t.exports=function(){var e=r.apply(null,arguments);return i(e,{bufferKeys:e.bufferKeys||!1,snapshots:e.snapshots||!1,permanence:e.permanence||!1,seek:e.seek||!1,clear:e.clear||!1,status:e.status||!1,createIfMissing:e.createIfMissing||!1,errorIfExists:e.errorIfExists||!1,deferredOpen:e.deferredOpen||!1,openCallback:e.openCallback||!1,promises:e.promises||!1,streams:e.streams||!1,encodings:e.encodings||!1,additionalMethods:r(e.additionalMethods)})}},{141:141,142:142}],59:[function(e,t,n){var r=e(41).WriteError,i=e(62),o=e(60).getCallback,a=e(60).getOptions;function s(e){this.db=this._levelup=e,this.batch=e.db.batch(),this.ops=[],this.length=0}s.prototype.put=function(e,t){try{this.batch.put(e,t)}catch(e){throw new r(e)}return this.ops.push({type:"put",key:e,value:t}),this.length++,this},s.prototype.del=function(e){try{this.batch.del(e)}catch(e){throw new r(e)}return this.ops.push({type:"del",key:e}),this.length++,this},s.prototype.clear=function(){try{this.batch.clear()}catch(e){throw new r(e)}return this.ops=[],this.length=0,this},s.prototype.write=function(e,t){var n,s=this._levelup,u=this.ops;(t=o(e,t))||(n=(t=i()).promise),e=a(e);try{this.batch.write(e,(function(e){if(e)return t(new r(e));s.emit("batch",u),t()}))}catch(e){throw new r(e)}return n},t.exports=s},{41:41,60:60,62:62}],60:[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:{}}},{}],61:[function(e,t,n){(function(n){(function(){var r=e(26).EventEmitter,i=e(124).inherits,o=e(141),a=e(17),s=e(42),u=e(59),f=e(41),c=e(58),l=e(6),h=e(62),d=e(60).getCallback,p=e(60).getOptions,y=f.WriteError,g=f.ReadError,b=f.NotFoundError,v=f.OpenError,_=f.InitializationError;function w(e,t,i){if(!(this instanceof w))return new w(e,t,i);var o,s=this;if(r.call(this),this.setMaxListeners(1/0),"function"==typeof t&&(i=t,t={}),t=t||{},!e||"object"!=typeof e){if(o=new _("First argument must be an abstract-leveldown compliant store"),"function"==typeof i)return n.nextTick(i,o);throw o}l.strictEqual(typeof e.status,"string",".status required, old abstract-leveldown"),this.options=p(t),this._db=e,this.db=new a(e),this.open(i||function(e){e&&s.emit("error",e)}),this.supports=c(this.db.supports,{status:!1,deferredOpen:!0,openCallback:!0,promises:!0,streams:!0}),Object.keys(this.supports.additionalMethods).forEach((function(e){null==this[e]&&(this[e]=function(){return this.db[e].apply(this.db,arguments)})}),this)}function m(e,t){if(!e._isOpening()&&!e.isOpen())return n.nextTick(t,new g("Database is not open")),!0}w.prototype.emit=r.prototype.emit,w.prototype.once=r.prototype.once,i(w,r),w.prototype.open=function(e,t){var r,i=this;return"function"==typeof e&&(t=e,e=null),t||(r=(t=h()).promise),e||(e=this.options),this.isOpen()?(n.nextTick(t,null,i),r):this._isOpening()?(this.once("open",(function(){t(null,i)})),r):(this.emit("opening"),this.db.open(e,(function(e){if(e)return t(new v(e));i.db=i._db,t(null,i),i.emit("open"),i.emit("ready")})),r)},w.prototype.close=function(e){var t,r=this;return e||(t=(e=h()).promise),this.isOpen()?(this.db.close((function(){r.emit("closed"),e.apply(null,arguments)})),this.emit("closing"),this.db=new a(this._db)):this.isClosed()?n.nextTick(e):"closing"===this.db.status?this.once("closed",e):this._isOpening()&&this.once("open",(function(){r.close(e)})),t},w.prototype.isOpen=function(){return"open"===this.db.status},w.prototype._isOpening=function(){return"opening"===this.db.status},w.prototype.isClosed=function(){return/^clos|new/.test(this.db.status)},w.prototype.get=function(e,t,n){var r;return(n=d(t,n))||(r=(n=h()).promise),m(this,n)||(t=p(t),this.db.get(e,t,(function(t,r){if(t)return t=/notfound/i.test(t)||t.notFound?new b("Key not found in database ["+e+"]",t):new g(t),n(t);n(null,r)}))),r},w.prototype.put=function(e,t,n,r){var i,o=this;return(r=d(n,r))||(i=(r=h()).promise),m(this,r)||(n=p(n),this.db.put(e,t,n,(function(n){if(n)return r(new y(n));o.emit("put",e,t),r()}))),i},w.prototype.del=function(e,t,n){var r,i=this;return(n=d(t,n))||(r=(n=h()).promise),m(this,n)||(t=p(t),this.db.del(e,t,(function(t){if(t)return n(new y(t));i.emit("del",e),n()}))),r},w.prototype.batch=function(e,t,n){if(!arguments.length)return new u(this);var r,i=this;return(n="function"==typeof e?e:d(t,n))||(r=(n=h()).promise),m(this,n)||(t=p(t),this.db.batch(e,t,(function(t){if(t)return n(new y(t));i.emit("batch",e),n()}))),r},w.prototype.iterator=function(e){return this.db.iterator(e)},w.prototype.clear=function(e,t){var n,r=this;return t=d(e,t),e=p(e),t||(n=(t=h()).promise),m(this,t)||this.db.clear(e,(function(n){if(n)return t(new y(n));r.emit("clear",e),t()})),n},w.prototype.readStream=w.prototype.createReadStream=function(e){return"number"!=typeof(e=o({keys:!0,values:!0},e)).limit&&(e.limit=-1),new s(this.db.iterator(e),e)},w.prototype.keyStream=w.prototype.createKeyStream=function(e){return this.createReadStream(o(e,{keys:!0,values:!1}))},w.prototype.valueStream=w.prototype.createValueStream=function(e){return this.createReadStream(o(e,{keys:!1,values:!0}))},w.prototype.toString=function(){return"LevelUP"},w.prototype.type="levelup",w.errors=f,t.exports=w.default=w}).call(this)}).call(this,e(73))},{124:124,141:141,17:17,26:26,41:41,42:42,58:58,59:59,6:6,60:60,62:62,73:73}],62:[function(e,t,n){t.exports=function(){var e,t=new Promise((function(t,n){e=function(e,r){e?n(e):t(r)}}));return e.promise=t,e}},{}],63:[function(e,t,n){(function(n,r,i){(function(){"use strict";var o=e(37),a=e(68),s=e(3).AbstractLevelDOWN,u=e(3).AbstractIterator,f=e(65).LocalStorage,c=e(64),l=e(67),h=i.setImmediate||r.nextTick;function d(e,t){u.call(this,e),this._reverse=!!t.reverse,this._endkey=t.end,this._startkey=t.start,this._gt=t.gt,this._gte=t.gte,this._lt=t.lt,this._lte=t.lte,this._exclusiveStart=t.exclusiveStart,this._keysOnly=!1===t.values,this._limit=t.limit,this._count=0,this.onInitCompleteListeners=[]}function p(e){if(!(this instanceof p))return new p(e);s.call(this,e),this.container=new f(e)}function y(e,t){if(null==e)return new Error(t+" cannot be `null` or `undefined`");if(null==e)return new Error(t+" cannot be `null` or `undefined`");if("key"===t){if(e instanceof Boolean)return new Error(t+" cannot be `null` or `undefined`");if(""===e)return new Error(t+" cannot be empty")}if(0===e.toString().indexOf("[object ArrayBuffer]")&&(0===e.byteLength||void 0===e.byteLength))return new Error(t+" cannot be an empty Buffer");if(n.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")}o(d,u),d.prototype._init=function(e){h((function(){e()}))},d.prototype._next=function(e){var t=this;function n(){if(t._pos===t._keys.length||t._pos<0)return e();var n=t._keys[t._pos];return t._endkey&&(t._reverse?n<t._endkey:n>t._endkey)||t._limit&&t._limit>0&&t._count++>=t._limit||t._lt&&n>=t._lt||t._lte&&n>t._lte||t._gt&&n<=t._gt||t._gte&&n<t._gte?e():(t._pos+=t._reverse?-1:1,t._keysOnly?e(null,n):void t.db.container.getItem(n,(function(r,i){if(r)return"NotFound"===r.message?h((function(){t._next(e)})):e(r);e(null,n,i)})))}t.initStarted?t.initCompleted?r.nextTick(n):t.onInitCompleteListeners.push(n):r.nextTick((function(){t.initStarted=!0,t._init((function(r){if(r)return e(r);t.db.container.keys((function(r,i){if(r)return e(r);if(t._keys=i,t._startkey){var o=l.sortedIndexOf(t._keys,t._startkey),a=o>=t._keys.length||o<0?void 0:t._keys[o];t._pos=o,t._reverse?(t._exclusiveStart||a!==t._startkey)&&t._pos--:t._exclusiveStart&&a===t._startkey&&t._pos++}else t._pos=t._reverse?t._keys.length-1:0;n(),t.initCompleted=!0;for(var s=-1;++s<t.onInitCompleteListeners.length;)h(t.onInitCompleteListeners[s])}))}))}))},o(p,s),p.prototype._open=function(e,t){this.container.init(t)},p.prototype._put=function(e,t,r,i){var o=y(e,"key");if(o)return h((function(){i(o)}));if(o=y(t,"value"))return h((function(){i(o)}));if("object"==typeof t&&!n.isBuffer(t)&&void 0===t.buffer){var a={storetype:"json"};a.data=t,t=JSON.stringify(a)}this.container.setItem(e,t,i)},p.prototype._get=function(e,t,r){var i=y(e,"key");if(i)return h((function(){r(i)}));n.isBuffer(e)||(e=String(e)),this.container.getItem(e,(function(e,i){if(e)return r(e);(!1===t.asBuffer||n.isBuffer(i)||(i=a(i)),!1===t.asBuffer)&&(i.indexOf('{"storetype":"json","data"')>-1&&(i=JSON.parse(i).data));r(null,i)}))},p.prototype._del=function(e,t,r){var i=y(e,"key");if(i)return h((function(){r(i)}));n.isBuffer(e)||(e=String(e)),this.container.removeItem(e,r)},p.prototype._batch=function(e,t,r){var i=this;h((function(){var o,a,s,u,f=0;function c(){++f===e.length&&r(u)}if(Array.isArray(e)&&e.length)for(var l=0;l<e.length;l++){var h=e[l];h?(o=y(a=n.isBuffer(h.key)?h.key:String(h.key),"key"))?(u=o,c()):"del"===h.type?i._del(h.key,t,c):"put"===h.type&&((o=y(s=n.isBuffer(h.value)?h.value:String(h.value),"value"))?(u=o,c()):i._put(a,s,t,c)):c()}else r()}))},p.prototype._iterator=function(e){return new d(this,e)},p.destroy=function(e,t){c.destroy(e,t)},t.exports=p}).call(this)}).call(this,{isBuffer:e(38)},e(73),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{3:3,37:37,38:38,64:64,65:65,67:67,68:68,73:73}],64:[function(e,t,n){(function(n,r){(function(){"use strict";var i=r.setImmediate||n.nextTick,o=e(29);function a(e,t){var n,r;try{n=t()}catch(e){r=e}i((function(){e(r,n)}))}function s(e){return e.replace(/!/g,"!!")+"!"}function u(e){this._prefix=s(e)}u.prototype.getKeys=function(e){var t=this;a(e,(function(){for(var e=[],n=t._prefix.length,r=-1,i=o.length;++r<i;){var a=o.key(r);a.substring(0,n)===t._prefix&&e.push(a.substring(n))}return e.sort(),e}))},u.prototype.put=function(e,t,n){var r=this;a(n,(function(){o.setItem(r._prefix+e,t)}))},u.prototype.get=function(e,t){var n=this;a(t,(function(){return o.getItem(n._prefix+e)}))},u.prototype.remove=function(e,t){var n=this;a(t,(function(){o.removeItem(n._prefix+e)}))},u.destroy=function(e,t){var n=s(e);a(t,(function(){for(var e=[],t=-1,r=o.length;++t<r;){var i=o.key(t);i.substring(0,n.length)===n&&e.push(i)}e.forEach((function(e){o.removeItem(e)}))}))},t.exports=u}).call(this)}).call(this,e(73),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{29:29,73:73}],65:[function(e,t,n){(function(t){(function(){"use strict";var r=new RegExp("^ArrayBuffer:"),i=new RegExp("^Uint8Array:"),o=new RegExp("^Buff:"),a=e(67),s=e(64),u=e(66),f=e(15);function c(e){this._store=new s(e),this._queue=new u}c.prototype.sequentialize=function(e,t){this._queue.add(t,e)},c.prototype.init=function(e){var t=this;t.sequentialize(e,(function(e){t._store.getKeys((function(n,r){return n?e(n):(t._keys=r,e())}))}))},c.prototype.keys=function(e){var t=this;t.sequentialize(e,(function(e){t._store.getKeys((function(t,n){e(null,n.slice())}))}))},c.prototype.setItem=function(e,n,r){var i=this;i.sequentialize(r,(function(r){t.isBuffer(n)&&(n="Buff:"+f.encode(n));var o=a.sortedIndexOf(i._keys,e);i._keys[o]!==e&&i._keys.splice(o,0,e),i._store.put(e,n,r)}))},c.prototype.getItem=function(e,t){var n=this;n.sequentialize(t,(function(t){n._store.get(e,(function(e,n){return e?t(e):null==n?t(new Error("NotFound")):(void 0!==n&&(o.test(n)?n=f.decode(n.substring("Buff:".length)):r.test(n)?(n=n.substring("ArrayBuffer:".length),n=new ArrayBuffer(atob(n).split("").map((function(e){return e.charCodeAt(0)})))):i.test(n)&&(n=n.substring("Uint8Array:".length),n=new Uint8Array(atob(n).split("").map((function(e){return e.charCodeAt(0)}))))),void t(null,n))}))}))},c.prototype.removeItem=function(e,t){var n=this;n.sequentialize(t,(function(t){var r=a.sortedIndexOf(n._keys,e);n._keys[r]===e?(n._keys.splice(r,1),n._store.remove(e,(function(e){if(e)return t(e);t()}))):t()}))},c.prototype.length=function(e){var t=this;t.sequentialize(e,(function(e){e(null,t._keys.length)}))},n.LocalStorage=c}).call(this)}).call(this,{isBuffer:e(38)})},{15:15,38:38,64:64,66:66,67:67}],66:[function(e,t,n){(function(n,r){(function(){"use strict";var i=e(5),o=e(120),a=r.setImmediate||n.nextTick;function s(){this.queue=new o,this.running=!1}s.prototype.add=function(e,t){this.queue.push({fun:e,callback:t}),this.processNext()},s.prototype.processNext=function(){var e=this;if(!e.running&&e.queue.length){e.running=!0;var t=e.queue.shift();a((function(){t.fun(i((function(n){t.callback.apply(null,n),e.running=!1,e.processNext()})))}))}},t.exports=s}).call(this)}).call(this,e(73),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{120:120,5:5,73:73}],67:[function(e,t,n){"use strict";n.sortedIndexOf=function(e,t){for(var n,r=0,i=e.length;r<i;)e[n=r+i>>>1]<t?r=n+1:i=n;return r}},{}],68:[function(e,t,n){(function(e){(function(){var n=Object.prototype.toString,r="function"==typeof e.alloc&&"function"==typeof e.allocUnsafe&&"function"==typeof e.from;t.exports=function(t,i,o){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return a=t,"ArrayBuffer"===n.call(a).slice(8,-1)?function(t,n,i){n>>>=0;var o=t.byteLength-n;if(o<0)throw new RangeError("'offset' is out of bounds");if(void 0===i)i=o;else if((i>>>=0)>o)throw new RangeError("'length' is out of bounds");return r?e.from(t.slice(n,n+i)):new e(new Uint8Array(t.slice(n,n+i)))}(t,i,o):"string"==typeof t?function(t,n){if("string"==typeof n&&""!==n||(n="utf8"),!e.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');return r?e.from(t,n):new e(t,n)}(t,i):r?e.from(t):new e(t);var a}}).call(this)}).call(this,e(13).Buffer)},{13:13}],69:[function(e,t,n){var r,i,o;r=this,o={},(i={}).length=0,i.getItem=function(e){return e in o?o[e]:null},i.setItem=function(e,t){void 0===t?i.removeItem(e):(o.hasOwnProperty(e)||i.length++,o[e]=""+t)},i.removeItem=function(e){o.hasOwnProperty(e)&&(delete o[e],i.length--)},i.key=function(e){return Object.keys(o)[e]||null},i.clear=function(){o={},i.length=0},"object"==typeof n?t.exports=i:r.localStorageMemory=i},{}],70:[function(e,t,n){(function(e){(function(){function t(e){return void 0!==e&&""!==e}function r(e,t){return Object.hasOwnProperty.call(e,t)}function i(e,t){return Object.hasOwnProperty.call(e,t)&&t}n.compare=function(t,n){if(e.isBuffer(t)){for(var r=Math.min(t.length,n.length),i=0;i<r;i++){var o=t[i]-n[i];if(o)return o}return t.length-n.length}return t<n?-1:t>n?1:0};var o=n.lowerBoundKey=function(e){return i(e,"gt")||i(e,"gte")||i(e,"min")||(e.reverse?i(e,"end"):i(e,"start"))||void 0},a=n.lowerBound=function(e,t){var n=o(e);return n?e[n]:t},s=n.lowerBoundInclusive=function(e){return!r(e,"gt")},u=n.upperBoundInclusive=function(e){return!r(e,"lt")},f=n.lowerBoundExclusive=function(e){return!s(e)},c=n.upperBoundExclusive=function(e){return!u(e)},l=n.upperBoundKey=function(e){return i(e,"lt")||i(e,"lte")||i(e,"max")||(e.reverse?i(e,"start"):i(e,"end"))||void 0},h=n.upperBound=function(e,t){var n=l(e);return n?e[n]:t};function d(e){return e}n.start=function(e,t){return e.reverse?h(e,t):a(e,t)},n.end=function(e,t){return e.reverse?a(e,t):h(e,t)},n.startInclusive=function(e){return e.reverse?u(e):s(e)},n.endInclusive=function(e){return e.reverse?s(e):u(e)},n.toLtgt=function(e,t,i,o,a){t=t||{},i=i||d;var s=arguments.length>3,u=n.lowerBoundKey(e),f=n.upperBoundKey(e);return u?"gt"===u?t.gt=i(e.gt,!1):t.gte=i(e[u],!1):s&&(t.gte=i(o,!1)),f?"lt"===f?t.lt=i(e.lt,!0):t.lte=i(e[f],!0):s&&(t.lte=i(a,!0)),null!=e.reverse&&(t.reverse=!!e.reverse),r(t,"max")&&delete t.max,r(t,"min")&&delete t.min,r(t,"start")&&delete t.start,r(t,"end")&&delete t.end,t},n.contains=function(e,r,i){i=i||n.compare;var o=a(e);if(t(o)&&((s=i(r,o))<0||0===s&&f(e)))return!1;var s,u=h(e);if(t(u)&&((s=i(r,u))>0||0===s&&c(e)))return!1;return!0},n.filter=function(e,t){return function(r){return n.contains(e,r,t)}}}).call(this)}).call(this,{isBuffer:e(38)})},{38:38}],71:[function(e,t,n){
31/*
32object-assign
33(c) Sindre Sorhus
34@license MIT
35*/
36"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}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,s,u=a(e),f=1;f<arguments.length;f++){for(var c in n=Object(arguments[f]))i.call(n,c)&&(u[c]=n[c]);if(r){s=r(n);for(var l=0;l<s.length;l++)o.call(n,s[l])&&(u[s[l]]=n[s[l]])}}return u}},{}],72:[function(e,t,n){(function(e){(function(){"use strict";void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,n,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,n)}));case 3:return e.nextTick((function(){t.call(null,n,r)}));case 4:return e.nextTick((function(){t.call(null,n,r,i)}));default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return e.nextTick((function(){t.apply(null,o)}))}}}:t.exports=e}).call(this)}).call(this,e(73))},{73:73}],73:[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(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout: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(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function g(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new y(e,t)),1!==c.length||l||u(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],74:[function(e,t,n){
37/*!
38 * prr
39 * (c) 2013 Rod Vagg <rod@vagg.org>
40 * https://github.com/rvagg/prr
41 * License: MIT
42 */
43var r,i;r=this,i=function(){var e="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(t,n,r,i){var o;if(i=function(e,t){var n="object"==typeof t,r=!n&&"string"==typeof t,i=function(e){return n?!!t[e]:!!r&&t.indexOf(e[0])>-1};return{enumerable:i("enumerable"),configurable:i("configurable"),writable:i("writable"),value:e}}(r,i),"object"==typeof n){for(o in n)Object.hasOwnProperty.call(n,o)&&(i.value=n[o],e(t,o,i));return t}return e(t,n,i)}},void 0!==t&&t.exports?t.exports=i():r.prr=i()},{}],75:[function(e,t,n){(function(n){(function(){t.exports=s;var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t},i=e(14);i.inherits=e(37);var o=e(77),a=e(79);function s(e){if(!(this instanceof s))return new s(e);o.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",u)}function u(){this.allowHalfOpen||this._writableState.ended||n.nextTick(this.end.bind(this))}i.inherits(s,o),function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}(r(a.prototype),(function(e){s.prototype[e]||(s.prototype[e]=a.prototype[e])}))}).call(this)}).call(this,e(73))},{14:14,37:37,73:73,77:77,79:79}],76:[function(e,t,n){t.exports=o;var r=e(78),i=e(14);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=e(37),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},{14:14,37:37,78:78}],77:[function(e,t,n){(function(n){(function(){t.exports=l;var r=e(80),i=e(13).Buffer;l.ReadableState=c;var o=e(26).EventEmitter;o.listenerCount||(o.listenerCount=function(e,t){return e.listeners(t).length});var a,s=e(85),u=e(14);u.inherits=e(37);var f=e(11);function c(t,n){var r=e(75),i=(t=t||{}).highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!t.objectMode,n instanceof r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(a||(a=e(81).StringDecoder),this.decoder=new a(t.encoding),this.encoding=t.encoding)}function l(t){e(75);if(!(this instanceof l))return new l(t);this._readableState=new c(t,this),this.readable=!0,s.call(this)}function h(e,t,r,i,o){var a=function(e,t){var n=null;u.isBuffer(t)||u.isString(t)||u.isNullOrUndefined(t)||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));return n}(t,r);if(a)e.emit("error",a);else if(u.isNullOrUndefined(r))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,p(e)}(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!o){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&o){s=new Error("stream.unshift() after end event");e.emit("error",s)}else!t.decoder||o||i||(r=t.decoder.write(r)),o||(t.reading=!1),t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,o?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&p(e)),function(e,t){t.readingMore||(t.readingMore=!0,n.nextTick((function(){!function(e,t){var n=t.length;for(;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(f("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}(e,t)})))}(e,t);else o||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}f=f&&f.debuglog?f.debuglog("stream"):function(){},u.inherits(l,s),l.prototype.push=function(e,t){var n=this._readableState;return u.isString(e)&&!n.objectMode&&(t=t||n.defaultEncoding)!==n.encoding&&(e=new i(e,t),t=""),h(this,n,e,t,!1)},l.prototype.unshift=function(e){return h(this,this._readableState,e,"",!0)},l.prototype.setEncoding=function(t){return a||(a=e(81).StringDecoder),this._readableState.decoder=new a(t),this._readableState.encoding=t,this};function d(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:isNaN(e)||u.isNull(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>=8388608)e=8388608;else{e--;for(var t=1;t<32;t<<=1)e|=e>>t;e++}return e}(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function p(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick((function(){y(e)})):y(e))}function y(e){f("emit readable"),e.emit("readable"),g(e)}function g(e){var t=e._readableState;if(f("flow",t.flowing),t.flowing)do{var n=e.read()}while(null!==n&&t.flowing)}function b(e,t){var n,r=t.buffer,o=t.length,a=!!t.decoder,s=!!t.objectMode;if(0===r.length)return null;if(0===o)n=null;else if(s)n=r.shift();else if(!e||e>=o)n=a?r.join(""):i.concat(r,o),r.length=0;else{if(e<r[0].length)n=(l=r[0]).slice(0,e),r[0]=l.slice(e);else if(e===r[0].length)n=r.shift();else{n=a?"":new i(e);for(var u=0,f=0,c=r.length;f<c&&u<e;f++){var l=r[0],h=Math.min(e-u,l.length);a?n+=l.slice(0,h):l.copy(n,u,0,h),h<l.length?r[0]=l.slice(h):r.shift(),u+=h}}}return n}function v(e){var t=e._readableState;if(t.length>0)throw new Error("endReadable called on non-empty stream");t.endEmitted||(t.ended=!0,n.nextTick((function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))})))}l.prototype.read=function(e){f("read",e);var t=this._readableState,n=e;if((!u.isNumber(e)||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?v(this):p(this),null;if(0===(e=d(e,t))&&t.ended)return 0===t.length&&v(this),null;var r,i=t.needReadable;return f("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&f("length less than watermark",i=!0),(t.ended||t.reading)&&f("reading or ended",i=!1),i&&(f("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),i&&!t.reading&&(e=d(n,t)),r=e>0?b(e,t):null,u.isNull(r)&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),n!==e&&t.ended&&0===t.length&&v(this),u.isNull(r)||this.emit("data",r),r},l.prototype._read=function(e){this.emit("error",new Error("not implemented"))},l.prototype.pipe=function(e,t){var i=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,f("pipe count=%d opts=%j",a.pipesCount,t);var s=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:h;function u(e){f("onunpipe"),e===i&&h()}function c(){f("onend"),e.end()}a.endEmitted?n.nextTick(s):i.once("end",s),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o.listenerCount(e,"data")&&(t.flowing=!0,g(e))}}(i);function h(){f("cleanup"),e.removeListener("close",y),e.removeListener("finish",b),e.removeListener("drain",l),e.removeListener("error",p),e.removeListener("unpipe",u),i.removeListener("end",c),i.removeListener("end",h),i.removeListener("data",d),!a.awaitDrain||e._writableState&&!e._writableState.needDrain||l()}function d(t){f("ondata"),!1===e.write(t)&&(f("false write response, pause",i._readableState.awaitDrain),i._readableState.awaitDrain++,i.pause())}function p(t){f("onerror",t),v(),e.removeListener("error",p),0===o.listenerCount(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",b),v()}function b(){f("onfinish"),e.removeListener("close",y),v()}function v(){f("unpipe"),i.unpipe(e)}return e.on("drain",l),i.on("data",d),e._events&&e._events.error?r(e._events.error)?e._events.error.unshift(p):e._events.error=[p,e._events.error]:e.on("error",p),e.once("close",y),e.once("finish",b),e.emit("pipe",i),a.flowing||(f("pipe resume"),i.resume()),e},l.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}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},l.prototype.on=function(e,t){var r=s.prototype.on.call(this,e,t);if("data"===e&&!1!==this._readableState.flowing&&this.resume(),"readable"===e&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&p(this);else{var o=this;n.nextTick((function(){f("readable nexttick read 0"),o.read(0)}))}}return r},l.prototype.addListener=l.prototype.on,l.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!0,e.reading||(f("resume read 0"),this.read(0)),function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick((function(){!function(e,t){t.resumeScheduled=!1,e.emit("resume"),g(e),t.flowing&&!t.reading&&e.read(0)}(e,t)})))}(this,e)),this},l.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},l.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;for(var i in e.on("end",(function(){if(f("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)})),e.on("data",(function(i){(f("wrapped data"),t.decoder&&(i=t.decoder.write(i)),i&&(t.objectMode||i.length))&&(r.push(i)||(n=!0,e.pause()))})),e)u.isFunction(e[i])&&u.isUndefined(this[i])&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));return function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}(["error","close","destroy","pause","resume"],(function(t){e.on(t,r.emit.bind(r,t))})),r._read=function(t){f("wrapped _read",t),n&&(n=!1,e.resume())},r},l._fromList=b}).call(this)}).call(this,e(73))},{11:11,13:13,14:14,26:26,37:37,73:73,75:75,80:80,81:81,85:85}],78:[function(e,t,n){t.exports=a;var r=e(75),i=e(14);function o(e,t){this.afterTransform=function(e,n){return function(e,t,n){var r=e._transformState;r.transforming=!1;var o=r.writecb;if(!o)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,i.isNullOrUndefined(n)||e.push(n);o&&o(t);var a=e._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&e._read(a.highWaterMark)}(t,e,n)},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("prefinish",(function(){i.isFunction(this._flush)?this._flush((function(e){s(t,e)})):s(t)}))}function s(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=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(37),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;i.isNull(t.writechunk)||!t.writecb||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))}},{14:14,37:37,75:75}],79:[function(e,t,n){(function(n){(function(){t.exports=u;var r=e(13).Buffer;u.WritableState=s;var i=e(14);i.inherits=e(37);var o=e(85);function a(e,t,n){this.chunk=e,this.encoding=t,this.callback=n}function s(t,r){var i=e(75),o=(t=t||{}).highWaterMark,a=t.objectMode?16:16384;this.highWaterMark=o||0===o?o:a,this.objectMode=!!t.objectMode,r instanceof i&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,o=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,o){r?n.nextTick((function(){t.pendingcb--,o(i)})):(t.pendingcb--,o(i));e._writableState.errorEmitted=!0,e.emit("error",i)}(e,r,i,t,o);else{var a=h(e,r);a||r.corked||r.bufferProcessing||!r.buffer.length||l(e,r),i?n.nextTick((function(){c(e,r,a,o)})):c(e,r,a,o)}}(r,e)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function u(t){var n=e(75);if(!(this instanceof u||this instanceof n))return new u(t);this._writableState=new s(t,this),this.writable=!0,o.call(this)}function f(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 c(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),p(e,t)}function l(e,t){if(t.bufferProcessing=!0,e._writev&&t.buffer.length>1){for(var n=[],r=0;r<t.buffer.length;r++)n.push(t.buffer[r].callback);t.pendingcb++,f(e,t,!0,t.length,t.buffer,"",(function(e){for(var r=0;r<n.length;r++)t.pendingcb--,n[r](e)})),t.buffer=[]}else{for(r=0;r<t.buffer.length;r++){var i=t.buffer[r],o=i.chunk,a=i.encoding,s=i.callback,u=t.objectMode?1:o.length;if(f(e,t,!1,u,o,a,s),t.writing){r++;break}}r<t.buffer.length?t.buffer=t.buffer.slice(r):t.buffer.length=0}t.bufferProcessing=!1}function h(e,t){return t.ending&&0===t.length&&!t.finished&&!t.writing}function d(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function p(e,t){var n=h(0,t);return n&&(0===t.pendingcb?(d(e,t),t.finished=!0,e.emit("finish")):d(e,t)),n}i.inherits(u,o),u.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},u.prototype.write=function(e,t,o){var s=this._writableState,u=!1;return i.isFunction(t)&&(o=t,t=null),i.isBuffer(e)?t="buffer":t||(t=s.defaultEncoding),i.isFunction(o)||(o=function(){}),s.ended?function(e,t,r){var i=new Error("write after end");e.emit("error",i),n.nextTick((function(){r(i)}))}(this,0,o):function(e,t,r,o){var a=!0;if(!(i.isBuffer(r)||i.isString(r)||i.isNullOrUndefined(r)||t.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");e.emit("error",s),n.nextTick((function(){o(s)})),a=!1}return a}(this,s,e,o)&&(s.pendingcb++,u=function(e,t,n,o,s){n=function(e,t,n){!e.objectMode&&!1!==e.decodeStrings&&i.isString(t)&&(t=new r(t,n));return t}(t,n,o),i.isBuffer(n)&&(o="buffer");var u=t.objectMode?1:n.length;t.length+=u;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);t.writing||t.corked?t.buffer.push(new a(n,o,s)):f(e,t,!1,u,n,o,s);return c}(this,s,e,t,o)),u},u.prototype.cork=function(){this._writableState.corked++},u.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.buffer.length||l(this,e))},u.prototype._write=function(e,t,n){n(new Error("not implemented"))},u.prototype._writev=null,u.prototype.end=function(e,t,r){var o=this._writableState;i.isFunction(e)?(r=e,e=null,t=null):i.isFunction(t)&&(r=t,t=null),i.isNullOrUndefined(e)||this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||o.finished||function(e,t,r){t.ending=!0,p(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0}(this,o,r)}}).call(this)}).call(this,e(73))},{13:13,14:14,37:37,73:73,75:75,85:85}],80:[function(e,t,n){t.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},{}],81:[function(e,t,n){var r=e(13).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),!((i=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var 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((i=t.charCodeAt(r))>=55296&&i<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,r)}return t},o.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;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}},{13:13}],82:[function(e,t,n){(function(r){(function(){(n=t.exports=e(77)).Stream=e(85),n.Readable=n,n.Writable=e(79),n.Duplex=e(75),n.Transform=e(78),n.PassThrough=e(76),r.browser||"disable"!==r.env.READABLE_STREAM||(t.exports=e(85))}).call(this)}).call(this,e(73))},{73:73,75:75,76:76,77:77,78:78,79:79,85:85}],83:[function(e,t,n){
44/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
45var r=e(13),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),a.prototype=Object.create(i.prototype),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)}},{13:13}],84:[function(e,t,n){!function(e){if("object"==typeof n)t.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var r;try{r=window}catch(e){r=self}r.SparkMD5=e()}}((function(e){"use strict";var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(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 r(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 i(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 o(e){var t,i,o,a,s,u,f=e.length,c=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=f;t+=64)n(c,r(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(c,o),t=0;t<16;t+=1)o[t]=0;return a=(a=8*f).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,o[14]=s,o[15]=u,n(c,o),c}function a(e){var n,r="";for(n=0;n<4;n+=1)r+=t[e>>8*n+4&15]+t[e>>8*n&15];return r}function s(e){var t;for(t=0;t<e.length;t+=1)e[t]=a(e[t]);return e.join("")}function u(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function f(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 c(){this.reset()}return"5d41402abc4b2a76b9719d911017c592"!==s(o("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||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i,o,a,s,u=this.byteLength,f=t(n,u),c=u;return r!==e&&(c=t(r,u)),f>c?new ArrayBuffer(0):(i=c-f,o=new ArrayBuffer(i),a=new Uint8Array(o),s=new Uint8Array(this,f,i),a.set(s),o)}}(),c.prototype.append=function(e){return this.appendBinary(u(e)),this},c.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)n(this._hash,r(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},c.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=s(this._hash),e&&(n=f(n)),this.reset(),n},c.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},c.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},c.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},c.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},c.prototype._finish=function(e,t){var r,i,o,a=t;if(e[a>>2]|=128<<(a%4<<3),a>55)for(n(this._hash,e),a=0;a<16;a+=1)e[a]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,e[14]=i,e[15]=o,n(this._hash,e)},c.hash=function(e,t){return c.hashBinary(u(e),t)},c.hashBinary=function(e,t){var n=s(o(e));return t?f(n):n},c.ArrayBuffer=function(){this.reset()},c.ArrayBuffer.prototype.append=function(e){var t,r,o,a,s,u=(r=this._buff.buffer,o=e,a=!0,(s=new Uint8Array(r.byteLength+o.byteLength)).set(new Uint8Array(r)),s.set(new Uint8Array(o),r.byteLength),a?s:s.buffer),f=u.length;for(this._length+=e.byteLength,t=64;t<=f;t+=64)n(this._hash,i(u.subarray(t-64,t)));return this._buff=t-64<f?new Uint8Array(u.buffer.slice(t-64)):new Uint8Array(0),this},c.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=s(this._hash),e&&(n=f(n)),this.reset(),n},c.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},c.ArrayBuffer.prototype.getState=function(){var e,t=c.prototype.getState.call(this);return t.buff=(e=t.buff,String.fromCharCode.apply(null,new Uint8Array(e))),t},c.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),c.prototype.setState.call(this,e)},c.ArrayBuffer.prototype.destroy=c.prototype.destroy,c.ArrayBuffer.prototype._finish=c.prototype._finish,c.ArrayBuffer.hash=function(e,t){var r=s(function(e){var t,r,o,a,s,u,f=e.length,c=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=f;t+=64)n(c,i(e.subarray(t-64,t)));for(r=(e=t-64<f?e.subarray(t-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)o[t>>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(c,o),t=0;t<16;t+=1)o[t]=0;return a=(a=8*f).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(a[2],16),u=parseInt(a[1],16)||0,o[14]=s,o[15]=u,n(c,o),c}(new Uint8Array(e)));return t?f(r):r},c}))},{}],85:[function(e,t,n){t.exports=i;var r=e(26).EventEmitter;function i(){r.call(this)}e(37)(i,r),i.Readable=e(97),i.Writable=e(99),i.Duplex=e(87),i.Transform=e(98),i.PassThrough=e(96),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",u));var a=!1;function s(){a||(a=!0,e.end())}function u(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function f(e){if(c(),0===r.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",i),e.removeListener("drain",o),n.removeListener("end",s),n.removeListener("close",u),n.removeListener("error",f),e.removeListener("error",f),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",f),e.on("error",f),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e}},{26:26,37:37,87:87,96:96,97:97,98:98,99:99}],86:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],87:[function(e,t,n){t.exports=e(88)},{88:88}],88:[function(e,t,n){"use strict";var r=e(72),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=l;var o=Object.create(e(14));o.inherits=e(37);var a=e(90),s=e(92);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)}},{14:14,37:37,72:72,90:90,92:92}],89:[function(e,t,n){"use strict";t.exports=o;var r=e(91),i=Object.create(e(14));function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=e(37),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},{14:14,37:37,91:91}],90:[function(e,t,n){(function(n,r){(function(){"use strict";var i=e(72);t.exports=_;var o,a=e(86);_.ReadableState=v;e(26).EventEmitter;var s=function(e,t){return e.listeners(t).length},u=e(95),f=e(100).Buffer,c=r.Uint8Array||function(){};var l=Object.create(e(14));l.inherits=e(37);var h=e(11),d=void 0;d=h&&h.debuglog?h.debuglog("stream"):function(){};var p,y=e(93),g=e(94);l.inherits(_,u);var b=["error","close","destroy","pause","resume"];function v(t,n){t=t||{};var r=n instanceof(o=o||e(88));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,a=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=e(101).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function _(t){if(o=o||e(88),!(this instanceof _))return new _(t);this._readableState=new v(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(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,S(e)}(e,a)):(i||(o=function(e,t){var n;r=t,f.isBuffer(r)||r instanceof c||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===f.prototype||(t=function(e){return f.from(e)}(t)),r?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):m(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?m(e,a,t,!1):x(e,a)):m(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 m(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&&S(e)),x(e,t)}Object.defineProperty(_.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),_.prototype.destroy=g.destroy,_.prototype._undestroy=g.undestroy,_.prototype._destroy=function(e,t){this.push(null),t(e)},_.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=f.from(e,t),t=""),n=!0),w(this,e,t,!1,n)},_.prototype.unshift=function(e){return w(this,e,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(t){return p||(p=e(101).StringDecoder),this._readableState.decoder=new p(t),this._readableState.encoding=t,this};function E(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(k,e):k(e))}function k(e){d("emit readable"),e.emit("readable"),j(e)}function x(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(O,e,t))}function O(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(d("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function R(e){d("readable nexttick read 0"),e.read(0)}function A(e,t){t.reading||(d("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function T(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,n.data=o.slice(a));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=f.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,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 M(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(B,t,e))}function B(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function L(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}_.prototype.read=function(e){d("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 d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?M(this):S(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&M(this),null;var r,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&d("length less than watermark",i=!0),t.ended||t.reading?d("reading or ended",i=!1):i&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=E(n,t))),null===(r=e>0?T(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&M(this)),null!==r&&this.emit("data",r),r},_.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},_.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,t);var u=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:_;function f(t,n){d("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",l),e.removeListener("error",g),e.removeListener("unpipe",f),r.removeListener("end",c),r.removeListener("end",_),r.removeListener("data",y),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function c(){d("onend"),e.end()}o.endEmitted?i.nextTick(u):r.once("end",u),e.on("unpipe",f);var l=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,j(e))}}(r);e.on("drain",l);var h=!1;var p=!1;function y(t){d("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==L(o.pipes,e))&&!h&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function g(t){d("onerror",t),_(),e.removeListener("error",g),0===s(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),_()}function v(){d("onfinish"),e.removeListener("close",b),_()}function _(){d("unpipe"),r.unpipe(e)}return r.on("data",y),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",g),e.once("close",b),e.once("finish",v),e.emit("pipe",r),o.flowing||(d("pipe resume"),r.resume()),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,n);return this}var a=L(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},_.prototype.on=function(e,t){var n=u.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&&S(this):i.nextTick(R,this))}return n},_.prototype.addListener=_.prototype.on,_.prototype.resume=function(){var e=this._readableState;return e.flowing||(d("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(A,e,t))}(this,e)),this},_.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},_.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(d("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(d("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<b.length;o++)e.on(b[o],this.emit.bind(this,b[o]));return this._read=function(t){d("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),_._fromList=T}).call(this)}).call(this,e(73),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{100:100,101:101,11:11,14:14,26:26,37:37,72:72,73:73,86:86,88:88,93:93,94:94,95:95}],91:[function(e,t,n){"use strict";t.exports=a;var r=e(88),i=Object.create(e(14));function o(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,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);r.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",s)}function s(){var e=this;"function"==typeof this._flush?this._flush((function(t,n){u(e,t,n)})):u(this,null,null)}function u(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(37),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("_transform() is 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},a.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,(function(e){t(e),n.emit("close")}))}},{14:14,37:37,88:88}],92:[function(e,t,n){(function(n,r,i){(function(){"use strict";var o=e(72);function a(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)}}t.exports=v;var s,u=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?i:o.nextTick;v.WritableState=b;var f=Object.create(e(14));f.inherits=e(37);var c={deprecate:e(121)},l=e(95),h=e(100).Buffer,d=r.Uint8Array||function(){};var p,y=e(94);function g(){}function b(t,n){s=s||e(88),t=t||{};var r=n instanceof s;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,f=t.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(f||0===f)?f:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===t.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var 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?(o.nextTick(i,r),o.nextTick(k,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),k(e,t))}(e,n,r,t,i);else{var a=E(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||m(e,n),r?u(w,e,n,a,i):w(e,n,a,i)}}(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function v(t){if(s=s||e(88),!(p.call(v,this)||this instanceof s))return new v(t);this._writableState=new b(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function _(e,t,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 w(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),k(e,t)}function m(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 s=0,u=!0;n;)i[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;i.allBuffers=u,_(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var f=n.chunk,c=n.encoding,l=n.callback;if(_(e,t,!1,t.objectMode?1:f.length,f,c,l),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),k(e,t)}))}function k(e,t){var n=E(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}f.inherits(v,l),b.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(b.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===v&&(e&&e._writableState instanceof b)}})):p=function(e){return e instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(e,t,n){var r,i=this._writableState,a=!1,s=!i.objectMode&&(r=e,h.isBuffer(r)||r instanceof d);return s&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=g),i.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),o.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),o.nextTick(r,a),i=!1),i}(this,i,e,n))&&(i.pendingcb++,a=function(e,t,n,r,i,o){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.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 _(e,t,!1,s,r,i,o);return u}(this,i,s,e,t,n)),a},v.prototype.cork=function(){this._writableState.corked++},v.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||m(this,e))},v.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=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,k(e,t),n&&(t.finished?o.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),v.prototype.destroy=y.destroy,v.prototype._undestroy=y.undestroy,v.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this)}).call(this,e(73),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e(119).setImmediate)},{100:100,119:119,121:121,14:14,37:37,72:72,73:73,88:88,94:94,95:95}],93:[function(e,t,n){"use strict";var r=e(100).Buffer,i=e(11);t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,i,o=r.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=o,i=s,t.copy(n,i),s+=a.data.length,a=a.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},{100:100,11:11}],94:[function(e,t,n){"use strict";var r=e(72);function i(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var n=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(r.nextTick(i,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)}}},{72:72}],95:[function(e,t,n){arguments[4][56][0].apply(n,arguments)},{26:26,56:56}],96:[function(e,t,n){t.exports=e(97).PassThrough},{97:97}],97:[function(e,t,n){(n=t.exports=e(90)).Stream=n,n.Readable=n,n.Writable=e(92),n.Duplex=e(88),n.Transform=e(91),n.PassThrough=e(89)},{88:88,89:89,90:90,91:91,92:92}],98:[function(e,t,n){t.exports=e(97).Transform},{97:97}],99:[function(e,t,n){t.exports=e(92)},{92:92}],100:[function(e,t,n){var r=e(13),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)}},{13:13}],101:[function(e,t,n){"use strict";var r=e(100).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,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&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){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&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}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}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,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(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if((i=a(t[r]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=a(t[r]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=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}},{100:100}],102:[function(e,t,n){arguments[4][101][0].apply(n,arguments)},{101:101,83:83}],103:[function(e,t,n){arguments[4][43][0].apply(n,arguments)},{43:43}],104:[function(e,t,n){arguments[4][44][0].apply(n,arguments)},{106:106,108:108,37:37,44:44,73:73}],105:[function(e,t,n){arguments[4][45][0].apply(n,arguments)},{107:107,37:37,45:45}],106:[function(e,t,n){arguments[4][46][0].apply(n,arguments)},{102:102,103:103,104:104,109:109,11:11,110:110,111:111,113:113,115:115,116:116,13:13,26:26,37:37,46:46,73:73}],107:[function(e,t,n){arguments[4][47][0].apply(n,arguments)},{103:103,104:104,37:37,47:47}],108:[function(e,t,n){arguments[4][48][0].apply(n,arguments)},{103:103,104:104,111:111,115:115,116:116,121:121,13:13,37:37,48:48,73:73}],109:[function(e,t,n){arguments[4][49][0].apply(n,arguments)},{112:112,49:49,73:73}],110:[function(e,t,n){arguments[4][50][0].apply(n,arguments)},{11:11,13:13,50:50}],111:[function(e,t,n){arguments[4][51][0].apply(n,arguments)},{51:51,73:73}],112:[function(e,t,n){arguments[4][52][0].apply(n,arguments)},{103:103,52:52}],113:[function(e,t,n){arguments[4][53][0].apply(n,arguments)},{53:53}],114:[function(e,t,n){arguments[4][54][0].apply(n,arguments)},{103:103,112:112,54:54}],115:[function(e,t,n){arguments[4][55][0].apply(n,arguments)},{103:103,55:55}],116:[function(e,t,n){arguments[4][56][0].apply(n,arguments)},{26:26,56:56}],117:[function(e,t,n){arguments[4][57][0].apply(n,arguments)},{104:104,105:105,106:106,107:107,108:108,112:112,114:114,57:57}],118:[function(e,t,n){(function(n){(function(){var r=e(117).Transform,i=e(37);function o(e){r.call(this,e),this._destroyed=!1}function a(e,t,n){n(null,e)}function s(e){return function(t,n,r){return"function"==typeof t&&(r=n,n=t,t={}),"function"!=typeof n&&(n=a),"function"!=typeof r&&(r=null),e(t,n,r)}}i(o,r),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")}))}},t.exports=s((function(e,t,n){var r=new o(e);return r._transform=t,n&&(r._flush=n),r})),t.exports.ctor=s((function(e,t,n){function r(t){if(!(this instanceof r))return new r(t);this.options=Object.assign({},e,t),o.call(this,this.options)}return i(r,o),r.prototype._transform=t,n&&(r.prototype._flush=n),r})),t.exports.obj=s((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)}).call(this,e(73))},{117:117,37:37,73:73}],119:[function(e,t,n){(function(t,r){(function(){var i=e(73).nextTick,o=Function.prototype.apply,a=Array.prototype.slice,s={},u=0;function f(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new f(o.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new f(o.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},f.prototype.unref=f.prototype.ref=function(){},f.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"==typeof t?t:function(e){var t=u++,r=!(arguments.length<2)&&a.call(arguments,1);return s[t]=!0,i((function(){s[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"==typeof r?r:function(e){delete s[e]}}).call(this)}).call(this,e(119).setImmediate,e(119).clearImmediate)},{119:119,73:73}],120:[function(e,t,n){"use strict";function r(){this.length=0}r.prototype.push=function(e){var t={item:e};this.last?this.last=this.last.next=t:this.last=this.first=t,this.length++},r.prototype.shift=function(){var e=this.first;if(e)return this.first=e.next,--this.length||(this.last=void 0),e.item},r.prototype.slice=function(e,t){e=void 0===e?0:e,t=void 0===t?1/0:t;for(var n=[],r=0,i=this.first;i&&!(--t<0);i=i.next)++r>e&&n.push(i.item);return n},t.exports=r},{}],121:[function(e,t,n){(function(e){(function(){function n(t){try{if(!e.localStorage)return!1}catch(e){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],122:[function(e,t,n){arguments[4][7][0].apply(n,arguments)},{7:7}],123:[function(e,t,n){arguments[4][8][0].apply(n,arguments)},{8:8}],124:[function(e,t,n){arguments[4][9][0].apply(n,arguments)},{122:122,123:123,73:73,9:9}],125:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"v1",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(n,"v3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(n,"v4",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(n,"v5",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(n,"NIL",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(n,"version",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(n,"validate",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(n,"parse",{enumerable:!0,get:function(){return l.default}});var r=h(e(133)),i=h(e(134)),o=h(e(136)),a=h(e(137)),s=h(e(127)),u=h(e(139)),f=h(e(138)),c=h(e(132)),l=h(e(128));function h(e){return e&&e.__esModule?e:{default:e}}},{127:127,128:128,132:132,133:133,134:134,136:136,137:137,138:138,139:139}],126:[function(e,t,n){"use strict";function r(e){return 14+(e+64>>>9<<4)+1}function i(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function o(e,t,n,r,o,a){return i((s=i(i(t,e),i(r,a)))<<(u=o)|s>>>32-u,n);var s,u}function a(e,t,n,r,i,a,s){return o(t&n|~t&r,e,t,i,a,s)}function s(e,t,n,r,i,a,s){return o(t&r|n&~r,e,t,i,a,s)}function u(e,t,n,r,i,a,s){return o(t^n^r,e,t,i,a,s)}function f(e,t,n,r,i,a,s){return o(n^(t|~r),e,t,i,a,s)}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var c=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){const t=[],n=32*e.length;for(let r=0;r<n;r+=8){const n=e[r>>5]>>>r%32&255,i=parseInt("0123456789abcdef".charAt(n>>>4&15)+"0123456789abcdef".charAt(15&n),16);t.push(i)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[r(t)-1]=t;let n=1732584193,o=-271733879,c=-1732584194,l=271733878;for(let t=0;t<e.length;t+=16){const r=n,h=o,d=c,p=l;n=a(n,o,c,l,e[t],7,-680876936),l=a(l,n,o,c,e[t+1],12,-389564586),c=a(c,l,n,o,e[t+2],17,606105819),o=a(o,c,l,n,e[t+3],22,-1044525330),n=a(n,o,c,l,e[t+4],7,-176418897),l=a(l,n,o,c,e[t+5],12,1200080426),c=a(c,l,n,o,e[t+6],17,-1473231341),o=a(o,c,l,n,e[t+7],22,-45705983),n=a(n,o,c,l,e[t+8],7,1770035416),l=a(l,n,o,c,e[t+9],12,-1958414417),c=a(c,l,n,o,e[t+10],17,-42063),o=a(o,c,l,n,e[t+11],22,-1990404162),n=a(n,o,c,l,e[t+12],7,1804603682),l=a(l,n,o,c,e[t+13],12,-40341101),c=a(c,l,n,o,e[t+14],17,-1502002290),o=a(o,c,l,n,e[t+15],22,1236535329),n=s(n,o,c,l,e[t+1],5,-165796510),l=s(l,n,o,c,e[t+6],9,-1069501632),c=s(c,l,n,o,e[t+11],14,643717713),o=s(o,c,l,n,e[t],20,-373897302),n=s(n,o,c,l,e[t+5],5,-701558691),l=s(l,n,o,c,e[t+10],9,38016083),c=s(c,l,n,o,e[t+15],14,-660478335),o=s(o,c,l,n,e[t+4],20,-405537848),n=s(n,o,c,l,e[t+9],5,568446438),l=s(l,n,o,c,e[t+14],9,-1019803690),c=s(c,l,n,o,e[t+3],14,-187363961),o=s(o,c,l,n,e[t+8],20,1163531501),n=s(n,o,c,l,e[t+13],5,-1444681467),l=s(l,n,o,c,e[t+2],9,-51403784),c=s(c,l,n,o,e[t+7],14,1735328473),o=s(o,c,l,n,e[t+12],20,-1926607734),n=u(n,o,c,l,e[t+5],4,-378558),l=u(l,n,o,c,e[t+8],11,-2022574463),c=u(c,l,n,o,e[t+11],16,1839030562),o=u(o,c,l,n,e[t+14],23,-35309556),n=u(n,o,c,l,e[t+1],4,-1530992060),l=u(l,n,o,c,e[t+4],11,1272893353),c=u(c,l,n,o,e[t+7],16,-155497632),o=u(o,c,l,n,e[t+10],23,-1094730640),n=u(n,o,c,l,e[t+13],4,681279174),l=u(l,n,o,c,e[t],11,-358537222),c=u(c,l,n,o,e[t+3],16,-722521979),o=u(o,c,l,n,e[t+6],23,76029189),n=u(n,o,c,l,e[t+9],4,-640364487),l=u(l,n,o,c,e[t+12],11,-421815835),c=u(c,l,n,o,e[t+15],16,530742520),o=u(o,c,l,n,e[t+2],23,-995338651),n=f(n,o,c,l,e[t],6,-198630844),l=f(l,n,o,c,e[t+7],10,1126891415),c=f(c,l,n,o,e[t+14],15,-1416354905),o=f(o,c,l,n,e[t+5],21,-57434055),n=f(n,o,c,l,e[t+12],6,1700485571),l=f(l,n,o,c,e[t+3],10,-1894986606),c=f(c,l,n,o,e[t+10],15,-1051523),o=f(o,c,l,n,e[t+1],21,-2054922799),n=f(n,o,c,l,e[t+8],6,1873313359),l=f(l,n,o,c,e[t+15],10,-30611744),c=f(c,l,n,o,e[t+6],15,-1560198380),o=f(o,c,l,n,e[t+13],21,1309151649),n=f(n,o,c,l,e[t+4],6,-145523070),l=f(l,n,o,c,e[t+11],10,-1120210379),c=f(c,l,n,o,e[t+2],15,718787259),o=f(o,c,l,n,e[t+9],21,-343485551),n=i(n,r),o=i(o,h),c=i(c,d),l=i(l,p)}return[n,o,c,l]}(function(e){if(0===e.length)return[];const t=8*e.length,n=new Uint32Array(r(t));for(let r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))};n.default=c},{}],127:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default="00000000-0000-0000-0000-000000000000"},{}],128:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,i=(r=e(138))&&r.__esModule?r:{default:r};var o=function(e){if(!(0,i.default)(e))throw TypeError("Invalid UUID");let t;const n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};n.default=o},{138:138}],129:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},{}],130:[function(e,t,n){"use strict";let r;Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)};const i=new Uint8Array(16)},{}],131:[function(e,t,n){"use strict";function r(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}function i(e,t){return e<<t|e>>>32-t}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=function(e){const t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let n=0;n<t.length;++n)e.push(t.charCodeAt(n))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const o=e.length/4+2,a=Math.ceil(o/16),s=new Array(a);for(let t=0;t<a;++t){const n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=e[64*t+4*r]<<24|e[64*t+4*r+1]<<16|e[64*t+4*r+2]<<8|e[64*t+4*r+3];s[t]=n}s[a-1][14]=8*(e.length-1)/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<a;++e){const o=new Uint32Array(80);for(let t=0;t<16;++t)o[t]=s[e][t];for(let e=16;e<80;++e)o[e]=i(o[e-3]^o[e-8]^o[e-14]^o[e-16],1);let a=n[0],u=n[1],f=n[2],c=n[3],l=n[4];for(let e=0;e<80;++e){const n=Math.floor(e/20),s=i(a,5)+r(n,u,f,c)+l+t[n]+o[e]>>>0;l=c,c=f,f=i(u,30)>>>0,u=a,a=s}n[0]=n[0]+a>>>0,n[1]=n[1]+u>>>0,n[2]=n[2]+f>>>0,n[3]=n[3]+c>>>0,n[4]=n[4]+l>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]};n.default=o},{}],132:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,i=(r=e(138))&&r.__esModule?r:{default:r};const o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).substr(1));var a=function(e,t=0){const n=(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase();if(!(0,i.default)(n))throw TypeError("Stringified UUID is invalid");return n};n.default=a},{138:138}],133:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=o(e(130)),i=o(e(132));function o(e){return e&&e.__esModule?e:{default:e}}let a,s,u=0,f=0;var c=function(e,t,n){let o=t&&n||0;const c=t||new Array(16);let l=(e=e||{}).node||a,h=void 0!==e.clockseq?e.clockseq:s;if(null==l||null==h){const t=e.random||(e.rng||r.default)();null==l&&(l=a=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==h&&(h=s=16383&(t[6]<<8|t[7]))}let d=void 0!==e.msecs?e.msecs:Date.now(),p=void 0!==e.nsecs?e.nsecs:f+1;const y=d-u+(p-f)/1e4;if(y<0&&void 0===e.clockseq&&(h=h+1&16383),(y<0||d>u)&&void 0===e.nsecs&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=d,f=p,s=h,d+=122192928e5;const g=(1e4*(268435455&d)+p)%4294967296;c[o++]=g>>>24&255,c[o++]=g>>>16&255,c[o++]=g>>>8&255,c[o++]=255&g;const b=d/4294967296*1e4&268435455;c[o++]=b>>>8&255,c[o++]=255&b,c[o++]=b>>>24&15|16,c[o++]=b>>>16&255,c[o++]=h>>>8|128,c[o++]=255&h;for(let e=0;e<6;++e)c[o+e]=l[e];return t||(0,i.default)(c)};n.default=c},{130:130,132:132}],134:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=o(e(135)),i=o(e(126));function o(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)("v3",48,i.default);n.default=a},{126:126,135:135}],135:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t,n){function o(e,o,a,s){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof o&&(o=(0,i.default)(o)),16!==o.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+e.length);if(u.set(o),u.set(e,o.length),u=n(u),u[6]=15&u[6]|t,u[8]=63&u[8]|128,a){s=s||0;for(let e=0;e<16;++e)a[s+e]=u[e];return a}return(0,r.default)(u)}try{o.name=e}catch(e){}return o.DNS=a,o.URL=s,o},n.URL=n.DNS=void 0;var r=o(e(132)),i=o(e(128));function o(e){return e&&e.__esModule?e:{default:e}}const a="6ba7b810-9dad-11d1-80b4-00c04fd430c8";n.DNS=a;const s="6ba7b811-9dad-11d1-80b4-00c04fd430c8";n.URL=s},{128:128,132:132}],136:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=o(e(130)),i=o(e(132));function o(e){return e&&e.__esModule?e:{default:e}}var a=function(e,t,n){const o=(e=e||{}).random||(e.rng||r.default)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=o[e];return t}return(0,i.default)(o)};n.default=a},{130:130,132:132}],137:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=o(e(135)),i=o(e(131));function o(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)("v5",80,i.default);n.default=a},{131:131,135:135}],138:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,i=(r=e(129))&&r.__esModule?r:{default:r};var o=function(e){return"string"==typeof e&&i.default.test(e)};n.default=o},{129:129}],139:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,i=(r=e(138))&&r.__esModule?r:{default:r};var o=function(e){if(!(0,i.default)(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)};n.default=o},{138:138}],140:[function(e,t,n){"use strict";function r(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;o>=0;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;o>=0;o--)c=r[f=s[o]],l=o>0?",":"",l+=JSON.stringify(f)+":",t.push({obj:c,prefix:l});t.push({val:"{"})}return h},n.parse=function(e){for(var t,n,i,o,a,s,u,f,c,l=[],h=[],d=0;;)if("}"!==(t=e[d++])&&"]"!==t&&void 0!==t)switch(t){case" ":case"\t":case"\n":case":":case",":break;case"n":d+=3,r(null,l,h);break;case"t":d+=3,r(!0,l,h);break;case"f":d+=4,r(!1,l,h);break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"-":for(n="",d--;;){if(i=e[d++],!/[\d\.\-e\+]/.test(i)){d--;break}n+=i}r(parseFloat(n),l,h);break;case'"':for(o="",a=void 0,s=0;'"'!==(u=e[d++])||"\\"===a&&s%2==1;)o+=u,"\\"===(a=u)?s++:s=0;r(JSON.parse('"'+o+'"'),l,h);break;case"[":f={element:[],index:l.length},l.push(f.element),h.push(f);break;case"{":c={element:{},index:l.length},l.push(c.element),h.push(c);break;default:throw new Error("unexpectedly reached end of input: "+t)}else{if(1===l.length)return l.pop();r(l.pop(),l,h)}}},{}],141:[function(e,t,n){t.exports=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var i in n)r.call(n,i)&&(e[i]=n[i])}return e};var r=Object.prototype.hasOwnProperty},{}],142:[function(e,t,n){t.exports=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)r.call(n,i)&&(e[i]=n[i])}return e};var r=Object.prototype.hasOwnProperty},{}],143:[function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=r(e(31)),o=e(125),a=r(e(84)),s=r(e(61)),u=r(e(70)),f=r(e(26)),c=r(e(39)),l=r(e(82)),h=r(e(37)),d=e(118),p=r(e(5)),y=r(e(23)),g=r(e(12)),b=r(e(140)),v=r(e(63));function _(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 w,m,E,S=Function.prototype.toString,k=S.call(Object);function x(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]=x(e[n]);return t}if(e instanceof Date&&isFinite(e))return e.toISOString();if(function(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer||"undefined"!=typeof Blob&&e instanceof Blob}(e))return _(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&&S.call(n)==k}(e))return e;for(n in t={},e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=x(e[n]);void 0!==i&&(t[n]=i)}return t}function O(e){return"$"+e}function R(e){return e.substring(1)}function A(){this._store={}}function j(e){if(this._store=new A,e&&Array.isArray(e))for(var t=0,n=e.length;t<n;t++)this.add(e[t])}A.prototype.get=function(e){var t=O(e);return this._store[t]},A.prototype.set=function(e,t){var n=O(e);return this._store[n]=t,!0},A.prototype.has=function(e){return O(e)in this._store},A.prototype.keys=function(){return Object.keys(this._store).map(e=>R(e))},A.prototype.delete=function(e){var t=O(e),n=t in this._store;return delete this._store[t],n},A.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=R(i))}},Object.defineProperty(A.prototype,"size",{get:function(){return Object.keys(this._store).length}}),j.prototype.add=function(e){return this._store.set(e,!0)},j.prototype.has=function(e){return this._store.has(e)},j.prototype.forEach=function(e){this._store.forEach((function(t,n){e(n)}))},Object.defineProperty(j.prototype,"size",{get:function(){return this._store.size}}),!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}()?(w=j,m=A):(w=Set,m=Map);try{localStorage.setItem("_pouch_check_localstorage",1),E=!!localStorage.getItem("_pouch_check_localstorage")}catch(e){E=!1}function T(){return E}function M(){f.call(this),this._listeners={},function(e){T()&&addEventListener("storage",(function(t){e.emit(t.key)}))}(this)}h(M,f),M.prototype.addListener=function(e,t,n,r){if(!this._listeners[t]){var o=this,a=!1;this._listeners[t]=s,this.on(e,s)}function s(){if(o._listeners[t])if(a)a="waiting";else{a=!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"===a&&i(s),a=!1})).on("error",(function(){a=!1}))}}},M.prototype.removeListener=function(e,t){t in this._listeners&&(f.prototype.removeListener.call(this,e,this._listeners[t]),delete this._listeners[t])},M.prototype.notifyLocalWindows=function(e){T()&&(localStorage[e]="a"===localStorage[e]?"b":"a")},M.prototype.notify=function(e){this.emit(e),this.notifyLocalWindows(e)};var B="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 L(e,t,n){Error.call(this,n),this.status=e,this.name=t,this.message=n,this.error=!0}h(L,Error),L.prototype.toString=function(){return JSON.stringify({status:this.status,name:this.name,message:this.message,reason:this.reason})};new L(401,"unauthorized","Name or password is incorrect."),new L(400,"bad_request","Missing JSON list of 'docs'");var C=new L(404,"not_found","missing"),I=new L(409,"conflict","Document update conflict"),N=new L(400,"bad_request","_id field must contain a string"),P=new L(412,"missing_id","_id is required for puts"),q=new L(400,"bad_request","Only reserved document ids may start with underscore."),D=new L(412,"precondition_failed","Database not open"),U=(new L(500,"unknown_error","Database encountered an unknown error"),new L(500,"badarg","Some query argument is invalid")),W=(new L(400,"invalid_request","Request was invalid"),new L(400,"query_parse_error","Some query parameter is invalid"),new L(500,"doc_validation","Bad special document member")),F=new L(400,"bad_request","Something wrong with the request"),z=(new L(400,"bad_request","Document must be a JSON object"),new L(404,"not_found","Database not found"),new L(500,"indexed_db_went_bad","unknown"),new L(500,"web_sql_went_bad","unknown"),new L(500,"levelDB_went_went_bad","unknown"),new L(403,"forbidden","Forbidden by design doc validate_doc_update function"),new L(400,"bad_request","Invalid rev format")),K=(new L(412,"file_exists","The database could not be created, the file already exists."),new L(412,"missing_stub","A pre-existing attachment stub wasn't found"));new L(413,"invalid_url","Provided URL is invalid");function V(e,t){function n(t){for(var n=Object.getOwnPropertyNames(e),r=0,i=n.length;r<i;r++)"function"!=typeof e[n[r]]&&(this[n[r]]=e[n[r]]);void 0===this.stack&&(this.stack=(new Error).stack),void 0!==t&&(this.reason=t)}return n.prototype=L.prototype,new n(t)}function H(e){var t={},n=e.filter&&"function"==typeof e.filter;return t.query=e.query_params,function(r){r.doc||(r.doc={});var i=n&&function(e,t,n){try{return!e(t,n)}catch(e){var r="Filter function threw: "+e.toString();return V(F,r)}}(e.filter,r.doc,t);if("object"==typeof i)return i;if(i)return!1;if(e.include_docs){if(!e.attachments)for(var o in r.doc._attachments)Object.prototype.hasOwnProperty.call(r.doc._attachments,o)&&(r.doc._attachments[o].stub=!0)}else delete r.doc;return!0}}var J=function(){}.name?function(e){return e.name}:function(e){var t=e.toString().match(/^\s*function\s*(?:(\S+)\s*)?\(/);return t&&t[1]?t[1]:""};function Y(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),r=0;r<e.length;r+=1)n.append(e[r]);return n.getBlob(t.type)}}function G(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}function $(e,t){var n=new FileReader,r="function"==typeof n.readAsBinaryString;n.onloadend=function(e){var n=e.target.result||"";if(r)return t(n);t(function(e){for(var t="",n=new Uint8Array(e),r=n.byteLength,i=0;i<r;i++)t+=String.fromCharCode(n[i]);return t}(n))},r?n.readAsBinaryString(e):n.readAsArrayBuffer(e)}var X=self.setImmediate||self.setTimeout;function Z(e){return btoa(e)}function Q(e,t,n,r,i){(n>0||r<t.size)&&(t=function(e,t,n){return e.webkitSlice?e.webkitSlice(t,n):e.slice(t,n)}(t,n,r)),function(e,t){var n=new FileReader;n.onloadend=function(e){var n=e.target.result||new ArrayBuffer(0);t(n)},n.readAsArrayBuffer(e)}(t,(function(t){e.append(t),i()}))}function ee(e,t,n,r,i){(n>0||r<t.length)&&(t=t.substring(n,r)),e.appendBinary(t),i()}function te(e,t){if(!t)return o.v4().replace(/-/g,"").toLowerCase();var n,r=B({},e);return delete r._rev_tree,n=JSON.stringify(r),a.hash(n)}var ne=o.v4;function re(e){return function(e){return"function"==typeof e}(e.prefix)?e.prefix():e}function ie(){Error.call(this)}h(ie,Error),ie.prototype.name="NotFoundError";var oe=f.EventEmitter,ae=new ie,se=function(e,t,n,r){var i=new oe;function o(e){var t,n={};if(r)for(t in r)void 0!==r[t]&&(n[t]=r[t]);if(e)for(t in e)void 0!==e[t]&&(n[t]=e[t]);return n}return i.sublevels={},i.options=r,i.version="6.5.4",i.methods={},t=t||[],i.put=function(n,r,a,s){"function"==typeof a&&(s=a,a={}),e.apply([{key:n,value:r,prefix:t.slice(),type:"put"}],o(a),(function(e){if(e)return s(e);i.emit("put",n,r),s(null)}))},i.prefix=function(){return t.slice()},i.batch=function(n,r,a){"function"==typeof r&&(a=r,r={}),n=n.map((function(e){return{key:e.key,value:e.value,prefix:e.prefix||t,keyEncoding:e.keyEncoding,valueEncoding:e.valueEncoding,type:e.type}})),e.apply(n,o(r),(function(e){if(e)return a(e);i.emit("batch",n),a(null)}))},i.get=function(n,r,i){"function"==typeof r&&(i=r,r={}),e.get(n,t,o(r),(function(e,t){e?i(ae):i(null,t)}))},i.sublevel=function(r,a){return i.sublevels[r]=i.sublevels[r]||se(e,t.concat(r),n,o(a))},i.readStream=i.createReadStream=function(r){var i;(r=o(r)).prefix=t;var a=e.iterator(r);return(i=n(r,e.createDecoder(r))).setIterator(a),i},i.close=function(t){e.close(t)},i.isOpen=e.isOpen,i.isClosed=e.isClosed,i},ue=l.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}h(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 e=this;if(!e._destroyed)return e._iterator?void e._iterator.next((function(t,n,r){if(t||void 0===n&&void 0===r)return t||e._destroyed||e.push(null),e._cleanup(t);r=e._makeData(n,r),e._destroyed||e.push(r)})):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 c;function he(e){return se(function(e,t,n){function r(e,r,i,o){return t.encode([e,n.encodeKey(r,i,o)])}function i(e,t){return t&&t.options&&(e.keyEncoding=e.keyEncoding||t.options.keyEncoding,e.valueEncoding=e.valueEncoding||t.options.valueEncoding),e}return e.open((function(){})),{apply:function(t,o,a){o=o||{};for(var s=[],u=-1,f=t.length;++u<f;){var c=t[u];i(c,c.prefix),c.prefix=re(c.prefix),s.push({key:r(c.prefix,c.key,o,c),value:"del"!==c.type&&n.encodeValue(c.value,o,c),type:c.type})}e.db.batch(s,o,a)},get:function(t,i,o,a){return o.asBuffer=n.valueAsBuffer(o),e.db.get(r(i,t,o),o,(function(e,t){e?a(e):a(null,n.decodeValue(t,o))}))},createDecoder:function(e){return function(r,i){return{key:n.decodeKey(t.decode(r)[1],e),value:n.decodeValue(i,e)}}},isClosed:function(){return e.isClosed()},close:function(t){return e.close(t)},iterator:function(i){var o,a=function(e){var t={};for(var n in e)t[n]=e[n];return t}(i||{}),s=i.prefix||[];return u.toLtgt(i,a,(function(e){return r(s,e,a,{})}),t.lowerBound,t.upperBound),a.prefix=null,a.keyAsBuffer=a.valueAsBuffer=!1,"number"!=typeof a.limit&&(a.limit=-1),a.keyAsBuffer=t.buffer,a.valueAsBuffer=n.valueAsBuffer(a),o=e.db.iterator(a),{next:function(e){return o.next(e)},end:function(e){o.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","_access","_attachments","_deleted","_revisions","_revs_info","_conflicts","_deleted_conflicts","_local_seq","_rev_tree","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats","_removed"]),ye=de(["_access","_attachments","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats"]);function ge(e){if(!/^\d+-/.test(e))return V(z);var t=e.indexOf("-"),n=e.substring(0,t),r=e.substring(t+1);return{prefix:parseInt(n,10),id:r}}function be(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=ne()),i=te(e,n.deterministic_revs),e._rev){if((o=ge(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=ge(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=V(N):/^_/.test(e)&&!/^_(design|local)/.test(e)&&(t=V(q)):t=V(P),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=V(W,u);throw c.message=W.message+": "+u,c}f&&!ye[u]?s.metadata[u.slice(1)]=e[u]:s.data[u]=e[u]}return s}function ve(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 we(e,t){return e.pos-t.pos}function me(e){for(var t=ve(e),n=function(e){var t=[];_e(e,(function(e,n,r,i,o){e&&t.push({rev:n+"-"+r,pos:n,opts:o})})),t.sort(we).reverse();for(var n=0,r=t.length;n<r;n++)delete t[n].pos;return t}(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 Se(e,t,n){var r=function(e,t,n){for(var r,i=0,o=e.length;i<o;)n(e[r=i+o>>>1],t)<0?i=r+1:o=r;return i}(e,t,n);e.splice(r,0,t)}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 xe(e,t){return e[0]<t[0]?-1:1}function Oe(e,t){for(var n=[{tree1:e,tree2:t}],r=!1;n.length>0;){var i=n.pop(),o=i.tree1,a=i.tree2;(o[1].status||a[1].status)&&(o[1].status="available"===o[1].status||"available"===a[1].status?"available":"missing");for(var s=0;s<a[2].length;s++)if(o[2][0]){for(var u=!1,f=0;f<o[2].length;f++)o[2][f][0]===a[2][s][0]&&(n.push({tree1:o[2][f],tree2:a[2][s]}),u=!0);u||(r="new_branch",Se(o[2],a[2][s],xe))}else r="new_leaf",o[2][0]=a[2][s]}return{conflicts:r,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=Oe(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});p.length>0;){var y=p.pop();if(0!==y.diff)for(var g=y.ids[2],b=0,v=g.length;b<v;b++)p.push({ids:g[b],diff:y.diff-1,parent:y.ids,parentIdx:b});else y.ids[0]===l.ids[0]&&d.push(y)}var _=d[0];_?(r=Oe(_.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 Ae(e,t,n){var r=Re(e,t),i=function(e,t){for(var n,r,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){n||(n={});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;n[h]=!0}}else s={pos:u.pos,ids:ke(f,0)};r=r?Re(r,s,!0).tree:[s]}return n&&_e(r,(function(e,t,r){delete n[t+"-"+r]})),{tree:r,revs:n?Object.keys(n):[]}}(r.tree,n);return{tree:i.tree,stemmedRevs:i.revs,conflicts:r.conflicts}}function je(e){return e.ids}function Te(e,t){t||(t=ve(e));for(var n,r=t.substring(t.indexOf("-")+1),i=e.rev_tree.map(je);n=i.pop();){if(n[0]===r)return!!n[1].deleted;i=i.concat(n[2])}}function Me(e){return/^_local/.test(e)}function Be(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||ve(t),f="deleted"in t?t.deleted:Te(t,u),c="deleted"in n.metadata?n.metadata.deleted:Te(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=be(h,s)}var d=Ae(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=V(I);return r[i]=p,o()}var y=n.metadata.rev;n.metadata.rev_tree=d.tree,n.stemmedRevs=d.stemmedRevs||[],t.rev_map&&(n.metadata.rev_map=t.rev_map);var g=ve(n.metadata),b=Te(n.metadata,g),v=f===b?0:f<b?-1:1;a(n,g,b,y===g?b:Te(n.metadata,y),!0,v,i,o)}function Le(e,t,n,r,i,o,a,s,u){e=e||1e3;var f=s.new_edits,c=new m,l=0,h=t.length;function d(){++l===h&&u&&u()}t.forEach((function(e,t){if(e._id&&Me(e._id)){var r=e._deleted?"_removeLocal":"_putLocal";n[r](e,{ctx:i},(function(e,n){o[t]=e||n,d()}))}else{var a=e.metadata.id;c.has(a)?(h--,c.get(a).push([e,t])):c.set(a,[[e,t]])}})),c.forEach((function(t,n){var i=0;function u(){++i<t.length?c():d()}function c(){var c=t[i],l=c[0],h=c[1];if(r.has(n))Be(e,r.get(n),l,o,h,u,a,f);else{var d=Ae([],l.metadata.rev_tree[0],e);l.metadata.rev_tree=d.tree,l.stemmedRevs=d.stemmedRevs||[],function(e,t,n){var r=ve(e.metadata),i=Te(e.metadata,r);if("was_delete"in s&&i)return o[t]=V(C,"deleted"),n();if(f&&function(e){return"missing"===e.metadata.rev_tree[0].ids[1].status}(e)){var u=V(I);return o[t]=u,n()}a(e,r,i,i,!1,i?0:1,t,n)}(l,h,u)}}c()}))}function Ce(e,t){return Y([new Uint8Array(e)],{type:t})}function Ie(e,t){var n=t.prefix()[0],r=e._cache,i=r.get(n);return i||(i=new m,r.set(n,i)),i}function Ne(){this._batch=[],this._cache=new m}Ne.prototype.get=function(e,t,n){var r=Ie(this,e),o=r.get(t);return o?i((function(){n(null,o)})):null===o?i((function(){n({name:"NotFoundError"})})):void e.get(t,(function(e,i){if(e)return"NotFoundError"===e.name&&r.set(t,null),n(e);r.set(t,i),n(null,i)}))},Ne.prototype.batch=function(e){for(var t=0,n=e.length;t<n;t++){var r=e[t],i=Ie(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 w,r=[],i=this._batch.length-1;i>=0;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 Pe=new m,qe={encode:function(e){try{return JSON.stringify(e)}catch(t){return b.stringify(e)}},decode:function(e){try{return JSON.parse(e)}catch(t){return b.parse(e)}},buffer:!1,type:"cheap-json"},De=new M;function Ue(e){return"winningRev"in e?e.winningRev:ve(e)}function We(e,t){return"deleted"in e?e.deleted:Te(e,t)}function Fe(e,t,n){var r=e.content_type;return new Promise((function(i,o){t.binaryStore.get(e.digest,(function(t,a){var s;if(t){if("NotFoundError"!==t.name)return o(t);s=n.binary?function(e,t){return Y([G(e)],{type:t})}("",r):""}else s=n.binary?Ce(a,r):a.toString("base64");delete e.stub,delete e.length,e.data=s,i()}))}))}function ze(e,t,n){var r=[];return e.forEach((function(e){e.doc&&e.doc._attachments&&Object.keys(e.doc._attachments).forEach((function(t){var n=e.doc._attachments[t];"data"in n||r.push(n)}))})),Promise.all(r.map((function(e){return Fe(e,t,n)})))}function Ke(e,t){e=x(e);var n,r,o=this,u={},f=e.revs_limit,c=e.name;void 0===e.createIfMissing&&(e.createIfMissing=!0);var l,h=e.db,b=J(h);function v(){u.docStore=r.sublevel("document-store",{valueEncoding:qe}),u.bySeqStore=r.sublevel("by-sequence",{valueEncoding:"json"}),u.attachmentStore=r.sublevel("attach-store",{valueEncoding:"json"}),u.binaryStore=r.sublevel("attach-binary-store",{valueEncoding:"binary"}),u.localStore=r.sublevel("local-store",{valueEncoding:"json"}),u.metaStore=r.sublevel("meta-store",{valueEncoding:"json"}),"object"==typeof e.migrate?e.migrate.doMigrationTwo(r,u,_):_()}function _(){u.metaStore.get("_local_last_update_seq",(function(e,a){void 0===r._updateSeq&&(r._updateSeq=a||0),u.metaStore.get("_local_doc_count",(function(e,a){r._docCount=e?0:a,u.metaStore.get("_local_uuid",(function(e,r){n=e?ne():r,u.metaStore.put("_local_uuid",n,(function(){i((function(){t(null,o)}))}))}))}))}))}function E(e,t){try{e.apply(null,t)}catch(e){t[t.length-1](e)}}function S(){var e=r._queue.peekFront();"read"===e.type?function(e){var t=[e],n=1,o=r._queue.get(n);for(;void 0!==o&&"read"===o.type;)t.push(o),n++,o=r._queue.get(n);var a=0;t.forEach((function(e){var n=e.args,o=n[n.length-1];n[n.length-1]=p((function(e){o.apply(null,e),++a===t.length&&i((function(){t.forEach((function(){r._queue.shift()})),r._queue.length&&S()}))})),E(e.fun,n)}))}(e):function(e){var t=e.args,n=t[t.length-1];t[t.length-1]=p((function(e){n.apply(null,e),i((function(){r._queue.shift(),r._queue.length&&S()}))})),E(e.fun,t)}(e)}function k(e){return p((function(t){r._queue.push({fun:e,args:t,type:"write"}),1===r._queue.length&&i(S)}))}function O(e){return p((function(t){r._queue.push({fun:e,args:t,type:"read"}),1===r._queue.length&&i(S)}))}function R(e){return("0000000000000000"+e).slice(-16)}function A(e,t){"destroy"in h?h.destroy(e,t):t(null)}Pe.has(b)?l=Pe.get(b):(l=new m,Pe.set(b,l)),l.has(c)?(r=l.get(c),v()):l.set(c,he(s(h(c),e,(function(n){if(n)return l.delete(c),t(n);(r=l.get(c))._docCount=-1,r._queue=new y,"object"==typeof e.migrate?e.migrate.doMigrationOne(c,r,v):v()})))),o._remote=!1,o.type=function(){return"leveldb"},o._id=function(e){e(null,n)},o._info=function(e){var t={doc_count:r._docCount,update_seq:r._updateSeq,backend_adapter:J(h)};return i((function(){e(null,t)}))},o._get=O((function(e,t,n){t=x(t),u.docStore.get(e,(function(e,r){if(e||!r)return n(V(C,"missing"));var i;if(t.rev)i=t.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,y=u.length;p<y;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)}(t.rev,r):t.rev;else if(i=Ue(r),We(r,i))return n(V(C,"deleted"));var o=r.rev_map[i];u.bySeqStore.get(R(o),(function(e,t){if(!t)return n(V(C));if("_id"in t&&t._id!==r.id)return n(new Error("wrong doc returned"));if(t._id=r.id,"_rev"in t){if(t._rev!==i)return n(new Error("wrong doc returned"))}else t._rev=i;return n(null,{doc:t,metadata:r})}))}))})),o._getAttachment=function(e,t,n,r,i){var o=n.digest,a=n.content_type;u.binaryStore.get(o,(function(e,t){if(e)return"NotFoundError"!==e.name?i(e):i(null,r.binary?function(e){return Y([""],{type:e})}(a):"");r.binary?i(null,Ce(t,a)):i(null,t.toString("base64"))}))},o._bulkDocs=k((function(e,t,n){var s=t.new_edits,l=new Array(e.docs.length),h=new m,d=new m,p=new Ne,y=0,b=r._updateSeq,v=e.docs,_=v.map((function(e){if(e._id&&Me(e._id))return e;var t=be(e,s,o.__opts);return t.metadata&&!t.metadata.rev_map&&(t.metadata.rev_map={}),t})),w=_.filter((function(e){return e.error}));if(w.length)return n(w[0]);function E(e,t){var n=Promise.resolve();e.forEach((function(e,t){n=n.then((function(){return new Promise((function(n,r){o._doCompactionNoLock(t,e,{ctx:p},(function(e){if(e)return r(e);n()}))}))}))})),n.then((function(){t()}),t)}function S(e){var t=new m;h.forEach((function(e,n){t.set(n,function(e){var t=[];return _e(e.rev_tree,(function(e,n,r,i,o){"available"!==o.status||e||(t.push(n+"-"+r),o.status="missing")})),t}(e))})),E(t,e)}function k(){E(d,(function(e){if(e&&j(e),o.auto_compaction)return S(j);j()}))}function x(e,t,r,i,o,s,f,c){y+=s;var v=null,_=0;e.metadata.winningRev=t,e.metadata.deleted=r,e.data._id=e.metadata.id,e.data._rev=e.metadata.rev,i&&(e.data._deleted=!0),e.stemmedRevs.length&&d.set(e.metadata.id,e.stemmedRevs);var w,m,E,S=e.data._attachments?Object.keys(e.data._attachments):[];function k(e){_++,v||(e?c(v=e):_===S.length&&L())}function x(e,t,n,r){return function(i){!function(e,t,n,r,i){var o=e.data._attachments[n];delete o.data,o.digest=t,o.length=r.length;var a=e.metadata.id,s=e.metadata.rev;o.revpos=parseInt(s,10),A(a,s,t,(function(e,n){return e||0===r.length?i(e):n?(p.batch([{type:"put",prefix:u.binaryStore,key:t,value:g(r,"binary")}]),void i()):i(e)}))}(e,"md5-"+i,t,n,r)}}function O(e,t,n){return function(r){!function(e,t){var n="string"==typeof e,r=n?e.length:e.size,i=Math.min(32768,r),o=Math.ceil(r/i),s=0,u=n?new a:new a.ArrayBuffer,f=n?ee:Q;function c(){X(h)}function l(){var e=Z(u.end(!0));t(e),u.destroy()}function h(){var t=s*i,n=t+i;s++,f(u,e,t,n,s<o?c:l)}h()}(r,x(e,t,r,n))}}for(var j=0;j<S.length;j++){var T,M=S[j],B=e.data._attachments[M];if(B.stub)A(e.data._id,e.data._rev,B.digest,k);else if("string"==typeof B.data){try{E=B.data,T=atob(E)}catch(e){return void n(V(U,"Attachment is not a valid base64 string"))}O(e,M,k)(T)}else w=B.data,m=O(e,M,k),$(w,m)}function L(){var t=e.metadata.rev_map[e.metadata.rev];if(t)return c();t=++b,e.metadata.rev_map[e.metadata.rev]=e.metadata.seq=t;var n=[{key:R(t),value:e.data,prefix:u.bySeqStore,type:"put"},{key:e.metadata.id,value:e.metadata,prefix:u.docStore,type:"put"}];p.batch(n),l[f]={ok:!0,id:e.metadata.id,rev:e.metadata.rev},h.set(e.metadata.id,e.metadata),c()}S.length||L()}var O={};function A(e,t,n,r){function i(r){var i=[e,t].join("@"),o={};return r?r.refs&&(o.refs=r.refs,o.refs[i]=!0):(o.refs={},o.refs[i]=!0),new Promise((function(e){p.batch([{type:"put",prefix:u.attachmentStore,key:n,value:o}]),e(!r)}))}var o=O[n]||Promise.resolve();O[n]=o.then((function(){return new Promise((function(e,t){p.get(u.attachmentStore,n,(function(n,r){if(n&&"NotFoundError"!==n.name)return t(n);e(r)}))})).then(i).then((function(e){r(null,e)}),r)}))}function j(e){if(e)return i((function(){n(e)}));p.batch([{prefix:u.metaStore,type:"put",key:"_local_last_update_seq",value:b},{prefix:u.metaStore,type:"put",key:"_local_doc_count",value:r._docCount+y}]),p.execute(r,(function(e){if(e)return n(e);r._docCount+=y,r._updateSeq=b,De.notify(c),i((function(){n(null,l)}))}))}if(!_.length)return n(null,[]);!function(e){var t=[];if(v.forEach((function(e){e&&e._attachments&&Object.keys(e._attachments).forEach((function(n){var r=e._attachments[n];r.stub&&t.push(r.digest)}))})),!t.length)return e();var n,r=0;t.forEach((function(i){!function(e,t){p.get(u.attachmentStore,e,(function(n){if(n){var r=V(K,"unknown stub attachment with digest "+e);t(r)}else t()}))}(i,(function(i){i&&!n&&(n=i),++r===t.length&&e(n)}))}))}((function(e){if(e)return n(e);!function(e){var t,n=0;function r(){if(++n===v.length)return e(t)}v.forEach((function(e){if(e._id&&Me(e._id))return r();p.get(u.docStore,e._id,(function(n,i){n?"NotFoundError"!==n.name&&(t=n):h.set(e._id,i),r()}))}))}((function(e){if(e)return n(e);Le(f,_,o,h,p,l,x,t,k)}))}))})),o._allDocs=function(e,t){return"keys"in e?function(e,t){var n=t.keys,r={offset:t.skip};return Promise.all(n.map((function(n){var i=B({key:n,deleted:"ok"},t);return["limit","skip","keys"].forEach((function(e){delete i[e]})),new Promise((function(o,a){e._allDocs(i,(function(e,i){if(e)return a(e);t.update_seq&&void 0!==i.update_seq&&(r.update_seq=i.update_seq),r.total_rows=i.total_rows,o(i.rows[0]||{key:n,error:"not_found"})}))}))}))).then((function(e){return r.rows=e,r}))}(this,e):O((function(e,t){e=x(e),function(e){r.isClosed()?e(new Error("database is closed")):e(null,r._docCount)}((function(n,i){if(n)return t(n);var o,a={},s=e.skip||0;if(e.startkey&&(a.gte=e.startkey),e.endkey&&(a.lte=e.endkey),e.key&&(a.gte=a.lte=e.key),e.descending){a.reverse=!0;var f=a.lte;a.lte=a.gte,a.gte=f}if("number"==typeof e.limit&&(o=e.limit),0===o||"gte"in a&&"lte"in a&&a.gte>a.lte){var c={total_rows:i,offset:e.skip,rows:[]};return e.update_seq&&(c.update_seq=r._updateSeq),t(null,c)}var l=[],h=u.docStore.readStream(a),p=d.obj((function(t,n,r){var i=t.value,a=Ue(i),f=We(i,a);if(f){if("ok"!==e.deleted)return void r()}else{if(s-- >0)return void r();if("number"==typeof o&&o--<=0)return h.unpipe(),h.destroy(),void r()}function c(t){var n={id:i.id,key:i.id,value:{rev:a}};if(e.include_docs){if(n.doc=t,n.doc._rev=n.value.rev,e.conflicts){var o=me(i);o.length&&(n.doc._conflicts=o)}for(var s in n.doc._attachments)Object.prototype.hasOwnProperty.call(n.doc._attachments,s)&&(n.doc._attachments[s].stub=!0)}if(!1===e.inclusive_end&&i.id===e.endkey)return r();if(f){if("ok"!==e.deleted)return r();n.value.deleted=!0,n.doc=null}l.push(n),r()}if(e.include_docs){var d=i.rev_map[a];u.bySeqStore.get(R(d),(function(e,t){c(t)}))}else c()}),(function(n){Promise.resolve().then((function(){if(e.include_docs&&e.attachments)return ze(l,u,e)})).then((function(){var n={total_rows:i,offset:e.skip,rows:l};e.update_seq&&(n.update_seq=r._updateSeq),t(null,n)}),t),n()})).on("unpipe",(function(){p.end()}));h.on("error",t),h.pipe(p)}))}))(e,t)},o._changes=function(e){if((e=x(e)).continuous){var t=c+":"+ne();return De.addListener(c,t,o,e),De.notify(c),{cancel:function(){De.removeListener(c,t)}}}var n,i=e.descending,a=[],s=e.since||0,f=0,l={reverse:i};"limit"in e&&e.limit>0&&(n=e.limit),l.reverse||(l.start=R(e.since||0));var h=e.doc_ids&&new w(e.doc_ids),p=H(e),y=new m;function g(){e.done=!0,e.return_docs&&e.limit&&e.limit<a.length&&(a.length=e.limit),b.unpipe(v),b.destroy(),e.continuous||e.cancelled||(e.include_docs&&e.attachments&&e.return_docs?ze(a,u,e).then((function(){e.complete(null,{results:a,last_seq:s})})):e.complete(null,{results:a,last_seq:s}))}var b=u.bySeqStore.readStream(l),v=d.obj((function(t,o,c){if(n&&f>=n)return g(),c();if(e.cancelled||e.done)return c();var l,d,b=(l=t.key,parseInt(l,10)),v=t.value;if(b===e.since&&!i)return c();if(h&&!h.has(v._id))return c();function _(t){var n=Ue(t);function r(n){var r=e.processChange(n,t,e);r.seq=t.seq;var i=p(r);if("object"==typeof i)return e.complete(i);i&&(f++,e.attachments&&e.include_docs?ze([r],u,e).then((function(){e.onChange(r)})):e.onChange(r),e.return_docs&&a.push(r)),c()}if(t.seq!==b)return c();if(s=b,n===v._rev)return r(v);var i=t.rev_map[n];u.bySeqStore.get(R(i),(function(e,t){r(t)}))}if(d=y.get(v._id))return _(d);u.docStore.get(v._id,(function(t,n){if(e.cancelled||e.done||r.isClosed()||Me(n.id))return c();y.set(v._id,n),_(n)}))}),(function(t){if(e.cancelled)return t();e.return_docs&&e.limit&&e.limit<a.length&&(a.length=e.limit),t()})).on("unpipe",(function(){v.end(),g()}));return b.pipe(v),{cancel:function(){e.cancelled=!0,g()}}},o._close=function(e){if(r.isClosed())return e(V(D));r.close((function(t){if(t)e(t);else{l.delete(c);var n=J(h),r=Pe.get(n);[...r.keys()].filter(e=>e.includes("-mrview-")).forEach(e=>{var t=r.get(e);t.removeAllListeners(),t.close(),r.delete(e)}),e()}}))},o._getRevisionTree=function(e,t){u.docStore.get(e,(function(e,n){e?t(V(C)):t(null,n.rev_tree)}))},o._doCompaction=k((function(e,t,n,r){o._doCompactionNoLock(e,t,n,r)})),o._doCompactionNoLock=function(e,t,n,i){if("function"==typeof n&&(i=n,n={}),!t.length)return i();var o=n.ctx||new Ne;o.get(u.docStore,e,(function(a,s){if(a)return i(a);var f=t.map((function(e){var t=s.rev_map[e];return delete s.rev_map[e],t}));_e(s.rev_tree,(function(e,n,r,i,o){var a=n+"-"+r;-1!==t.indexOf(a)&&(o.status="missing")}));var c=[];c.push({key:s.id,value:s,type:"put",prefix:u.docStore});var l,h={},d=0;function p(n){if(n&&(l=n),++d===t.length){if(l)return i(l);!function(){var n=Object.keys(h);if(!n.length)return y();var r,i=0;function a(e){e&&(r=e),++i===n.length&&y(r)}var s=new m;t.forEach((function(t){s.set(e+"@"+t,!0)})),n.forEach((function(e){o.get(u.attachmentStore,e,(function(t,n){if(t)return"NotFoundError"===t.name?a():a(t);var r=Object.keys(n.refs||{}).filter((function(e){return!s.has(e)})),i={};r.forEach((function(e){i[e]=!0})),r.length?c.push({key:e,type:"put",value:{refs:i},prefix:u.attachmentStore}):c=c.concat([{key:e,type:"del",prefix:u.attachmentStore},{key:e,type:"del",prefix:u.binaryStore}]),a()}))}))}()}}function y(e){return e?i(e):(o.batch(c),n.ctx?i():void o.execute(r,i))}f.forEach((function(e){c.push({key:R(e),type:"del",prefix:u.bySeqStore}),o.get(u.bySeqStore,R(e),(function(e,t){if(e)return"NotFoundError"===e.name?p():p(e);Object.keys(t._attachments||{}).forEach((function(e){var n=t._attachments[e].digest;h[n]=!0})),p()}))}))}))},o._getLocal=function(e,t){u.localStore.get(e,(function(e,n){e?t(V(C)):t(null,n)}))},o._putLocal=function(e,t,n){"function"==typeof t&&(n=t,t={}),t.ctx?o._putLocalNoLock(e,t,n):o._putLocalWithLock(e,t,n)},o._putLocalWithLock=k((function(e,t,n){o._putLocalNoLock(e,t,n)})),o._putLocalNoLock=function(e,t,n){delete e._revisions;var i=e._rev,o=e._id,a=t.ctx||new Ne;a.get(u.localStore,o,(function(s,f){if(s&&i)return n(V(I));if(f&&f._rev!==i)return n(V(I));e._rev=i?"0-"+(parseInt(i.split("-")[1],10)+1):"0-1";var c=[{type:"put",prefix:u.localStore,key:o,value:e}];a.batch(c);var l={ok:!0,id:e._id,rev:e._rev};if(t.ctx)return n(null,l);a.execute(r,(function(e){if(e)return n(e);n(null,l)}))}))},o._removeLocal=function(e,t,n){"function"==typeof t&&(n=t,t={}),t.ctx?o._removeLocalNoLock(e,t,n):o._removeLocalWithLock(e,t,n)},o._removeLocalWithLock=k((function(e,t,n){o._removeLocalNoLock(e,t,n)})),o._removeLocalNoLock=function(e,t,n){var i=t.ctx||new Ne;i.get(u.localStore,e._id,(function(o,a){if(o)return"NotFoundError"!==o.name?n(o):n(V(C));if(a._rev!==e._rev)return n(V(I));i.batch([{prefix:u.localStore,type:"del",key:e._id}]);var s={ok:!0,id:e._id,rev:"0-0"};if(t.ctx)return n(null,s);i.execute(r,(function(e){if(e)return n(e);n(null,s)}))}))},o._destroy=function(e,t){var n,r=J(h);if(!Pe.has(r))return A(c,t);(n=Pe.get(r)).has(c)?(De.removeAllListeners(c),n.get(c).close((function(){n.delete(c),A(c,t)}))):A(c,t)}}function Ve(e,t){var n=B({db:v},e);Ke.call(this,n,t)}Ve.valid=function(){return"undefined"!=typeof localStorage},Ve.use_prefix=!0,"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",'localstorage adapter plugin error: Cannot find global "PouchDB" object! Did you remember to include pouchdb.js?'):PouchDB.plugin((function(e){e.adapter("localstorage",Ve,!0)}))},{118:118,12:12,125:125,140:140,23:23,26:26,31:31,37:37,39:39,5:5,61:61,63:63,70:70,82:82,84:84}]},{},[143]);
\No newline at end of file