orbitdb/dist/orbitdb.min.js
2016-04-15 11:41:06 +02:00

22 lines
333 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var OrbitDB=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(1),i=r(o),u=n(5),c=r(u),a=n(37),s=r(a),f=n(61),p=r(f),h=n(62),l=r(h),y=n(63).EventEmitter,d=n(64).create("orbit-db.Client"),v=n(91),g=n(150),S=function(){function e(t,n){(0,p["default"])(this,e),this._ipfs=t,this._pubsub=null,this.user=null,this.network=null,this.events=new y,this.options=n||{},this.db=new g(this._ipfs,this.options)}return(0,l["default"])(e,[{key:"channel",value:function(e,t,n){var r=this;void 0===t&&(t=""),void 0===n&&(n=!0);var o={iterator:function(n){return r._iterator(e,t,n)},"delete":function(){return r.db.deleteChannel(e,t)},del:function(n){return r.db.del(e,t,n)},add:function(n){return r.db.add(e,t,n)},put:function(n,o){return r.db.put(e,t,n,o)},get:function(n){var o=r._iterator(e,t,{key:n}).collect();return o[0]?o[0]:null},close:function(){return r._pubsub.unsubscribe(e)}};return new s["default"](function(i,u){r.db.use(e,r.user).then(function(){r.db.events[e].on("write",r._onWrite.bind(r)),r.db.events[e].on("sync",r._onSync.bind(r)),r.db.events[e].on("load",r._onLoad.bind(r)),r.db.events[e].on("loaded",r._onLoaded.bind(r)),n&&r._pubsub.subscribe(e,t,r._onMessage.bind(r)),i(o)})["catch"](u)})}},{key:"disconnect",value:function(){this._pubsub.disconnect(),this._store={},this.user=null,this.network=null}},{key:"_onMessage",value:function(e,t){this.db.sync(e,t)}},{key:"_onWrite",value:function(e,t){this._pubsub.publish(e,t),this.events.emit("data",e,t)}},{key:"_onSync",value:function(e,t){this.events.emit("data",e,t)}},{key:"_onLoad",value:function(e,t){this.events.emit("load",e,t)}},{key:"_onLoaded",value:function(e,t){this.events.emit("loaded",e,t)}},{key:"_iterator",value:function(e,t,n){var r,o=this.db.query(e,t,n),u=0,a=(r={},(0,i["default"])(r,c["default"],function(){return this}),(0,i["default"])(r,"next",function(){var e={value:null,done:!0};return u<o.length&&(e={value:o[u],done:!1},u++),e}),(0,i["default"])(r,"collect",function(){return o}),r);return a}},{key:"_connect",value:function(e,t,n,r,o){var i=this;return new s["default"](function(u,c){void 0===o&&(o=!1),i._pubsub=new v(i._ipfs),i._pubsub.connect(e,t,n,r).then(function(){d.debug("Connected to Pubsub at '"+e+":"+t+"'"),i.user={username:n,id:n},i.network={host:e,port:t,name:"TODO: network name"},u()})["catch"](function(r){return d.warn("Couldn't connect to Pubsub:",r.message),o?(i.user={username:n,id:n},i.network={host:e,port:t,name:"TODO: network name"},void u()):(d.debug("'allowOffline' set to false, terminating"),i._pubsub.disconnect(),void c(r))})})}}]),e}(),m=function(){function e(){(0,p["default"])(this,e)}return(0,l["default"])(e,null,[{key:"connect",value:function(e,t,n,r,o,i){var u=function(o){return new s["default"](function(u,c){var a=new S(o,i);a._connect(e,t,n,r,i.allowOffline).then(function(){return u(a)})["catch"](c)})};if(i=i?i:{},!o)throw d.error("IPFS instance not provided"),new Error("IPFS instance not provided");return u(o)}}]),e}();e.exports=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(2),i=r(o);t["default"]=function(e,t,n){return t in e?(0,i["default"])(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){e.exports={"default":n(3),__esModule:!0}},function(e,t,n){var r=n(4);e.exports=function(e,t,n){return r.setDesc(e,t,n)}},function(e,t){var n=Object;e.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},function(e,t,n){e.exports={"default":n(6),__esModule:!0}},function(e,t,n){n(7),n(30),e.exports=n(27)("iterator")},function(e,t,n){"use strict";var r=n(8)(!0);n(11)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var r=n(9),o=n(10);e.exports=function(e){return function(t,n){var i,u,c=String(o(t)),a=r(n),s=c.length;return 0>a||a>=s?e?"":void 0:(i=c.charCodeAt(a),55296>i||i>56319||a+1===s||(u=c.charCodeAt(a+1))<56320||u>57343?e?c.charAt(a):i:e?c.slice(a,a+2):(i-55296<<10)+(u-56320)+65536)}}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";var r=n(12),o=n(13),i=n(18),u=n(19),c=n(23),a=n(24),s=n(25),f=n(26),p=n(4).getProto,h=n(27)("iterator"),l=!([].keys&&"next"in[].keys()),y="@@iterator",d="keys",v="values",g=function(){return this};e.exports=function(e,t,n,S,m,_,w){s(n,t,S);var b,q,k=function(e){if(!l&&e in I)return I[e];switch(e){case d:return function(){return new n(this,e)};case v:return function(){return new n(this,e)}}return function(){return new n(this,e)}},x=t+" Iterator",A=m==v,E=!1,I=e.prototype,L=I[h]||I[y]||m&&I[m],O=L||k(m);if(L){var C=p(O.call(new e));f(C,x,!0),!r&&c(I,y)&&u(C,h,g),A&&L.name!==v&&(E=!0,O=function(){return L.call(this)})}if(r&&!w||!l&&!E&&I[h]||u(I,h,O),a[t]=O,a[x]=g,m)if(b={values:A?O:k(v),keys:_?O:k(d),entries:A?k("entries"):O},w)for(q in b)q in I||i(I,q,b[q]);else o(o.P+o.F*(l||E),t,b);return b}},function(e,t){e.exports=!0},function(e,t,n){var r=n(14),o=n(15),i=n(16),u="prototype",c=function(e,t,n){var a,s,f,p=e&c.F,h=e&c.G,l=e&c.S,y=e&c.P,d=e&c.B,v=e&c.W,g=h?o:o[t]||(o[t]={}),S=h?r:l?r[t]:(r[t]||{})[u];h&&(n=t);for(a in n)s=!p&&S&&a in S,s&&a in g||(f=s?S[a]:n[a],g[a]=h&&"function"!=typeof S[a]?n[a]:d&&s?i(f,r):v&&S[a]==f?function(e){var t=function(t){return this instanceof e?new e(t):e(t)};return t[u]=e[u],t}(f):y&&"function"==typeof f?i(Function.call,f):f,y&&((g[u]||(g[u]={}))[a]=f))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,e.exports=c},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n=e.exports={version:"1.2.6"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(17);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){e.exports=n(19)},function(e,t,n){var r=n(4),o=n(20);e.exports=n(21)?function(e,t,n){return r.setDesc(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){e.exports=!n(22)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){e.exports={}},function(e,t,n){"use strict";var r=n(4),o=n(20),i=n(26),u={};n(19)(u,n(27)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r.create(u,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var r=n(4).setDesc,o=n(23),i=n(27)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){var r=n(28)("wks"),o=n(29),i=n(14).Symbol;e.exports=function(e){return r[e]||(r[e]=i&&i[e]||(i||o)("Symbol."+e))}},function(e,t,n){var r=n(14),o="__core-js_shared__",i=r[o]||(r[o]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){n(31);var r=n(24);r.NodeList=r.HTMLCollection=r.Array},function(e,t,n){"use strict";var r=n(32),o=n(33),i=n(24),u=n(34);e.exports=n(11)(Array,"Array",function(e,t){this._t=u(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):"keys"==t?o(0,n):"values"==t?o(0,e[n]):o(0,[n,e[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(35),o=n(10);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(36);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){e.exports={"default":n(38),__esModule:!0}},function(e,t,n){n(39),n(7),n(30),n(40),e.exports=n(15).Promise},function(e,t){},function(e,t,n){"use strict";var r,o=n(4),i=n(12),u=n(14),c=n(16),a=n(41),s=n(13),f=n(42),p=n(43),h=n(17),l=n(44),y=n(45),d=n(50).set,v=n(51),g=n(27)("species"),S=n(52),m=n(53),_="Promise",w=u.process,b="process"==a(w),q=u[_],k=function(e){var t=new q(function(){});return e&&(t.constructor=Object),q.resolve(t)===t},x=function(){function e(t){var n=new q(t);return d(n,e.prototype),n}var t=!1;try{if(t=q&&q.resolve&&k(),d(e,q),e.prototype=o.create(q.prototype,{constructor:{value:e}}),e.resolve(5).then(function(){})instanceof e||(t=!1),t&&n(21)){var r=!1;q.resolve(o.setDesc({},"then",{get:function(){r=!0}})),t=r}}catch(i){t=!1}return t}(),A=function(e,t){return i&&e===q&&t===r?!0:v(e,t)},E=function(e){var t=p(e)[g];return void 0!=t?t:e},I=function(e){var t;return f(e)&&"function"==typeof(t=e.then)?t:!1},L=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=h(t),this.reject=h(n)},O=function(e){try{e()}catch(t){return{error:t}}},C=function(e,t){if(!e.n){e.n=!0;var n=e.c;m(function(){for(var r=e.v,o=1==e.s,i=0,c=function(t){var n,i,u=o?t.ok:t.fail,c=t.resolve,a=t.reject;try{u?(o||(e.h=!0),n=u===!0?r:u(r),n===t.promise?a(TypeError("Promise-chain cycle")):(i=I(n))?i.call(n,c,a):c(n)):a(r)}catch(s){a(s)}};n.length>i;)c(n[i++]);n.length=0,e.n=!1,t&&setTimeout(function(){var t,n,o=e.p;j(o)&&(b?w.emit("unhandledRejection",r,o):(t=u.onunhandledrejection)?t({promise:o,reason:r}):(n=u.console)&&n.error&&n.error("Unhandled promise rejection",r)),e.a=void 0},1)})}},j=function(e){var t,n=e._d,r=n.a||n.c,o=0;if(n.h)return!1;for(;r.length>o;)if(t=r[o++],t.fail||!j(t.promise))return!1;return!0},R=function(e){var t=this;t.d||(t.d=!0,t=t.r||t,t.v=e,t.s=2,t.a=t.c.slice(),C(t,!0))},T=function(e){var t,n=this;if(!n.d){n.d=!0,n=n.r||n;try{if(n.p===e)throw TypeError("Promise can't be resolved itself");(t=I(e))?m(function(){var r={r:n,d:!1};try{t.call(e,c(T,r,1),c(R,r,1))}catch(o){R.call(r,o)}}):(n.v=e,n.s=1,C(n,!1))}catch(r){R.call({r:n,d:!1},r)}}};x||(q=function(e){h(e);var t=this._d={p:l(this,q,_),c:[],a:void 0,s:0,d:!1,v:void 0,h:!1,n:!1};try{e(c(T,t,1),c(R,t,1))}catch(n){R.call(t,n)}},n(58)(q.prototype,{then:function(e,t){var n=new L(S(this,q)),r=n.promise,o=this._d;return n.ok="function"==typeof e?e:!0,n.fail="function"==typeof t&&t,o.c.push(n),o.a&&o.a.push(n),o.s&&C(o,!1),r},"catch":function(e){return this.then(void 0,e)}})),s(s.G+s.W+s.F*!x,{Promise:q}),n(26)(q,_),n(59)(_),r=n(15)[_],s(s.S+s.F*!x,_,{reject:function(e){var t=new L(this),n=t.reject;return n(e),t.promise}}),s(s.S+s.F*(!x||k(!0)),_,{resolve:function(e){if(e instanceof q&&A(e.constructor,this))return e;var t=new L(this),n=t.resolve;return n(e),t.promise}}),s(s.S+s.F*!(x&&n(60)(function(e){q.all(e)["catch"](function(){})})),_,{all:function(e){var t=E(this),n=new L(t),r=n.resolve,i=n.reject,u=[],c=O(function(){y(e,!1,u.push,u);var n=u.length,c=Array(n);n?o.each.call(u,function(e,o){var u=!1;t.resolve(e).then(function(e){u||(u=!0,c[o]=e,--n||r(c))},i)}):r(c)});return c&&i(c.error),n.promise},race:function(e){var t=E(this),n=new L(t),r=n.reject,o=O(function(){y(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return o&&r(o.error),n.promise}})},function(e,t,n){var r=n(36),o=n(27)("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=(t=Object(e))[o])?n:i?r(t):"Object"==(u=r(t))&&"function"==typeof t.callee?"Arguments":u}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(42);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError(n+": use the 'new' operator!");return e}},function(e,t,n){var r=n(16),o=n(46),i=n(47),u=n(43),c=n(48),a=n(49);e.exports=function(e,t,n,s){var f,p,h,l=a(e),y=r(n,s,t?2:1),d=0;if("function"!=typeof l)throw TypeError(e+" is not iterable!");if(i(l))for(f=c(e.length);f>d;d++)t?y(u(p=e[d])[0],p[1]):y(e[d]);else for(h=l.call(e);!(p=h.next()).done;)o(h,y,p.value,t)}},function(e,t,n){var r=n(43);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(i){var u=e["return"];throw void 0!==u&&r(u.call(e)),i}}},function(e,t,n){var r=n(24),o=n(27)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},function(e,t,n){var r=n(9),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(41),o=n(27)("iterator"),i=n(24);e.exports=n(15).getIteratorMethod=function(e){return void 0!=e?e[o]||e["@@iterator"]||i[r(e)]:void 0}},function(e,t,n){var r=n(4).getDesc,o=n(42),i=n(43),u=function(e,t){if(i(e),!o(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,o){try{o=n(16)(Function.call,r(Object.prototype,"__proto__").set,2),o(e,[]),t=!(e instanceof Array)}catch(i){t=!0}return function(e,n){return u(e,n),t?e.__proto__=n:o(e,n),e}}({},!1):void 0),check:u}},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},function(e,t,n){var r=n(43),o=n(17),i=n(27)("species");e.exports=function(e,t){var n,u=r(e).constructor;return void 0===u||void 0==(n=r(u)[i])?t:o(n)}},function(e,t,n){var r,o,i,u=n(14),c=n(54).set,a=u.MutationObserver||u.WebKitMutationObserver,s=u.process,f=u.Promise,p="process"==n(36)(s),h=function(){var e,t,n;for(p&&(e=s.domain)&&(s.domain=null,e.exit());r;)t=r.domain,n=r.fn,t&&t.enter(),n(),t&&t.exit(),r=r.next;o=void 0,e&&e.enter()};if(p)i=function(){s.nextTick(h)};else if(a){var l=1,y=document.createTextNode("");new a(h).observe(y,{characterData:!0}),i=function(){y.data=l=-l}}else i=f&&f.resolve?function(){f.resolve().then(h)}:function(){c.call(u,h)};e.exports=function(e){var t={fn:e,next:void 0,domain:p&&s.domain};o&&(o.next=t),r||(r=t,i()),o=t}},function(e,t,n){var r,o,i,u=n(16),c=n(55),a=n(56),s=n(57),f=n(14),p=f.process,h=f.setImmediate,l=f.clearImmediate,y=f.MessageChannel,d=0,v={},g="onreadystatechange",S=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},m=function(e){S.call(e.data)};h&&l||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return v[++d]=function(){c("function"==typeof e?e:Function(e),t)},r(d),d},l=function(e){delete v[e]},"process"==n(36)(p)?r=function(e){p.nextTick(u(S,e,1))}:y?(o=new y,i=o.port2,o.port1.onmessage=m,r=u(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(e){f.postMessage(e+"","*")},f.addEventListener("message",m,!1)):r=g in s("script")?function(e){a.appendChild(s("script"))[g]=function(){a.removeChild(this),S.call(e)}}:function(e){setTimeout(u(S,e,1),0)}),e.exports={set:h,clear:l}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){e.exports=n(14).document&&document.documentElement},function(e,t,n){var r=n(42),o=n(14).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){var r=n(18);e.exports=function(e,t){for(var n in t)r(e,n,t[n]);return e}},function(e,t,n){"use strict";var r=n(15),o=n(4),i=n(21),u=n(27)("species");e.exports=function(e){var t=r[e];i&&t&&!t[u]&&o.setDesc(t,u,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(27)("iterator"),o=!1;try{var i=[7][r]();i["return"]=function(){o=!0},Array.from(i,function(){throw 2})}catch(u){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],u=i[r]();u.next=function(){n=!0},i[r]=function(){return u},e(i)}catch(c){}return n}},function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(2),i=r(o);t["default"]=function(){function e(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),(0,i["default"])(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function o(e){return"number"==typeof e}function i(e){return"object"==typeof e&&null!==e}function u(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!o(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,o,c,a,s;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[e],u(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:c=Array.prototype.slice.call(arguments,1),n.apply(this,c)}else if(i(n))for(c=Array.prototype.slice.call(arguments,1),s=n.slice(),o=s.length,a=0;o>a;a++)s[a].apply(this,c);return!0},n.prototype.addListener=function(e,t){var o;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?i(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,i(this._events[e])&&!this._events[e].warned&&(o=u(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,o&&o>0&&this._events[e].length>o&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),o||(o=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var o=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,o,u,c;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],u=n.length,o=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(n)){for(c=u;c-- >0;)if(n[c]===t||n[c].listener&&n[c].listener===t){o=c;break}if(0>o)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(67),i=r(o),u=n(79),c=r(u),a=n(86),s=r(a),f=n(87),p=r(f),h=n(90),l=!!t.version,y={DEBUG:"DEBUG",INFO:"INFO",WARN:"WARN",ERROR:"ERROR",NONE:"NONE"},d=y.DEBUG,v={Black:0,Red:1,Green:2,Yellow:3,Blue:4,Magenta:5,Cyan:6,Grey:7,White:9,Default:9};l||(v={Black:"Black",Red:"IndianRed",Green:"LimeGreen",Yellow:"Orange",Blue:"RoyalBlue",Magenta:"Orchid",Cyan:"SkyBlue",Grey:"DimGrey",White:"White",Default:"Black"});var g=[v.Cyan,v.Green,v.Yellow,v.Red,v.Default],S={useColors:!0,color:v.Default,showTimestamp:!0,showLevel:!0,filename:null,appendFile:!0},m=function(){function e(t,n){(0,s["default"])(this,e),this.category=t;var r={};if((0,c["default"])(r,S),(0,c["default"])(r,n),this.options=r,this.options.filename){var o=this.options.appendFile?"a":"w";this.fileWriter=h.createWriteStream(this.options.filename,{flags:o})}}return(0,p["default"])(e,[{key:"debug",value:function(e){this._write(y.DEBUG,e)}},{key:"log",value:function(e){this.debug(e)}},{key:"info",value:function(e){this._write(y.INFO,e)}},{key:"warn",value:function(e){this._write(y.WARN,e)}},{key:"error",value:function(e){this._write(y.ERROR,e)}},{key:"_write",value:function(e,t){if(this._shouldLog(e)){var n=this._format(e,t),r=this._createLogMessage(e,t),o=this._createLogMessage(e,t,n.timestamp,n.level,n.category,n.text);this.fileWriter&&this.fileWriter.write(r+"\n"),l?console.log(o):e===y.ERROR?this.options.showTimestamp&&this.options.showLevel?console.error(o,n.timestamp,n.level,n.category,n.text):this.options.showTimestamp&&!this.options.showLevel?console.error(o,n.timestamp,n.category,n.text):!this.options.showTimestamp&&this.options.showLevel?console.error(o,n.level,n.category,n.text):console.error(o,n.category,n.text):this.options.showTimestamp&&this.options.showLevel?console.log(o,n.timestamp,n.level,n.category,n.text):this.options.showTimestamp&&!this.options.showLevel?console.log(o,n.timestamp,n.category,n.text):!this.options.showTimestamp&&this.options.showLevel?console.log(o,n.level,n.category,n.text):console.log(o,n.category,n.text)}}},{key:"_format",value:function(e,t){var n="",r="",o="",u=": ";if(this.options.useColors){var c=(0,i["default"])(y).map(function(e){return y[e]}).indexOf(e),a=this.options.color;l?(this.options.showTimestamp&&(n="[3"+v.Grey+"m"),this.options.showLevel&&(r="[3"+g[c]+";22m"),o="[3"+a+";1m",u=": "):(this.options.showTimestamp&&(n="color:"+v.Grey),this.options.showLevel&&(r="color:"+g[c]),o="color:"+a+"; font-weight: bold")}return{timestamp:n,level:r,category:o,text:u}}},{key:"_createLogMessage",value:function(e,t,n,r,o,i){n=n||"",r=r||"",o=o||"",i=i||": ",l||(this.options.showTimestamp&&(n="%c"),this.options.showLevel&&(r="%c"),o="%c",i=": %c");var u="";return this.options.showTimestamp&&(u+=""+(new Date).toISOString()+" "),u=n+u,this.options.showLevel&&(u+=r+"["+e+"]"+(e===y.INFO||e===y.WARN?" ":"")+" "),u+=o+this.category,u+=i+t}},{key:"_shouldLog",value:function(e){var t=(0,i["default"])(y).map(function(e){return y[e]}),n=t.indexOf(e),r=t.indexOf(d);return n>=r}}]),e}();e.exports={Colors:v,LogLevel:y,setLogLevel:function(e){d=e},create:function(e,t){return new m(e,t)}}}).call(t,n(65))},function(e,t,n){t.nextTick=function(e){setTimeout(e,0)},t.platform=t.arch=t.execPath=t.title="browser",t.pid=1,t.browser=!0,t.env={},t.argv=[],t.binding=function(e){throw new Error("No such module. (Possibly not yet loaded)")},function(){var e,r="/";t.cwd=function(){return r},t.chdir=function(t){e||(e=n(66)),r=e.resolve(t,r)}}(),t.exit=t.kill=t.umask=t.dlopen=t.uptime=t.memoryUsage=t.uvCounters=function(){},t.features={}},function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}var o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(e){return o.exec(e).slice(1)};t.resolve=function(){for(var t="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var u=i>=0?arguments[i]:e.cwd();if("string"!=typeof u)throw new TypeError("Arguments to path.resolve must be strings");u&&(t=u+"/"+t,o="/"===u.charAt(0))}return t=n(r(t.split("/"),function(e){return!!e}),!o).join("/"),(o?"/":"")+t||"."},t.normalize=function(e){var o=t.isAbsolute(e),i="/"===u(e,-1);return e=n(r(e.split("/"),function(e){return!!e}),!o).join("/"),e||o||(e="."),e&&i&&(e+="/"),(o?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var o=r(e.split("/")),i=r(n.split("/")),u=Math.min(o.length,i.length),c=u,a=0;u>a;a++)if(o[a]!==i[a]){c=a;break}for(var s=[],a=c;a<o.length;a++)s.push("..");return s=s.concat(i.slice(c)),s.join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){var t=i(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},t.basename=function(e,t){var n=i(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){return i(e)[3]};var u="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return 0>t&&(t=e.length+t),e.substr(t,n)}}).call(t,n(65))},function(e,t,n){e.exports={"default":n(68),__esModule:!0}},function(e,t,n){n(69),e.exports=n(75).Object.keys},function(e,t,n){var r=n(70);n(72)("keys",function(e){return function(t){return e(r(t))}})},function(e,t,n){var r=n(71);e.exports=function(e){return Object(r(e))}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(73),o=n(75),i=n(78);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],u={};u[e]=t(n),r(r.S+r.F*i(function(){n(1)}),"Object",u)}},function(e,t,n){var r=n(74),o=n(75),i=n(76),u="prototype",c=function(e,t,n){var a,s,f,p=e&c.F,h=e&c.G,l=e&c.S,y=e&c.P,d=e&c.B,v=e&c.W,g=h?o:o[t]||(o[t]={}),S=h?r:l?r[t]:(r[t]||{})[u];h&&(n=t);for(a in n)s=!p&&S&&a in S,s&&a in g||(f=s?S[a]:n[a],g[a]=h&&"function"!=typeof S[a]?n[a]:d&&s?i(f,r):v&&S[a]==f?function(e){var t=function(t){return this instanceof e?new e(t):e(t)};return t[u]=e[u],t}(f):y&&"function"==typeof f?i(Function.call,f):f,y&&((g[u]||(g[u]={}))[a]=f))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,e.exports=c},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n=e.exports={version:"1.2.6"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(77);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){e.exports={"default":n(80),__esModule:!0}},function(e,t,n){n(81),e.exports=n(75).Object.assign},function(e,t,n){var r=n(73);r(r.S+r.F,"Object",{assign:n(82)})},function(e,t,n){var r=n(83),o=n(70),i=n(84);e.exports=n(78)(function(){var e=Object.assign,t={},n={},r=Symbol(),o="abcdefghijklmnopqrst";return t[r]=7,o.split("").forEach(function(e){n[e]=e}),7!=e({},t)[r]||Object.keys(e({},n)).join("")!=o})?function(e,t){for(var n=o(e),u=arguments,c=u.length,a=1,s=r.getKeys,f=r.getSymbols,p=r.isEnum;c>a;)for(var h,l=i(u[a++]),y=f?s(l).concat(f(l)):s(l),d=y.length,v=0;d>v;)p.call(l,h=y[v++])&&(n[h]=l[h]);return n}:Object.assign},function(e,t){var n=Object;e.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},function(e,t,n){var r=n(85);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(88),i=r(o);t["default"]=function(){function e(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),(0,i["default"])(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},function(e,t,n){e.exports={"default":n(89),__esModule:!0}},function(e,t,n){var r=n(83);e.exports=function(e,t,n){return r.setDesc(e,t,n)}},function(e,t){"use strict";e.exports={createWriteStream:function(e,t){},writeFileSync:function(){}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(92),i=r(o),u=n(37),c=r(u),a=n(61),s=r(a),f=n(62),p=r(f),h=n(94),l=n(64).create("orbit-db.Pubsub"),y=function(){function e(t){(0,s["default"])(this,e),this.ipfs=t,this._socket=null,this._subscriptions={},this.onConnected=null,this.onConnectionError=null}return(0,p["default"])(e,[{key:"connect",value:function(e,t,n,r){var o=this;return new c["default"](function(n,r){o._socket||(o._socket=h.connect("http://"+e+":"+t,{forceNew:!0})),o._socket.on("connect",n),o._socket.on("connect_error",function(n){return r(new Error("Connection refused to Pubsub at '"+e+":"+t+"'"))}),o._socket.on("disconnect",function(n){return l.warn("Disconnected from Pubsub at 'http://"+e+":"+t+"'")}),o._socket.on("error",function(e){return l.error("Pubsub socket error:",e)}),o._socket.on("message",o._handleMessage.bind(o)),o._socket.on("subscribed",o._handleMessage.bind(o))})}},{key:"disconnect",value:function(){this._socket&&this._socket.disconnect()}},{key:"subscribe",value:function(e,t,n){this._subscriptions[e]||(this._subscriptions[e]={callback:n},this._socket.emit("subscribe",{channel:e}))}},{key:"unsubscribe",value:function(e){this._socket.emit("unsubscribe",{channel:e}),delete this._subscriptions[e]}},{key:"publish",value:function(e,t){this._socket.send((0,i["default"])({channel:e,message:t}))}},{key:"_handleMessage",value:function(e,t){this._subscriptions[e]&&this._subscriptions[e].callback&&this._subscriptions[e].callback(e,t)}}]),e}();e.exports=y;
},function(e,t,n){e.exports={"default":n(93),__esModule:!0}},function(e,t,n){var r=n(15);e.exports=function(e){return(r.JSON&&r.JSON.stringify||JSON.stringify).apply(JSON,arguments)}},function(e,t,n){function r(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,r=o(e),i=r.source,s=r.id,f=r.path,p=a[s]&&f in a[s].nsps,h=t.forceNew||t["force new connection"]||!1===t.multiplex||p;return h?(c("ignoring socket cache for %s",i),n=u(i,t)):(a[s]||(c("new io instance for %s",i),a[s]=u(i,t)),n=a[s]),n.socket(r.path)}var o=n(95),i=n(100),u=n(111),c=n(97)("socket.io-client");e.exports=t=r;var a=t.managers={};t.protocol=i.protocol,t.connect=r,t.Manager=n(111),t.Socket=n(142)},function(e,t,n){(function(t){function r(e,n){var r=e,n=n||t.location;null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"==e.charAt(0)&&(e="/"==e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(i("protocol-less url %s",e),e="undefined"!=typeof n?n.protocol+"//"+e:"https://"+e),i("parse %s",e),r=o(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var u=-1!==r.host.indexOf(":"),c=u?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+c+":"+r.port,r.href=r.protocol+"://"+c+(n&&n.port==r.port?"":":"+r.port),r}var o=n(96),i=n(97)("socket.io-client:url");e.exports=r}).call(t,function(){return this}())},function(e,t){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var t=e,o=e.indexOf("["),i=e.indexOf("]");-1!=o&&-1!=i&&(e=e.substring(0,o)+e.substring(o,i).replace(/:/g,";")+e.substring(i,e.length));for(var u=n.exec(e||""),c={},a=14;a--;)c[r[a]]=u[a]||"";return-1!=o&&-1!=i&&(c.source=t,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c}},function(e,t,n){function r(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function o(){var e=arguments,n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return e;var r="color: "+this.color;e=[e[0],r,"color: inherit"].concat(Array.prototype.slice.call(e,1));var o=0,i=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))}),e.splice(i,0,r),e}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function u(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(n){}}function c(){var e;try{e=t.storage.debug}catch(n){}return e}function a(){try{return window.localStorage}catch(e){}}t=e.exports=n(98),t.log=i,t.formatArgs=o,t.save=u,t.load=c,t.useColors=r,t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:a(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){return JSON.stringify(e)},t.enable(c())},function(e,t,n){function r(){return t.colors[f++%t.colors.length]}function o(e){function n(){}function o(){var e=o,n=+new Date,i=n-(s||n);e.diff=i,e.prev=s,e.curr=n,s=n,null==e.useColors&&(e.useColors=t.useColors()),null==e.color&&e.useColors&&(e.color=r());var u=Array.prototype.slice.call(arguments);u[0]=t.coerce(u[0]),"string"!=typeof u[0]&&(u=["%o"].concat(u));var c=0;u[0]=u[0].replace(/%([a-z%])/g,function(n,r){if("%%"===n)return n;c++;var o=t.formatters[r];if("function"==typeof o){var i=u[c];n=o.call(e,i),u.splice(c,1),c--}return n}),"function"==typeof t.formatArgs&&(u=t.formatArgs.apply(e,u));var a=o.log||t.log||console.log.bind(console);a.apply(e,u)}n.enabled=!1,o.enabled=!0;var i=t.enabled(e)?o:n;return i.namespace=e,i}function i(e){t.save(e);for(var n=(e||"").split(/[\s,]+/),r=n.length,o=0;r>o;o++)n[o]&&(e=n[o].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))}function u(){t.enable("")}function c(e){var n,r;for(n=0,r=t.skips.length;r>n;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;r>n;n++)if(t.names[n].test(e))return!0;return!1}function a(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=o,t.coerce=a,t.disable=u,t.enable=i,t.enabled=c,t.humanize=n(99),t.names=[],t.skips=[],t.formatters={};var s,f=0},function(e,t){function n(e){if(e=""+e,!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*f;case"days":case"day":case"d":return n*s;case"hours":case"hour":case"hrs":case"hr":case"h":return n*a;case"minutes":case"minute":case"mins":case"min":case"m":return n*c;case"seconds":case"second":case"secs":case"sec":case"s":return n*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}}}function r(e){return e>=s?Math.round(e/s)+"d":e>=a?Math.round(e/a)+"h":e>=c?Math.round(e/c)+"m":e>=u?Math.round(e/u)+"s":e+"ms"}function o(e){return i(e,s,"day")||i(e,a,"hour")||i(e,c,"minute")||i(e,u,"second")||e+" ms"}function i(e,t,n){return t>e?void 0:1.5*t>e?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var u=1e3,c=60*u,a=60*c,s=24*a,f=365.25*s;e.exports=function(e,t){return t=t||{},"string"==typeof e?n(e):t["long"]?o(e):r(e)}},function(e,t,n){function r(){}function o(e){var n="",r=!1;return n+=e.type,t.BINARY_EVENT!=e.type&&t.BINARY_ACK!=e.type||(n+=e.attachments,n+="-"),e.nsp&&"/"!=e.nsp&&(r=!0,n+=e.nsp),null!=e.id&&(r&&(n+=",",r=!1),n+=e.id),null!=e.data&&(r&&(n+=","),n+=p.stringify(e.data)),f("encoded %j as %s",e,n),n}function i(e,t){function n(e){var n=l.deconstructPacket(e),r=o(n.packet),i=n.buffers;i.unshift(r),t(i)}l.removeBlobs(e,n)}function u(){this.reconstructor=null}function c(e){var n={},r=0;if(n.type=Number(e.charAt(0)),null==t.types[n.type])return s();if(t.BINARY_EVENT==n.type||t.BINARY_ACK==n.type){for(var o="";"-"!=e.charAt(++r)&&(o+=e.charAt(r),r!=e.length););if(o!=Number(o)||"-"!=e.charAt(r))throw new Error("Illegal attachments");n.attachments=Number(o)}if("/"==e.charAt(r+1))for(n.nsp="";++r;){var i=e.charAt(r);if(","==i)break;if(n.nsp+=i,r==e.length)break}else n.nsp="/";var u=e.charAt(r+1);if(""!==u&&Number(u)==u){for(n.id="";++r;){var i=e.charAt(r);if(null==i||Number(i)!=i){--r;break}if(n.id+=e.charAt(r),r==e.length)break}n.id=Number(n.id)}if(e.charAt(++r))try{n.data=p.parse(e.substr(r))}catch(c){return s()}return f("decoded %s as %j",e,n),n}function a(e){this.reconPack=e,this.buffers=[]}function s(e){return{type:t.ERROR,data:"parser error"}}var f=n(101)("socket.io-parser"),p=n(104),h=(n(107),n(108)),l=n(109),y=n(110);t.protocol=4,t.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],t.CONNECT=0,t.DISCONNECT=1,t.EVENT=2,t.ACK=3,t.ERROR=4,t.BINARY_EVENT=5,t.BINARY_ACK=6,t.Encoder=r,t.Decoder=u,r.prototype.encode=function(e,n){if(f("encoding packet %j",e),t.BINARY_EVENT==e.type||t.BINARY_ACK==e.type)i(e,n);else{var r=o(e);n([r])}},h(u.prototype),u.prototype.add=function(e){var n;if("string"==typeof e)n=c(e),t.BINARY_EVENT==n.type||t.BINARY_ACK==n.type?(this.reconstructor=new a(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!y(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,this.emit("decoded",n))}},u.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},a.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length==this.reconPack.attachments){var t=l.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},a.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(e,t,n){function r(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function o(){var e=arguments,n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return e;var r="color: "+this.color;e=[e[0],r,"color: inherit"].concat(Array.prototype.slice.call(e,1));var o=0,i=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))}),e.splice(i,0,r),e}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function u(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(n){}}function c(){var e;try{e=t.storage.debug}catch(n){}return e}function a(){try{return window.localStorage}catch(e){}}t=e.exports=n(102),t.log=i,t.formatArgs=o,t.save=u,t.load=c,t.useColors=r,t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:a(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){return JSON.stringify(e)},t.enable(c())},function(e,t,n){function r(){return t.colors[f++%t.colors.length]}function o(e){function n(){}function o(){var e=o,n=+new Date,i=n-(s||n);e.diff=i,e.prev=s,e.curr=n,s=n,null==e.useColors&&(e.useColors=t.useColors()),null==e.color&&e.useColors&&(e.color=r());var u=Array.prototype.slice.call(arguments);u[0]=t.coerce(u[0]),"string"!=typeof u[0]&&(u=["%o"].concat(u));var c=0;u[0]=u[0].replace(/%([a-z%])/g,function(n,r){if("%%"===n)return n;c++;var o=t.formatters[r];if("function"==typeof o){var i=u[c];n=o.call(e,i),u.splice(c,1),c--}return n}),"function"==typeof t.formatArgs&&(u=t.formatArgs.apply(e,u));var a=o.log||t.log||console.log.bind(console);a.apply(e,u)}n.enabled=!1,o.enabled=!0;var i=t.enabled(e)?o:n;return i.namespace=e,i}function i(e){t.save(e);for(var n=(e||"").split(/[\s,]+/),r=n.length,o=0;r>o;o++)n[o]&&(e=n[o].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))}function u(){t.enable("")}function c(e){var n,r;for(n=0,r=t.skips.length;r>n;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;r>n;n++)if(t.names[n].test(e))return!0;return!1}function a(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=o,t.coerce=a,t.disable=u,t.enable=i,t.enabled=c,t.humanize=n(103),t.names=[],t.skips=[],t.formatters={};var s,f=0},function(e,t){function n(e){if(e=""+e,!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*f;case"days":case"day":case"d":return n*s;case"hours":case"hour":case"hrs":case"hr":case"h":return n*a;case"minutes":case"minute":case"mins":case"min":case"m":return n*c;case"seconds":case"second":case"secs":case"sec":case"s":return n*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}}}function r(e){return e>=s?Math.round(e/s)+"d":e>=a?Math.round(e/a)+"h":e>=c?Math.round(e/c)+"m":e>=u?Math.round(e/u)+"s":e+"ms"}function o(e){return i(e,s,"day")||i(e,a,"hour")||i(e,c,"minute")||i(e,u,"second")||e+" ms"}function i(e,t,n){return t>e?void 0:1.5*t>e?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var u=1e3,c=60*u,a=60*c,s=24*a,f=365.25*s;e.exports=function(e,t){return t=t||{},"string"==typeof e?n(e):t["long"]?o(e):r(e)}},function(e,t,n){var r;(function(e,o){(function(){function i(e,t){function n(e){if(n[e]!==v)return n[e];var i;if("bug-string-char-index"==e)i="a"!="a"[0];else if("json"==e)i=n("json-stringify")&&n("json-parse");else{var u,c='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var s=t.stringify,f="function"==typeof s&&m;if(f){(u=function(){return 1}).toJSON=u;try{f="0"===s(0)&&"0"===s(new r)&&'""'==s(new o)&&s(S)===v&&s(v)===v&&s()===v&&"1"===s(u)&&"[1]"==s([u])&&"[null]"==s([v])&&"null"==s(null)&&"[null,null,null]"==s([v,S,null])&&s({a:[u,!0,!1,null,"\x00\b\n\f\r "]})==c&&"1"===s(null,u)&&"[\n 1,\n 2\n]"==s([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==s(new a(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==s(new a(864e13))&&'"-000001-01-01T00:00:00.000Z"'==s(new a(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==s(new a(-1))}catch(p){f=!1}}i=f}if("json-parse"==e){var h=t.parse;if("function"==typeof h)try{if(0===h("0")&&!h(!1)){u=h(c);var l=5==u.a.length&&1===u.a[0];if(l){try{l=!h('" "')}catch(p){}if(l)try{l=1!==h("01")}catch(p){}if(l)try{l=1!==h("1.")}catch(p){}}}}catch(p){l=!1}i=l}}return n[e]=!!i}e||(e=s.Object()),t||(t=s.Object());var r=e.Number||s.Number,o=e.String||s.String,u=e.Object||s.Object,a=e.Date||s.Date,f=e.SyntaxError||s.SyntaxError,p=e.TypeError||s.TypeError,h=e.Math||s.Math,l=e.JSON||s.JSON;"object"==typeof l&&l&&(t.stringify=l.stringify,t.parse=l.parse);var y,d,v,g=u.prototype,S=g.toString,m=new a(-0xc782b5b800cec);try{m=-109252==m.getUTCFullYear()&&0===m.getUTCMonth()&&1===m.getUTCDate()&&10==m.getUTCHours()&&37==m.getUTCMinutes()&&6==m.getUTCSeconds()&&708==m.getUTCMilliseconds()}catch(_){}if(!n("json")){var w="[object Function]",b="[object Date]",q="[object Number]",k="[object String]",x="[object Array]",A="[object Boolean]",E=n("bug-string-char-index");if(!m)var I=h.floor,L=[0,31,59,90,120,151,181,212,243,273,304,334],O=function(e,t){return L[t]+365*(e-1970)+I((e-1969+(t=+(t>1)))/4)-I((e-1901+t)/100)+I((e-1601+t)/400)};if((y=g.hasOwnProperty)||(y=function(e){var t,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=S?y=function(e){var t=this.__proto__,n=e in(this.__proto__=null,this);return this.__proto__=t,n}:(t=n.constructor,y=function(e){var n=(this.constructor||t).prototype;return e in this&&!(e in n&&this[e]===n[e])}),n=null,y.call(this,e)}),d=function(e,t){var n,r,o,i=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,r=new n;for(o in r)y.call(r,o)&&i++;return n=r=null,i?d=2==i?function(e,t){var n,r={},o=S.call(e)==w;for(n in e)o&&"prototype"==n||y.call(r,n)||!(r[n]=1)||!y.call(e,n)||t(n)}:function(e,t){var n,r,o=S.call(e)==w;for(n in e)o&&"prototype"==n||!y.call(e,n)||(r="constructor"===n)||t(n);(r||y.call(e,n="constructor"))&&t(n)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],d=function(e,t){var n,o,i=S.call(e)==w,u=!i&&"function"!=typeof e.constructor&&c[typeof e.hasOwnProperty]&&e.hasOwnProperty||y;for(n in e)i&&"prototype"==n||!u.call(e,n)||t(n);for(o=r.length;n=r[--o];u.call(e,n)&&t(n));}),d(e,t)},!n("json-stringify")){var C={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},j="000000",R=function(e,t){return(j+(t||0)).slice(-e)},T="\\u00",P=function(e){for(var t='"',n=0,r=e.length,o=!E||r>10,i=o&&(E?e.split(""):e);r>n;n++){var u=e.charCodeAt(n);switch(u){case 8:case 9:case 10:case 12:case 13:case 34:case 92:t+=C[u];break;default:if(32>u){t+=T+R(2,u.toString(16));break}t+=o?i[n]:e.charAt(n)}}return t+'"'},M=function(e,t,n,r,o,i,u){var c,a,s,f,h,l,g,m,_,w,E,L,C,j,T,B;try{c=t[e]}catch(D){}if("object"==typeof c&&c)if(a=S.call(c),a!=b||y.call(c,"toJSON"))"function"==typeof c.toJSON&&(a!=q&&a!=k&&a!=x||y.call(c,"toJSON"))&&(c=c.toJSON(e));else if(c>-1/0&&1/0>c){if(O){for(h=I(c/864e5),s=I(h/365.2425)+1970-1;O(s+1,0)<=h;s++);for(f=I((h-O(s,0))/30.42);O(s,f+1)<=h;f++);h=1+h-O(s,f),l=(c%864e5+864e5)%864e5,g=I(l/36e5)%24,m=I(l/6e4)%60,_=I(l/1e3)%60,w=l%1e3}else s=c.getUTCFullYear(),f=c.getUTCMonth(),h=c.getUTCDate(),g=c.getUTCHours(),m=c.getUTCMinutes(),_=c.getUTCSeconds(),w=c.getUTCMilliseconds();c=(0>=s||s>=1e4?(0>s?"-":"+")+R(6,0>s?-s:s):R(4,s))+"-"+R(2,f+1)+"-"+R(2,h)+"T"+R(2,g)+":"+R(2,m)+":"+R(2,_)+"."+R(3,w)+"Z"}else c=null;if(n&&(c=n.call(t,e,c)),null===c)return"null";if(a=S.call(c),a==A)return""+c;if(a==q)return c>-1/0&&1/0>c?""+c:"null";if(a==k)return P(""+c);if("object"==typeof c){for(j=u.length;j--;)if(u[j]===c)throw p();if(u.push(c),E=[],T=i,i+=o,a==x){for(C=0,j=c.length;j>C;C++)L=M(C,c,n,r,o,i,u),E.push(L===v?"null":L);B=E.length?o?"[\n"+i+E.join(",\n"+i)+"\n"+T+"]":"["+E.join(",")+"]":"[]"}else d(r||c,function(e){var t=M(e,c,n,r,o,i,u);t!==v&&E.push(P(e)+":"+(o?" ":"")+t)}),B=E.length?o?"{\n"+i+E.join(",\n"+i)+"\n"+T+"}":"{"+E.join(",")+"}":"{}";return u.pop(),B}};t.stringify=function(e,t,n){var r,o,i,u;if(c[typeof t]&&t)if((u=S.call(t))==w)o=t;else if(u==x){i={};for(var a,s=0,f=t.length;f>s;a=t[s++],u=S.call(a),(u==k||u==q)&&(i[a]=1));}if(n)if((u=S.call(n))==q){if((n-=n%1)>0)for(r="",n>10&&(n=10);r.length<n;r+=" ");}else u==k&&(r=n.length<=10?n:n.slice(0,10));return M("",(a={},a[""]=e,a),o,i,r,"",[])}}if(!n("json-parse")){var B,D,F=o.fromCharCode,N={92:"\\",34:'"',47:"/",98:"\b",116:" ",110:"\n",102:"\f",114:"\r"},U=function(){throw B=D=null,f()},W=function(){for(var e,t,n,r,o,i=D,u=i.length;u>B;)switch(o=i.charCodeAt(B)){case 9:case 10:case 13:case 32:B++;break;case 123:case 125:case 91:case 93:case 58:case 44:return e=E?i.charAt(B):i[B],B++,e;case 34:for(e="@",B++;u>B;)if(o=i.charCodeAt(B),32>o)U();else if(92==o)switch(o=i.charCodeAt(++B)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:e+=N[o],B++;break;case 117:for(t=++B,n=B+4;n>B;B++)o=i.charCodeAt(B),o>=48&&57>=o||o>=97&&102>=o||o>=65&&70>=o||U();e+=F("0x"+i.slice(t,B));break;default:U()}else{if(34==o)break;for(o=i.charCodeAt(B),t=B;o>=32&&92!=o&&34!=o;)o=i.charCodeAt(++B);e+=i.slice(t,B)}if(34==i.charCodeAt(B))return B++,e;U();default:if(t=B,45==o&&(r=!0,o=i.charCodeAt(++B)),o>=48&&57>=o){for(48==o&&(o=i.charCodeAt(B+1),o>=48&&57>=o)&&U(),r=!1;u>B&&(o=i.charCodeAt(B),o>=48&&57>=o);B++);if(46==i.charCodeAt(B)){for(n=++B;u>n&&(o=i.charCodeAt(n),o>=48&&57>=o);n++);n==B&&U(),B=n}if(o=i.charCodeAt(B),101==o||69==o){for(o=i.charCodeAt(++B),43!=o&&45!=o||B++,n=B;u>n&&(o=i.charCodeAt(n),o>=48&&57>=o);n++);n==B&&U(),B=n}return+i.slice(t,B)}if(r&&U(),"true"==i.slice(B,B+4))return B+=4,!0;if("false"==i.slice(B,B+5))return B+=5,!1;if("null"==i.slice(B,B+4))return B+=4,null;U()}return"$"},z=function(e){var t,n;if("$"==e&&U(),"string"==typeof e){if("@"==(E?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];e=W(),"]"!=e;n||(n=!0))n&&(","==e?(e=W(),"]"==e&&U()):U()),","==e&&U(),t.push(z(e));return t}if("{"==e){for(t={};e=W(),"}"!=e;n||(n=!0))n&&(","==e?(e=W(),"}"==e&&U()):U()),","!=e&&"string"==typeof e&&"@"==(E?e.charAt(0):e[0])&&":"==W()||U(),t[e.slice(1)]=z(W());return t}U()}return e},Y=function(e,t,n){var r=H(e,t,n);r===v?delete e[t]:e[t]=r},H=function(e,t,n){var r,o=e[t];if("object"==typeof o&&o)if(S.call(o)==x)for(r=o.length;r--;)Y(o,r,n);else d(o,function(e){Y(o,e,n)});return n.call(e,t,o)};t.parse=function(e,t){var n,r;return B=0,D=""+e,n=z(W()),"$"!=W()&&U(),B=D=null,t&&S.call(t)==w?H((r={},r[""]=n,r),"",t):n}}}return t.runInContext=i,t}var u=n(106),c={"function":!0,object:!0},a=c[typeof t]&&t&&!t.nodeType&&t,s=c[typeof window]&&window||this,f=a&&c[typeof e]&&e&&!e.nodeType&&"object"==typeof o&&o;if(!f||f.global!==f&&f.window!==f&&f.self!==f||(s=f),a&&!u)i(s,a);else{var p=s.JSON,h=s.JSON3,l=!1,y=i(s,s.JSON3={noConflict:function(){return l||(l=!0,s.JSON=p,s.JSON3=h,p=h=null),y}});s.JSON={parse:y.parse,stringify:y.stringify}}u&&(r=function(){return y}.call(t,n,t,e),!(void 0!==r&&(e.exports=r)))}).call(this)}).call(t,n(105)(e),function(){return this}())},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},function(e,t){function n(e){return e?r(e):void 0}function r(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}e.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[e]=this._callbacks[e]||[]).push(t),this},n.prototype.once=function(e,t){function n(){r.off(e,n),t.apply(this,arguments)}var r=this;return this._callbacks=this._callbacks||{},n.fn=t,this.on(e,n),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks[e];if(!n)return this;if(1==arguments.length)return delete this._callbacks[e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return this},n.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks[e];if(n){n=n.slice(0);for(var r=0,o=n.length;o>r;++r)n[r].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){(function(e){var r=n(107),o=n(110);t.deconstructPacket=function(e){function t(e){if(!e)return e;if(o(e)){var i={_placeholder:!0,num:n.length};return n.push(e),i}if(r(e)){for(var u=new Array(e.length),c=0;c<e.length;c++)u[c]=t(e[c]);return u}if("object"==typeof e&&!(e instanceof Date)){var u={};for(var a in e)u[a]=t(e[a]);return u}return e}var n=[],i=e.data,u=e;return u.data=t(i),u.attachments=n.length,{packet:u,buffers:n}},t.reconstructPacket=function(e,t){function n(e){if(e&&e._placeholder){var o=t[e.num];return o}if(r(e)){for(var i=0;i<e.length;i++)e[i]=n(e[i]);return e}if(e&&"object"==typeof e){for(var u in e)e[u]=n(e[u]);return e}return e}return e.data=n(e.data),e.attachments=void 0,e},t.removeBlobs=function(t,n){function i(t,a,s){if(!t)return t;if(e.Blob&&t instanceof Blob||e.File&&t instanceof File){u++;var f=new FileReader;f.onload=function(){s?s[a]=this.result:c=this.result,--u||n(c)},f.readAsArrayBuffer(t)}else if(r(t))for(var p=0;p<t.length;p++)i(t[p],p,t);else if(t&&"object"==typeof t&&!o(t))for(var h in t)i(t[h],h,t)}var u=0,c=t;i(c),u||n(c)}}).call(t,function(){return this}())},function(e,t){(function(t){function n(e){return t.Buffer&&t.Buffer.isBuffer(e)||t.ArrayBuffer&&e instanceof ArrayBuffer}e.exports=n}).call(t,function(){return this}())},function(e,t,n){function r(e,t){return this instanceof r?(e&&"object"==typeof e&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new h({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[],this.encoder=new c.Encoder,this.decoder=new c.Decoder,this.autoConnect=t.autoConnect!==!1,void(this.autoConnect&&this.open())):new r(e,t)}var o=n(112),i=n(142),u=n(143),c=n(100),a=n(145),s=n(146),f=n(97)("socket.io-client:manager"),p=n(140),h=n(149),l=Object.prototype.hasOwnProperty;e.exports=r,r.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var e in this.nsps)l.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},r.prototype.updateSocketIds=function(){for(var e in this.nsps)l.call(this.nsps,e)&&(this.nsps[e].id=this.engine.id)},u(r.prototype),r.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},r.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},r.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},r.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},r.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},r.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},r.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},r.prototype.open=r.prototype.connect=function(e){if(f("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;f("opening %s",this.uri),this.engine=o(this.uri,this.opts);var t=this.engine,n=this;this.readyState="opening",this.skipReconnect=!1;var r=a(t,"open",function(){n.onopen(),e&&e()}),i=a(t,"error",function(t){if(f("connect_error"),n.cleanup(),n.readyState="closed",n.emitAll("connect_error",t),e){var r=new Error("Connection error");r.data=t,e(r)}else n.maybeReconnectOnOpen()});if(!1!==this._timeout){var u=this._timeout;f("connect attempt will timeout after %d",u);var c=setTimeout(function(){f("connect attempt timed out after %d",u),r.destroy(),t.close(),t.emit("error","timeout"),n.emitAll("connect_timeout",u)},u);this.subs.push({destroy:function(){clearTimeout(c)}})}return this.subs.push(r),this.subs.push(i),this},r.prototype.onopen=function(){f("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(a(e,"data",s(this,"ondata"))),this.subs.push(a(e,"ping",s(this,"onping"))),this.subs.push(a(e,"pong",s(this,"onpong"))),this.subs.push(a(e,"error",s(this,"onerror"))),this.subs.push(a(e,"close",s(this,"onclose"))),this.subs.push(a(this.decoder,"decoded",s(this,"ondecoded")))},r.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},r.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},r.prototype.ondata=function(e){this.decoder.add(e)},r.prototype.ondecoded=function(e){this.emit("packet",e)},r.prototype.onerror=function(e){f("error",e),this.emitAll("error",e)},r.prototype.socket=function(e){function t(){~p(r.connecting,n)||r.connecting.push(n)}var n=this.nsps[e];if(!n){n=new i(this,e),this.nsps[e]=n;var r=this;n.on("connecting",t),n.on("connect",function(){n.id=r.engine.id}),this.autoConnect&&t()}return n},r.prototype.destroy=function(e){var t=p(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},r.prototype.packet=function(e){f("writing packet %j",e);var t=this;t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,function(n){for(var r=0;r<n.length;r++)t.engine.write(n[r],e.options);t.encoding=!1,t.processPacketQueue()}))},r.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},r.prototype.cleanup=function(){f("cleanup");for(var e;e=this.subs.shift();)e.destroy();this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},r.prototype.close=r.prototype.disconnect=function(){f("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"==this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},r.prototype.onclose=function(e){f("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},r.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)f("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();f("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var n=setTimeout(function(){e.skipReconnect||(f("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open(function(t){t?(f("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(f("reconnect success"),e.onreconnect())}))},t);this.subs.push({destroy:function(){clearTimeout(n)}})}},r.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,n){e.exports=n(113)},function(e,t,n){e.exports=n(114),e.exports.parser=n(121)},function(e,t,n){(function(t){function r(e,n){if(!(this instanceof r))return new r(e,n);n=n||{},e&&"object"==typeof e&&(n=e,e=null),e?(e=f(e),n.hostname=e.host,n.secure="https"==e.protocol||"wss"==e.protocol,n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=f(n.host).host),this.secure=null!=n.secure?n.secure:t.location&&"https:"==location.protocol,n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.agent=n.agent||!1,this.hostname=n.hostname||(t.location?location.hostname:"localhost"),this.port=n.port||(t.location&&location.port?location.port:this.secure?443:80),this.query=n.query||{},"string"==typeof this.query&&(this.query=h.decode(this.query)),this.upgrade=!1!==n.upgrade,this.path=(n.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!n.forceJSONP,this.jsonp=!1!==n.jsonp,this.forceBase64=!!n.forceBase64,this.enablesXDR=!!n.enablesXDR,this.timestampParam=n.timestampParam||"t",this.timestampRequests=n.timestampRequests,this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.policyPort=n.policyPort||843,this.rememberUpgrade=n.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=n.onlyBinaryUpgrades,this.perMessageDeflate=!1!==n.perMessageDeflate?n.perMessageDeflate||{}:!1,!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=n.pfx||null,this.key=n.key||null,this.passphrase=n.passphrase||null,this.cert=n.cert||null,this.ca=n.ca||null,this.ciphers=n.ciphers||null,this.rejectUnauthorized=void 0===n.rejectUnauthorized?null:n.rejectUnauthorized;var o="object"==typeof t&&t;o.global===o&&n.extraHeaders&&Object.keys(n.extraHeaders).length>0&&(this.extraHeaders=n.extraHeaders),this.open()}function o(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var i=n(115),u=n(130),c=n(134)("engine.io-client:socket"),a=n(140),s=n(121),f=n(96),p=n(141),h=n(131);e.exports=r,r.priorWebsocketSuccess=!1,u(r.prototype),r.protocol=s.protocol,r.Socket=r,r.Transport=n(120),r.transports=n(115),r.parser=n(121),r.prototype.createTransport=function(e){c('creating transport "%s"',e);var t=o(this.query);t.EIO=s.protocol,t.transport=e,this.id&&(t.sid=this.id);var n=new i[e]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:t,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized,perMessageDeflate:this.perMessageDeflate,extraHeaders:this.extraHeaders});return n},r.prototype.open=function(){var e;if(this.rememberUpgrade&&r.priorWebsocketSuccess&&-1!=this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout(function(){t.emit("error","No transports available")},0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e);
}catch(n){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},r.prototype.setTransport=function(e){c("setting transport %s",e.name);var t=this;this.transport&&(c("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(e){t.onPacket(e)}).on("error",function(e){t.onError(e)}).on("close",function(){t.onClose("transport close")})},r.prototype.probe=function(e){function t(){if(h.onlyBinaryUpgrades){var t=!this.supportsBinary&&h.transport.supportsBinary;p=p||t}p||(c('probe transport "%s" opened',e),f.send([{type:"ping",data:"probe"}]),f.once("packet",function(t){if(!p)if("pong"==t.type&&"probe"==t.data){if(c('probe transport "%s" pong',e),h.upgrading=!0,h.emit("upgrading",f),!f)return;r.priorWebsocketSuccess="websocket"==f.name,c('pausing current transport "%s"',h.transport.name),h.transport.pause(function(){p||"closed"!=h.readyState&&(c("changing transport and sending upgrade packet"),s(),h.setTransport(f),f.send([{type:"upgrade"}]),h.emit("upgrade",f),f=null,h.upgrading=!1,h.flush())})}else{c('probe transport "%s" failed',e);var n=new Error("probe error");n.transport=f.name,h.emit("upgradeError",n)}}))}function n(){p||(p=!0,s(),f.close(),f=null)}function o(t){var r=new Error("probe error: "+t);r.transport=f.name,n(),c('probe transport "%s" failed because of error: %s',e,t),h.emit("upgradeError",r)}function i(){o("transport closed")}function u(){o("socket closed")}function a(e){f&&e.name!=f.name&&(c('"%s" works - aborting "%s"',e.name,f.name),n())}function s(){f.removeListener("open",t),f.removeListener("error",o),f.removeListener("close",i),h.removeListener("close",u),h.removeListener("upgrading",a)}c('probing transport "%s"',e);var f=this.createTransport(e,{probe:1}),p=!1,h=this;r.priorWebsocketSuccess=!1,f.once("open",t),f.once("error",o),f.once("close",i),this.once("close",u),this.once("upgrading",a),f.open()},r.prototype.onOpen=function(){if(c("socket open"),this.readyState="open",r.priorWebsocketSuccess="websocket"==this.transport.name,this.emit("open"),this.flush(),"open"==this.readyState&&this.upgrade&&this.transport.pause){c("starting upgrade probes");for(var e=0,t=this.upgrades.length;t>e;e++)this.probe(this.upgrades[e])}},r.prototype.onPacket=function(e){if("opening"==this.readyState||"open"==this.readyState)switch(c('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(p(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else c('packet received with socket readyState "%s"',this.readyState)},r.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!=this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},r.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){"closed"!=t.readyState&&t.onClose("ping timeout")},e||t.pingInterval+t.pingTimeout)},r.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout(function(){c("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)},e.pingInterval)},r.prototype.ping=function(){var e=this;this.sendPacket("ping",function(){e.emit("ping")})},r.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},r.prototype.flush=function(){"closed"!=this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(c("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},r.prototype.write=r.prototype.send=function(e,t,n){return this.sendPacket("message",e,t,n),this},r.prototype.sendPacket=function(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"!=this.readyState&&"closed"!=this.readyState){n=n||{},n.compress=!1!==n.compress;var o={type:e,data:t,options:n};this.emit("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}},r.prototype.close=function(){function e(){r.onClose("forced close"),c("socket closing - telling transport to close"),r.transport.close()}function t(){r.removeListener("upgrade",t),r.removeListener("upgradeError",t),e()}function n(){r.once("upgrade",t),r.once("upgradeError",t)}if("opening"==this.readyState||"open"==this.readyState){this.readyState="closing";var r=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?n():e()}):this.upgrading?n():e()}return this},r.prototype.onError=function(e){c("socket error %j",e),r.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},r.prototype.onClose=function(e,t){if("opening"==this.readyState||"open"==this.readyState||"closing"==this.readyState){c('socket close with reason: "%s"',e);var n=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),n.writeBuffer=[],n.prevBufferLen=0}},r.prototype.filterUpgrades=function(e){for(var t=[],n=0,r=e.length;r>n;n++)~a(this.transports,e[n])&&t.push(e[n]);return t}}).call(t,function(){return this}())},function(e,t,n){(function(e){function r(t){var n,r=!1,c=!1,a=!1!==t.jsonp;if(e.location){var s="https:"==location.protocol,f=location.port;f||(f=s?443:80),r=t.hostname!=location.hostname||f!=t.port,c=t.secure!=s}if(t.xdomain=r,t.xscheme=c,n=new o(t),"open"in n&&!t.forceJSONP)return new i(t);if(!a)throw new Error("JSONP disabled");return new u(t)}var o=n(116),i=n(118),u=n(137),c=n(138);t.polling=r,t.websocket=c}).call(t,function(){return this}())},function(e,t,n){var r=n(117);e.exports=function(e){var t=e.xdomain,n=e.xscheme,o=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||r))return new XMLHttpRequest}catch(i){}try{if("undefined"!=typeof XDomainRequest&&!n&&o)return new XDomainRequest}catch(i){}if(!t)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(i){}}},function(e,t){try{e.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(n){e.exports=!1}},function(e,t,n){(function(t){function r(){}function o(e){if(a.call(this,e),t.location){var n="https:"==location.protocol,r=location.port;r||(r=n?443:80),this.xd=e.hostname!=t.location.hostname||r!=e.port,this.xs=e.secure!=n}else this.extraHeaders=e.extraHeaders}function i(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!=e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}function u(){for(var e in i.requests)i.requests.hasOwnProperty(e)&&i.requests[e].abort()}var c=n(116),a=n(119),s=n(130),f=n(132),p=n(134)("engine.io-client:polling-xhr");e.exports=o,e.exports.Request=i,f(o,a),o.prototype.supportsBinary=!0,o.prototype.request=function(e){return e=e||{},e.uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.extraHeaders=this.extraHeaders,new i(e)},o.prototype.doWrite=function(e,t){var n="string"!=typeof e&&void 0!==e,r=this.request({method:"POST",data:e,isBinary:n}),o=this;r.on("success",t),r.on("error",function(e){o.onError("xhr post error",e)}),this.sendXhr=r},o.prototype.doPoll=function(){p("xhr poll");var e=this.request(),t=this;e.on("data",function(e){t.onData(e)}),e.on("error",function(e){t.onError("xhr poll error",e)}),this.pollXhr=e},s(i.prototype),i.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var n=this.xhr=new c(e),r=this;try{p("xhr open %s: %s",this.method,this.uri),n.open(this.method,this.uri,this.async);try{if(this.extraHeaders){n.setDisableHeaderCheck(!0);for(var o in this.extraHeaders)this.extraHeaders.hasOwnProperty(o)&&n.setRequestHeader(o,this.extraHeaders[o])}}catch(u){}if(this.supportsBinary&&(n.responseType="arraybuffer"),"POST"==this.method)try{this.isBinary?n.setRequestHeader("Content-type","application/octet-stream"):n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(u){}"withCredentials"in n&&(n.withCredentials=!0),this.hasXDR()?(n.onload=function(){r.onLoad()},n.onerror=function(){r.onError(n.responseText)}):n.onreadystatechange=function(){4==n.readyState&&(200==n.status||1223==n.status?r.onLoad():setTimeout(function(){r.onError(n.status)},0))},p("xhr data %s",this.data),n.send(this.data)}catch(u){return void setTimeout(function(){r.onError(u)},0)}t.document&&(this.index=i.requestsCount++,i.requests[this.index]=this)},i.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},i.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},i.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},i.prototype.cleanup=function(e){if("undefined"!=typeof this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=r:this.xhr.onreadystatechange=r,e)try{this.xhr.abort()}catch(n){}t.document&&delete i.requests[this.index],this.xhr=null}},i.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch(n){}if("application/octet-stream"===t)e=this.xhr.response;else if(this.supportsBinary)try{e=String.fromCharCode.apply(null,new Uint8Array(this.xhr.response))}catch(n){for(var r=new Uint8Array(this.xhr.response),o=[],i=0,u=r.length;u>i;i++)o.push(r[i]);e=String.fromCharCode.apply(null,o)}else e=this.xhr.responseText}catch(n){this.onError(n)}null!=e&&this.onData(e)},i.prototype.hasXDR=function(){return"undefined"!=typeof t.XDomainRequest&&!this.xs&&this.enablesXDR},i.prototype.abort=function(){this.cleanup()},t.document&&(i.requestsCount=0,i.requests={},t.attachEvent?t.attachEvent("onunload",u):t.addEventListener&&t.addEventListener("beforeunload",u,!1))}).call(t,function(){return this}())},function(e,t,n){function r(e){var t=e&&e.forceBase64;f&&!t||(this.supportsBinary=!1),o.call(this,e)}var o=n(120),i=n(131),u=n(121),c=n(132),a=n(133),s=n(134)("engine.io-client:polling");e.exports=r;var f=function(){var e=n(116),t=new e({xdomain:!1});return null!=t.responseType}();c(r,o),r.prototype.name="polling",r.prototype.doOpen=function(){this.poll()},r.prototype.pause=function(e){function t(){s("paused"),n.readyState="paused",e()}var n=this;if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(s("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){s("pre-pause polling complete"),--r||t()})),this.writable||(s("we are currently writing - waiting to pause"),r++,this.once("drain",function(){s("pre-pause writing complete"),--r||t()}))}else t()},r.prototype.poll=function(){s("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},r.prototype.onData=function(e){var t=this;s("polling got data %s",e);var n=function(e,n,r){return"opening"==t.readyState&&t.onOpen(),"close"==e.type?(t.onClose(),!1):void t.onPacket(e)};u.decodePayload(e,this.socket.binaryType,n),"closed"!=this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"==this.readyState?this.poll():s('ignoring poll - transport state "%s"',this.readyState))},r.prototype.doClose=function(){function e(){s("writing close packet"),t.write([{type:"close"}])}var t=this;"open"==this.readyState?(s("transport open - closing"),e()):(s("transport not open - deferring close"),this.once("open",e))},r.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")},t=this;u.encodePayload(e,this.supportsBinary,function(e){t.doWrite(e,n)})},r.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";!1!==this.timestampRequests&&(e[this.timestampParam]=a()),this.supportsBinary||e.sid||(e.b64=1),e=i.encode(e),this.port&&("https"==t&&443!=this.port||"http"==t&&80!=this.port)&&(n=":"+this.port),e.length&&(e="?"+e);var r=-1!==this.hostname.indexOf(":");return t+"://"+(r?"["+this.hostname+"]":this.hostname)+n+this.path+e}},function(e,t,n){function r(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders}var o=n(121),i=n(130);e.exports=r,i(r.prototype),r.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},r.prototype.open=function(){return"closed"!=this.readyState&&""!=this.readyState||(this.readyState="opening",this.doOpen()),this},r.prototype.close=function(){return"opening"!=this.readyState&&"open"!=this.readyState||(this.doClose(),this.onClose()),this},r.prototype.send=function(e){if("open"!=this.readyState)throw new Error("Transport not open");this.write(e)},r.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},r.prototype.onData=function(e){var t=o.decodePacket(e,this.socket.binaryType);this.onPacket(t)},r.prototype.onPacket=function(e){this.emit("packet",e)},r.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(e,t,n){(function(e){function r(e,n){var r="b"+t.packets[e.type]+e.data.data;return n(r)}function o(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var o=e.data,i=new Uint8Array(o),u=new Uint8Array(1+o.byteLength);u[0]=g[e.type];for(var c=0;c<i.length;c++)u[c+1]=i[c];return r(u.buffer)}function i(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var o=new FileReader;return o.onload=function(){e.data=o.result,t.encodePacket(e,n,!0,r)},o.readAsArrayBuffer(e.data)}function u(e,n,r){if(!n)return t.encodeBase64Packet(e,r);if(v)return i(e,n,r);var o=new Uint8Array(1);o[0]=g[e.type];var u=new _([o.buffer,e.data]);return r(u)}function c(e,t,n){for(var r=new Array(e.length),o=h(e.length,n),i=function(e,n,o){t(n,function(t,n){r[e]=n,o(t,r)})},u=0;u<e.length;u++)i(u,e[u],o)}var a=n(122),s=n(123),f=n(125),p=n(126),h=n(127),l=n(128),y=navigator.userAgent.match(/Android/i),d=/PhantomJS/i.test(navigator.userAgent),v=y||d;t.protocol=3;var g=t.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},S=a(g),m={type:"error",data:"parser error"},_=n(129);t.encodePacket=function(t,n,i,c){"function"==typeof n&&(c=n,n=!1),"function"==typeof i&&(c=i,i=null);var a=void 0===t.data?void 0:t.data.buffer||t.data;if(e.ArrayBuffer&&a instanceof ArrayBuffer)return o(t,n,c);if(_&&a instanceof e.Blob)return u(t,n,c);if(a&&a.base64)return r(t,c);var s=g[t.type];return void 0!==t.data&&(s+=i?l.encode(String(t.data)):String(t.data)),c(""+s)},t.encodeBase64Packet=function(n,r){var o="b"+t.packets[n.type];if(_&&n.data instanceof e.Blob){var i=new FileReader;return i.onload=function(){var e=i.result.split(",")[1];r(o+e)},i.readAsDataURL(n.data)}var u;try{u=String.fromCharCode.apply(null,new Uint8Array(n.data))}catch(c){for(var a=new Uint8Array(n.data),s=new Array(a.length),f=0;f<a.length;f++)s[f]=a[f];u=String.fromCharCode.apply(null,s)}return o+=e.btoa(u),r(o)},t.decodePacket=function(e,n,r){if("string"==typeof e||void 0===e){if("b"==e.charAt(0))return t.decodeBase64Packet(e.substr(1),n);if(r)try{e=l.decode(e)}catch(o){return m}var i=e.charAt(0);return Number(i)==i&&S[i]?e.length>1?{type:S[i],data:e.substring(1)}:{type:S[i]}:m}var u=new Uint8Array(e),i=u[0],c=f(e,1);return _&&"blob"===n&&(c=new _([c])),{type:S[i],data:c}},t.decodeBase64Packet=function(t,n){var r=S[t.charAt(0)];if(!e.ArrayBuffer)return{type:r,data:{base64:!0,data:t.substr(1)}};var o=p.decode(t.substr(1));return"blob"===n&&_&&(o=new _([o])),{type:r,data:o}},t.encodePayload=function(e,n,r){function o(e){return e.length+":"+e}function i(e,r){t.encodePacket(e,u?n:!1,!0,function(e){r(null,o(e))})}"function"==typeof n&&(r=n,n=null);var u=s(e);return n&&u?_&&!v?t.encodePayloadAsBlob(e,r):t.encodePayloadAsArrayBuffer(e,r):e.length?void c(e,i,function(e,t){return r(t.join(""))}):r("0:")},t.decodePayload=function(e,n,r){if("string"!=typeof e)return t.decodePayloadAsBinary(e,n,r);"function"==typeof n&&(r=n,n=null);var o;if(""==e)return r(m,0,1);for(var i,u,c="",a=0,s=e.length;s>a;a++){var f=e.charAt(a);if(":"!=f)c+=f;else{if(""==c||c!=(i=Number(c)))return r(m,0,1);if(u=e.substr(a+1,i),c!=u.length)return r(m,0,1);if(u.length){if(o=t.decodePacket(u,n,!0),m.type==o.type&&m.data==o.data)return r(m,0,1);var p=r(o,a+i,s);if(!1===p)return}a+=i,c=""}}return""!=c?r(m,0,1):void 0},t.encodePayloadAsArrayBuffer=function(e,n){function r(e,n){t.encodePacket(e,!0,!0,function(e){return n(null,e)})}return e.length?void c(e,r,function(e,t){var r=t.reduce(function(e,t){var n;return n="string"==typeof t?t.length:t.byteLength,e+n.toString().length+n+2},0),o=new Uint8Array(r),i=0;return t.forEach(function(e){var t="string"==typeof e,n=e;if(t){for(var r=new Uint8Array(e.length),u=0;u<e.length;u++)r[u]=e.charCodeAt(u);n=r.buffer}t?o[i++]=0:o[i++]=1;for(var c=n.byteLength.toString(),u=0;u<c.length;u++)o[i++]=parseInt(c[u]);o[i++]=255;for(var r=new Uint8Array(n),u=0;u<r.length;u++)o[i++]=r[u]}),n(o.buffer)}):n(new ArrayBuffer(0))},t.encodePayloadAsBlob=function(e,n){function r(e,n){t.encodePacket(e,!0,!0,function(e){var t=new Uint8Array(1);if(t[0]=1,"string"==typeof e){for(var r=new Uint8Array(e.length),o=0;o<e.length;o++)r[o]=e.charCodeAt(o);e=r.buffer,t[0]=0}for(var i=e instanceof ArrayBuffer?e.byteLength:e.size,u=i.toString(),c=new Uint8Array(u.length+1),o=0;o<u.length;o++)c[o]=parseInt(u[o]);if(c[u.length]=255,_){var a=new _([t.buffer,c.buffer,e]);n(null,a)}})}c(e,r,function(e,t){return n(new _(t))})},t.decodePayloadAsBinary=function(e,n,r){"function"==typeof n&&(r=n,n=null);for(var o=e,i=[],u=!1;o.byteLength>0;){for(var c=new Uint8Array(o),a=0===c[0],s="",p=1;255!=c[p];p++){if(s.length>310){u=!0;break}s+=c[p]}if(u)return r(m,0,1);o=f(o,2+s.length),s=parseInt(s);var h=f(o,0,s);if(a)try{h=String.fromCharCode.apply(null,new Uint8Array(h))}catch(l){var y=new Uint8Array(h);h="";for(var p=0;p<y.length;p++)h+=String.fromCharCode(y[p])}i.push(h),o=f(o,s)}var d=i.length;i.forEach(function(e,o){r(t.decodePacket(e,n,!0),o,d)})}}).call(t,function(){return this}())},function(e,t){e.exports=Object.keys||function(e){var t=[],n=Object.prototype.hasOwnProperty;for(var r in e)n.call(e,r)&&t.push(r);return t}},function(e,t,n){(function(t){function r(e){function n(e){if(!e)return!1;if(t.Buffer&&t.Buffer.isBuffer(e)||t.ArrayBuffer&&e instanceof ArrayBuffer||t.Blob&&e instanceof Blob||t.File&&e instanceof File)return!0;if(o(e)){for(var r=0;r<e.length;r++)if(n(e[r]))return!0}else if(e&&"object"==typeof e){e.toJSON&&(e=e.toJSON());for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&n(e[i]))return!0}return!1}return n(e)}var o=n(124);e.exports=r}).call(t,function(){return this}())},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},function(e,t){e.exports=function(e,t,n){var r=e.byteLength;if(t=t||0,n=n||r,e.slice)return e.slice(t,n);if(0>t&&(t+=r),0>n&&(n+=r),n>r&&(n=r),t>=r||t>=n||0===r)return new ArrayBuffer(0);for(var o=new Uint8Array(e),i=new Uint8Array(n-t),u=t,c=0;n>u;u++,c++)i[c]=o[u];return i.buffer}},function(e,t){!function(e){"use strict";t.encode=function(t){var n,r=new Uint8Array(t),o=r.length,i="";for(n=0;o>n;n+=3)i+=e[r[n]>>2],i+=e[(3&r[n])<<4|r[n+1]>>4],i+=e[(15&r[n+1])<<2|r[n+2]>>6],i+=e[63&r[n+2]];return o%3===2?i=i.substring(0,i.length-1)+"=":o%3===1&&(i=i.substring(0,i.length-2)+"=="),i},t.decode=function(t){var n,r,o,i,u,c=.75*t.length,a=t.length,s=0;"="===t[t.length-1]&&(c--,"="===t[t.length-2]&&c--);var f=new ArrayBuffer(c),p=new Uint8Array(f);for(n=0;a>n;n+=4)r=e.indexOf(t[n]),o=e.indexOf(t[n+1]),i=e.indexOf(t[n+2]),u=e.indexOf(t[n+3]),p[s++]=r<<2|o>>4,p[s++]=(15&o)<<4|i>>2,p[s++]=(3&i)<<6|63&u;return f}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},function(e,t){function n(e,t,n){function o(e,r){if(o.count<=0)throw new Error("after called too many times");--o.count,e?(i=!0,t(e),t=n):0!==o.count||i||t(null,r)}var i=!1;return n=n||r,o.count=e,0===e?t():o}function r(){}e.exports=n},function(e,t,n){var r;(function(e,o){!function(i){function u(e){for(var t,n,r=[],o=0,i=e.length;i>o;)t=e.charCodeAt(o++),t>=55296&&56319>=t&&i>o?(n=e.charCodeAt(o++),56320==(64512&n)?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--)):r.push(t);return r}function c(e){for(var t,n=e.length,r=-1,o="";++r<n;)t=e[r],t>65535&&(t-=65536,o+=_(t>>>10&1023|55296),t=56320|1023&t),o+=_(t);return o}function a(e){if(e>=55296&&57343>=e)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function s(e,t){return _(e>>t&63|128)}function f(e){if(0==(4294967168&e))return _(e);var t="";return 0==(4294965248&e)?t=_(e>>6&31|192):0==(4294901760&e)?(a(e),t=_(e>>12&15|224),t+=s(e,6)):0==(4292870144&e)&&(t=_(e>>18&7|240),t+=s(e,12),t+=s(e,6)),t+=_(63&e|128)}function p(e){for(var t,n=u(e),r=n.length,o=-1,i="";++o<r;)t=n[o],i+=f(t);return i}function h(){if(m>=S)throw Error("Invalid byte index");var e=255&g[m];if(m++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function l(){var e,t,n,r,o;if(m>S)throw Error("Invalid byte index");if(m==S)return!1;if(e=255&g[m],m++,0==(128&e))return e;if(192==(224&e)){var t=h();if(o=(31&e)<<6|t,o>=128)return o;throw Error("Invalid continuation byte")}if(224==(240&e)){if(t=h(),n=h(),o=(15&e)<<12|t<<6|n,o>=2048)return a(o),o;throw Error("Invalid continuation byte")}if(240==(248&e)&&(t=h(),n=h(),r=h(),o=(15&e)<<18|t<<12|n<<6|r,o>=65536&&1114111>=o))return o;throw Error("Invalid UTF-8 detected")}function y(e){g=u(e),S=g.length,m=0;for(var t,n=[];(t=l())!==!1;)n.push(t);return c(n)}var d="object"==typeof t&&t,v=("object"==typeof e&&e&&e.exports==d&&e,"object"==typeof o&&o);v.global!==v&&v.window!==v||(i=v);var g,S,m,_=String.fromCharCode,w={version:"2.0.0",encode:p,decode:y};r=function(){return w}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}(this)}).call(t,n(105)(e),function(){return this}())},function(e,t){(function(t){function n(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.buffer instanceof ArrayBuffer){var r=n.buffer;if(n.byteLength!==r.byteLength){var o=new Uint8Array(n.byteLength);o.set(new Uint8Array(r,n.byteOffset,n.byteLength)),r=o.buffer}e[t]=r}}}function r(e,t){t=t||{};var r=new i;n(e);for(var o=0;o<e.length;o++)r.append(e[o]);return t.type?r.getBlob(t.type):r.getBlob()}function o(e,t){return n(e),new Blob(e,t||{})}var i=t.BlobBuilder||t.WebKitBlobBuilder||t.MSBlobBuilder||t.MozBlobBuilder,u=function(){try{var e=new Blob(["hi"]);return 2===e.size}catch(t){return!1}}(),c=u&&function(){try{var e=new Blob([new Uint8Array([1,2])]);return 2===e.size}catch(t){return!1}}(),a=i&&i.prototype.append&&i.prototype.getBlob;e.exports=function(){return u?c?t.Blob:o:a?r:void 0}()}).call(t,function(){return this}())},function(e,t){function n(e){return e?r(e):void 0}function r(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}e.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[e]=this._callbacks[e]||[]).push(t),this},n.prototype.once=function(e,t){function n(){r.off(e,n),t.apply(this,arguments)}var r=this;return this._callbacks=this._callbacks||{},n.fn=t,this.on(e,n),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks[e];if(!n)return this;if(1==arguments.length)return delete this._callbacks[e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return this},n.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks[e];if(n){n=n.slice(0);for(var r=0,o=n.length;o>r;++r)n[r].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t){t.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){for(var t={},n=e.split("&"),r=0,o=n.length;o>r;r++){var i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}},function(e,t){e.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){"use strict";function n(e){var t="";do t=u[e%c]+t,e=Math.floor(e/c);while(e>0);return t}function r(e){var t=0;for(f=0;f<e.length;f++)t=t*c+a[e.charAt(f)];return t}function o(){var e=n(+new Date);return e!==i?(s=0,i=e):e+"."+n(s++)}for(var i,u="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),c=64,a={},s=0,f=0;c>f;f++)a[u[f]]=f;o.encode=n,o.decode=r,e.exports=o},function(e,t,n){function r(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function o(){var e=arguments,n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return e;var r="color: "+this.color;e=[e[0],r,"color: inherit"].concat(Array.prototype.slice.call(e,1));var o=0,i=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))}),e.splice(i,0,r),e}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function u(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(n){}}function c(){var e;try{e=t.storage.debug}catch(n){}return e}function a(){try{return window.localStorage}catch(e){}}t=e.exports=n(135),t.log=i,t.formatArgs=o,t.save=u,t.load=c,t.useColors=r,t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:a(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){return JSON.stringify(e)},t.enable(c())},function(e,t,n){function r(){return t.colors[f++%t.colors.length]}function o(e){function n(){}function o(){var e=o,n=+new Date,i=n-(s||n);e.diff=i,e.prev=s,e.curr=n,s=n,null==e.useColors&&(e.useColors=t.useColors()),null==e.color&&e.useColors&&(e.color=r());var u=Array.prototype.slice.call(arguments);u[0]=t.coerce(u[0]),"string"!=typeof u[0]&&(u=["%o"].concat(u));var c=0;u[0]=u[0].replace(/%([a-z%])/g,function(n,r){if("%%"===n)return n;c++;var o=t.formatters[r];if("function"==typeof o){var i=u[c];n=o.call(e,i),u.splice(c,1),c--}return n}),"function"==typeof t.formatArgs&&(u=t.formatArgs.apply(e,u));var a=o.log||t.log||console.log.bind(console);a.apply(e,u)}n.enabled=!1,o.enabled=!0;var i=t.enabled(e)?o:n;return i.namespace=e,i}function i(e){t.save(e);for(var n=(e||"").split(/[\s,]+/),r=n.length,o=0;r>o;o++)n[o]&&(e=n[o].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))}function u(){t.enable("")}function c(e){var n,r;for(n=0,r=t.skips.length;r>n;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;r>n;n++)if(t.names[n].test(e))return!0;return!1}function a(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=o,t.coerce=a,t.disable=u,t.enable=i,t.enabled=c,t.humanize=n(136),t.names=[],t.skips=[],t.formatters={};var s,f=0},function(e,t){function n(e){if(e=""+e,!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*f;case"days":case"day":case"d":return n*s;case"hours":case"hour":case"hrs":case"hr":case"h":return n*a;case"minutes":case"minute":case"mins":case"min":case"m":return n*c;case"seconds":case"second":case"secs":case"sec":case"s":return n*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}}}function r(e){return e>=s?Math.round(e/s)+"d":e>=a?Math.round(e/a)+"h":e>=c?Math.round(e/c)+"m":e>=u?Math.round(e/u)+"s":e+"ms"}function o(e){return i(e,s,"day")||i(e,a,"hour")||i(e,c,"minute")||i(e,u,"second")||e+" ms"}function i(e,t,n){return t>e?void 0:1.5*t>e?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var u=1e3,c=60*u,a=60*c,s=24*a,f=365.25*s;e.exports=function(e,t){return t=t||{},"string"==typeof e?n(e):t["long"]?o(e):r(e)}},function(e,t,n){(function(t){function r(){}function o(e){i.call(this,e),this.query=this.query||{},c||(t.___eio||(t.___eio=[]),c=t.___eio),this.index=c.length;var n=this;c.push(function(e){n.onData(e)}),this.query.j=this.index,t.document&&t.addEventListener&&t.addEventListener("beforeunload",function(){n.script&&(n.script.onerror=r)},!1)}var i=n(119),u=n(132);e.exports=o;var c,a=/\n/g,s=/\\n/g;u(o,i),o.prototype.supportsBinary=!1,o.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),i.prototype.doClose.call(this)},o.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(t,n):(document.head||document.body).appendChild(t),this.script=t;var r="undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent);r&&setTimeout(function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)},100)},o.prototype.doWrite=function(e,t){function n(){r(),t()}function r(){if(o.iframe)try{o.form.removeChild(o.iframe)}catch(e){o.onError("jsonp polling iframe removal error",e)}try{var t='<iframe src="javascript:0" name="'+o.iframeId+'">';i=document.createElement(t)}catch(e){i=document.createElement("iframe"),i.name=o.iframeId,i.src="javascript:0"}i.id=o.iframeId,o.form.appendChild(i),o.iframe=i}var o=this;if(!this.form){var i,u=document.createElement("form"),c=document.createElement("textarea"),f=this.iframeId="eio_iframe_"+this.index;u.className="socketio",u.style.position="absolute",u.style.top="-1000px",u.style.left="-1000px",u.target=f,u.method="POST",u.setAttribute("accept-charset","utf-8"),c.name="d",u.appendChild(c),document.body.appendChild(u),this.form=u,this.area=c}this.form.action=this.uri(),r(),e=e.replace(s,"\\\n"),this.area.value=e.replace(a,"\\n");try{this.form.submit()}catch(p){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){
"complete"==o.iframe.readyState&&n()}:this.iframe.onload=n}}).call(t,function(){return this}())},function(e,t,n){(function(t){function r(e){var t=e&&e.forceBase64;t&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,o.call(this,e)}var o=n(120),i=n(121),u=n(131),c=n(132),a=n(133),s=n(134)("engine.io-client:websocket"),f=t.WebSocket||t.MozWebSocket,p=f;if(!p&&"undefined"==typeof window)try{p=n(139)}catch(h){}e.exports=r,c(r,o),r.prototype.name="websocket",r.prototype.supportsBinary=!0,r.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=void 0,n={agent:this.agent,perMessageDeflate:this.perMessageDeflate};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(n.headers=this.extraHeaders),this.ws=f?new p(e):new p(e,t,n),void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="buffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},r.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},"undefined"!=typeof navigator&&/iPad|iPhone|iPod/i.test(navigator.userAgent)&&(r.prototype.onData=function(e){var t=this;setTimeout(function(){o.prototype.onData.call(t,e)},0)}),r.prototype.write=function(e){function n(){r.emit("flush"),setTimeout(function(){r.writable=!0,r.emit("drain")},0)}var r=this;this.writable=!1;for(var o=e.length,u=0,c=o;c>u;u++)!function(e){i.encodePacket(e,r.supportsBinary,function(i){if(!f){var u={};if(e.options&&(u.compress=e.options.compress),r.perMessageDeflate){var c="string"==typeof i?t.Buffer.byteLength(i):i.length;c<r.perMessageDeflate.threshold&&(u.compress=!1)}}try{f?r.ws.send(i):r.ws.send(i,u)}catch(a){s("websocket closed before onclose event")}--o||n()})}(e[u])},r.prototype.onClose=function(){o.prototype.onClose.call(this)},r.prototype.doClose=function(){"undefined"!=typeof this.ws&&this.ws.close()},r.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",n="";this.port&&("wss"==t&&443!=this.port||"ws"==t&&80!=this.port)&&(n=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=a()),this.supportsBinary||(e.b64=1),e=u.encode(e),e.length&&(e="?"+e);var r=-1!==this.hostname.indexOf(":");return t+"://"+(r?"["+this.hostname+"]":this.hostname)+n+this.path+e},r.prototype.check=function(){return!(!p||"__initialize"in p&&this.name===r.prototype.name)}}).call(t,function(){return this}())},function(e,t){},function(e,t){var n=[].indexOf;e.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}},function(e,t){(function(t){var n=/^[\],:{}\s]*$/,r=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,o=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,i=/(?:^|:|,)(?:\s*\[)+/g,u=/^\s+/,c=/\s+$/;e.exports=function(e){return"string"==typeof e&&e?(e=e.replace(u,"").replace(c,""),t.JSON&&JSON.parse?JSON.parse(e):n.test(e.replace(r,"@").replace(o,"]").replace(i,""))?new Function("return "+e)():void 0):null}}).call(t,function(){return this}())},function(e,t,n){function r(e,t){this.io=e,this.nsp=t,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.io.autoConnect&&this.open()}var o=n(100),i=n(143),u=n(144),c=n(145),a=n(146),s=n(97)("socket.io-client:socket"),f=n(147);e.exports=t=r;var p={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},h=i.prototype.emit;i(r.prototype),r.prototype.subEvents=function(){if(!this.subs){var e=this.io;this.subs=[c(e,"open",a(this,"onopen")),c(e,"packet",a(this,"onpacket")),c(e,"close",a(this,"onclose"))]}},r.prototype.open=r.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"==this.io.readyState&&this.onopen(),this.emit("connecting"),this)},r.prototype.send=function(){var e=u(arguments);return e.unshift("message"),this.emit.apply(this,e),this},r.prototype.emit=function(e){if(p.hasOwnProperty(e))return h.apply(this,arguments),this;var t=u(arguments),n=o.EVENT;f(t)&&(n=o.BINARY_EVENT);var r={type:n,data:t};return r.options={},r.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof t[t.length-1]&&(s("emitting packet with ack id %d",this.ids),this.acks[this.ids]=t.pop(),r.id=this.ids++),this.connected?this.packet(r):this.sendBuffer.push(r),delete this.flags,this},r.prototype.packet=function(e){e.nsp=this.nsp,this.io.packet(e)},r.prototype.onopen=function(){s("transport is open - connecting"),"/"!=this.nsp&&this.packet({type:o.CONNECT})},r.prototype.onclose=function(e){s("close (%s)",e),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",e)},r.prototype.onpacket=function(e){if(e.nsp==this.nsp)switch(e.type){case o.CONNECT:this.onconnect();break;case o.EVENT:this.onevent(e);break;case o.BINARY_EVENT:this.onevent(e);break;case o.ACK:this.onack(e);break;case o.BINARY_ACK:this.onack(e);break;case o.DISCONNECT:this.ondisconnect();break;case o.ERROR:this.emit("error",e.data)}},r.prototype.onevent=function(e){var t=e.data||[];s("emitting event %j",t),null!=e.id&&(s("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?h.apply(this,t):this.receiveBuffer.push(t)},r.prototype.ack=function(e){var t=this,n=!1;return function(){if(!n){n=!0;var r=u(arguments);s("sending ack %j",r);var i=f(r)?o.BINARY_ACK:o.ACK;t.packet({type:i,id:e,data:r})}}},r.prototype.onack=function(e){var t=this.acks[e.id];"function"==typeof t?(s("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):s("bad ack %s",e.id)},r.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},r.prototype.emitBuffered=function(){var e;for(e=0;e<this.receiveBuffer.length;e++)h.apply(this,this.receiveBuffer[e]);for(this.receiveBuffer=[],e=0;e<this.sendBuffer.length;e++)this.packet(this.sendBuffer[e]);this.sendBuffer=[]},r.prototype.ondisconnect=function(){s("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},r.prototype.destroy=function(){if(this.subs){for(var e=0;e<this.subs.length;e++)this.subs[e].destroy();this.subs=null}this.io.destroy(this)},r.prototype.close=r.prototype.disconnect=function(){return this.connected&&(s("performing disconnect (%s)",this.nsp),this.packet({type:o.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},r.prototype.compress=function(e){return this.flags=this.flags||{},this.flags.compress=e,this}},function(e,t){function n(e){return e?r(e):void 0}function r(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}e.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},n.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return this},n.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n){n=n.slice(0);for(var r=0,o=n.length;o>r;++r)n[r].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t){function n(e,t){var n=[];t=t||0;for(var r=t||0;r<e.length;r++)n[r-t]=e[r];return n}e.exports=n},function(e,t){function n(e,t,n){return e.on(t,n),{destroy:function(){e.removeListener(t,n)}}}e.exports=n},function(e,t){var n=[].slice;e.exports=function(e,t){if("string"==typeof t&&(t=e[t]),"function"!=typeof t)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return t.apply(e,r.concat(n.call(arguments)))}}},function(e,t,n){(function(t){function r(e){function n(e){if(!e)return!1;if(t.Buffer&&t.Buffer.isBuffer&&t.Buffer.isBuffer(e)||t.ArrayBuffer&&e instanceof ArrayBuffer||t.Blob&&e instanceof Blob||t.File&&e instanceof File)return!0;if(o(e)){for(var r=0;r<e.length;r++)if(n(e[r]))return!0}else if(e&&"object"==typeof e){e.toJSON&&"function"==typeof e.toJSON&&(e=e.toJSON());for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&n(e[i]))return!0}return!1}return n(e)}var o=n(148);e.exports=r}).call(t,function(){return this}())},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(151),i=r(o),u=n(92),c=r(u),a=n(37),s=r(a),f=n(61),p=r(f),h=n(62),l=r(h),y=n(156),d=n(63).EventEmitter,v=(n(64).create("orbit-db.OrbitDB"),n(159)),g=n(233),S=(n(256),n(266)),m=function(){function e(t,n){(0,p["default"])(this,e),this._ipfs=t,this._logs={},this.events={},this.options=n||{},this.lastWrite=null,this._cached=[],this._state={}}return(0,l["default"])(e,[{key:"use",value:function(e,t){var n=this;return this.user=t,this._state[e]=!0,new s["default"](function(t,r){v.create(n._ipfs,n.user.username).then(function(o){n._logs[e]=o,n.events[e]=new d,n.options.cacheFile?(S.loadCache(n.options.cacheFile),n.sync(e,S.get(e)).then(function(){n._state[e]=!1,t()})["catch"](r)):t()})["catch"](r)})}},{key:"sync",value:function(e,t){var n=this;return new s["default"](function(r,o){t&&t!==n.lastWrite&&n._logs[e]?!function(){n.events[e].emit("load","sync",e);var i=n._logs[e].items.length;v.fromIpfsHash(n._ipfs,t).then(function(u){n._logs[e].join(u).then(function(u){var c=n._logs[e].items.length-i;c>0?(S.set(e,t),n._cacheOperations(n._logs[e]).then(function(){n.events[e].emit("sync",e,t),n.events[e].emit("loaded","sync",e),r()})["catch"](o)):(n.events[e].emit("loaded","sync",e),r())})})}():(n.events[e].emit("loaded","sync",e),r())})}},{key:"query",value:function(e,t,n){this.events[e].emit("load","query",e),n||(n={}),this._cached||(this._cached=[]);var r=y(this._logs[e].items),o=n.limit?n.limit>-1?n.limit:this._logs[e].items.length:1,i=[];i=n.key?this._read(r.reverse(),n.key,1,!0).map(function(e){return e.value}):n.gt||n.gte?this._read(r,n.gt?n.gt:n.gte,o,n.gte?n.gte:!1):this._read(r.reverse(),n.lt?n.lt:n.lte,o,n.lte||!n.lt).reverse(),n.reverse&&i.reverse();var u=i.toArray();return this.events[e].emit("loaded","query",e),u}},{key:"add",value:function(e,t,n){return this._write(e,t,g.Types.Add,null,n)}},{key:"put",value:function(e,t,n,r){return this._write(e,t,g.Types.Put,n,r)}},{key:"del",value:function(e,t,n){return this._write(e,t,g.Types.Delete,n)}},{key:"deleteChannel",value:function(e,t){return this._logs[e]?(this._logs[e].clear(),!0):!1}},{key:"_cacheOperations",value:function(t){var n=this;return new s["default"](function(r,o){var i=t.items.map(function(e){return e.payload}).filter(function(e){return void 0===y(n._cached).find(function(t){return t.hash===e.payload})}),u=i.map(function(t){return e.fetchPayload(n._ipfs,t)});s["default"].all(u).then(function(e){e.forEach(function(e){return n._cached.push(e)}),r()})["catch"](o)})}},{key:"_read",value:function(e,t,n,r){var o=this,i=[],u=function(e){return-1===y(i).indexOf(e.key)&&(i.push(e.key),g.Types.isInsert(e.op))?e:null};return e.map(function(e){return y(o._cached).find(function(t){return t.hash===e.payload})}).compact().skipWhile(function(e){return t&&e.key!==t}).map(function(e){return e}).map(u).compact().drop(r?0:1).take(n)}},{key:"_write",value:function(e,t,n,r,o){var u=this;return new s["default"](function(t,a){g.create(u._ipfs,u._logs[e],u.user,n,r,o).then(function(n){v.getIpfsHash(u._ipfs,u._logs[e]).then(function(r){u.lastWrite=r,S.set(e,r);var o=JSON.parse((0,c["default"])(n.op));(0,i["default"])(o,{hash:n.node.payload}),null===o.key&&(0,i["default"])(o,{key:n.node.payload}),u._cached.push(o),u.events[e].emit("write",e,r),t(n.node.payload)})})["catch"](a)})}}],[{key:"fetchPayload",value:function(e,t){return new s["default"](function(n,r){e.object.get(t).then(function(e){var r=JSON.parse(e.Data);(0,i["default"])(r,{hash:t}),null===r.key&&(0,i["default"])(r,{key:t}),n(r)})["catch"](r)})}}]),e}();e.exports=m},function(e,t,n){e.exports={"default":n(152),__esModule:!0}},function(e,t,n){n(153),e.exports=n(15).Object.assign},function(e,t,n){var r=n(13);r(r.S+r.F,"Object",{assign:n(154)})},function(e,t,n){var r=n(4),o=n(155),i=n(35);e.exports=n(22)(function(){var e=Object.assign,t={},n={},r=Symbol(),o="abcdefghijklmnopqrst";return t[r]=7,o.split("").forEach(function(e){n[e]=e}),7!=e({},t)[r]||Object.keys(e({},n)).join("")!=o})?function(e,t){for(var n=o(e),u=arguments,c=u.length,a=1,s=r.getKeys,f=r.getSymbols,p=r.isEnum;c>a;)for(var h,l=i(u[a++]),y=f?s(l).concat(f(l)):s(l),d=y.length,v=0;d>v;)p.call(l,h=y[v++])&&(n[h]=l[h]);return n}:Object.assign},function(e,t,n){var r=n(10);e.exports=function(e){return Object(r(e))}},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(setImmediate,clearImmediate){!function(e,t){__WEBPACK_AMD_DEFINE_FACTORY__=t,__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof __WEBPACK_AMD_DEFINE_FACTORY__?__WEBPACK_AMD_DEFINE_FACTORY__.call(exports,__webpack_require__,exports,module):__WEBPACK_AMD_DEFINE_FACTORY__,!(void 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))}(this,function(context){function Lazy(e){if(e instanceof Array)return new ArrayWrapper(e);if("string"==typeof e)return new StringWrapper(e);if(e instanceof Sequence)return e;if(Lazy.extensions){for(var t,n=Lazy.extensions,r=n.length;!t&&r--;)t=n[r](e);if(t)return t}return new ObjectWrapper(e)}function Sequence(){}function Iterator(e){this.sequence=e,this.index=-1}function MemoizedSequence(e){this.parent=e}function MappedSequence(e,t){this.parent=e,this.mapFn=t}function MappingIterator(e,t){this.iterator=e.getIterator(),this.mapFn=t,this.index=-1}function FilteredSequence(e,t){this.parent=e,this.filterFn=t}function FilteringIterator(e,t){this.iterator=e.getIterator(),this.filterFn=t,this.index=0}function ReversedSequence(e){this.parent=e}function ReversedIterator(e){this.sequence=e}function ConcatenatedSequence(e,t){this.parent=e,this.arrays=t}function TakeSequence(e,t){this.parent=e,this.count=t}function TakeIterator(e,t){this.iterator=e.getIterator(),this.count=t}function TakeWhileSequence(e,t){this.parent=e,this.predicate=t}function InitialSequence(e,t){this.parent=e,this.count="number"==typeof t?t:1}function DropSequence(e,t){this.parent=e,this.count="number"==typeof t?t:1}function DropWhileSequence(e,t){this.parent=e,this.predicate=t}function SortedSequence(e,t){this.parent=e,this.sortFn=t}function GroupedSequence(e,t,n){this.parent=e,this.keyFn=t,this.valFn=n}function IndexedSequence(e,t,n){this.parent=e,this.keyFn=t,this.valFn=n}function CountedSequence(e,t){this.parent=e,this.keyFn=t}function UniqueSequence(e,t){this.parent=e,this.keyFn=t}function ZippedSequence(e,t){this.parent=e,this.arrays=t}function ShuffledSequence(e){this.parent=e}function FlattenedSequence(e){this.parent=e}function WithoutSequence(e,t){this.parent=e,this.values=t}function IntersectionSequence(e,t){this.parent=e,this.arrays=t}function UniqueMemoizer(e){this.iterator=e,this.set=new Set,this.memo=[],this.currentValue=void 0}function ChunkedSequence(e,t){this.parent=e,this.chunkSize=t}function ChunkedIterator(e,t){this.iterator=e.getIterator(),this.size=t}function TappedSequence(e,t){this.parent=e,this.callback=t}function SimpleIntersectionSequence(e,t){this.parent=e,this.array=t,this.each=getEachForIntersection(t)}function getEachForIntersection(e){return e.length<40?SimpleIntersectionSequence.prototype.eachArrayCache:SimpleIntersectionSequence.prototype.eachMemoizerCache}function SimpleZippedSequence(e,t){this.parent=e,this.array=t}function ArrayLikeSequence(){}function IndexedIterator(e){this.sequence=e,this.index=-1}function IndexedMappedSequence(e,t){this.parent=e,this.mapFn=t}function IndexedFilteredSequence(e,t){this.parent=e,this.filterFn=t}function IndexedReversedSequence(e){this.parent=e}function IndexedTakeSequence(e,t){this.parent=e,this.count=t}function IndexedDropSequence(e,t){this.parent=e,this.count="number"==typeof t?t:1}function IndexedConcatenatedSequence(e,t){this.parent=e,this.other=t}function IndexedUniqueSequence(e,t){this.parent=e,this.each=getEachForParent(e),this.keyFn=t}function getEachForParent(e){return e.length()<100?IndexedUniqueSequence.prototype.eachArrayCache:UniqueSequence.prototype.each}function ArrayWrapper(e){this.source=e}function MappedArrayWrapper(e,t){this.parent=e,this.mapFn=t}function FilteredArrayWrapper(e,t){this.parent=e,this.filterFn=t}function UniqueArrayWrapper(e,t){this.parent=e,this.each=getEachForSource(e.source),this.keyFn=t}function getEachForSource(e){return e.length<40?UniqueArrayWrapper.prototype.eachNoCache:e.length<100?UniqueArrayWrapper.prototype.eachArrayCache:UniqueArrayWrapper.prototype.eachSetCache}function ConcatArrayWrapper(e,t){this.parent=e,this.other=t}function ObjectLikeSequence(){}function FilteredObjectLikeSequence(e,t){this.parent=e,this.filterFn=t}function AssignSequence(e,t){this.parent=e,this.other=t}function DefaultsSequence(e,t){this.parent=e,this.defaults=t}function InvertedSequence(e){this.parent=e}function MergedSequence(e,t,n){this.parent=e,this.others=t,this.mergeFn=n}function mergeObjects(e,t){var n,r;if("undefined"==typeof t)return e;if(isVanillaObject(e)&&isVanillaObject(t))n={};else{if(!(e instanceof Array&&t instanceof Array))return t;n=[]}for(r in e)n[r]=mergeObjects(e[r],t[r]);for(r in t)n[r]||(n[r]=t[r]);return n}function isVanillaObject(e){return e&&e.constructor===Object}function PickSequence(e,t){this.parent=e,this.properties=t}function OmitSequence(e,t){this.parent=e,this.properties=t}function ObjectWrapper(e){this.source=e}function StringLikeSequence(){}function CharIterator(e){this.source=Lazy(e),this.index=-1}function StringSegment(e,t,n){this.parent=e,this.start=Math.max(0,t),this.stop=n}function MappedStringLikeSequence(e,t){this.parent=e,this.mapFn=t}function ReversedStringLikeSequence(e){this.parent=e}function StringMatchSequence(e,t){this.parent=e,this.pattern=t}function StringMatchIterator(e,t){this.source=e,this.pattern=cloneRegex(t)}function SplitStringSequence(e,t){this.parent=e,this.pattern=t}function SplitWithRegExpIterator(e,t){this.source=e,this.pattern=cloneRegex(t)}function SplitWithStringIterator(e,t){this.source=e,this.delimiter=t}function StringWrapper(e){this.source=e}function GeneratedSequence(e,t){this.get=e,this.fixedLength=t}function GeneratedIterator(e){this.sequence=e,this.index=0,this.currentValue=null}function AsyncSequence(e,t){if(e instanceof AsyncSequence)throw new Error("Sequence is already asynchronous!");this.parent=e,this.interval=t,this.onNextCallback=getOnNextCallback(t),this.cancelCallback=getCancelCallback(t)}function AsyncHandle(e){this.resolveListeners=[],this.rejectListeners=[],this.state=PENDING,this.cancelFn=e}function resolve(e,t){if(e===t)return void e._reject(new TypeError("Cannot resolve a promise to itself"));if(t instanceof AsyncHandle)return void t.then(function(t){resolve(e,t)},function(t){e._reject(t)});var n;try{n=/function|object/.test(typeof t)&&null!=t&&t.then}catch(r){return void e._reject(r)}var o=PENDING;if("function"!=typeof n)e._resolve(t);else try{n.call(t,function(t){o===PENDING&&(o=RESOLVED,resolve(e,t))},function(t){o===PENDING&&(o=REJECTED,e._reject(t))})}catch(r){if(o!==PENDING)return;e._reject(r)}}function consumeListeners(e,t,n){n||(n=getOnNextCallback()),n(function(){e.length>0&&(e.shift()(t),consumeListeners(e,t,n))})}function getOnNextCallback(e){return"undefined"==typeof e&&"function"==typeof setImmediate?setImmediate:(e=e||0,function(t){return setTimeout(t,e)})}function getCancelCallback(e){return"undefined"==typeof e&&"function"==typeof clearImmediate?clearImmediate:clearTimeout}function transform(e,t){return t instanceof AsyncHandle?t.then(function(){e(t)}):e(t)}function WatchedPropertySequence(e,t){this.listeners=[],t?t instanceof Array||(t=[t]):t=Lazy(e).keys().toArray();var n=this.listeners,r=0;Lazy(t).each(function(t){var o=e[t];Object.defineProperty(e,t,{get:function(){return o},set:function(e){for(var i=n.length-1;i>=0;--i)n[i]({property:t,value:e},r)===!1&&n.splice(i,1);o=e,++r}})})}function StreamLikeSequence(){}function SplitStreamSequence(e,t){this.parent=e,this.delimiter=t,this.each=this.getEachForDelimiter(t)}function MatchedStreamSequence(e,t){this.parent=e,this.pattern=cloneRegex(t)}function createCallback(e,t){switch(typeof e){case"function":return e;case"string":return function(t){return t[e]};case"object":return function(t){return Lazy(e).all(function(e,n){return t[n]===e})};case"undefined":return t?function(){return t}:Lazy.identity;default:throw new Error("Don't know how to make a callback from a "+typeof e+"!")}}function createComparator(e,t){return e?(e=createCallback(e),function(t,n){return compare(e(t),e(n))}):compare}function reverseArguments(e){return function(t,n){return e(n,t)}}function createSet(e){var t=new Set;return Lazy(e||[]).flatten().each(function(e){t.add(e)}),t}function compare(e,t){return e===t?0:e>t?1:-1}function forEach(e,t){for(var n=-1,r=e.length;++n<r;)if(t(e[n],n)===!1)return!1;return!0}function getFirst(e){var t;return e.each(function(e){return t=e,!1}),t}function arrayContains(e,t){var n=-1,r=e.length;if(t!==t){for(;++n<r;)if(e[n]!==e[n])return!0;return!1}for(;++n<r;)if(e[n]===t)return!0;return!1}function arrayContainsBefore(e,t,n,r){var o=-1;if(r){for(r=createCallback(r);++o<n;)if(r(e[o])===r(t))return!0}else for(;++o<n;)if(e[o]===t)return!0;return!1}function swap(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function cloneRegex(pattern){return eval(""+pattern+(pattern.global?"":"g"))}function Set(){this.table={},this.objects=[]}function Queue(e){this.contents=new Array(e),this.start=0,this.count=0}function defineSequenceType(e,t,n){var r=function(){};r.prototype=new e;for(var o in n)r.prototype[o]=n[o];for(var i=function(){var e=new r;return e.parent=this,e.init&&e.init.apply(e,arguments),e},u="string"==typeof t?[t]:t,c=0;c<u.length;++c)e.prototype[u[c]]=i;return r}Lazy.VERSION="0.4.2",Lazy.noop=function(){},Lazy.identity=function(e){return e},Lazy.strict=function(){function e(e){if(null==e)throw new Error("You cannot wrap null or undefined using Lazy.");if("number"==typeof e||"boolean"==typeof e)throw new Error("You cannot wrap primitive values using Lazy.");return Lazy(e)}return Lazy(Lazy).each(function(t,n){e[n]=t}),e},Sequence.define=function(e,t){if(!t||!t.getIterator&&!t.each)throw new Error("A custom sequence must implement *at least* getIterator or each!");return defineSequenceType(Sequence,e,t)},Sequence.prototype.size=function(){return this.getIndex().length()},Sequence.prototype.getIterator=function(){return new Iterator(this)},Sequence.prototype.root=function(){return this.parent.root()},Sequence.prototype.isAsync=function(){return this.parent?this.parent.isAsync():!1},Sequence.prototype.value=function(){return this.toArray()},Sequence.prototype.apply=function(e){var t,n=this.root(),r=n.source;try{n.source=e,t=this.value()}finally{n.source=r}return t},Iterator.prototype.current=function(){return this.cachedIndex&&this.cachedIndex.get(this.index)},Iterator.prototype.moveNext=function(){var e=this.cachedIndex;return e||(e=this.cachedIndex=this.sequence.getIndex()),this.index>=e.length()-1?!1:(++this.index,!0)},Sequence.prototype.toArray=function(){return this.reduce(function(e,t){return e.push(t),e},[])},Sequence.prototype.getIndex=function(){return new ArrayWrapper(this.toArray())},Sequence.prototype.get=function(e){var t;return this.each(function(n,r){return r===e?(t=n,!1):void 0}),t},Sequence.prototype.memoize=function(){return new MemoizedSequence(this)},Sequence.prototype.toObject=function(){return this.reduce(function(e,t){return e[t[0]]=t[1],e},{})},Sequence.prototype.each=function(e){for(var t=this.getIterator(),n=-1;t.moveNext();)if(e(t.current(),++n)===!1)return!1;return!0},Sequence.prototype.forEach=function(e){return this.each(e)},Sequence.prototype.map=function(e){return new MappedSequence(this,createCallback(e))},Sequence.prototype.collect=function(e){return this.map(e)},MappedSequence.prototype=new Sequence,MappedSequence.prototype.getIterator=function(){return new MappingIterator(this.parent,this.mapFn)},MappedSequence.prototype.each=function(e){var t=this.mapFn;return this.parent.each(function(n,r){return e(t(n,r),r)})},MappingIterator.prototype.current=function(){return this.mapFn(this.iterator.current(),this.index)},MappingIterator.prototype.moveNext=function(){return this.iterator.moveNext()?(++this.index,!0):!1},Sequence.prototype.pluck=function(e){return this.map(e)},Sequence.prototype.invoke=function(e){return this.map(function(t){return t[e]()})},Sequence.prototype.filter=function(e){return new FilteredSequence(this,createCallback(e))},Sequence.prototype.select=function(e){return this.filter(e)},FilteredSequence.prototype=new Sequence,FilteredSequence.prototype.getIterator=function(){return new FilteringIterator(this.parent,this.filterFn)},FilteredSequence.prototype.each=function(e){var t=this.filterFn,n=0;return this.parent.each(function(r,o){return t(r,o)?e(r,n++):void 0})},FilteredSequence.prototype.reverse=function(){return this.parent.reverse().filter(this.filterFn)},FilteringIterator.prototype.current=function(){return this.value},FilteringIterator.prototype.moveNext=function(){for(var e,t=this.iterator,n=this.filterFn;t.moveNext();)if(e=t.current(),n(e,this.index++))return this.value=e,!0;return this.value=void 0,!1},Sequence.prototype.reject=function(e){return e=createCallback(e),this.filter(function(t){return!e(t)})},Sequence.prototype.ofType=function(e){return this.filter(function(t){return typeof t===e})},Sequence.prototype.where=function(e){return this.filter(e)},Sequence.prototype.reverse=function(){return new ReversedSequence(this)},ReversedSequence.prototype=new Sequence,ReversedSequence.prototype.getIterator=function(){return new ReversedIterator(this.parent)},ReversedIterator.prototype.current=function(){return this.getIndex().get(this.index)},ReversedIterator.prototype.moveNext=function(){var e=this.getIndex(),t=e.length();return"undefined"==typeof this.index&&(this.index=t),--this.index>=0},ReversedIterator.prototype.getIndex=function(){return this.cachedIndex||(this.cachedIndex=this.sequence.getIndex()),this.cachedIndex},Sequence.prototype.concat=function(e){return new ConcatenatedSequence(this,arraySlice.call(arguments,0))},ConcatenatedSequence.prototype=new Sequence,ConcatenatedSequence.prototype.each=function(e){var t=!1,n=0;this.parent.each(function(r){return e(r,n++)===!1?(t=!0,!1):void 0}),t||Lazy(this.arrays).flatten().each(function(t){return e(t,n++)===!1?!1:void 0})},Sequence.prototype.first=function(e){return"undefined"==typeof e?getFirst(this):new TakeSequence(this,e)},Sequence.prototype.head=Sequence.prototype.take=function(e){return this.first(e)},TakeSequence.prototype=new Sequence,TakeSequence.prototype.getIterator=function(){return new TakeIterator(this.parent,this.count)},TakeSequence.prototype.each=function(e){var t,n=this.count,r=0,o=this.parent.each(function(o){return n>r&&(t=e(o,r++)),r>=n?!1:t});return o instanceof AsyncHandle?o:r===n&&t!==!1},TakeIterator.prototype.current=function(){return this.iterator.current()},TakeIterator.prototype.moveNext=function(){return--this.count>=0&&this.iterator.moveNext()},Sequence.prototype.takeWhile=function(e){return new TakeWhileSequence(this,e)},TakeWhileSequence.prototype=new Sequence,TakeWhileSequence.prototype.each=function(e){var t=this.predicate,n=!1,r=0,o=this.parent.each(function(o,i){return t(o,i)?e(o,r++):(n=!0,!1)});return o instanceof AsyncHandle?o:n},Sequence.prototype.initial=function(e){return new InitialSequence(this,e)},InitialSequence.prototype=new Sequence,InitialSequence.prototype.each=function(e){var t=this.parent.getIndex();return t.take(t.length()-this.count).each(e)},Sequence.prototype.last=function(e){return"undefined"==typeof e?this.reverse().first():this.reverse().take(e).reverse()},Sequence.prototype.findWhere=function(e){return this.where(e).first()},Sequence.prototype.rest=function(e){return new DropSequence(this,e)},Sequence.prototype.skip=Sequence.prototype.tail=Sequence.prototype.drop=function(e){return this.rest(e)},DropSequence.prototype=new Sequence,DropSequence.prototype.each=function(e){var t=this.count,n=0,r=0;return this.parent.each(function(o){return n++<t?void 0:e(o,r++)})},Sequence.prototype.dropWhile=function(e){return new DropWhileSequence(this,e)},Sequence.prototype.skipWhile=function(e){return this.dropWhile(e)},DropWhileSequence.prototype=new Sequence,DropWhileSequence.prototype.each=function(e){var t=this.predicate,n=!1;return this.parent.each(function(r){if(!n){if(t(r))return;n=!0}return e(r)})},Sequence.prototype.sort=function(e,t){return e||(e=compare),t&&(e=reverseArguments(e)),new SortedSequence(this,e)},Sequence.prototype.sortBy=function(e,t){return e=createComparator(e),t&&(e=reverseArguments(e)),new SortedSequence(this,e)},SortedSequence.prototype=new Sequence,SortedSequence.prototype.each=function(e){var t=this.sortFn,n=this.parent.toArray();return n.sort(t),forEach(n,e)},SortedSequence.prototype.reverse=function(){return new SortedSequence(this.parent,reverseArguments(this.sortFn))},Sequence.prototype.groupBy=function(e,t){return new GroupedSequence(this,e,t)},Sequence.prototype.indexBy=function(e,t){return new IndexedSequence(this,e,t)},Sequence.prototype.countBy=function(e){return new CountedSequence(this,e)},Sequence.prototype.uniq=function(e){return new UniqueSequence(this,e)},Sequence.prototype.unique=function(e){return this.uniq(e)},UniqueSequence.prototype=new Sequence,UniqueSequence.prototype.each=function(e){var t=new Set,n=this.keyFn,r=0;return n?(n=createCallback(n),this.parent.each(function(o){return t.add(n(o))?e(o,r++):void 0})):this.parent.each(function(n){return t.add(n)?e(n,r++):void 0})},Sequence.prototype.zip=function(e){return 1===arguments.length?new SimpleZippedSequence(this,e):new ZippedSequence(this,arraySlice.call(arguments,0))},ZippedSequence.prototype=new Sequence,ZippedSequence.prototype.each=function(e){var t=this.arrays,n=0;this.parent.each(function(r){for(var o=[r],i=0;i<t.length;++i)t[i].length>n&&o.push(t[i][n]);return e(o,n++)})},Sequence.prototype.shuffle=function(){return new ShuffledSequence(this)},ShuffledSequence.prototype=new Sequence,ShuffledSequence.prototype.each=function(e){for(var t=this.parent.toArray(),n=Math.floor,r=Math.random,o=0,i=t.length-1;i>0;--i)if(swap(t,i,n(r()*(i+1))),e(t[i],o++)===!1)return;e(t[0],o)},Sequence.prototype.flatten=function(){return new FlattenedSequence(this)},FlattenedSequence.prototype=new Sequence,
FlattenedSequence.prototype.each=function(e){var t=0;return this.parent.each(function n(r){return r instanceof Array?forEach(r,n):r instanceof Sequence?r.each(n):e(r,t++)})},Sequence.prototype.compact=function(){return this.filter(function(e){return!!e})},Sequence.prototype.without=function(e){return new WithoutSequence(this,arraySlice.call(arguments,0))},Sequence.prototype.difference=function(e){return this.without.apply(this,arguments)},WithoutSequence.prototype=new Sequence,WithoutSequence.prototype.each=function(e){var t=createSet(this.values),n=0;return this.parent.each(function(r){return t.contains(r)?void 0:e(r,n++)})},Sequence.prototype.union=function(e){return this.concat(e).uniq()},Sequence.prototype.intersection=function(e){return 1===arguments.length&&arguments[0]instanceof Array?new SimpleIntersectionSequence(this,e):new IntersectionSequence(this,arraySlice.call(arguments,0))},IntersectionSequence.prototype=new Sequence,IntersectionSequence.prototype.each=function(e){var t=Lazy(this.arrays).map(function(e){return new UniqueMemoizer(Lazy(e).getIterator())}),n=new UniqueMemoizer(t.getIterator()),r=0;return this.parent.each(function(t){var o=!0;return n.each(function(e){return e.contains(t)?void 0:(o=!1,!1)}),o?e(t,r++):void 0})},UniqueMemoizer.prototype.current=function(){return this.currentValue},UniqueMemoizer.prototype.moveNext=function(){for(var e,t=this.iterator,n=this.set,r=this.memo;t.moveNext();)if(e=t.current(),n.add(e))return r.push(e),this.currentValue=e,!0;return!1},UniqueMemoizer.prototype.each=function(e){for(var t=this.memo,n=t.length,r=-1;++r<n;)if(e(t[r],r)===!1)return!1;for(;this.moveNext()&&e(this.currentValue,r++)!==!1;);},UniqueMemoizer.prototype.contains=function(e){if(this.set.contains(e))return!0;for(;this.moveNext();)if(this.currentValue===e)return!0;return!1},Sequence.prototype.every=function(e){return e=createCallback(e),this.each(function(t,n){return!!e(t,n)})},Sequence.prototype.all=function(e){return this.every(e)},Sequence.prototype.some=function(e){e=createCallback(e,!0);var t=!1;return this.each(function(n){return e(n)?(t=!0,!1):void 0}),t},Sequence.prototype.any=function(e){return this.some(e)},Sequence.prototype.none=function(e){return!this.any(e)},Sequence.prototype.isEmpty=function(){return!this.any()},Sequence.prototype.indexOf=function(e){var t=-1;return this.each(function(n,r){return n===e?(t=r,!1):void 0}),t},Sequence.prototype.lastIndexOf=function(e){var t=this.getIndex().reverse(),n=t.indexOf(e);return-1!==n&&(n=t.length()-n-1),n},Sequence.prototype.sortedIndex=function(e){for(var t,n=this.getIndex(),r=0,o=n.length();o>r;)t=r+o>>>1,-1===compare(n.get(t),e)?r=t+1:o=t;return r},Sequence.prototype.contains=function(e){return-1!==this.indexOf(e)},Sequence.prototype.reduce=function(e,t){if(arguments.length<2)return this.tail().reduce(e,this.head());var n=this.each(function(n,r){t=e(t,n,r)});return n instanceof AsyncHandle?n.then(function(){return t}):t},Sequence.prototype.inject=Sequence.prototype.foldl=function(e,t){return this.reduce(e,t)},Sequence.prototype.reduceRight=function(e,t){if(arguments.length<2)return this.initial(1).reduceRight(e,this.last());var n=this.getIndex(),r=n.length()-1;return n.reverse().reduce(function(t,n){return e(t,n,r--)},t)},Sequence.prototype.foldr=function(e,t){return this.reduceRight(e,t)},Sequence.prototype.consecutive=function(e){var t=new Queue(e),n=this.map(function(n){return t.add(n).count===e?t.toArray():void 0});return n.compact()},Sequence.prototype.chunk=function(e){if(1>e)throw new Error("You must specify a positive chunk size.");return new ChunkedSequence(this,e)},ChunkedSequence.prototype=new Sequence,ChunkedSequence.prototype.getIterator=function(){return new ChunkedIterator(this.parent,this.chunkSize)},ChunkedIterator.prototype.current=function(){return this.currentChunk},ChunkedIterator.prototype.moveNext=function(){for(var e=this.iterator,t=this.size,n=[];n.length<t&&e.moveNext();)n.push(e.current());return 0===n.length?!1:(this.currentChunk=n,!0)},Sequence.prototype.tap=function(e){return new TappedSequence(this,e)},TappedSequence.prototype=new Sequence,TappedSequence.prototype.each=function(e){var t=this.callback;return this.parent.each(function(n,r){return t(n,r),e(n,r)})},Sequence.prototype.find=function(e){return this.filter(e).first()},Sequence.prototype.detect=function(e){return this.find(e)},Sequence.prototype.min=function(e){return"undefined"!=typeof e?this.minBy(e):this.reduce(function(e,t){return e>t?t:e},1/0)},Sequence.prototype.minBy=function(e){return e=createCallback(e),this.reduce(function(t,n){return e(n)<e(t)?n:t})},Sequence.prototype.max=function(e){return"undefined"!=typeof e?this.maxBy(e):this.reduce(function(e,t){return t>e?t:e},-(1/0))},Sequence.prototype.maxBy=function(e){return e=createCallback(e),this.reduce(function(t,n){return e(n)>e(t)?n:t})},Sequence.prototype.sum=function(e){return"undefined"!=typeof e?this.sumBy(e):this.reduce(function(e,t){return e+t},0)},Sequence.prototype.sumBy=function(e){return e=createCallback(e),this.reduce(function(t,n){return t+e(n)},0)},Sequence.prototype.join=function(e){return e="string"==typeof e?e:",",this.reduce(function(t,n,r){return r>0&&(t+=e),t+n},"")},Sequence.prototype.toString=function(e){return this.join(e)},Sequence.prototype.async=function(e){return new AsyncSequence(this,e)},SimpleIntersectionSequence.prototype=new Sequence,SimpleIntersectionSequence.prototype.eachMemoizerCache=function(e){var t=new UniqueMemoizer(Lazy(this.array).getIterator()),n=0;return this.parent.each(function(r){return t.contains(r)?e(r,n++):void 0})},SimpleIntersectionSequence.prototype.eachArrayCache=function(e){var t=this.array,n=arrayContains,r=0;return this.parent.each(function(o){return n(t,o)?e(o,r++):void 0})},SimpleZippedSequence.prototype=new Sequence,SimpleZippedSequence.prototype.each=function(e){var t=this.array;return this.parent.each(function(n,r){return e([n,t[r]],r)})},ArrayLikeSequence.prototype=new Sequence,ArrayLikeSequence.define=function(e,t){if(!t||"function"!=typeof t.get)throw new Error("A custom array-like sequence must implement *at least* get!");return defineSequenceType(ArrayLikeSequence,e,t)},ArrayLikeSequence.prototype.get=function(e){return this.parent.get(e)},ArrayLikeSequence.prototype.length=function(){return this.parent.length()},ArrayLikeSequence.prototype.getIndex=function(){return this},ArrayLikeSequence.prototype.getIterator=function(){return new IndexedIterator(this)},IndexedIterator.prototype.current=function(){return this.sequence.get(this.index)},IndexedIterator.prototype.moveNext=function(){return this.index>=this.sequence.length()-1?!1:(++this.index,!0)},ArrayLikeSequence.prototype.each=function(e){for(var t=this.length(),n=-1;++n<t;)if(e(this.get(n),n)===!1)return!1;return!0},ArrayLikeSequence.prototype.pop=function(){return this.initial()},ArrayLikeSequence.prototype.shift=function(){return this.drop()},ArrayLikeSequence.prototype.slice=function(e,t){var n=this.length();0>e&&(e=n+e);var r=this.drop(e);return"number"==typeof t&&(0>t&&(t=n+t),r=r.take(t-e)),r},ArrayLikeSequence.prototype.map=function(e){return new IndexedMappedSequence(this,createCallback(e))},IndexedMappedSequence.prototype=new ArrayLikeSequence,IndexedMappedSequence.prototype.get=function(e){return 0>e||e>=this.parent.length()?void 0:this.mapFn(this.parent.get(e),e)},ArrayLikeSequence.prototype.filter=function(e){return new IndexedFilteredSequence(this,createCallback(e))},IndexedFilteredSequence.prototype=new FilteredSequence,IndexedFilteredSequence.prototype.each=function(e){for(var t,n=this.parent,r=this.filterFn,o=this.parent.length(),i=-1,u=0;++i<o;)if(t=n.get(i),r(t,i)&&e(t,u++)===!1)return!1;return!0},ArrayLikeSequence.prototype.reverse=function(){return new IndexedReversedSequence(this)},IndexedReversedSequence.prototype=new ArrayLikeSequence,IndexedReversedSequence.prototype.get=function(e){return this.parent.get(this.length()-e-1)},ArrayLikeSequence.prototype.first=function(e){return"undefined"==typeof e?this.get(0):new IndexedTakeSequence(this,e)},IndexedTakeSequence.prototype=new ArrayLikeSequence,IndexedTakeSequence.prototype.length=function(){var e=this.parent.length();return this.count<=e?this.count:e},ArrayLikeSequence.prototype.rest=function(e){return new IndexedDropSequence(this,e)},IndexedDropSequence.prototype=new ArrayLikeSequence,IndexedDropSequence.prototype.get=function(e){return this.parent.get(this.count+e)},IndexedDropSequence.prototype.length=function(){var e=this.parent.length();return this.count<=e?e-this.count:0},ArrayLikeSequence.prototype.concat=function(e){return 1===arguments.length&&arguments[0]instanceof Array?new IndexedConcatenatedSequence(this,e):Sequence.prototype.concat.apply(this,arguments)},IndexedConcatenatedSequence.prototype=new ArrayLikeSequence,IndexedConcatenatedSequence.prototype.get=function(e){var t=this.parent.length();return t>e?this.parent.get(e):this.other[e-t]},IndexedConcatenatedSequence.prototype.length=function(){return this.parent.length()+this.other.length},ArrayLikeSequence.prototype.uniq=function(e){return new IndexedUniqueSequence(this,createCallback(e))},IndexedUniqueSequence.prototype=new Sequence,IndexedUniqueSequence.prototype.eachArrayCache=function(e){for(var t,n,r=this.parent,o=this.keyFn,i=r.length(),u=[],c=arrayContains,a=-1,s=0;++a<i;)if(n=r.get(a),t=o(n),!c(u,t)&&(u.push(t),e(n,s++)===!1))return!1},IndexedUniqueSequence.prototype.eachSetCache=UniqueSequence.prototype.each,MemoizedSequence.prototype=new ArrayLikeSequence,MemoizedSequence.prototype.cache=function(){return this.cachedResult||(this.cachedResult=this.parent.toArray())},MemoizedSequence.prototype.get=function(e){return this.cache()[e]},MemoizedSequence.prototype.length=function(){return this.cache().length},MemoizedSequence.prototype.slice=function(e,t){return this.cache().slice(e,t)},MemoizedSequence.prototype.toArray=function(){return this.cache().slice(0)},ArrayWrapper.prototype=new ArrayLikeSequence,ArrayWrapper.prototype.root=function(){return this},ArrayWrapper.prototype.isAsync=function(){return!1},ArrayWrapper.prototype.get=function(e){return this.source[e]},ArrayWrapper.prototype.length=function(){return this.source.length},ArrayWrapper.prototype.each=function(e){return forEach(this.source,e)},ArrayWrapper.prototype.map=function(e){return new MappedArrayWrapper(this,createCallback(e))},ArrayWrapper.prototype.filter=function(e){return new FilteredArrayWrapper(this,createCallback(e))},ArrayWrapper.prototype.uniq=function(e){return new UniqueArrayWrapper(this,e)},ArrayWrapper.prototype.concat=function(e){return 1===arguments.length&&arguments[0]instanceof Array?new ConcatArrayWrapper(this,e):ArrayLikeSequence.prototype.concat.apply(this,arguments)},ArrayWrapper.prototype.toArray=function(){return this.source.slice(0)},MappedArrayWrapper.prototype=new ArrayLikeSequence,MappedArrayWrapper.prototype.get=function(e){var t=this.parent.source;if(!(0>e||e>=t.length))return this.mapFn(t[e])},MappedArrayWrapper.prototype.length=function(){return this.parent.source.length},MappedArrayWrapper.prototype.each=function(e){for(var t=this.parent.source,n=t.length,r=this.mapFn,o=-1;++o<n;)if(e(r(t[o],o),o)===!1)return!1;return!0},FilteredArrayWrapper.prototype=new FilteredSequence,FilteredArrayWrapper.prototype.each=function(e){for(var t,n=this.parent.source,r=this.filterFn,o=n.length,i=-1,u=0;++i<o;)if(t=n[i],r(t,i)&&e(t,u++)===!1)return!1;return!0},UniqueArrayWrapper.prototype=new Sequence,UniqueArrayWrapper.prototype.eachNoCache=function(e){for(var t,n=this.parent.source,r=this.keyFn,o=n.length,i=arrayContainsBefore,u=-1,c=0;++u<o;)if(t=n[u],!i(n,t,u,r)&&e(t,c++)===!1)return!1;return!0},UniqueArrayWrapper.prototype.eachArrayCache=function(e){var t,n,r=this.parent.source,o=this.keyFn,i=r.length,u=[],c=arrayContains,a=-1,s=0;if(o){for(o=createCallback(o);++a<i;)if(n=r[a],t=o(n),!c(u,t)&&(u.push(t),e(n,s++)===!1))return!1}else for(;++a<i;)if(n=r[a],!c(u,n)&&(u.push(n),e(n,s++)===!1))return!1;return!0},UniqueArrayWrapper.prototype.eachSetCache=UniqueSequence.prototype.each,ConcatArrayWrapper.prototype=new ArrayLikeSequence,ConcatArrayWrapper.prototype.get=function(e){var t=this.parent.source,n=t.length;return n>e?t[e]:this.other[e-n]},ConcatArrayWrapper.prototype.length=function(){return this.parent.source.length+this.other.length},ConcatArrayWrapper.prototype.each=function(e){for(var t=this.parent.source,n=t.length,r=this.other,o=r.length,i=0,u=-1;++u<n;)if(e(t[u],i++)===!1)return!1;for(u=-1;++u<o;)if(e(r[u],i++)===!1)return!1;return!0},ObjectLikeSequence.prototype=new Sequence,ObjectLikeSequence.define=function(e,t){if(!t||"function"!=typeof t.each)throw new Error("A custom object-like sequence must implement *at least* each!");return defineSequenceType(ObjectLikeSequence,e,t)},ObjectLikeSequence.prototype.value=function(){return this.toObject()},ObjectLikeSequence.prototype.get=function(e){var t=this.pairs().find(function(t){return t[0]===e});return t?t[1]:void 0},ObjectLikeSequence.prototype.keys=function(){return this.map(function(e,t){return t})},ObjectLikeSequence.prototype.values=function(){return this.map(function(e,t){return e})},ObjectLikeSequence.prototype.async=function(){throw new Error("An ObjectLikeSequence does not support asynchronous iteration.")},ObjectLikeSequence.prototype.filter=function(e){return new FilteredObjectLikeSequence(this,createCallback(e))},FilteredObjectLikeSequence.prototype=new ObjectLikeSequence,FilteredObjectLikeSequence.prototype.each=function(e){var t=this.filterFn;return this.parent.each(function(n,r){return t(n,r)?e(n,r):void 0})},ObjectLikeSequence.prototype.reverse=function(){return this},ObjectLikeSequence.prototype.assign=function(e){return new AssignSequence(this,e)},ObjectLikeSequence.prototype.extend=function(e){return this.assign(e)},AssignSequence.prototype=new ObjectLikeSequence,AssignSequence.prototype.get=function(e){return this.other[e]||this.parent.get(e)},AssignSequence.prototype.each=function(e){var t=new Set,n=!1;return Lazy(this.other).each(function(r,o){return e(r,o)===!1?(n=!0,!1):void t.add(o)}),n?void 0:this.parent.each(function(n,r){return t.contains(r)||e(n,r)!==!1?void 0:!1})},ObjectLikeSequence.prototype.defaults=function e(e){return new DefaultsSequence(this,e)},DefaultsSequence.prototype=new ObjectLikeSequence,DefaultsSequence.prototype.get=function(e){return this.parent.get(e)||this.defaults[e]},DefaultsSequence.prototype.each=function(e){var t=new Set,n=!1;this.parent.each(function(r,o){return e(r,o)===!1?(n=!0,!1):void("undefined"!=typeof r&&t.add(o))}),n||Lazy(this.defaults).each(function(n,r){return t.contains(r)||e(n,r)!==!1?void 0:!1})},ObjectLikeSequence.prototype.invert=function(){return new InvertedSequence(this)},InvertedSequence.prototype=new ObjectLikeSequence,InvertedSequence.prototype.each=function(e){this.parent.each(function(t,n){return e(n,t)})},ObjectLikeSequence.prototype.merge=function(e){var t=arguments.length>1&&"function"==typeof arguments[arguments.length-1]?arrayPop.call(arguments):null;return new MergedSequence(this,arraySlice.call(arguments,0),t)},MergedSequence.prototype=new ObjectLikeSequence,MergedSequence.prototype.each=function(e){var t=this.others,n=this.mergeFn||mergeObjects,r={},o=this.parent.each(function(o,i){var u=o;return forEach(t,function(e){i in e&&(u=n(u,e[i]))}),r[i]=!0,e(u,i)});if(o===!1)return!1;var i={};return forEach(t,function(e){for(var t in e)r[t]||(i[t]=n(i[t],e[t]))}),Lazy(i).each(e)},ObjectLikeSequence.prototype.functions=function(){return this.filter(function(e,t){return"function"==typeof e}).map(function(e,t){return t})},ObjectLikeSequence.prototype.methods=function(){return this.functions()},ObjectLikeSequence.prototype.pick=function(e){return new PickSequence(this,e)},PickSequence.prototype=new ObjectLikeSequence,PickSequence.prototype.get=function(e){return arrayContains(this.properties,e)?this.parent.get(e):void 0},PickSequence.prototype.each=function(e){var t=arrayContains,n=this.properties;return this.parent.each(function(r,o){return t(n,o)?e(r,o):void 0})},ObjectLikeSequence.prototype.omit=function(e){return new OmitSequence(this,e)},OmitSequence.prototype=new ObjectLikeSequence,OmitSequence.prototype.get=function(e){return arrayContains(this.properties,e)?void 0:this.parent.get(e)},OmitSequence.prototype.each=function(e){var t=arrayContains,n=this.properties;return this.parent.each(function(r,o){return t(n,o)?void 0:e(r,o)})},ObjectLikeSequence.prototype.pairs=function(){return this.map(function(e,t){return[t,e]})},ObjectLikeSequence.prototype.toArray=function(){return this.pairs().toArray()},ObjectLikeSequence.prototype.toObject=function(){return this.reduce(function(e,t,n){return e[n]=t,e},{})},GroupedSequence.prototype=new ObjectLikeSequence,GroupedSequence.prototype.each=function(e){var t,n=createCallback(this.keyFn),r=createCallback(this.valFn);return t=this.parent.reduce(function(e,t){var o=n(t),i=r(t);return e[o]instanceof Array?e[o].push(i):e[o]=[i],e},{}),transform(function(t){for(var n in t)if(e(t[n],n)===!1)return!1},t)},IndexedSequence.prototype=new ObjectLikeSequence,IndexedSequence.prototype.each=function(e){var t=createCallback(this.keyFn),n=createCallback(this.valFn),r={};return this.parent.each(function(o){var i=t(o),u=n(o);return r[i]?void 0:(r[i]=u,e(u,i))})},CountedSequence.prototype=new ObjectLikeSequence,CountedSequence.prototype.each=function(e){var t=createCallback(this.keyFn),n={};this.parent.each(function(e){var r=t(e);n[r]?n[r]+=1:n[r]=1});for(var r in n)if(e(n[r],r)===!1)return!1;return!0},ObjectLikeSequence.prototype.watch=function(e){throw new Error("You can only call #watch on a directly wrapped object.")},ObjectWrapper.prototype=new ObjectLikeSequence,ObjectWrapper.prototype.root=function(){return this},ObjectWrapper.prototype.isAsync=function(){return!1},ObjectWrapper.prototype.get=function(e){return this.source[e]},ObjectWrapper.prototype.each=function(e){var t,n=this.source;for(t in n)if(e(n[t],t)===!1)return!1;return!0},StringLikeSequence.prototype=new ArrayLikeSequence,StringLikeSequence.define=function(e,t){if(!t||"function"!=typeof t.get)throw new Error("A custom string-like sequence must implement *at least* get!");return defineSequenceType(StringLikeSequence,e,t)},StringLikeSequence.prototype.value=function(){return this.toString()},StringLikeSequence.prototype.getIterator=function(){return new CharIterator(this)},CharIterator.prototype.current=function(){return this.source.charAt(this.index)},CharIterator.prototype.moveNext=function(){return++this.index<this.source.length()},StringLikeSequence.prototype.charAt=function(e){return this.get(e)},StringLikeSequence.prototype.charCodeAt=function(e){var t=this.charAt(e);return t?t.charCodeAt(0):NaN},StringLikeSequence.prototype.substring=function(e,t){return new StringSegment(this,e,t)},StringSegment.prototype=new StringLikeSequence,StringSegment.prototype.get=function(e){return this.parent.get(e+this.start)},StringSegment.prototype.length=function(){return("number"==typeof this.stop?this.stop:this.parent.length())-this.start},StringLikeSequence.prototype.first=function(e){return"undefined"==typeof e?this.charAt(0):this.substring(0,e)},StringLikeSequence.prototype.last=function(e){return"undefined"==typeof e?this.charAt(this.length()-1):this.substring(this.length()-e)},StringLikeSequence.prototype.drop=function(e){return this.substring(e)},StringLikeSequence.prototype.indexOf=function(e,t){return this.toString().indexOf(e,t)},StringLikeSequence.prototype.lastIndexOf=function(e,t){return this.toString().lastIndexOf(e,t)},StringLikeSequence.prototype.contains=function(e){return-1!==this.indexOf(e)},StringLikeSequence.prototype.endsWith=function(e){return this.substring(this.length()-e.length).toString()===e},StringLikeSequence.prototype.startsWith=function(e){return this.substring(0,e.length).toString()===e},StringLikeSequence.prototype.toUpperCase=function(){return this.mapString(function(e){return e.toUpperCase()})},StringLikeSequence.prototype.toLowerCase=function(){return this.mapString(function(e){return e.toLowerCase()})},StringLikeSequence.prototype.mapString=function(e){return new MappedStringLikeSequence(this,e)},MappedStringLikeSequence.prototype=new StringLikeSequence,MappedStringLikeSequence.prototype.get=IndexedMappedSequence.prototype.get,MappedStringLikeSequence.prototype.length=IndexedMappedSequence.prototype.length,StringLikeSequence.prototype.reverse=function(){return new ReversedStringLikeSequence(this)},ReversedStringLikeSequence.prototype=new StringLikeSequence,ReversedStringLikeSequence.prototype.get=IndexedReversedSequence.prototype.get,ReversedStringLikeSequence.prototype.length=IndexedReversedSequence.prototype.length,StringLikeSequence.prototype.toString=function(){return this.join("")},StringLikeSequence.prototype.match=function(e){return new StringMatchSequence(this,e)},StringMatchSequence.prototype=new Sequence,StringMatchSequence.prototype.getIterator=function(){return new StringMatchIterator(this.parent.toString(),this.pattern)},StringMatchIterator.prototype.current=function(){return this.match[0]},StringMatchIterator.prototype.moveNext=function(){return!!(this.match=this.pattern.exec(this.source))},StringLikeSequence.prototype.split=function(e){return new SplitStringSequence(this,e)},SplitStringSequence.prototype=new Sequence,SplitStringSequence.prototype.getIterator=function(){var e=this.parent.toString();return this.pattern instanceof RegExp?""===this.pattern.source||"(?:)"===this.pattern.source?new CharIterator(e):new SplitWithRegExpIterator(e,this.pattern):""===this.pattern?new CharIterator(e):new SplitWithStringIterator(e,this.pattern)},SplitWithRegExpIterator.prototype.current=function(){return this.source.substring(this.start,this.end)},SplitWithRegExpIterator.prototype.moveNext=function(){if(!this.pattern)return!1;var e=this.pattern.exec(this.source);return e?(this.start=this.nextStart?this.nextStart:0,this.end=e.index,this.nextStart=e.index+e[0].length,!0):this.pattern?(this.start=this.nextStart,this.end=void 0,this.nextStart=void 0,this.pattern=void 0,!0):!1},SplitWithStringIterator.prototype.current=function(){return this.source.substring(this.leftIndex,this.rightIndex)},SplitWithStringIterator.prototype.moveNext=function(){return this.finished||(this.leftIndex="undefined"!=typeof this.leftIndex?this.rightIndex+this.delimiter.length:0,this.rightIndex=this.source.indexOf(this.delimiter,this.leftIndex)),-1===this.rightIndex?(this.finished=!0,this.rightIndex=void 0,!0):!this.finished},StringWrapper.prototype=new StringLikeSequence,StringWrapper.prototype.root=function(){return this},StringWrapper.prototype.isAsync=function(){return!1},StringWrapper.prototype.get=function(e){return this.source.charAt(e)},StringWrapper.prototype.length=function(){return this.source.length},StringWrapper.prototype.toString=function(){return this.source},GeneratedSequence.prototype=new Sequence,GeneratedSequence.prototype.isAsync=function(){return!1},GeneratedSequence.prototype.length=function(){return this.fixedLength},GeneratedSequence.prototype.each=function(e){for(var t=this.get,n=this.fixedLength,r=0;"undefined"==typeof n||n>r;)if(e(t(r),r++)===!1)return!1;return!0},GeneratedSequence.prototype.getIterator=function(){return new GeneratedIterator(this)},GeneratedIterator.prototype.current=function(){return this.currentValue},GeneratedIterator.prototype.moveNext=function(){var e=this.sequence;return"number"==typeof e.fixedLength&&this.index>=e.fixedLength?!1:(this.currentValue=e.get(this.index++),!0)},AsyncSequence.prototype=new Sequence,AsyncSequence.prototype.isAsync=function(){return!0},AsyncSequence.prototype.getIterator=function(){throw new Error("An AsyncSequence does not support synchronous iteration.")},AsyncSequence.prototype.each=function(e){var t=this.parent.getIterator(),n=this.onNextCallback,r=this.cancelCallback,o=0,i=new AsyncHandle(function(){u&&r(u)}),u=n(function c(){u=null;try{t.moveNext()&&e(t.current(),o++)!==!1?u=n(c):i._resolve()}catch(r){i._reject(r)}});return i};var PENDING=1,RESOLVED=2,REJECTED=3;AsyncHandle.prototype.then=function(e,t){var n=new AsyncHandle(this.cancelFn);return this.resolveListeners.push(function(t){try{if("function"!=typeof e)return void resolve(n,t);resolve(n,e(t))}catch(r){n._reject(r)}}),this.rejectListeners.push(function(e){try{if("function"!=typeof t)return void n._reject(e);resolve(n,t(e))}catch(r){n._reject(r)}}),this.state===RESOLVED&&this._resolve(this.value),this.state===REJECTED&&this._reject(this.reason),n},AsyncHandle.prototype._resolve=function(e){this.state!==REJECTED&&(this.state===PENDING&&(this.state=RESOLVED,this.value=e),consumeListeners(this.resolveListeners,this.value))},AsyncHandle.prototype._reject=function(e){this.state!==RESOLVED&&(this.state===PENDING&&(this.state=REJECTED,this.reason=e),consumeListeners(this.rejectListeners,this.reason))},AsyncHandle.prototype.cancel=function(){this.cancelFn&&(this.cancelFn(),this.cancelFn=null,this._resolve(!1))},AsyncHandle.prototype.onComplete=function(e){return this.resolveListeners.push(e),this},AsyncHandle.prototype.onError=function(e){return this.rejectListeners.push(e),this},AsyncSequence.prototype.reverse=function(){return this.parent.reverse().async()},AsyncSequence.prototype.find=function(e){var t,n=this.each(function(n,r){return e(n,r)?(t=n,!1):void 0});return n.then(function(){return t})},AsyncSequence.prototype.indexOf=function(e){var t=-1,n=this.each(function(n,r){return n===e?(t=r,!1):void 0});return n.then(function(){return t})},AsyncSequence.prototype.contains=function(e){var t=!1,n=this.each(function(n){return n===e?(t=!0,!1):void 0});return n.then(function(){return t})},AsyncSequence.prototype.async=function(){return this},ObjectWrapper.prototype.watch=function(e){return new WatchedPropertySequence(this.source,e)},WatchedPropertySequence.prototype=new AsyncSequence,WatchedPropertySequence.prototype.each=function(e){this.listeners.push(e)},StreamLikeSequence.prototype=new AsyncSequence,StreamLikeSequence.prototype.isAsync=function(){return!0},StreamLikeSequence.prototype.split=function(e){return new SplitStreamSequence(this,e)},SplitStreamSequence.prototype=new Sequence,SplitStreamSequence.prototype.getEachForDelimiter=function(e){return e instanceof RegExp?this.regexEach:this.stringEach},SplitStreamSequence.prototype.regexEach=function(e){var t,n=cloneRegex(this.delimiter),r="",o=0,i=0,u=this.parent.each(function(u){r+=u;for(var c;c=n.exec(r);){if(t=c.index,e(r.substring(o,t),i++)===!1)return!1;o=t+c[0].length}r=r.substring(o),o=0});return u.onComplete(function(){r.length>0&&e(r,i++)}),u},SplitStreamSequence.prototype.stringEach=function(e){var t=this.delimiter,n=0,r="",o=this.parent.each(function(o){r+=o;for(var i;(i=r.indexOf(t))>=0;){var u=r.substr(0,i);if(r=r.substr(i+t.length),e(u,n++)===!1)return!1}return!0});return o.onComplete(function(){e(r,n++)}),o},StreamLikeSequence.prototype.lines=function(){return this.split("\n")},StreamLikeSequence.prototype.match=function(e){return new MatchedStreamSequence(this,e)},MatchedStreamSequence.prototype=new AsyncSequence,MatchedStreamSequence.prototype.each=function(e){var t=this.pattern,n=!1,r=0;return this.parent.each(function(o){return Lazy(o).match(t).each(function(t){return e(t,r++)===!1?(n=!0,!1):void 0}),!n})},Lazy.createWrapper=function(e){var t=function(){this.listeners=[]};return t.prototype=new StreamLikeSequence,t.prototype.each=function(e){this.listeners.push(e)},t.prototype.emit=function(e){for(var t=this.listeners,n=t.length,r=n-1;r>=0;--r)t[r](e)===!1&&t.splice(r,1)},function(){var n=new t;return e.apply(n,arguments),n}},Lazy.generate=function(e,t){return new GeneratedSequence(e,t)},Lazy.range=function(){var e=arguments.length>1?arguments[0]:0,t=arguments.length>1?arguments[1]:arguments[0],n=arguments.length>2&&arguments[2];return n===!1&&(n=t>e?1:-1),0===n?Lazy([]):Lazy.generate(function(t){return e+n*t}).take(Math.ceil((t-e)/n))},Lazy.repeat=function(e,t){return Lazy.generate(function(){return e},t)},Lazy.Sequence=Sequence,Lazy.ArrayLikeSequence=ArrayLikeSequence,Lazy.ObjectLikeSequence=ObjectLikeSequence,Lazy.StringLikeSequence=StringLikeSequence,Lazy.StreamLikeSequence=StreamLikeSequence,Lazy.GeneratedSequence=GeneratedSequence,Lazy.AsyncSequence=AsyncSequence,Lazy.AsyncHandle=AsyncHandle,Lazy.clone=function(e){return Lazy(e).value()},Lazy.deprecate=function(e,t){return function(){return console.warn(e),t.apply(this,arguments)}};var arrayPop=Array.prototype.pop,arraySlice=Array.prototype.slice;return Set.prototype.add=function(e){var t,n=this.table,r=typeof e;switch(r){case"number":case"boolean":case"undefined":return n[e]?!1:(n[e]=!0,!0);case"string":switch(e.charAt(0)){case"_":case"f":case"t":case"c":case"u":case"@":case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"N":e="@"+e}return n[e]?!1:(n[e]=!0,!0);default:return t=this.objects,arrayContains(t,e)?!1:(t.push(e),!0)}},Set.prototype.contains=function(e){var t=typeof e;switch(t){case"number":case"boolean":case"undefined":return!!this.table[e];case"string":switch(e.charAt(0)){case"_":case"f":case"t":case"c":case"u":case"@":case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"N":e="@"+e}return!!this.table[e];default:return arrayContains(this.objects,e)}},Queue.prototype.add=function(e){var t=this.contents,n=t.length,r=this.start;return this.count===n?(t[r]=e,this.start=(r+1)%n):t[this.count++]=e,this},Queue.prototype.toArray=function(){var e=this.contents,t=this.start,n=this.count,r=e.slice(t,t+n);return r.length<n&&(r=r.concat(e.slice(0,n-r.length))),r},Lazy})}).call(exports,__webpack_require__(157).setImmediate,__webpack_require__(157).clearImmediate)},function(e,t,n){(function(e,r){function o(e,t){this._id=e,this._clearFn=t}var i=n(158).nextTick,u=Function.prototype.apply,c=Array.prototype.slice,a={},s=0;t.setTimeout=function(){return new o(u.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new o(u.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},t.setImmediate="function"==typeof e?e:function(e){var n=s++,r=arguments.length<2?!1:c.call(arguments,1);return a[n]=!0,i(function(){a[n]&&(r?e.apply(null,r):e.call(null),t.clearImmediate(n))}),n},t.clearImmediate="function"==typeof r?r:function(e){delete a[e]}}).call(t,n(157).setImmediate,n(157).clearImmediate)},function(e,t){function n(){s=!1,u.length?a=u.concat(a):f=-1,a.length&&r()}function r(){if(!s){var e=setTimeout(n);s=!0;for(var t=a.length;t;){for(u=a,a=[];++f<t;)u&&u[f].run();f=-1,t=a.length}u=null,s=!1,clearTimeout(e)}}function o(e,t){this.fun=e,this.array=t}function i(){}var u,c=e.exports={},a=[],s=!1,f=-1;c.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];a.push(new o(e,t)),1!==a.length||s||setTimeout(r,0)},o.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=i,c.addListener=i,c.once=i,c.off=i,c.removeListener=i,c.removeAllListeners=i,c.emit=i,c.binding=function(e){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(e){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(164),i=r(o),u=n(167),c=r(u),a=n(221),s=r(a),f=n(222),p=r(f),h=n(225),l=n(226),y=n(227),d=10,v=256,g=function(){
function e(t,n,r){(0,s["default"])(this,e),this.id=n,this._ipfs=t,this._items=r||[],this._currentBatch=[]}return(0,p["default"])(e,[{key:"add",value:function(t){var n=this;return this._currentBatch.length>=d&&this._commit(),new c["default"](function(r,o){var i=e.findHeads(n);y.create(n._ipfs,t,i).then(function(e){n._currentBatch.push(e),r(e)})["catch"](o)})}},{key:"join",value:function(e){var t=this;return new c["default"](function(n,r){var o=l(t._currentBatch).difference(t._items).toArray(),i=h.differenceWith(e.items,t._items,y.equals),u=h.unionWith(o,i,y.equals);t._items=t._items.concat(u),t._currentBatch=[];var a=h.flatten(e.items.map(function(e){return e.next})),s=a.map(function(e){var n=t.items.map(function(e){return e.hash});return t._fetchRecursive(t._ipfs,e,n,v,0).then(function(e){return e.forEach(function(e){return t._insert(e)}),e})});c["default"].all(s).then(function(e){return n(t)})})}},{key:"clear",value:function(){this._items=[],this._currentBatch=[]}},{key:"_insert",value:function(e){var t=this,n=l(e.next).map(function(e){return l(t._items).map(function(e){return e.hash}).indexOf(e)}),r=n.toArray().length>0?Math.max(n.max()+1,0):0;return this._items.splice(r,0,e),e}},{key:"_commit",value:function(){var e=l(this._currentBatch).difference(this._items).toArray();this._items=this._items.concat(e),this._currentBatch=[]}},{key:"_fetchRecursive",value:function(e,t,n,r,o){var i=this,u=function(e,t){return void 0!==l(e).reverse().find(function(e){return e===t})};return new c["default"](function(a,s){var f=[];return u(n,t)||o>=r?void a(f):void y.fromIpfsHash(e,t).then(function(u){f.push(u),n.push(t),o++;var p=u.next.map(function(t){return i._fetchRecursive(e,t,n,r,o)});c["default"].all(p).then(function(e){f=h.flatten(e.concat(f)),a(f)})["catch"](s)})["catch"](s)})}},{key:"items",get:function(){return this._items.concat(this._currentBatch)}},{key:"snapshot",get:function(){return{id:this.id,items:this._currentBatch.map(function(e){return e.hash})}}}],[{key:"create",value:function(t,n,r){if(!t)throw new Error("Ipfs instance not defined");if(!n)throw new Error("id is not defined");return new c["default"](function(o,i){var u=new e(t,n,r);o(u)})}},{key:"getIpfsHash",value:function(e,n){if(!e)throw new Error("Ipfs instance not defined");return new c["default"](function(r,o){e.object.put(new t((0,i["default"])({Data:(0,i["default"])(n.snapshot)}))).then(function(e){return r(e.Hash)})["catch"](o)})}},{key:"fromJson",value:function(t,n){return new c["default"](function(r,o){c["default"].all(n.items.map(function(e){return y.fromIpfsHash(t,e)})).then(function(i){e.create(t,n.id,i).then(r)["catch"](o)})["catch"](o)})}},{key:"fromIpfsHash",value:function(t,n){if(!t)throw new Error("Ipfs instance not defined");if(!n)throw new Error("Invalid hash: "+n);return new c["default"](function(r,o){t.object.get(n).then(function(n){e.fromJson(t,JSON.parse(n.Data)).then(r)["catch"](o)})["catch"](o)})}},{key:"findHeads",value:function(t){return l(t.items).reverse().filter(function(n){return!e.isReferencedInChain(t,n)}).map(function(e){return e.hash}).toArray()}},{key:"isReferencedInChain",value:function(e,t){return void 0!==l(e.items).reverse().find(function(e){return e.hasChild(t)})}},{key:"batchSize",get:function(){return d}},{key:"maxHistory",get:function(){return v}}]),e}();e.exports=g}).call(t,n(160).Buffer)},function(e,t,n){(function(e,r){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
"use strict";function o(){try{var e=new Uint8Array(1);return e.foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function i(){return e.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function e(t){return this instanceof e?(e.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof t?u(this,t):"string"==typeof t?c(this,t,arguments.length>1?arguments[1]:"utf8"):a(this,t)):arguments.length>1?new e(t,arguments[1]):new e(t)}function u(t,n){if(t=d(t,0>n?0:0|v(n)),!e.TYPED_ARRAY_SUPPORT)for(var r=0;n>r;r++)t[r]=0;return t}function c(e,t,n){"string"==typeof n&&""!==n||(n="utf8");var r=0|S(t,n);return e=d(e,r),e.write(t,n),e}function a(t,n){if(e.isBuffer(n))return s(t,n);if(K(n))return f(t,n);if(null==n)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(n.buffer instanceof ArrayBuffer)return p(t,n);if(n instanceof ArrayBuffer)return h(t,n)}return n.length?l(t,n):y(t,n)}function s(e,t){var n=0|v(t.length);return e=d(e,n),t.copy(e,0,0,n),e}function f(e,t){var n=0|v(t.length);e=d(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function p(e,t){var n=0|v(t.length);e=d(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function h(t,n){return n.byteLength,e.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(n),t.__proto__=e.prototype):t=p(t,new Uint8Array(n)),t}function l(e,t){var n=0|v(t.length);e=d(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function y(e,t){var n,r=0;"Buffer"===t.type&&K(t.data)&&(n=t.data,r=0|v(n.length)),e=d(e,r);for(var o=0;r>o;o+=1)e[o]=255&n[o];return e}function d(t,n){e.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(n),t.__proto__=e.prototype):t.length=n;var r=0!==n&&n<=e.poolSize>>>1;return r&&(t.parent=X),t}function v(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function g(t,n){if(!(this instanceof g))return new g(t,n);var r=new e(t,n);return delete r.parent,r}function S(e,t){"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(r)return z(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if(t=0|t,n=void 0===n||n===1/0?this.length:0|n,e||(e="utf8"),0>t&&(t=0),n>this.length&&(n=this.length),t>=n)return"";for(;;)switch(e){case"hex":return C(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return L(this,t,n);case"binary":return O(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function _(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r),r>o&&(r=o)):r=o;var i=t.length;if(i%2!==0)throw new Error("Invalid hex string");r>i/2&&(r=i/2);for(var u=0;r>u;u++){var c=parseInt(t.substr(2*u,2),16);if(isNaN(c))throw new Error("Invalid hex string");e[n+u]=c}return u}function w(e,t,n,r){return J(z(t,e.length-n),e,n,r)}function b(e,t,n,r){return J(Y(t),e,n,r)}function q(e,t,n,r){return b(e,t,n,r)}function k(e,t,n,r){return J(G(t),e,n,r)}function x(e,t,n,r){return J(H(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?V.fromByteArray(e):V.fromByteArray(e.slice(t,n))}function E(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;n>o;){var i=e[o],u=null,c=i>239?4:i>223?3:i>191?2:1;if(n>=o+c){var a,s,f,p;switch(c){case 1:128>i&&(u=i);break;case 2:a=e[o+1],128===(192&a)&&(p=(31&i)<<6|63&a,p>127&&(u=p));break;case 3:a=e[o+1],s=e[o+2],128===(192&a)&&128===(192&s)&&(p=(15&i)<<12|(63&a)<<6|63&s,p>2047&&(55296>p||p>57343)&&(u=p));break;case 4:a=e[o+1],s=e[o+2],f=e[o+3],128===(192&a)&&128===(192&s)&&128===(192&f)&&(p=(15&i)<<18|(63&a)<<12|(63&s)<<6|63&f,p>65535&&1114112>p&&(u=p))}}null===u?(u=65533,c=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),o+=c}return I(r)}function I(e){var t=e.length;if(Z>=t)return String.fromCharCode.apply(String,e);for(var n="",r=0;t>r;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Z));return n}function L(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;n>o;o++)r+=String.fromCharCode(127&e[o]);return r}function O(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;n>o;o++)r+=String.fromCharCode(e[o]);return r}function C(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var o="",i=t;n>i;i++)o+=W(e[i]);return o}function j(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function R(e,t,n){if(e%1!==0||0>e)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function T(t,n,r,o,i,u){if(!e.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(n>i||u>n)throw new RangeError("value is out of bounds");if(r+o>t.length)throw new RangeError("index out of range")}function P(e,t,n,r){0>t&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);i>o;o++)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function M(e,t,n,r){0>t&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);i>o;o++)e[n+o]=t>>>8*(r?o:3-o)&255}function B(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function D(e,t,n,r,o){return o||B(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),$.write(e,t,n,r,23,4),n+4}function F(e,t,n,r,o){return o||B(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),$.write(e,t,n,r,52,8),n+8}function N(e){if(e=U(e).replace(Q,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function U(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function W(e){return 16>e?"0"+e.toString(16):e.toString(16)}function z(e,t){t=t||1/0;for(var n,r=e.length,o=null,i=[],u=0;r>u;u++){if(n=e.charCodeAt(u),n>55295&&57344>n){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(u+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(56320>n){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,128>n){if((t-=1)<0)break;i.push(n)}else if(2048>n){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Y(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t}function H(e,t){for(var n,r,o,i=[],u=0;u<e.length&&!((t-=2)<0);u++)n=e.charCodeAt(u),r=n>>8,o=n%256,i.push(o),i.push(r);return i}function G(e){return V.toByteArray(N(e))}function J(e,t,n,r){for(var o=0;r>o&&!(o+n>=t.length||o>=e.length);o++)t[o+n]=e[o];return o}var V=n(161),$=n(162),K=n(163);t.Buffer=e,t.SlowBuffer=g,t.INSPECT_MAX_BYTES=50,e.poolSize=8192;var X={};e.TYPED_ARRAY_SUPPORT=void 0!==r.TYPED_ARRAY_SUPPORT?r.TYPED_ARRAY_SUPPORT:o(),e._augment=function(t){return t.__proto__=e.prototype,t},e.TYPED_ARRAY_SUPPORT?(e.prototype.__proto__=Uint8Array.prototype,e.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&e[Symbol.species]===e&&Object.defineProperty(e,Symbol.species,{value:null,configurable:!0})):(e.prototype.length=void 0,e.prototype.parent=void 0),e.isBuffer=function(e){return!(null==e||!e._isBuffer)},e.compare=function(t,n){if(!e.isBuffer(t)||!e.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(t===n)return 0;for(var r=t.length,o=n.length,i=0,u=Math.min(r,o);u>i;++i)if(t[i]!==n[i]){r=t[i],o=n[i];break}return o>r?-1:r>o?1:0},e.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(t,n){if(!K(t))throw new TypeError("list argument must be an Array of Buffers.");if(0===t.length)return new e(0);var r;if(void 0===n)for(n=0,r=0;r<t.length;r++)n+=t[r].length;var o=new e(n),i=0;for(r=0;r<t.length;r++){var u=t[r];u.copy(o,i),i+=u.length}return o},e.byteLength=S,e.prototype._isBuffer=!0,e.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?E(this,0,e):m.apply(this,arguments)},e.prototype.equals=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:0===e.compare(this,t)},e.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},e.prototype.compare=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return e.compare(this,t)},e.prototype.indexOf=function(t,n){function r(e,t,n){for(var r=-1,o=0;n+o<e.length;o++)if(e[n+o]===t[-1===r?0:o-r]){if(-1===r&&(r=o),o-r+1===t.length)return n+r}else r=-1;return-1}if(n>2147483647?n=2147483647:-2147483648>n&&(n=-2147483648),n>>=0,0===this.length)return-1;if(n>=this.length)return-1;if(0>n&&(n=Math.max(this.length+n,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,n);if(e.isBuffer(t))return r(this,t,n);if("number"==typeof t)return e.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,n):r(this,[t],n);throw new TypeError("val must be string, number or Buffer")},e.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))t=0|t,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0);else{var o=r;r=t,t=0|n,n=o}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(0>n||0>t)||t>this.length)throw new RangeError("attempt to write outside buffer bounds");r||(r="utf8");for(var u=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return b(this,e,t,n);case"binary":return q(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(u)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),u=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;e.prototype.slice=function(t,n){var r=this.length;t=~~t,n=void 0===n?r:~~n,0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),0>n?(n+=r,0>n&&(n=0)):n>r&&(n=r),t>n&&(n=t);var o;if(e.TYPED_ARRAY_SUPPORT)o=this.subarray(t,n),o.__proto__=e.prototype;else{var i=n-t;o=new e(i,void 0);for(var u=0;i>u;u++)o[u]=this[u+t]}return o.length&&(o.parent=this.parent||this),o},e.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||R(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},e.prototype.readUIntBE=function(e,t,n){e=0|e,t=0|t,n||R(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},e.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},e.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},e.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},e.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},e.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},e.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||R(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*t)),r},e.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||R(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},e.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},e.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},e.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},e.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},e.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},e.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),$.read(this,e,!0,23,4)},e.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),$.read(this,e,!1,23,4)},e.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),$.read(this,e,!0,52,8)},e.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),$.read(this,e,!1,52,8)},e.prototype.writeUIntLE=function(e,t,n,r){e=+e,t=0|t,n=0|n,r||T(this,e,t,n,Math.pow(2,8*n),0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},e.prototype.writeUIntBE=function(e,t,n,r){e=+e,t=0|t,n=0|n,r||T(this,e,t,n,Math.pow(2,8*n),0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},e.prototype.writeUInt8=function(t,n,r){return t=+t,n=0|n,r||T(this,t,n,1,255,0),e.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[n]=255&t,n+1},e.prototype.writeUInt16LE=function(t,n,r){return t=+t,n=0|n,r||T(this,t,n,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8):P(this,t,n,!0),n+2},e.prototype.writeUInt16BE=function(t,n,r){return t=+t,n=0|n,r||T(this,t,n,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=255&t):P(this,t,n,!1),n+2},e.prototype.writeUInt32LE=function(t,n,r){return t=+t,n=0|n,r||T(this,t,n,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=255&t):M(this,t,n,!0),n+4},e.prototype.writeUInt32BE=function(t,n,r){return t=+t,n=0|n,r||T(this,t,n,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t):M(this,t,n,!1),n+4},e.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t=0|t,!r){var o=Math.pow(2,8*n-1);T(this,e,t,n,o-1,-o)}var i=0,u=1,c=0>e?1:0;for(this[t]=255&e;++i<n&&(u*=256);)this[t+i]=(e/u>>0)-c&255;return t+n},e.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t=0|t,!r){var o=Math.pow(2,8*n-1);T(this,e,t,n,o-1,-o)}var i=n-1,u=1,c=0>e?1:0;for(this[t+i]=255&e;--i>=0&&(u*=256);)this[t+i]=(e/u>>0)-c&255;return t+n},e.prototype.writeInt8=function(t,n,r){return t=+t,n=0|n,r||T(this,t,n,1,127,-128),e.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[n]=255&t,n+1},e.prototype.writeInt16LE=function(t,n,r){return t=+t,n=0|n,r||T(this,t,n,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8):P(this,t,n,!0),n+2},e.prototype.writeInt16BE=function(t,n,r){return t=+t,n=0|n,r||T(this,t,n,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=255&t):P(this,t,n,!1),n+2},e.prototype.writeInt32LE=function(t,n,r){return t=+t,n=0|n,r||T(this,t,n,4,2147483647,-2147483648),e.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24):M(this,t,n,!0),n+4},e.prototype.writeInt32BE=function(t,n,r){return t=+t,n=0|n,r||T(this,t,n,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),e.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t):M(this,t,n,!1),n+4},e.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},e.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},e.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)},e.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)},e.prototype.copy=function(t,n,r,o){if(r||(r=0),o||0===o||(o=this.length),n>=t.length&&(n=t.length),n||(n=0),o>0&&r>o&&(o=r),o===r)return 0;if(0===t.length||0===this.length)return 0;if(0>n)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>o)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-n<o-r&&(o=t.length-n+r);var i,u=o-r;if(this===t&&n>r&&o>n)for(i=u-1;i>=0;i--)t[i+n]=this[i+r];else if(1e3>u||!e.TYPED_ARRAY_SUPPORT)for(i=0;u>i;i++)t[i+n]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+u),n);return u},e.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),t>n)throw new RangeError("end < start");if(n!==t&&0!==this.length){if(0>t||t>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof e)for(r=t;n>r;r++)this[r]=e;else{var o=z(e.toString()),i=o.length;for(r=t;n>r;r++)this[r]=o[r%i]}return this}};var Q=/[^+\/0-9A-Za-z-_]/g}).call(t,n(160).Buffer,function(){return this}())},function(e,t){"use strict";function n(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;n>t;++t)c[t]=e[t],a[e.charCodeAt(t)]=t;a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63}function r(e){var t,n,r,o,i,u,c=e.length;if(c%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===e[c-2]?2:"="===e[c-1]?1:0,u=new s(3*c/4-i),r=i>0?c-4:c;var f=0;for(t=0,n=0;r>t;t+=4,n+=3)o=a[e.charCodeAt(t)]<<18|a[e.charCodeAt(t+1)]<<12|a[e.charCodeAt(t+2)]<<6|a[e.charCodeAt(t+3)],u[f++]=o>>16&255,u[f++]=o>>8&255,u[f++]=255&o;return 2===i?(o=a[e.charCodeAt(t)]<<2|a[e.charCodeAt(t+1)]>>4,u[f++]=255&o):1===i&&(o=a[e.charCodeAt(t)]<<10|a[e.charCodeAt(t+1)]<<4|a[e.charCodeAt(t+2)]>>2,u[f++]=o>>8&255,u[f++]=255&o),u}function o(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function i(e,t,n){for(var r,i=[],u=t;n>u;u+=3)r=(e[u]<<16)+(e[u+1]<<8)+e[u+2],i.push(o(r));return i.join("")}function u(e){for(var t,n=e.length,r=n%3,o="",u=[],a=16383,s=0,f=n-r;f>s;s+=a)u.push(i(e,s,s+a>f?f:s+a));return 1===r?(t=e[n-1],o+=c[t>>2],o+=c[t<<4&63],o+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],o+=c[t>>10],o+=c[t>>4&63],o+=c[t<<2&63],o+="="),u.push(o),u.join("")}t.toByteArray=r,t.fromByteArray=u;var c=[],a=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array;n()},function(e,t){t.read=function(e,t,n,r,o){var i,u,c=8*o-r-1,a=(1<<c)-1,s=a>>1,f=-7,p=n?o-1:0,h=n?-1:1,l=e[t+p];for(p+=h,i=l&(1<<-f)-1,l>>=-f,f+=c;f>0;i=256*i+e[t+p],p+=h,f-=8);for(u=i&(1<<-f)-1,i>>=-f,f+=r;f>0;u=256*u+e[t+p],p+=h,f-=8);if(0===i)i=1-s;else{if(i===a)return u?NaN:(l?-1:1)*(1/0);u+=Math.pow(2,r),i-=s}return(l?-1:1)*u*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var u,c,a,s=8*i-o-1,f=(1<<s)-1,p=f>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,l=r?0:i-1,y=r?1:-1,d=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,u=f):(u=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-u))<1&&(u--,a*=2),t+=u+p>=1?h/a:h*Math.pow(2,1-p),t*a>=2&&(u++,a/=2),u+p>=f?(c=0,u=f):u+p>=1?(c=(t*a-1)*Math.pow(2,o),u+=p):(c=t*Math.pow(2,p-1)*Math.pow(2,o),u=0));o>=8;e[n+l]=255&c,l+=y,c/=256,o-=8);for(u=u<<o|c,s+=o;s>0;e[n+l]=255&u,l+=y,u/=256,s-=8);e[n+l-y]|=128*d}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){e.exports={"default":n(165),__esModule:!0}},function(e,t,n){var r=n(166);e.exports=function(e){return(r.JSON&&r.JSON.stringify||JSON.stringify).apply(JSON,arguments)}},function(e,t){var n=e.exports={version:"1.2.6"};"number"==typeof __e&&(__e=n)},function(e,t,n){e.exports={"default":n(168),__esModule:!0}},function(e,t,n){n(169),n(170),n(193),n(200),e.exports=n(166).Promise},function(e,t){},function(e,t,n){"use strict";var r=n(171)(!0);n(174)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var r=n(172),o=n(173);e.exports=function(e){return function(t,n){var i,u,c=String(o(t)),a=r(n),s=c.length;return 0>a||a>=s?e?"":void 0:(i=c.charCodeAt(a),55296>i||i>56319||a+1===s||(u=c.charCodeAt(a+1))<56320||u>57343?e?c.charAt(a):i:e?c.slice(a,a+2):(i-55296<<10)+(u-56320)+65536)}}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";var r=n(175),o=n(176),i=n(180),u=n(181),c=n(186),a=n(187),s=n(188),f=n(189),p=n(182).getProto,h=n(190)("iterator"),l=!([].keys&&"next"in[].keys()),y="@@iterator",d="keys",v="values",g=function(){return this};e.exports=function(e,t,n,S,m,_,w){s(n,t,S);var b,q,k=function(e){if(!l&&e in I)return I[e];switch(e){case d:return function(){return new n(this,e)};case v:return function(){return new n(this,e)}}return function(){return new n(this,e)}},x=t+" Iterator",A=m==v,E=!1,I=e.prototype,L=I[h]||I[y]||m&&I[m],O=L||k(m);if(L){var C=p(O.call(new e));f(C,x,!0),!r&&c(I,y)&&u(C,h,g),A&&L.name!==v&&(E=!0,O=function(){return L.call(this)})}if(r&&!w||!l&&!E&&I[h]||u(I,h,O),a[t]=O,a[x]=g,m)if(b={values:A?O:k(v),keys:_?O:k(d),entries:A?k("entries"):O},w)for(q in b)q in I||i(I,q,b[q]);else o(o.P+o.F*(l||E),t,b);return b}},function(e,t){e.exports=!0},function(e,t,n){var r=n(177),o=n(166),i=n(178),u="prototype",c=function(e,t,n){var a,s,f,p=e&c.F,h=e&c.G,l=e&c.S,y=e&c.P,d=e&c.B,v=e&c.W,g=h?o:o[t]||(o[t]={}),S=h?r:l?r[t]:(r[t]||{})[u];h&&(n=t);for(a in n)s=!p&&S&&a in S,s&&a in g||(f=s?S[a]:n[a],g[a]=h&&"function"!=typeof S[a]?n[a]:d&&s?i(f,r):v&&S[a]==f?function(e){var t=function(t){return this instanceof e?new e(t):e(t)};return t[u]=e[u],t}(f):y&&"function"==typeof f?i(Function.call,f):f,y&&((g[u]||(g[u]={}))[a]=f))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,e.exports=c},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(179);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){e.exports=n(181)},function(e,t,n){var r=n(182),o=n(183);e.exports=n(184)?function(e,t,n){return r.setDesc(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){var n=Object;e.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){e.exports=!n(185)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){e.exports={}},function(e,t,n){"use strict";var r=n(182),o=n(183),i=n(189),u={};n(181)(u,n(190)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r.create(u,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var r=n(182).setDesc,o=n(186),i=n(190)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){var r=n(191)("wks"),o=n(192),i=n(177).Symbol;e.exports=function(e){return r[e]||(r[e]=i&&i[e]||(i||o)("Symbol."+e))}},function(e,t,n){var r=n(177),o="__core-js_shared__",i=r[o]||(r[o]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){n(194);var r=n(187);r.NodeList=r.HTMLCollection=r.Array},function(e,t,n){"use strict";var r=n(195),o=n(196),i=n(187),u=n(197);e.exports=n(174)(Array,"Array",function(e,t){this._t=u(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):"keys"==t?o(0,n):"values"==t?o(0,e[n]):o(0,[n,e[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(198),o=n(173);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(199);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){"use strict";var r,o=n(182),i=n(175),u=n(177),c=n(178),a=n(201),s=n(176),f=n(202),p=n(203),h=n(179),l=n(204),y=n(205),d=n(210).set,v=n(211),g=n(190)("species"),S=n(212),m=n(213),_="Promise",w=u.process,b="process"==a(w),q=u[_],k=function(e){var t=new q(function(){});return e&&(t.constructor=Object),q.resolve(t)===t},x=function(){function e(t){var n=new q(t);return d(n,e.prototype),n}var t=!1;try{if(t=q&&q.resolve&&k(),d(e,q),e.prototype=o.create(q.prototype,{constructor:{value:e}}),e.resolve(5).then(function(){})instanceof e||(t=!1),t&&n(184)){var r=!1;q.resolve(o.setDesc({},"then",{get:function(){r=!0}})),t=r}}catch(i){t=!1}return t}(),A=function(e,t){return i&&e===q&&t===r?!0:v(e,t)},E=function(e){var t=p(e)[g];return void 0!=t?t:e},I=function(e){var t;return f(e)&&"function"==typeof(t=e.then)?t:!1},L=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=h(t),this.reject=h(n)},O=function(e){try{e()}catch(t){return{error:t}}},C=function(e,t){if(!e.n){e.n=!0;var n=e.c;m(function(){for(var r=e.v,o=1==e.s,i=0,c=function(t){var n,i,u=o?t.ok:t.fail,c=t.resolve,a=t.reject;try{u?(o||(e.h=!0),n=u===!0?r:u(r),n===t.promise?a(TypeError("Promise-chain cycle")):(i=I(n))?i.call(n,c,a):c(n)):a(r)}catch(s){a(s)}};n.length>i;)c(n[i++]);n.length=0,e.n=!1,t&&setTimeout(function(){var t,n,o=e.p;j(o)&&(b?w.emit("unhandledRejection",r,o):(t=u.onunhandledrejection)?t({promise:o,reason:r}):(n=u.console)&&n.error&&n.error("Unhandled promise rejection",r)),e.a=void 0},1)})}},j=function(e){var t,n=e._d,r=n.a||n.c,o=0;if(n.h)return!1;for(;r.length>o;)if(t=r[o++],t.fail||!j(t.promise))return!1;return!0},R=function(e){var t=this;t.d||(t.d=!0,t=t.r||t,t.v=e,t.s=2,t.a=t.c.slice(),C(t,!0))},T=function(e){var t,n=this;if(!n.d){n.d=!0,n=n.r||n;try{if(n.p===e)throw TypeError("Promise can't be resolved itself");(t=I(e))?m(function(){var r={r:n,d:!1};try{t.call(e,c(T,r,1),c(R,r,1))}catch(o){R.call(r,o)}}):(n.v=e,n.s=1,C(n,!1))}catch(r){R.call({r:n,d:!1},r)}}};x||(q=function(e){h(e);var t=this._d={p:l(this,q,_),c:[],a:void 0,s:0,d:!1,v:void 0,h:!1,n:!1};try{e(c(T,t,1),c(R,t,1))}catch(n){R.call(t,n)}},n(218)(q.prototype,{then:function(e,t){var n=new L(S(this,q)),r=n.promise,o=this._d;return n.ok="function"==typeof e?e:!0,n.fail="function"==typeof t&&t,o.c.push(n),o.a&&o.a.push(n),o.s&&C(o,!1),r},"catch":function(e){return this.then(void 0,e)}})),s(s.G+s.W+s.F*!x,{Promise:q}),n(189)(q,_),n(219)(_),r=n(166)[_],s(s.S+s.F*!x,_,{reject:function(e){var t=new L(this),n=t.reject;return n(e),t.promise}}),s(s.S+s.F*(!x||k(!0)),_,{resolve:function(e){if(e instanceof q&&A(e.constructor,this))return e;var t=new L(this),n=t.resolve;return n(e),t.promise}}),s(s.S+s.F*!(x&&n(220)(function(e){q.all(e)["catch"](function(){})})),_,{all:function(e){var t=E(this),n=new L(t),r=n.resolve,i=n.reject,u=[],c=O(function(){y(e,!1,u.push,u);var n=u.length,c=Array(n);n?o.each.call(u,function(e,o){var u=!1;t.resolve(e).then(function(e){u||(u=!0,c[o]=e,--n||r(c))},i)}):r(c)});return c&&i(c.error),n.promise},race:function(e){var t=E(this),n=new L(t),r=n.reject,o=O(function(){y(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return o&&r(o.error),n.promise}})},function(e,t,n){var r=n(199),o=n(190)("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=(t=Object(e))[o])?n:i?r(t):"Object"==(u=r(t))&&"function"==typeof t.callee?"Arguments":u}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(202);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError(n+": use the 'new' operator!");return e}},function(e,t,n){var r=n(178),o=n(206),i=n(207),u=n(203),c=n(208),a=n(209);e.exports=function(e,t,n,s){var f,p,h,l=a(e),y=r(n,s,t?2:1),d=0;if("function"!=typeof l)throw TypeError(e+" is not iterable!");if(i(l))for(f=c(e.length);f>d;d++)t?y(u(p=e[d])[0],p[1]):y(e[d]);else for(h=l.call(e);!(p=h.next()).done;)o(h,y,p.value,t)}},function(e,t,n){var r=n(203);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(i){var u=e["return"];throw void 0!==u&&r(u.call(e)),i}}},function(e,t,n){var r=n(187),o=n(190)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},function(e,t,n){var r=n(172),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(201),o=n(190)("iterator"),i=n(187);e.exports=n(166).getIteratorMethod=function(e){return void 0!=e?e[o]||e["@@iterator"]||i[r(e)]:void 0}},function(e,t,n){var r=n(182).getDesc,o=n(202),i=n(203),u=function(e,t){if(i(e),!o(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,o){try{o=n(178)(Function.call,r(Object.prototype,"__proto__").set,2),o(e,[]),t=!(e instanceof Array)}catch(i){t=!0}return function(e,n){return u(e,n),t?e.__proto__=n:o(e,n),e}}({},!1):void 0),check:u}},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},function(e,t,n){var r=n(203),o=n(179),i=n(190)("species");e.exports=function(e,t){var n,u=r(e).constructor;return void 0===u||void 0==(n=r(u)[i])?t:o(n)}},function(e,t,n){var r,o,i,u=n(177),c=n(214).set,a=u.MutationObserver||u.WebKitMutationObserver,s=u.process,f=u.Promise,p="process"==n(199)(s),h=function(){var e,t,n;for(p&&(e=s.domain)&&(s.domain=null,e.exit());r;)t=r.domain,n=r.fn,t&&t.enter(),n(),t&&t.exit(),r=r.next;o=void 0,e&&e.enter()};if(p)i=function(){s.nextTick(h)};else if(a){var l=1,y=document.createTextNode("");new a(h).observe(y,{characterData:!0}),i=function(){y.data=l=-l}}else i=f&&f.resolve?function(){f.resolve().then(h)}:function(){c.call(u,h)};e.exports=function(e){var t={fn:e,next:void 0,domain:p&&s.domain};o&&(o.next=t),r||(r=t,i()),o=t}},function(e,t,n){var r,o,i,u=n(178),c=n(215),a=n(216),s=n(217),f=n(177),p=f.process,h=f.setImmediate,l=f.clearImmediate,y=f.MessageChannel,d=0,v={},g="onreadystatechange",S=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},m=function(e){S.call(e.data)};h&&l||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return v[++d]=function(){c("function"==typeof e?e:Function(e),t)},r(d),d},l=function(e){delete v[e]},"process"==n(199)(p)?r=function(e){p.nextTick(u(S,e,1))}:y?(o=new y,i=o.port2,o.port1.onmessage=m,r=u(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(e){f.postMessage(e+"","*")},f.addEventListener("message",m,!1)):r=g in s("script")?function(e){a.appendChild(s("script"))[g]=function(){a.removeChild(this),S.call(e)}}:function(e){setTimeout(u(S,e,1),0)}),e.exports={set:h,clear:l}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){e.exports=n(177).document&&document.documentElement},function(e,t,n){var r=n(202),o=n(177).document,i=r(o)&&r(o.createElement);
e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){var r=n(180);e.exports=function(e,t){for(var n in t)r(e,n,t[n]);return e}},function(e,t,n){"use strict";var r=n(166),o=n(182),i=n(184),u=n(190)("species");e.exports=function(e){var t=r[e];i&&t&&!t[u]&&o.setDesc(t,u,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(190)("iterator"),o=!1;try{var i=[7][r]();i["return"]=function(){o=!0},Array.from(i,function(){throw 2})}catch(u){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],u=i[r]();u.next=function(){n=!0},i[r]=function(){return u},e(i)}catch(c){}return n}},function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(223),i=r(o);t["default"]=function(){function e(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),(0,i["default"])(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},function(e,t,n){e.exports={"default":n(224),__esModule:!0}},function(e,t,n){var r=n(182);e.exports=function(e,t,n){return r.setDesc(e,t,n)}},function(e,t,n){var r;(function(e,o){(function(){function i(e,t){return e.set(t[0],t[1]),e}function u(e,t){return e.add(t),e}function c(e,t,n){var r=n.length;switch(r){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function a(e,t,n,r){for(var o=-1,i=e.length;++o<i;){var u=e[o];t(r,u,n(u),e)}return r}function s(e,t){for(var n=-1,r=e.length,o=-1,i=t.length,u=Array(r+i);++n<r;)u[n]=e[n];for(;++o<i;)u[n++]=t[o];return u}function f(e,t){for(var n=-1,r=e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function p(e,t){for(var n=e.length;n--&&t(e[n],n,e)!==!1;);return e}function h(e,t){for(var n=-1,r=e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function l(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var u=e[n];t(u,n,e)&&(i[o++]=u)}return i}function y(e,t){return!!e.length&&k(e,t,0)>-1}function d(e,t,n){for(var r=-1,o=e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function v(e,t){for(var n=-1,r=e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function g(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function S(e,t,n,r){var o=-1,i=e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function m(e,t,n,r){var o=e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function _(e,t){for(var n=-1,r=e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function w(e,t,n){for(var r=-1,o=e.length;++r<o;){var i=e[r],u=t(i);if(null!=u&&(c===te?u===u:n(u,c)))var c=u,a=i}return a}function b(e,t,n,r){var o;return n(e,function(e,n,i){return t(e,n,i)?(o=r?n:e,!1):void 0}),o}function q(e,t,n){for(var r=e.length,o=n?r:-1;n?o--:++o<r;)if(t(e[o],o,e))return o;return-1}function k(e,t,n){if(t!==t)return Y(e,n);for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}function x(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function A(e,t){var n=e?e.length:0;return n?L(e,t)/n:Le}function E(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}function I(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function L(e,t){for(var n,r=-1,o=e.length;++r<o;){var i=t(e[r]);i!==te&&(n=n===te?i:n+i)}return n}function O(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function C(e,t){return v(t,function(t){return[t,e[t]]})}function j(e){return function(t){return e(t)}}function R(e,t){return v(t,function(t){return e[t]})}function T(e,t){for(var n=-1,r=e.length;++n<r&&k(t,e[n],0)>-1;);return n}function P(e,t){for(var n=e.length;n--&&k(t,e[n],0)>-1;);return n}function M(e){return e&&e.Object===Object?e:null}function B(e,t){if(e!==t){var n=null===e,r=e===te,o=e===e,i=null===t,u=t===te,c=t===t;if(e>t&&!i||!o||n&&!u&&c||r&&c)return 1;if(t>e&&!n||!c||i&&!r&&o||u&&o)return-1}return 0}function D(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,u=o.length,c=n.length;++r<u;){var a=B(o[r],i[r]);if(a){if(r>=c)return a;var s=n[r];return a*("desc"==s?-1:1)}}return e.index-t.index}function F(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&r++;return r}function N(e){return function(t,n){var r;return t===te&&n===te?0:(t!==te&&(r=t),n!==te&&(r=r===te?n:e(r,n)),r)}}function U(e){return jn[e]}function W(e){return Rn[e]}function z(e){return"\\"+Mn[e]}function Y(e,t,n){for(var r=e.length,o=t+(n?0:-1);n?o--:++o<r;){var i=e[o];if(i!==i)return o}return-1}function H(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}function G(e,t){return e="number"==typeof e||Tt.test(e)?+e:-1,t=null==t?Ee:t,e>-1&&e%1==0&&t>e}function J(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function V(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function $(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var u=e[n];u!==t&&u!==ue||(e[n]=ue,i[o++]=n)}return i}function K(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function X(e){if(!e||!An.test(e))return e.length;for(var t=kn.lastIndex=0;kn.test(e);)t++;return t}function Z(e){return e.match(kn)}function Q(e){return Tn[e]}function ee(e){function t(e){if(uc(e)&&!Zf(e)&&!(e instanceof o)){if(e instanceof r)return e;if(ls.call(e,"__wrapped__"))return Xo(e)}return new r(e)}function n(){}function r(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=te}function o(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Oe,this.__views__=[]}function M(){var e=new o(this.__wrapped__);return e.__actions__=Vr(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Vr(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Vr(this.__views__),e}function Tt(){if(this.__filtered__){var e=new o(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Dt(){var e=this.__wrapped__.value(),t=this.__dir__,n=Zf(e),r=0>t,o=n?e.length:0,i=Oo(0,o,this.__views__),u=i.start,c=i.end,a=c-u,s=r?c:u-1,f=this.__iteratees__,p=f.length,h=0,l=Ds(a,this.__takeCount__);if(!n||re>o||o==a&&l==a)return Cr(e,this.__actions__);var y=[];e:for(;a--&&l>h;){s+=t;for(var d=-1,v=e[s];++d<p;){var g=f[d],S=g.iteratee,m=g.type,_=S(v);if(m==ke)v=_;else if(!_){if(m==qe)continue e;break e}}y[h++]=v}return y}function Ft(){}function Nt(e,t){return Wt(e,t)&&delete e[t]}function Ut(e,t){if($s){var n=e[t];return n===ie?te:n}return ls.call(e,t)?e[t]:te}function Wt(e,t){return $s?e[t]!==te:ls.call(e,t)}function zt(e,t,n){e[t]=$s&&n===te?ie:n}function Yt(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ht(){this.__data__={hash:new Ft,map:Hs?new Hs:[],string:new Ft}}function Gt(e){var t=this.__data__;return No(e)?Nt("string"==typeof e?t.string:t.hash,e):Hs?t.map["delete"](e):un(t.map,e)}function Jt(e){var t=this.__data__;return No(e)?Ut("string"==typeof e?t.string:t.hash,e):Hs?t.map.get(e):cn(t.map,e)}function Vt(e){var t=this.__data__;return No(e)?Wt("string"==typeof e?t.string:t.hash,e):Hs?t.map.has(e):an(t.map,e)}function $t(e,t){var n=this.__data__;return No(e)?zt("string"==typeof e?n.string:n.hash,e,t):Hs?n.map.set(e,t):fn(n.map,e,t),this}function Kt(e){var t=-1,n=e?e.length:0;for(this.__data__=new Yt;++t<n;)this.push(e[t])}function Xt(e,t){var n=e.__data__;if(No(t)){var r=n.__data__,o="string"==typeof t?r.string:r.hash;return o[t]===ie}return n.has(t)}function Zt(e){var t=this.__data__;if(No(e)){var n=t.__data__,r="string"==typeof e?n.string:n.hash;r[e]=ie}else t.set(e,ie)}function Qt(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function en(){this.__data__={array:[],map:null}}function tn(e){var t=this.__data__,n=t.array;return n?un(n,e):t.map["delete"](e)}function nn(e){var t=this.__data__,n=t.array;return n?cn(n,e):t.map.get(e)}function rn(e){var t=this.__data__,n=t.array;return n?an(n,e):t.map.has(e)}function on(e,t){var n=this.__data__,r=n.array;r&&(r.length<re-1?fn(r,e,t):(n.array=null,n.map=new Yt(r)));var o=n.map;return o&&o.set(e,t),this}function un(e,t){var n=sn(e,t);if(0>n)return!1;var r=e.length-1;return n==r?e.pop():Os.call(e,n,1),!0}function cn(e,t){var n=sn(e,t);return 0>n?te:e[n][1]}function an(e,t){return sn(e,t)>-1}function sn(e,t){for(var n=e.length;n--;)if(Uu(e[n][0],t))return n;return-1}function fn(e,t,n){var r=sn(e,t);0>r?e.push([t,n]):e[r][1]=n}function pn(e,t,n,r){return e===te||Uu(e,fs[n])&&!ls.call(r,n)?t:e}function hn(e,t,n){(n===te||Uu(e[t],n))&&("number"!=typeof t||n!==te||t in e)||(e[t]=n)}function ln(e,t,n){var r=e[t];ls.call(e,t)&&Uu(r,n)&&(n!==te||t in e)||(e[t]=n)}function yn(e,t,n,r){return af(e,function(e,o,i){t(r,e,n(e),i)}),r}function dn(e,t){return e&&$r(t,Gc(t),e)}function vn(e,t){for(var n=-1,r=null==e,o=t.length,i=Array(o);++n<o;)i[n]=r?te:zc(e,t[n]);return i}function gn(e,t,n){return e===e&&(n!==te&&(e=n>=e?e:n),t!==te&&(e=e>=t?e:t)),e}function Sn(e,t,n,r,o,i,u){var c;if(r&&(c=i?r(e,o,i,u):r(e)),c!==te)return c;if(!ic(e))return e;var a=Zf(e);if(a){if(c=jo(e),!t)return Vr(e,c)}else{var s=Lo(e),p=s==De||s==Fe;if(Qf(e))return Dr(e,t);if(s==We||s==Re||p&&!i){if(H(e))return i?e:{};if(c=Ro(p?{}:e),!t)return Kr(e,dn(c,e))}else{if(!Cn[s])return i?e:{};c=To(e,s,Sn,t)}}u||(u=new Qt);var h=u.get(e);if(h)return h;if(u.set(e,c),!a)var l=n?_o(e):Gc(e);return f(l||e,function(o,i){l&&(i=o,o=e[i]),ln(c,i,Sn(o,t,n,r,i,e,u))}),c}function mn(e){var t=Gc(e),n=t.length;return function(r){if(null==r)return!n;for(var o=n;o--;){var i=t[o],u=e[i],c=r[i];if(c===te&&!(i in Object(r))||!u(c))return!1}return!0}}function _n(e){return ic(e)?Es(e):{}}function wn(e,t,n){if("function"!=typeof e)throw new as(oe);return Ls(function(){e.apply(te,n)},t)}function kn(e,t,n,r){var o=-1,i=y,u=!0,c=e.length,a=[],s=t.length;if(!c)return a;n&&(t=v(t,j(n))),r?(i=d,u=!1):t.length>=re&&(i=Xt,u=!1,t=new Kt(t));e:for(;++o<c;){var f=e[o],p=n?n(f):f;if(u&&p===p){for(var h=s;h--;)if(t[h]===p)continue e;a.push(f)}else i(t,p,r)||a.push(f)}return a}function jn(e,t){var n=!0;return af(e,function(e,r,o){return n=!!t(e,r,o)}),n}function Rn(e,t,n,r){var o=e.length;for(n=Ic(n),0>n&&(n=-n>o?0:o+n),r=r===te||r>o?o:Ic(r),0>r&&(r+=o),r=n>r?0:Lc(r);r>n;)e[n++]=t;return e}function Tn(e,t){var n=[];return af(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}function Pn(e,t,n,r,o){var i=-1,u=e.length;for(n||(n=Mo),o||(o=[]);++i<u;){var c=e[i];t>0&&n(c)?t>1?Pn(c,t-1,n,r,o):g(o,c):r||(o[o.length]=c)}return o}function Mn(e,t){return e&&ff(e,t,Gc)}function Fn(e,t){return e&&pf(e,t,Gc)}function Nn(e,t){return l(t,function(t){return nc(e[t])})}function Wn(e,t){t=Fo(t,e)?[t]:Mr(t);for(var n=0,r=t.length;null!=e&&r>n;)e=e[t[n++]];return n&&n==r?e:te}function zn(e,t,n){var r=t(e);return Zf(e)?r:g(r,n(e))}function Yn(e,t){return ls.call(e,t)||"object"==typeof e&&t in e&&null===Eo(e)}function Hn(e,t){return t in Object(e)}function Vn(e,t,n){return e>=Ds(t,n)&&e<Bs(t,n)}function $n(e,t,n){for(var r=n?d:y,o=e[0].length,i=e.length,u=i,c=Array(i),a=1/0,s=[];u--;){var f=e[u];u&&t&&(f=v(f,j(t))),a=Ds(f.length,a),c[u]=!n&&(t||o>=120&&f.length>=120)?new Kt(u&&f):te}f=e[0];var p=-1,h=c[0];e:for(;++p<o&&s.length<a;){var l=f[p],g=t?t(l):l;if(!(h?Xt(h,g):r(s,g,n))){for(u=i;--u;){var S=c[u];if(!(S?Xt(S,g):r(e[u],g,n)))continue e}h&&h.push(g),s.push(l)}}return s}function Kn(e,t,n,r){return Mn(e,function(e,o,i){t(r,n(e),o,i)}),r}function Xn(e,t,n){Fo(t,e)||(t=Mr(t),e=Jo(e,t),t=vi(t));var r=null==e?e:e[t];return null==r?te:c(r,e,n)}function Zn(e,t,n,r,o){return e===t?!0:null==e||null==t||!ic(e)&&!uc(t)?e!==e&&t!==t:Qn(e,t,Zn,n,r,o)}function Qn(e,t,n,r,o,i){var u=Zf(e),c=Zf(t),a=Te,s=Te;u||(a=Lo(e),a=a==Re?We:a),c||(s=Lo(t),s=s==Re?We:s);var f=a==We&&!H(e),p=s==We&&!H(t),h=a==s;if(h&&!f)return i||(i=new Qt),u||wc(e)?go(e,t,n,r,o,i):So(e,t,a,n,r,o,i);if(!(o&Se)){var l=f&&ls.call(e,"__wrapped__"),y=p&&ls.call(t,"__wrapped__");if(l||y){var d=l?e.value():e,v=y?t.value():t;return i||(i=new Qt),n(d,v,r,o,i)}}return h?(i||(i=new Qt),mo(e,t,n,r,o,i)):!1}function er(e,t,n,r){var o=n.length,i=o,u=!r;if(null==e)return!i;for(e=Object(e);o--;){var c=n[o];if(u&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++o<i;){c=n[o];var a=c[0],s=e[a],f=c[1];if(u&&c[2]){if(s===te&&!(a in e))return!1}else{var p=new Qt;if(r)var h=r(s,f,a,e,t,p);if(!(h===te?Zn(f,s,r,ge|Se,p):h))return!1}}return!0}function tr(e){return"function"==typeof e?e:null==e?Ba:"object"==typeof e?Zf(e)?ur(e[0],e[1]):ir(e):Ha(e)}function nr(e){return Ms(Object(e))}function rr(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}function or(e,t){var n=-1,r=Gu(e)?Array(e.length):[];return af(e,function(e,o,i){r[++n]=t(e,o,i)}),r}function ir(e){var t=ko(e);return 1==t.length&&t[0][2]?Yo(t[0][0],t[0][1]):function(n){return n===e||er(n,e,t)}}function ur(e,t){return Fo(e)&&zo(t)?Yo(e,t):function(n){var r=zc(n,e);return r===te&&r===t?Hc(n,e):Zn(t,r,te,ge|Se)}}function cr(e,t,n,r,o){if(e!==t){if(!Zf(t)&&!wc(t))var i=Jc(t);f(i||t,function(u,c){if(i&&(c=u,u=t[c]),ic(u))o||(o=new Qt),ar(e,t,c,n,cr,r,o);else{var a=r?r(e[c],u,c+"",e,t,o):te;a===te&&(a=u),hn(e,c,a)}})}}function ar(e,t,n,r,o,i,u){var c=e[n],a=t[n],s=u.get(a);if(s)return void hn(e,n,s);var f=i?i(c,a,n+"",e,t,u):te,p=f===te;p&&(f=a,Zf(a)||wc(a)?Zf(c)?f=c:Ju(c)?f=Vr(c):(p=!1,f=Sn(a,!0)):dc(a)||Yu(a)?Yu(c)?f=Cc(c):!ic(c)||r&&nc(c)?(p=!1,f=Sn(a,!0)):f=c:p=!1),u.set(a,f),p&&o(f,a,r,i,u),u["delete"](a),hn(e,n,f)}function sr(e,t){var n=e.length;if(n)return t+=0>t?n:0,G(t,n)?e[t]:te}function fr(e,t,n){var r=-1;t=v(t.length?t:[Ba],j(qo()));var o=or(e,function(e,n,o){var i=v(t,function(t){return t(e)});return{criteria:i,index:++r,value:e}});return I(o,function(e,t){return D(e,t,n)})}function pr(e,t){return e=Object(e),S(t,function(t,n){return n in e&&(t[n]=e[n]),t},{})}function hr(e,t){for(var n=-1,r=wo(e),o=r.length,i={};++n<o;){var u=r[n],c=e[u];t(c,u)&&(i[u]=c)}return i}function lr(e){return function(t){return null==t?te:t[e]}}function yr(e){return function(t){return Wn(t,e)}}function dr(e,t,n,r){var o=r?x:k,i=-1,u=t.length,c=e;for(n&&(c=v(e,j(n)));++i<u;)for(var a=0,s=t[i],f=n?n(s):s;(a=o(c,f,a,r))>-1;)c!==e&&Os.call(c,a,1),Os.call(e,a,1);return e}function vr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(r==n||o!=i){var i=o;if(G(o))Os.call(e,o,1);else if(Fo(o,e))delete e[o];else{var u=Mr(o),c=Jo(e,u);null!=c&&delete c[vi(u)]}}}return e}function gr(e,t){return e+js(Ns()*(t-e+1))}function Sr(e,t,n,r){for(var o=-1,i=Bs(Cs((t-e)/(n||1)),0),u=Array(i);i--;)u[r?i:++o]=e,e+=n;return u}function mr(e,t){var n="";if(!e||1>t||t>Ee)return n;do t%2&&(n+=e),t=js(t/2),t&&(e+=e);while(t);return n}function _r(e,t,n,r){t=Fo(t,e)?[t]:Mr(t);for(var o=-1,i=t.length,u=i-1,c=e;null!=c&&++o<i;){var a=t[o];if(ic(c)){var s=n;if(o!=u){var f=c[a];s=r?r(f,a,c):te,s===te&&(s=null==f?G(t[o+1])?[]:{}:f)}ln(c,a,s)}c=c[a]}return e}function wr(e,t,n){var r=-1,o=e.length;0>t&&(t=-t>o?0:o+t),n=n>o?o:n,0>n&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}function br(e,t){var n;return af(e,function(e,r,o){return n=t(e,r,o),!n}),!!n}function qr(e,t,n){var r=0,o=e?e.length:r;if("number"==typeof t&&t===t&&je>=o){for(;o>r;){var i=r+o>>>1,u=e[i];(n?t>=u:t>u)&&null!==u?r=i+1:o=i}return o}return kr(e,t,Ba,n)}function kr(e,t,n,r){t=n(t);for(var o=0,i=e?e.length:0,u=t!==t,c=null===t,a=t===te;i>o;){var s=js((o+i)/2),f=n(e[s]),p=f!==te,h=f===f;if(u)var l=h||r;else l=c?h&&p&&(r||null!=f):a?h&&(r||p):null==f?!1:r?t>=f:t>f;l?o=s+1:i=s}return Ds(i,Ce)}function xr(e){return Ar(e)}function Ar(e,t){for(var n=0,r=e.length,o=e[0],i=t?t(o):o,u=i,c=1,a=[o];++n<r;)o=e[n],i=t?t(o):o,Uu(i,u)||(u=i,a[c++]=o);return a}function Er(e,t,n){var r=-1,o=y,i=e.length,u=!0,c=[],a=c;if(n)u=!1,o=d;else if(i>=re){var s=t?null:lf(e);if(s)return K(s);u=!1,o=Xt,a=new Kt}else a=t?[]:c;e:for(;++r<i;){var f=e[r],p=t?t(f):f;if(u&&p===p){for(var h=a.length;h--;)if(a[h]===p)continue e;t&&a.push(p),c.push(f)}else o(a,p,n)||(a!==c&&a.push(p),c.push(f))}return c}function Ir(e,t){t=Fo(t,e)?[t]:Mr(t),e=Jo(e,t);var n=vi(t);return null!=e&&Yc(e,n)?delete e[n]:!0}function Lr(e,t,n,r){return _r(e,t,n(Wn(e,t)),r)}function Or(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?wr(e,r?0:i,r?i+1:o):wr(e,r?i+1:0,r?o:i)}function Cr(e,t){var n=e;return n instanceof o&&(n=n.value()),S(t,function(e,t){return t.func.apply(t.thisArg,g([e],t.args))},n)}function jr(e,t,n){for(var r=-1,o=e.length;++r<o;)var i=i?g(kn(i,e[r],t,n),kn(e[r],i,t,n)):e[r];return i&&i.length?Er(i,t,n):[]}function Rr(e,t,n){for(var r=-1,o=e.length,i=t.length,u={};++r<o;){var c=i>r?t[r]:te;n(u,e[r],c)}return u}function Tr(e){return Ju(e)?e:[]}function Pr(e){return"function"==typeof e?e:Ba}function Mr(e){return Zf(e)?e:Sf(e)}function Br(e,t,n){var r=e.length;return n=n===te?r:n,!t&&n>=r?e:wr(e,t,n)}function Dr(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}function Fr(e){var t=new e.constructor(e.byteLength);return new bs(t).set(new bs(e)),t}function Nr(e,t){var n=t?Fr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Ur(e,t,n){var r=t?n(V(e),!0):V(e);return S(r,i,new e.constructor)}function Wr(e){var t=new e.constructor(e.source,It.exec(e));return t.lastIndex=e.lastIndex,t}function zr(e,t,n){var r=t?n(K(e),!0):K(e);return S(r,u,new e.constructor)}function Yr(e){return uf?Object(uf.call(e)):{}}function Hr(e,t){var n=t?Fr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Gr(e,t,n,r){for(var o=-1,i=e.length,u=n.length,c=-1,a=t.length,s=Bs(i-u,0),f=Array(a+s),p=!r;++c<a;)f[c]=t[c];for(;++o<u;)(p||i>o)&&(f[n[o]]=e[o]);for(;s--;)f[c++]=e[o++];return f}function Jr(e,t,n,r){for(var o=-1,i=e.length,u=-1,c=n.length,a=-1,s=t.length,f=Bs(i-c,0),p=Array(f+s),h=!r;++o<f;)p[o]=e[o];for(var l=o;++a<s;)p[l+a]=t[a];for(;++u<c;)(h||i>o)&&(p[l+n[u]]=e[o++]);return p}function Vr(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function $r(e,t,n,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var u=t[o],c=r?r(n[u],e[u],u,n,e):e[u];ln(n,u,c)}return n}function Kr(e,t){return $r(e,Io(e),t)}function Xr(e,t){return function(n,r){var o=Zf(n)?a:yn,i=t?t():{};return o(n,e,qo(r),i)}}function Zr(e){return Cu(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:te,u=o>2?n[2]:te;for(i="function"==typeof i?(o--,i):te,u&&Do(n[0],n[1],u)&&(i=3>o?te:i,o=1),t=Object(t);++r<o;){var c=n[r];c&&e(t,c,r,i)}return t})}function Qr(e,t){return function(n,r){if(null==n)return n;if(!Gu(n))return e(n,r);for(var o=n.length,i=t?o:-1,u=Object(n);(t?i--:++i<o)&&r(u[i],i,u)!==!1;);return n}}function eo(e){return function(t,n,r){for(var o=-1,i=Object(t),u=r(t),c=u.length;c--;){var a=u[e?c:++o];if(n(i[a],a,i)===!1)break}return t}}function to(e,t,n){function r(){var t=this&&this!==Gn&&this instanceof r?i:e;return t.apply(o?n:this,arguments)}var o=t&ce,i=oo(e);return r}function no(e){return function(t){t=Rc(t);var n=An.test(t)?Z(t):te,r=n?n[0]:t.charAt(0),o=n?Br(n,1).join(""):t.slice(1);return r[e]()+o}}function ro(e){return function(t){return S(Ra(la(t).replace(bn,"")),e,"")}}function oo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=_n(e.prototype),r=e.apply(n,t);return ic(r)?r:n}}function io(e,t,n){function r(){for(var i=arguments.length,u=Array(i),a=i,s=Ao(r);a--;)u[a]=arguments[a];var f=3>i&&u[0]!==s&&u[i-1]!==s?[]:$(u,s);if(i-=f.length,n>i)return lo(e,t,co,r.placeholder,te,u,f,te,te,n-i);var p=this&&this!==Gn&&this instanceof r?o:e;return c(p,this,u)}var o=oo(e);return r}function uo(e){return Cu(function(t){t=Pn(t,1);var n=t.length,o=n,i=r.prototype.thru;for(e&&t.reverse();o--;){var u=t[o];if("function"!=typeof u)throw new as(oe);if(i&&!c&&"wrapper"==bo(u))var c=new r([],!0)}for(o=c?o:n;++o<n;){u=t[o];var a=bo(u),s="wrapper"==a?yf(u):te;c=s&&Uo(s[0])&&s[1]==(ye|fe|he|de)&&!s[4].length&&1==s[9]?c[bo(s[0])].apply(c,s[3]):1==u.length&&Uo(u)?c[a]():c.thru(u)}return function(){var e=arguments,r=e[0];if(c&&1==e.length&&Zf(r)&&r.length>=re)return c.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}})}function co(e,t,n,r,o,i,u,c,a,s){function f(){for(var g=arguments.length,S=g,m=Array(g);S--;)m[S]=arguments[S];if(y)var _=Ao(f),w=F(m,_);if(r&&(m=Gr(m,r,o,y)),i&&(m=Jr(m,i,u,y)),g-=w,y&&s>g){var b=$(m,_);return lo(e,t,co,f.placeholder,n,m,b,c,a,s-g)}var q=h?n:this,k=l?q[e]:e;return g=m.length,c?m=Vo(m,c):d&&g>1&&m.reverse(),p&&g>a&&(m.length=a),this&&this!==Gn&&this instanceof f&&(k=v||oo(k)),k.apply(q,m)}var p=t&ye,h=t&ce,l=t&ae,y=t&(fe|pe),d=t&ve,v=l?te:oo(e);return f}function ao(e,t){return function(n,r){return Kn(n,e,t(r),{})}}function so(e){return Cu(function(t){return t=1==t.length&&Zf(t[0])?v(t[0],j(qo())):v(Pn(t,1,Bo),j(qo())),Cu(function(n){var r=this;return e(t,function(e){return c(e,r,n)})})})}function fo(e,t){t=t===te?" ":t+"";var n=t.length;if(2>n)return n?mr(t,e):t;var r=mr(t,Cs(e/X(t)));return An.test(t)?Br(Z(r),0,e).join(""):r.slice(0,e)}function po(e,t,n,r){function o(){for(var t=-1,a=arguments.length,s=-1,f=r.length,p=Array(f+a),h=this&&this!==Gn&&this instanceof o?u:e;++s<f;)p[s]=r[s];for(;a--;)p[s++]=arguments[++t];return c(h,i?n:this,p)}var i=t&ce,u=oo(e);return o}function ho(e){return function(t,n,r){return r&&"number"!=typeof r&&Do(t,n,r)&&(n=r=te),t=Oc(t),t=t===t?t:0,n===te?(n=t,t=0):n=Oc(n)||0,r=r===te?n>t?1:-1:Oc(r)||0,Sr(t,n,r,e)}}function lo(e,t,n,r,o,i,u,c,a,s){var f=t&fe,p=f?u:te,h=f?te:u,l=f?i:te,y=f?te:i;t|=f?he:le,t&=~(f?le:he),t&se||(t&=~(ce|ae));var d=[e,t,o,l,p,y,h,c,a,s],v=n.apply(te,d);return Uo(e)&&gf(v,d),v.placeholder=r,v}function yo(e){var t=us[e];return function(e,n){if(e=Oc(e),n=Ic(n)){var r=(Rc(e)+"e").split("e"),o=t(r[0]+"e"+(+r[1]+n));return r=(Rc(o)+"e").split("e"),+(r[0]+"e"+(+r[1]-n))}return t(e)}}function vo(e,t,n,r,o,i,u,c){var a=t&ae;if(!a&&"function"!=typeof e)throw new as(oe);var s=r?r.length:0;if(s||(t&=~(he|le),r=o=te),u=u===te?u:Bs(Ic(u),0),c=c===te?c:Ic(c),s-=o?o.length:0,t&le){var f=r,p=o;r=o=te}var h=a?te:yf(e),l=[e,t,n,r,o,f,p,i,u,c];if(h&&Ho(l,h),e=l[0],t=l[1],n=l[2],r=l[3],o=l[4],c=l[9]=null==l[9]?a?0:e.length:Bs(l[9]-s,0),!c&&t&(fe|pe)&&(t&=~(fe|pe)),t&&t!=ce)y=t==fe||t==pe?io(e,t,c):t!=he&&t!=(ce|he)||o.length?co.apply(te,l):po(e,t,n,r);else var y=to(e,t,n);var d=h?hf:gf;return d(y,l)}function go(e,t,n,r,o,i){var u=-1,c=o&Se,a=o&ge,s=e.length,f=t.length;if(s!=f&&!(c&&f>s))return!1;var p=i.get(e);if(p)return p==t;var h=!0;for(i.set(e,t);++u<s;){var l=e[u],y=t[u];if(r)var d=c?r(y,l,u,t,e,i):r(l,y,u,e,t,i);if(d!==te){if(d)continue;h=!1;break}if(a){if(!_(t,function(e){return l===e||n(l,e,r,o,i)})){h=!1;break}}else if(l!==y&&!n(l,y,r,o,i)){h=!1;break}}return i["delete"](e),h}function So(e,t,n,r,o,i,u){switch(n){case Xe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ke:return!(e.byteLength!=t.byteLength||!r(new bs(e),new bs(t)));case Pe:case Me:return+e==+t;case Be:return e.name==t.name&&e.message==t.message;case Ue:return e!=+e?t!=+t:e==+t;case Ye:case Ge:return e==t+"";case Ne:var c=V;case He:var a=i&Se;if(c||(c=K),e.size!=t.size&&!a)return!1;var s=u.get(e);return s?s==t:(i|=ge,u.set(e,t),go(c(e),c(t),r,o,i,u));case Je:if(uf)return uf.call(e)==uf.call(t)}return!1}function mo(e,t,n,r,o,i){var u=o&Se,c=Gc(e),a=c.length,s=Gc(t),f=s.length;if(a!=f&&!u)return!1;for(var p=a;p--;){var h=c[p];if(!(u?h in t:Yn(t,h)))return!1}var l=i.get(e);if(l)return l==t;var y=!0;i.set(e,t);for(var d=u;++p<a;){h=c[p];var v=e[h],g=t[h];if(r)var S=u?r(g,v,h,t,e,i):r(v,g,h,e,t,i);if(!(S===te?v===g||n(v,g,r,o,i):S)){y=!1;break}d||(d="constructor"==h)}if(y&&!d){var m=e.constructor,_=t.constructor;m!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof m&&m instanceof m&&"function"==typeof _&&_ instanceof _)&&(y=!1)}return i["delete"](e),y}function _o(e){return zn(e,Gc,Io)}function wo(e){return zn(e,Jc,vf)}function bo(e){for(var t=e.name+"",n=Zs[t],r=ls.call(Zs,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function qo(){var e=t.iteratee||Da;return e=e===Da?tr:e,arguments.length?e(arguments[0],arguments[1]):e}function ko(e){for(var t=ta(e),n=t.length;n--;)t[n][2]=zo(t[n][1]);return t}function xo(e,t){var n=e[t];return pc(n)?n:te}function Ao(e){var n=ls.call(t,"placeholder")?t:e;return n.placeholder}function Eo(e){return Rs(Object(e))}function Io(e){return xs(Object(e))}function Lo(e){return vs.call(e)}function Oo(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],u=i.size;switch(i.type){case"drop":e+=u;break;case"dropRight":t-=u;break;case"take":t=Ds(t,e+u);break;case"takeRight":e=Bs(e,t-u)}}return{start:e,end:t}}function Co(e,t,n){t=Fo(t,e)?[t]:Mr(t);for(var r,o=-1,i=t.length;++o<i;){var u=t[o];if(!(r=null!=e&&n(e,u)))break;e=e[u]}if(r)return r;var i=e?e.length:0;return!!i&&oc(i)&&G(u,i)&&(Zf(e)||mc(e)||Yu(e))}function jo(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&ls.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function Ro(e){return"function"!=typeof e.constructor||Wo(e)?{}:_n(Eo(e))}function To(e,t,n,r){var o=e.constructor;switch(t){case Ke:return Fr(e);case Pe:case Me:return new o(+e);case Xe:return Nr(e,r);case Ze:case Qe:case et:case tt:case nt:case rt:case ot:case it:case ut:return Hr(e,r);case Ne:return Ur(e,r,n);case Ue:case Ge:return new o(e);case Ye:return Wr(e);case He:return zr(e,r,n);case Je:return Yr(e)}}function Po(e){var t=e?e.length:te;return oc(t)&&(Zf(e)||mc(e)||Yu(e))?O(t,String):null}function Mo(e){return Ju(e)&&(Zf(e)||Yu(e))}function Bo(e){return Zf(e)&&!(2==e.length&&!nc(e[0]))}function Do(e,t,n){if(!ic(n))return!1;var r=typeof t;return("number"==r?Gu(n)&&G(t,n.length):"string"==r&&t in n)?Uu(n[t],e):!1}function Fo(e,t){var n=typeof e;return"number"==n||"symbol"==n?!0:!Zf(e)&&(_c(e)||St.test(e)||!gt.test(e)||null!=t&&e in Object(t))}function No(e){var t=typeof e;return"number"==t||"boolean"==t||"string"==t&&"__proto__"!=e||null==e}function Uo(e){var n=bo(e),r=t[n];if("function"!=typeof r||!(n in o.prototype))return!1;if(e===r)return!0;var i=yf(r);return!!i&&e===i[0]}function Wo(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||fs;return e===n}function zo(e){return e===e&&!ic(e)}function Yo(e,t){return function(n){return null==n?!1:n[e]===t&&(t!==te||e in Object(n))}}function Ho(e,t){var n=e[1],r=t[1],o=n|r,i=(ce|ae|ye)>o,u=r==ye&&n==fe||r==ye&&n==de&&e[7].length<=t[8]||r==(ye|de)&&t[7].length<=t[8]&&n==fe;if(!i&&!u)return e;r&ce&&(e[2]=t[2],o|=n&ce?0:se);var c=t[3];if(c){var a=e[3];e[3]=a?Gr(a,c,t[4]):c,e[4]=a?$(e[3],ue):t[4]}return c=t[5],c&&(a=e[5],e[5]=a?Jr(a,c,t[6]):c,e[6]=a?$(e[5],ue):t[6]),c=t[7],c&&(e[7]=c),r&ye&&(e[8]=null==e[8]?t[8]:Ds(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o,e}function Go(e,t,n,r,o,i){return ic(e)&&ic(t)&&cr(e,t,te,Go,i.set(t,e)),e}function Jo(e,t){return 1==t.length?e:Wn(e,wr(t,0,-1))}function Vo(e,t){for(var n=e.length,r=Ds(t.length,n),o=Vr(e);r--;){var i=t[r];e[r]=G(i,n)?o[i]:te}return e}function $o(e){return"string"==typeof e||_c(e)?e:e+""}function Ko(e){if(null!=e){try{return hs.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Xo(e){if(e instanceof o)return e.clone();var t=new r(e.__wrapped__,e.__chain__);return t.__actions__=Vr(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Zo(e,t,n){t=(n?Do(e,t,n):t===te)?1:Bs(Ic(t),0);var r=e?e.length:0;if(!r||1>t)return[];for(var o=0,i=0,u=Array(Cs(r/t));r>o;)u[i++]=wr(e,o,o+=t);return u}function Qo(e){for(var t=-1,n=e?e.length:0,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o}function ei(){var e=arguments.length,t=Mu(arguments[0]);if(2>e)return e?Vr(t):[];for(var n=Array(e-1);e--;)n[e-1]=arguments[e];return s(t,Pn(n,1))}function ti(e,t,n){var r=e?e.length:0;return r?(t=n||t===te?1:Ic(t),wr(e,0>t?0:t,r)):[]}function ni(e,t,n){var r=e?e.length:0;return r?(t=n||t===te?1:Ic(t),t=r-t,wr(e,0,0>t?0:t)):[]}function ri(e,t){return e&&e.length?Or(e,qo(t,3),!0,!0):[]}function oi(e,t){return e&&e.length?Or(e,qo(t,3),!0):[]}function ii(e,t,n,r){var o=e?e.length:0;return o?(n&&"number"!=typeof n&&Do(e,t,n)&&(n=0,r=o),Rn(e,t,n,r)):[]}function ui(e,t){return e&&e.length?q(e,qo(t,3)):-1}function ci(e,t){return e&&e.length?q(e,qo(t,3),!0):-1}function ai(e){var t=e?e.length:0;return t?Pn(e,1):[]}function si(e){var t=e?e.length:0;return t?Pn(e,Ae):[]}function fi(e,t){var n=e?e.length:0;return n?(t=t===te?1:Ic(t),Pn(e,t)):[]}function pi(e){for(var t=-1,n=e?e.length:0,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r}function hi(e){return e&&e.length?e[0]:te}function li(e,t,n){var r=e?e.length:0;return r?(n=Ic(n),0>n&&(n=Bs(r+n,0)),k(e,t,n)):-1}function yi(e){return ni(e,1)}function di(e,t){return e?Ps.call(e,t):""}function vi(e){var t=e?e.length:0;return t?e[t-1]:te}function gi(e,t,n){var r=e?e.length:0;if(!r)return-1;var o=r;if(n!==te&&(o=Ic(n),o=(0>o?Bs(r+o,0):Ds(o,r-1))+1),t!==t)return Y(e,o,!0);for(;o--;)if(e[o]===t)return o;return-1}function Si(e,t){return e&&e.length?sr(e,Ic(t)):te}function mi(e,t){return e&&e.length&&t&&t.length?dr(e,t):e}function _i(e,t,n){return e&&e.length&&t&&t.length?dr(e,t,qo(n)):e}function wi(e,t,n){return e&&e.length&&t&&t.length?dr(e,t,te,n):e}function bi(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=qo(t,3);++r<i;){var u=e[r];t(u,r,e)&&(n.push(u),o.push(r))}return vr(e,o),n}function qi(e){return e?Ws.call(e):e}function ki(e,t,n){var r=e?e.length:0;return r?(n&&"number"!=typeof n&&Do(e,t,n)?(t=0,n=r):(t=null==t?0:Ic(t),n=n===te?r:Ic(n)),wr(e,t,n)):[]}function xi(e,t){return qr(e,t)}function Ai(e,t,n){return kr(e,t,qo(n))}function Ei(e,t){var n=e?e.length:0;if(n){var r=qr(e,t);if(n>r&&Uu(e[r],t))return r}return-1}function Ii(e,t){return qr(e,t,!0)}function Li(e,t,n){return kr(e,t,qo(n),!0)}function Oi(e,t){var n=e?e.length:0;if(n){var r=qr(e,t,!0)-1;if(Uu(e[r],t))return r}return-1}function Ci(e){return e&&e.length?xr(e):[]}function ji(e,t){return e&&e.length?Ar(e,qo(t)):[]}function Ri(e){return ti(e,1)}function Ti(e,t,n){return e&&e.length?(t=n||t===te?1:Ic(t),wr(e,0,0>t?0:t)):[]}function Pi(e,t,n){var r=e?e.length:0;return r?(t=n||t===te?1:Ic(t),t=r-t,wr(e,0>t?0:t,r)):[]}function Mi(e,t){return e&&e.length?Or(e,qo(t,3),!1,!0):[]}function Bi(e,t){return e&&e.length?Or(e,qo(t,3)):[]}function Di(e){return e&&e.length?Er(e):[]}function Fi(e,t){return e&&e.length?Er(e,qo(t)):[]}function Ni(e,t){return e&&e.length?Er(e,te,t):[]}function Ui(e){if(!e||!e.length)return[];var t=0;return e=l(e,function(e){return Ju(e)?(t=Bs(e.length,t),!0):void 0}),O(t,function(t){return v(e,lr(t))})}function Wi(e,t){if(!e||!e.length)return[];var n=Ui(e);return null==t?n:v(n,function(e){return c(t,te,e)})}function zi(e,t){return Rr(e||[],t||[],ln)}function Yi(e,t){return Rr(e||[],t||[],_r)}function Hi(e){var n=t(e);return n.__chain__=!0,n}function Gi(e,t){return t(e),e}function Ji(e,t){return t(e)}function Vi(){return Hi(this)}function $i(){return new r(this.value(),this.__chain__)}function Ki(){this.__values__===te&&(this.__values__=Ec(this.value()));var e=this.__index__>=this.__values__.length,t=e?te:this.__values__[this.__index__++];return{done:e,value:t}}function Xi(){return this}function Zi(e){for(var t,r=this;r instanceof n;){var o=Xo(r);o.__index__=0,o.__values__=te,t?i.__wrapped__=o:t=o;var i=o;r=r.__wrapped__}return i.__wrapped__=e,t}function Qi(){var e=this.__wrapped__;if(e instanceof o){var t=e;return this.__actions__.length&&(t=new o(this)),t=t.reverse(),t.__actions__.push({func:Ji,args:[qi],thisArg:te}),new r(t,this.__chain__)}return this.thru(qi)}function eu(){return Cr(this.__wrapped__,this.__actions__);
}function tu(e,t,n){var r=Zf(e)?h:jn;return n&&Do(e,t,n)&&(t=te),r(e,qo(t,3))}function nu(e,t){var n=Zf(e)?l:Tn;return n(e,qo(t,3))}function ru(e,t){if(t=qo(t,3),Zf(e)){var n=q(e,t);return n>-1?e[n]:te}return b(e,t,af)}function ou(e,t){if(t=qo(t,3),Zf(e)){var n=q(e,t,!0);return n>-1?e[n]:te}return b(e,t,sf)}function iu(e,t){return Pn(pu(e,t),1)}function uu(e,t){return Pn(pu(e,t),Ae)}function cu(e,t,n){return n=n===te?1:Ic(n),Pn(pu(e,t),n)}function au(e,t){return"function"==typeof t&&Zf(e)?f(e,t):af(e,qo(t))}function su(e,t){return"function"==typeof t&&Zf(e)?p(e,t):sf(e,qo(t))}function fu(e,t,n,r){e=Gu(e)?e:ca(e),n=n&&!r?Ic(n):0;var o=e.length;return 0>n&&(n=Bs(o+n,0)),mc(e)?o>=n&&e.indexOf(t,n)>-1:!!o&&k(e,t,n)>-1}function pu(e,t){var n=Zf(e)?v:or;return n(e,qo(t,3))}function hu(e,t,n,r){return null==e?[]:(Zf(t)||(t=null==t?[]:[t]),n=r?te:n,Zf(n)||(n=null==n?[]:[n]),fr(e,t,n))}function lu(e,t,n){var r=Zf(e)?S:E,o=arguments.length<3;return r(e,qo(t,4),n,o,af)}function yu(e,t,n){var r=Zf(e)?m:E,o=arguments.length<3;return r(e,qo(t,4),n,o,sf)}function du(e,t){var n=Zf(e)?l:Tn;return t=qo(t,3),n(e,function(e,n,r){return!t(e,n,r)})}function vu(e){var t=Gu(e)?e:ca(e),n=t.length;return n>0?t[gr(0,n-1)]:te}function gu(e,t,n){var r=-1,o=Ec(e),i=o.length,u=i-1;for(t=(n?Do(e,t,n):t===te)?1:gn(Ic(t),0,i);++r<t;){var c=gr(r,u),a=o[c];o[c]=o[r],o[r]=a}return o.length=t,o}function Su(e){return gu(e,Oe)}function mu(e){if(null==e)return 0;if(Gu(e)){var t=e.length;return t&&mc(e)?X(e):t}if(uc(e)){var n=Lo(e);if(n==Ne||n==He)return e.size}return Gc(e).length}function _u(e,t,n){var r=Zf(e)?_:br;return n&&Do(e,t,n)&&(t=te),r(e,qo(t,3))}function wu(e,t){if("function"!=typeof t)throw new as(oe);return e=Ic(e),function(){return--e<1?t.apply(this,arguments):void 0}}function bu(e,t,n){return t=n?te:t,t=e&&null==t?e.length:t,vo(e,ye,te,te,te,te,t)}function qu(e,t){var n;if("function"!=typeof t)throw new as(oe);return e=Ic(e),function(){return--e>0&&(n=t.apply(this,arguments)),1>=e&&(t=te),n}}function ku(e,t,n){t=n?te:t;var r=vo(e,fe,te,te,te,te,te,t);return r.placeholder=ku.placeholder,r}function xu(e,t,n){t=n?te:t;var r=vo(e,pe,te,te,te,te,te,t);return r.placeholder=xu.placeholder,r}function Au(e,t,n){function r(t){var n=h,r=l;return h=l=te,S=t,d=e.apply(r,n)}function o(e){return S=e,v=Ls(c,t),m?r(e):d}function i(e){var n=e-g,r=e-S,o=t-n;return _?Ds(o,y-r):o}function u(e){var n=e-g,r=e-S;return!g||n>=t||0>n||_&&r>=y}function c(){var e=zf();return u(e)?a(e):void(v=Ls(c,i(e)))}function a(e){return qs(v),v=te,w&&h?r(e):(h=l=te,d)}function s(){v!==te&&qs(v),g=S=0,h=l=v=te}function f(){return v===te?d:a(zf())}function p(){var e=zf(),n=u(e);if(h=arguments,l=this,g=e,n){if(v===te)return o(g);if(_)return qs(v),v=Ls(c,t),r(g)}return v===te&&(v=Ls(c,t)),d}var h,l,y,d,v,g=0,S=0,m=!1,_=!1,w=!0;if("function"!=typeof e)throw new as(oe);return t=Oc(t)||0,ic(n)&&(m=!!n.leading,_="maxWait"in n,y=_?Bs(Oc(n.maxWait)||0,t):y,w="trailing"in n?!!n.trailing:w),p.cancel=s,p.flush=f,p}function Eu(e){return vo(e,ve)}function Iu(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new as(oe);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var u=e.apply(this,r);return n.cache=i.set(o,u),u};return n.cache=new(Iu.Cache||Yt),n}function Lu(e){if("function"!=typeof e)throw new as(oe);return function(){return!e.apply(this,arguments)}}function Ou(e){return qu(2,e)}function Cu(e,t){if("function"!=typeof e)throw new as(oe);return t=Bs(t===te?e.length-1:Ic(t),0),function(){for(var n=arguments,r=-1,o=Bs(n.length-t,0),i=Array(o);++r<o;)i[r]=n[t+r];switch(t){case 0:return e.call(this,i);case 1:return e.call(this,n[0],i);case 2:return e.call(this,n[0],n[1],i)}var u=Array(t+1);for(r=-1;++r<t;)u[r]=n[r];return u[t]=i,c(e,this,u)}}function ju(e,t){if("function"!=typeof e)throw new as(oe);return t=t===te?0:Bs(Ic(t),0),Cu(function(n){var r=n[t],o=Br(n,0,t);return r&&g(o,r),c(e,this,o)})}function Ru(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new as(oe);return ic(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Au(e,t,{leading:r,maxWait:t,trailing:o})}function Tu(e){return bu(e,1)}function Pu(e,t){return t=null==t?Ba:t,$f(t,e)}function Mu(){if(!arguments.length)return[];var e=arguments[0];return Zf(e)?e:[e]}function Bu(e){return Sn(e,!1,!0)}function Du(e,t){return Sn(e,!1,!0,t)}function Fu(e){return Sn(e,!0,!0)}function Nu(e,t){return Sn(e,!0,!0,t)}function Uu(e,t){return e===t||e!==e&&t!==t}function Wu(e,t){return e>t}function zu(e,t){return e>=t}function Yu(e){return Ju(e)&&ls.call(e,"callee")&&(!Is.call(e,"callee")||vs.call(e)==Re)}function Hu(e){return uc(e)&&vs.call(e)==Ke}function Gu(e){return null!=e&&oc(df(e))&&!nc(e)}function Ju(e){return uc(e)&&Gu(e)}function Vu(e){return e===!0||e===!1||uc(e)&&vs.call(e)==Pe}function $u(e){return uc(e)&&vs.call(e)==Me}function Ku(e){return!!e&&1===e.nodeType&&uc(e)&&!dc(e)}function Xu(e){if(Gu(e)&&(Zf(e)||mc(e)||nc(e.splice)||Yu(e)||Qf(e)))return!e.length;if(uc(e)){var t=Lo(e);if(t==Ne||t==He)return!e.size}for(var n in e)if(ls.call(e,n))return!1;return!(Xs&&Gc(e).length)}function Zu(e,t){return Zn(e,t)}function Qu(e,t,n){n="function"==typeof n?n:te;var r=n?n(e,t):te;return r===te?Zn(e,t,n):!!r}function ec(e){return uc(e)?vs.call(e)==Be||"string"==typeof e.message&&"string"==typeof e.name:!1}function tc(e){return"number"==typeof e&&Ts(e)}function nc(e){var t=ic(e)?vs.call(e):"";return t==De||t==Fe}function rc(e){return"number"==typeof e&&e==Ic(e)}function oc(e){return"number"==typeof e&&e>-1&&e%1==0&&Ee>=e}function ic(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function uc(e){return!!e&&"object"==typeof e}function cc(e){return uc(e)&&Lo(e)==Ne}function ac(e,t){return e===t||er(e,t,ko(t))}function sc(e,t,n){return n="function"==typeof n?n:te,er(e,t,ko(t),n)}function fc(e){return yc(e)&&e!=+e}function pc(e){if(!ic(e))return!1;var t=nc(e)||H(e)?Ss:jt;return t.test(Ko(e))}function hc(e){return null===e}function lc(e){return null==e}function yc(e){return"number"==typeof e||uc(e)&&vs.call(e)==Ue}function dc(e){if(!uc(e)||vs.call(e)!=We||H(e))return!1;var t=Eo(e);if(null===t)return!0;var n=ls.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&hs.call(n)==ds}function vc(e){return ic(e)&&vs.call(e)==Ye}function gc(e){return rc(e)&&e>=-Ee&&Ee>=e}function Sc(e){return uc(e)&&Lo(e)==He}function mc(e){return"string"==typeof e||!Zf(e)&&uc(e)&&vs.call(e)==Ge}function _c(e){return"symbol"==typeof e||uc(e)&&vs.call(e)==Je}function wc(e){return uc(e)&&oc(e.length)&&!!On[vs.call(e)]}function bc(e){return e===te}function qc(e){return uc(e)&&Lo(e)==Ve}function kc(e){return uc(e)&&vs.call(e)==$e}function xc(e,t){return t>e}function Ac(e,t){return t>=e}function Ec(e){if(!e)return[];if(Gu(e))return mc(e)?Z(e):Vr(e);if(As&&e[As])return J(e[As]());var t=Lo(e),n=t==Ne?V:t==He?K:ca;return n(e)}function Ic(e){if(!e)return 0===e?e:0;if(e=Oc(e),e===Ae||e===-Ae){var t=0>e?-1:1;return t*Ie}var n=e%1;return e===e?n?e-n:e:0}function Lc(e){return e?gn(Ic(e),0,Oe):0}function Oc(e){if("number"==typeof e)return e;if(_c(e))return Le;if(ic(e)){var t=nc(e.valueOf)?e.valueOf():e;e=ic(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(bt,"");var n=Ct.test(e);return n||Rt.test(e)?Dn(e.slice(2),n?2:8):Ot.test(e)?Le:+e}function Cc(e){return $r(e,Jc(e))}function jc(e){return gn(Ic(e),-Ee,Ee)}function Rc(e){if("string"==typeof e)return e;if(null==e)return"";if(_c(e))return cf?cf.call(e):"";var t=e+"";return"0"==t&&1/e==-Ae?"-0":t}function Tc(e,t){var n=_n(e);return t?dn(n,t):n}function Pc(e,t){return b(e,qo(t,3),Mn,!0)}function Mc(e,t){return b(e,qo(t,3),Fn,!0)}function Bc(e,t){return null==e?e:ff(e,qo(t),Jc)}function Dc(e,t){return null==e?e:pf(e,qo(t),Jc)}function Fc(e,t){return e&&Mn(e,qo(t))}function Nc(e,t){return e&&Fn(e,qo(t))}function Uc(e){return null==e?[]:Nn(e,Gc(e))}function Wc(e){return null==e?[]:Nn(e,Jc(e))}function zc(e,t,n){var r=null==e?te:Wn(e,t);return r===te?n:r}function Yc(e,t){return null!=e&&Co(e,t,Yn)}function Hc(e,t){return null!=e&&Co(e,t,Hn)}function Gc(e){var t=Wo(e);if(!t&&!Gu(e))return nr(e);var n=Po(e),r=!!n,o=n||[],i=o.length;for(var u in e)!Yn(e,u)||r&&("length"==u||G(u,i))||t&&"constructor"==u||o.push(u);return o}function Jc(e){for(var t=-1,n=Wo(e),r=rr(e),o=r.length,i=Po(e),u=!!i,c=i||[],a=c.length;++t<o;){var s=r[t];u&&("length"==s||G(s,a))||"constructor"==s&&(n||!ls.call(e,s))||c.push(s)}return c}function Vc(e,t){var n={};return t=qo(t,3),Mn(e,function(e,r,o){n[t(e,r,o)]=e}),n}function $c(e,t){var n={};return t=qo(t,3),Mn(e,function(e,r,o){n[r]=t(e,r,o)}),n}function Kc(e,t){return t=qo(t),hr(e,function(e,n){return!t(e,n)})}function Xc(e,t){return null==e?{}:hr(e,qo(t))}function Zc(e,t,n){t=Fo(t,e)?[t]:Mr(t);var r=-1,o=t.length;for(o||(e=te,o=1);++r<o;){var i=null==e?te:e[t[r]];i===te&&(r=o,i=n),e=nc(i)?i.call(e):i}return e}function Qc(e,t,n){return null==e?e:_r(e,t,n)}function ea(e,t,n,r){return r="function"==typeof r?r:te,null==e?e:_r(e,t,n,r)}function ta(e){return C(e,Gc(e))}function na(e){return C(e,Jc(e))}function ra(e,t,n){var r=Zf(e)||wc(e);if(t=qo(t,4),null==n)if(r||ic(e)){var o=e.constructor;n=r?Zf(e)?new o:[]:nc(o)?_n(Eo(e)):{}}else n={};return(r?f:Mn)(e,function(e,r,o){return t(n,e,r,o)}),n}function oa(e,t){return null==e?!0:Ir(e,t)}function ia(e,t,n){return null==e?e:Lr(e,t,Pr(n))}function ua(e,t,n,r){return r="function"==typeof r?r:te,null==e?e:Lr(e,t,Pr(n),r)}function ca(e){return e?R(e,Gc(e)):[]}function aa(e){return null==e?[]:R(e,Jc(e))}function sa(e,t,n){return n===te&&(n=t,t=te),n!==te&&(n=Oc(n),n=n===n?n:0),t!==te&&(t=Oc(t),t=t===t?t:0),gn(Oc(e),t,n)}function fa(e,t,n){return t=Oc(t)||0,n===te?(n=t,t=0):n=Oc(n)||0,e=Oc(e),Vn(e,t,n)}function pa(e,t,n){if(n&&"boolean"!=typeof n&&Do(e,t,n)&&(t=n=te),n===te&&("boolean"==typeof t?(n=t,t=te):"boolean"==typeof e&&(n=e,e=te)),e===te&&t===te?(e=0,t=1):(e=Oc(e)||0,t===te?(t=e,e=0):t=Oc(t)||0),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=Ns();return Ds(e+o*(t-e+Bn("1e-"+((o+"").length-1))),t)}return gr(e,t)}function ha(e){return wp(Rc(e).toLowerCase())}function la(e){return e=Rc(e),e&&e.replace(Pt,U).replace(qn,"")}function ya(e,t,n){e=Rc(e),t="string"==typeof t?t:t+"";var r=e.length;return n=n===te?r:gn(Ic(n),0,r),n-=t.length,n>=0&&e.indexOf(t,n)==n}function da(e){return e=Rc(e),e&&lt.test(e)?e.replace(pt,W):e}function va(e){return e=Rc(e),e&&wt.test(e)?e.replace(_t,"\\$&"):e}function ga(e,t,n){e=Rc(e),t=Ic(t);var r=t?X(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return fo(js(o),n)+e+fo(Cs(o),n)}function Sa(e,t,n){e=Rc(e),t=Ic(t);var r=t?X(e):0;return t&&t>r?e+fo(t-r,n):e}function ma(e,t,n){e=Rc(e),t=Ic(t);var r=t?X(e):0;return t&&t>r?fo(t-r,n)+e:e}function _a(e,t,n){return n||null==t?t=0:t&&(t=+t),e=Rc(e).replace(bt,""),Fs(e,t||(Lt.test(e)?16:10))}function wa(e,t,n){return t=(n?Do(e,t,n):t===te)?1:Ic(t),mr(Rc(e),t)}function ba(){var e=arguments,t=Rc(e[0]);return e.length<3?t:Us.call(t,e[1],e[2])}function qa(e,t,n){return n&&"number"!=typeof n&&Do(e,t,n)&&(t=n=te),(n=n===te?Oe:n>>>0)?(e=Rc(e),e&&("string"==typeof t||null!=t&&!vc(t))&&(t+="",""==t&&An.test(e))?Br(Z(e),0,n):zs.call(e,t,n)):[]}function ka(e,t,n){return e=Rc(e),n=gn(Ic(n),0,e.length),e.lastIndexOf(t,n)==n}function xa(e,n,r){var o=t.templateSettings;r&&Do(e,n,r)&&(n=te),e=Rc(e),n=np({},n,o,pn);var i,u,c=np({},n.imports,o.imports,pn),a=Gc(c),s=R(c,a),f=0,p=n.interpolate||Mt,h="__p += '",l=cs((n.escape||Mt).source+"|"+p.source+"|"+(p===vt?Et:Mt).source+"|"+(n.evaluate||Mt).source+"|$","g"),y="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++Ln+"]")+"\n";e.replace(l,function(t,n,r,o,c,a){return r||(r=o),h+=e.slice(f,a).replace(Bt,z),n&&(i=!0,h+="' +\n__e("+n+") +\n'"),c&&(u=!0,h+="';\n"+c+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=a+t.length,t}),h+="';\n";var d=n.variable;d||(h="with (obj) {\n"+h+"\n}\n"),h=(u?h.replace(ct,""):h).replace(at,"$1").replace(st,"$1;"),h="function("+(d||"obj")+") {\n"+(d?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var v=bp(function(){return Function(a,y+"return "+h).apply(te,s)});if(v.source=h,ec(v))throw v;return v}function Aa(e){return Rc(e).toLowerCase()}function Ea(e){return Rc(e).toUpperCase()}function Ia(e,t,n){if(e=Rc(e),!e)return e;if(n||t===te)return e.replace(bt,"");if(!(t+=""))return e;var r=Z(e),o=Z(t),i=T(r,o),u=P(r,o)+1;return Br(r,i,u).join("")}function La(e,t,n){if(e=Rc(e),!e)return e;if(n||t===te)return e.replace(kt,"");if(!(t+=""))return e;var r=Z(e),o=P(r,Z(t))+1;return Br(r,0,o).join("")}function Oa(e,t,n){if(e=Rc(e),!e)return e;if(n||t===te)return e.replace(qt,"");if(!(t+=""))return e;var r=Z(e),o=T(r,Z(t));return Br(r,o).join("")}function Ca(e,t){var n=me,r=_e;if(ic(t)){var o="separator"in t?t.separator:o;n="length"in t?Ic(t.length):n,r="omission"in t?Rc(t.omission):r}e=Rc(e);var i=e.length;if(An.test(e)){var u=Z(e);i=u.length}if(n>=i)return e;var c=n-X(r);if(1>c)return r;var a=u?Br(u,0,c).join(""):e.slice(0,c);if(o===te)return a+r;if(u&&(c+=a.length-c),vc(o)){if(e.slice(c).search(o)){var s,f=a;for(o.global||(o=cs(o.source,Rc(It.exec(o))+"g")),o.lastIndex=0;s=o.exec(f);)var p=s.index;a=a.slice(0,p===te?c:p)}}else if(e.indexOf(o,c)!=c){var h=a.lastIndexOf(o);h>-1&&(a=a.slice(0,h))}return a+r}function ja(e){return e=Rc(e),e&&ht.test(e)?e.replace(ft,Q):e}function Ra(e,t,n){return e=Rc(e),t=n?te:t,t===te&&(t=En.test(e)?xn:xt),e.match(t)||[]}function Ta(e){var t=e?e.length:0,n=qo();return e=t?v(e,function(e){if("function"!=typeof e[1])throw new as(oe);return[n(e[0]),e[1]]}):[],Cu(function(n){for(var r=-1;++r<t;){var o=e[r];if(c(o[0],this,n))return c(o[1],this,n)}})}function Pa(e){return mn(Sn(e,!0))}function Ma(e){return function(){return e}}function Ba(e){return e}function Da(e){return tr("function"==typeof e?e:Sn(e,!0))}function Fa(e){return ir(Sn(e,!0))}function Na(e,t){return ur(e,Sn(t,!0))}function Ua(e,t,n){var r=Gc(t),o=Nn(t,r);null!=n||ic(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=Nn(t,Gc(t)));var i=!(ic(n)&&"chain"in n&&!n.chain),u=nc(e);return f(o,function(n){var r=t[n];e[n]=r,u&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=Vr(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,g([this.value()],arguments))})}),e}function Wa(){return Gn._===this&&(Gn._=gs),this}function za(){}function Ya(e){return e=Ic(e),Cu(function(t){return sr(t,e)})}function Ha(e){return Fo(e)?lr(e):yr(e)}function Ga(e){return function(t){return null==e?te:Wn(e,t)}}function Ja(e,t){if(e=Ic(e),1>e||e>Ee)return[];var n=Oe,r=Ds(e,Oe);t=qo(t),e-=Oe;for(var o=O(r,t);++n<e;)t(n);return o}function Va(e){return Zf(e)?v(e,$o):_c(e)?[e]:Vr(Sf(e))}function $a(e){var t=++ys;return Rc(e)+t}function Ka(e){return e&&e.length?w(e,Ba,Wu):te}function Xa(e,t){return e&&e.length?w(e,qo(t),Wu):te}function Za(e){return A(e,Ba)}function Qa(e,t){return A(e,qo(t))}function es(e){return e&&e.length?w(e,Ba,xc):te}function ts(e,t){return e&&e.length?w(e,qo(t),xc):te}function ns(e){return e&&e.length?L(e,Ba):0}function rs(e,t){return e&&e.length?L(e,qo(t)):0}e=e?Jn.defaults({},e,Jn.pick(Gn,In)):Gn;var os=e.Date,is=e.Error,us=e.Math,cs=e.RegExp,as=e.TypeError,ss=e.Array.prototype,fs=e.Object.prototype,ps=e.String.prototype,hs=e.Function.prototype.toString,ls=fs.hasOwnProperty,ys=0,ds=hs.call(Object),vs=fs.toString,gs=Gn._,Ss=cs("^"+hs.call(ls).replace(_t,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ms=Un?e.Buffer:te,_s=e.Reflect,ws=e.Symbol,bs=e.Uint8Array,qs=e.clearTimeout,ks=_s?_s.enumerate:te,xs=Object.getOwnPropertySymbols,As="symbol"==typeof(As=ws&&ws.iterator)?As:te,Es=Object.create,Is=fs.propertyIsEnumerable,Ls=e.setTimeout,Os=ss.splice,Cs=us.ceil,js=us.floor,Rs=Object.getPrototypeOf,Ts=e.isFinite,Ps=ss.join,Ms=Object.keys,Bs=us.max,Ds=us.min,Fs=e.parseInt,Ns=us.random,Us=ps.replace,Ws=ss.reverse,zs=ps.split,Ys=xo(e,"DataView"),Hs=xo(e,"Map"),Gs=xo(e,"Promise"),Js=xo(e,"Set"),Vs=xo(e,"WeakMap"),$s=xo(Object,"create"),Ks=Vs&&new Vs,Xs=!Is.call({valueOf:1},"valueOf"),Zs={},Qs=Ko(Ys),ef=Ko(Hs),tf=Ko(Gs),nf=Ko(Js),rf=Ko(Vs),of=ws?ws.prototype:te,uf=of?of.valueOf:te,cf=of?of.toString:te;t.templateSettings={escape:yt,evaluate:dt,interpolate:vt,variable:"",imports:{_:t}},t.prototype=n.prototype,t.prototype.constructor=t,r.prototype=_n(n.prototype),r.prototype.constructor=r,o.prototype=_n(n.prototype),o.prototype.constructor=o,Ft.prototype=$s?$s(null):fs,Yt.prototype.clear=Ht,Yt.prototype["delete"]=Gt,Yt.prototype.get=Jt,Yt.prototype.has=Vt,Yt.prototype.set=$t,Kt.prototype.push=Zt,Qt.prototype.clear=en,Qt.prototype["delete"]=tn,Qt.prototype.get=nn,Qt.prototype.has=rn,Qt.prototype.set=on;var af=Qr(Mn),sf=Qr(Fn,!0),ff=eo(),pf=eo(!0);ks&&!Is.call({valueOf:1},"valueOf")&&(rr=function(e){return J(ks(e))});var hf=Ks?function(e,t){return Ks.set(e,t),e}:Ba,lf=Js&&2===new Js([1,2]).size?function(e){return new Js(e)}:za,yf=Ks?function(e){return Ks.get(e)}:za,df=lr("length");xs||(Io=function(){return[]});var vf=xs?function(e){for(var t=[];e;)g(t,Io(e)),e=Eo(e);return t}:Io;(Ys&&Lo(new Ys(new ArrayBuffer(1)))!=Xe||Hs&&Lo(new Hs)!=Ne||Gs&&Lo(Gs.resolve())!=ze||Js&&Lo(new Js)!=He||Vs&&Lo(new Vs)!=Ve)&&(Lo=function(e){var t=vs.call(e),n=t==We?e.constructor:te,r=n?Ko(n):te;if(r)switch(r){case Qs:return Xe;case ef:return Ne;case tf:return ze;case nf:return He;case rf:return Ve}return t});var gf=function(){var e=0,t=0;return function(n,r){var o=zf(),i=be-(o-t);if(t=o,i>0){if(++e>=we)return n}else e=0;return hf(n,r)}}(),Sf=Iu(function(e){var t=[];return Rc(e).replace(mt,function(e,n,r,o){t.push(r?o.replace(At,"$1"):n||e)}),t}),mf=Cu(function(e,t){return Ju(e)?kn(e,Pn(t,1,Ju,!0)):[]}),_f=Cu(function(e,t){var n=vi(t);return Ju(n)&&(n=te),Ju(e)?kn(e,Pn(t,1,Ju,!0),qo(n)):[]}),wf=Cu(function(e,t){var n=vi(t);return Ju(n)&&(n=te),Ju(e)?kn(e,Pn(t,1,Ju,!0),te,n):[]}),bf=Cu(function(e){var t=v(e,Tr);return t.length&&t[0]===e[0]?$n(t):[]}),qf=Cu(function(e){var t=vi(e),n=v(e,Tr);return t===vi(n)?t=te:n.pop(),n.length&&n[0]===e[0]?$n(n,qo(t)):[]}),kf=Cu(function(e){var t=vi(e),n=v(e,Tr);return t===vi(n)?t=te:n.pop(),n.length&&n[0]===e[0]?$n(n,te,t):[]}),xf=Cu(mi),Af=Cu(function(e,t){t=v(Pn(t,1),String);var n=vn(e,t);return vr(e,t.sort(B)),n}),Ef=Cu(function(e){return Er(Pn(e,1,Ju,!0))}),If=Cu(function(e){var t=vi(e);return Ju(t)&&(t=te),Er(Pn(e,1,Ju,!0),qo(t))}),Lf=Cu(function(e){var t=vi(e);return Ju(t)&&(t=te),Er(Pn(e,1,Ju,!0),te,t)}),Of=Cu(function(e,t){return Ju(e)?kn(e,t):[]}),Cf=Cu(function(e){return jr(l(e,Ju))}),jf=Cu(function(e){var t=vi(e);return Ju(t)&&(t=te),jr(l(e,Ju),qo(t))}),Rf=Cu(function(e){var t=vi(e);return Ju(t)&&(t=te),jr(l(e,Ju),te,t)}),Tf=Cu(Ui),Pf=Cu(function(e){var t=e.length,n=t>1?e[t-1]:te;return n="function"==typeof n?(e.pop(),n):te,Wi(e,n)}),Mf=Cu(function(e){e=Pn(e,1);var t=e.length,n=t?e[0]:0,i=this.__wrapped__,u=function(t){return vn(t,e)};return!(t>1||this.__actions__.length)&&i instanceof o&&G(n)?(i=i.slice(n,+n+(t?1:0)),i.__actions__.push({func:Ji,args:[u],thisArg:te}),new r(i,this.__chain__).thru(function(e){return t&&!e.length&&e.push(te),e})):this.thru(u)}),Bf=Xr(function(e,t,n){ls.call(e,n)?++e[n]:e[n]=1}),Df=Xr(function(e,t,n){ls.call(e,n)?e[n].push(t):e[n]=[t]}),Ff=Cu(function(e,t,n){var r=-1,o="function"==typeof t,i=Fo(t),u=Gu(e)?Array(e.length):[];return af(e,function(e){var a=o?t:i&&null!=e?e[t]:te;u[++r]=a?c(a,e,n):Xn(e,t,n)}),u}),Nf=Xr(function(e,t,n){e[n]=t}),Uf=Xr(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Wf=Cu(function(e,t){if(null==e)return[];var n=t.length;return n>1&&Do(e,t[0],t[1])?t=[]:n>2&&Do(t[0],t[1],t[2])&&(t=[t[0]]),t=1==t.length&&Zf(t[0])?t[0]:Pn(t,1,Bo),fr(e,t,[])}),zf=os.now,Yf=Cu(function(e,t,n){var r=ce;if(n.length){var o=$(n,Ao(Yf));r|=he}return vo(e,r,t,n,o)}),Hf=Cu(function(e,t,n){var r=ce|ae;if(n.length){var o=$(n,Ao(Hf));r|=he}return vo(t,r,e,n,o)}),Gf=Cu(function(e,t){return wn(e,1,t)}),Jf=Cu(function(e,t,n){return wn(e,Oc(t)||0,n)});Iu.Cache=Yt;var Vf=Cu(function(e,t){t=1==t.length&&Zf(t[0])?v(t[0],j(qo())):v(Pn(t,1,Bo),j(qo()));var n=t.length;return Cu(function(r){for(var o=-1,i=Ds(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return c(e,this,r)})}),$f=Cu(function(e,t){var n=$(t,Ao($f));return vo(e,he,te,t,n)}),Kf=Cu(function(e,t){var n=$(t,Ao(Kf));return vo(e,le,te,t,n)}),Xf=Cu(function(e,t){return vo(e,de,te,te,te,Pn(t,1))}),Zf=Array.isArray,Qf=ms?function(e){return e instanceof ms}:Ma(!1),ep=Zr(function(e,t){if(Xs||Wo(t)||Gu(t))return void $r(t,Gc(t),e);for(var n in t)ls.call(t,n)&&ln(e,n,t[n])}),tp=Zr(function(e,t){if(Xs||Wo(t)||Gu(t))return void $r(t,Jc(t),e);for(var n in t)ln(e,n,t[n])}),np=Zr(function(e,t,n,r){$r(t,Jc(t),e,r)}),rp=Zr(function(e,t,n,r){$r(t,Gc(t),e,r)}),op=Cu(function(e,t){return vn(e,Pn(t,1))}),ip=Cu(function(e){return e.push(te,pn),c(np,te,e)}),up=Cu(function(e){return e.push(te,Go),c(pp,te,e)}),cp=ao(function(e,t,n){e[t]=n},Ma(Ba)),ap=ao(function(e,t,n){ls.call(e,t)?e[t].push(n):e[t]=[n]},qo),sp=Cu(Xn),fp=Zr(function(e,t,n){cr(e,t,n)}),pp=Zr(function(e,t,n,r){cr(e,t,n,r)}),hp=Cu(function(e,t){return null==e?{}:(t=v(Pn(t,1),$o),pr(e,kn(wo(e),t)))}),lp=Cu(function(e,t){return null==e?{}:pr(e,Pn(t,1))}),yp=ro(function(e,t,n){return t=t.toLowerCase(),e+(n?ha(t):t)}),dp=ro(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),vp=ro(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),gp=no("toLowerCase"),Sp=ro(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),mp=ro(function(e,t,n){return e+(n?" ":"")+wp(t)}),_p=ro(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),wp=no("toUpperCase"),bp=Cu(function(e,t){try{return c(e,te,t)}catch(n){return ec(n)?n:new is(n)}}),qp=Cu(function(e,t){return f(Pn(t,1),function(t){e[t]=Yf(e[t],e)}),e}),kp=uo(),xp=uo(!0),Ap=Cu(function(e,t){return function(n){return Xn(n,e,t)}}),Ep=Cu(function(e,t){return function(n){return Xn(e,n,t)}}),Ip=so(v),Lp=so(h),Op=so(_),Cp=ho(),jp=ho(!0),Rp=N(function(e,t){return e+t}),Tp=yo("ceil"),Pp=N(function(e,t){return e/t}),Mp=yo("floor"),Bp=N(function(e,t){return e*t}),Dp=yo("round"),Fp=N(function(e,t){return e-t});return t.after=wu,t.ary=bu,t.assign=ep,t.assignIn=tp,t.assignInWith=np,t.assignWith=rp,t.at=op,t.before=qu,t.bind=Yf,t.bindAll=qp,t.bindKey=Hf,t.castArray=Mu,t.chain=Hi,t.chunk=Zo,t.compact=Qo,t.concat=ei,t.cond=Ta,t.conforms=Pa,t.constant=Ma,t.countBy=Bf,t.create=Tc,t.curry=ku,t.curryRight=xu,t.debounce=Au,t.defaults=ip,t.defaultsDeep=up,t.defer=Gf,t.delay=Jf,t.difference=mf,t.differenceBy=_f,t.differenceWith=wf,t.drop=ti,t.dropRight=ni,t.dropRightWhile=ri,t.dropWhile=oi,t.fill=ii,t.filter=nu,t.flatMap=iu,t.flatMapDeep=uu,t.flatMapDepth=cu,t.flatten=ai,t.flattenDeep=si,t.flattenDepth=fi,t.flip=Eu,t.flow=kp,t.flowRight=xp,t.fromPairs=pi,t.functions=Uc,t.functionsIn=Wc,t.groupBy=Df,t.initial=yi,t.intersection=bf,t.intersectionBy=qf,t.intersectionWith=kf,t.invert=cp,t.invertBy=ap,t.invokeMap=Ff,t.iteratee=Da,t.keyBy=Nf,t.keys=Gc,t.keysIn=Jc,t.map=pu,t.mapKeys=Vc,t.mapValues=$c,t.matches=Fa,t.matchesProperty=Na,t.memoize=Iu,t.merge=fp,t.mergeWith=pp,t.method=Ap,t.methodOf=Ep,t.mixin=Ua,t.negate=Lu,t.nthArg=Ya,t.omit=hp,t.omitBy=Kc,t.once=Ou,t.orderBy=hu,t.over=Ip,t.overArgs=Vf,t.overEvery=Lp,t.overSome=Op,t.partial=$f,t.partialRight=Kf,t.partition=Uf,t.pick=lp,t.pickBy=Xc,t.property=Ha,t.propertyOf=Ga,t.pull=xf,t.pullAll=mi,t.pullAllBy=_i,t.pullAllWith=wi,t.pullAt=Af,t.range=Cp,t.rangeRight=jp,t.rearg=Xf,t.reject=du,t.remove=bi,t.rest=Cu,t.reverse=qi,t.sampleSize=gu,t.set=Qc,t.setWith=ea,t.shuffle=Su,t.slice=ki,t.sortBy=Wf,t.sortedUniq=Ci,t.sortedUniqBy=ji,t.split=qa,t.spread=ju,t.tail=Ri,t.take=Ti,t.takeRight=Pi,t.takeRightWhile=Mi,t.takeWhile=Bi,t.tap=Gi,t.throttle=Ru,t.thru=Ji,t.toArray=Ec,t.toPairs=ta,t.toPairsIn=na,t.toPath=Va,t.toPlainObject=Cc,t.transform=ra,t.unary=Tu,t.union=Ef,t.unionBy=If,t.unionWith=Lf,t.uniq=Di,t.uniqBy=Fi,t.uniqWith=Ni,t.unset=oa,t.unzip=Ui,t.unzipWith=Wi,t.update=ia,t.updateWith=ua,t.values=ca,t.valuesIn=aa,t.without=Of,t.words=Ra,t.wrap=Pu,t.xor=Cf,t.xorBy=jf,t.xorWith=Rf,t.zip=Tf,t.zipObject=zi,t.zipObjectDeep=Yi,t.zipWith=Pf,t.entries=ta,t.entriesIn=na,t.extend=tp,t.extendWith=np,Ua(t,t),t.add=Rp,t.attempt=bp,t.camelCase=yp,t.capitalize=ha,t.ceil=Tp,t.clamp=sa,t.clone=Bu,t.cloneDeep=Fu,t.cloneDeepWith=Nu,t.cloneWith=Du,t.deburr=la,t.divide=Pp,t.endsWith=ya,t.eq=Uu,t.escape=da,t.escapeRegExp=va,t.every=tu,t.find=ru,t.findIndex=ui,t.findKey=Pc,t.findLast=ou,t.findLastIndex=ci,t.findLastKey=Mc,t.floor=Mp,t.forEach=au,t.forEachRight=su,t.forIn=Bc,t.forInRight=Dc,t.forOwn=Fc,t.forOwnRight=Nc,t.get=zc,t.gt=Wu,t.gte=zu,t.has=Yc,t.hasIn=Hc,t.head=hi,t.identity=Ba,t.includes=fu,t.indexOf=li,t.inRange=fa,t.invoke=sp,t.isArguments=Yu,t.isArray=Zf,t.isArrayBuffer=Hu,t.isArrayLike=Gu,t.isArrayLikeObject=Ju,t.isBoolean=Vu,t.isBuffer=Qf,t.isDate=$u,t.isElement=Ku,t.isEmpty=Xu,t.isEqual=Zu,t.isEqualWith=Qu,t.isError=ec,t.isFinite=tc,t.isFunction=nc,t.isInteger=rc,t.isLength=oc,t.isMap=cc,t.isMatch=ac,t.isMatchWith=sc,t.isNaN=fc,t.isNative=pc,t.isNil=lc,t.isNull=hc,t.isNumber=yc,t.isObject=ic,t.isObjectLike=uc,t.isPlainObject=dc,t.isRegExp=vc,t.isSafeInteger=gc,t.isSet=Sc,t.isString=mc,t.isSymbol=_c,t.isTypedArray=wc,t.isUndefined=bc,t.isWeakMap=qc,t.isWeakSet=kc,t.join=di,t.kebabCase=dp,t.last=vi,t.lastIndexOf=gi,t.lowerCase=vp,t.lowerFirst=gp,t.lt=xc,t.lte=Ac,t.max=Ka,t.maxBy=Xa,t.mean=Za,t.meanBy=Qa,t.min=es,t.minBy=ts,t.multiply=Bp,t.nth=Si,t.noConflict=Wa,t.noop=za,t.now=zf,t.pad=ga,t.padEnd=Sa,t.padStart=ma,t.parseInt=_a,t.random=pa,t.reduce=lu,t.reduceRight=yu,t.repeat=wa,t.replace=ba,t.result=Zc,t.round=Dp,t.runInContext=ee,t.sample=vu,t.size=mu,t.snakeCase=Sp,t.some=_u,t.sortedIndex=xi,t.sortedIndexBy=Ai,t.sortedIndexOf=Ei,t.sortedLastIndex=Ii,t.sortedLastIndexBy=Li,t.sortedLastIndexOf=Oi,t.startCase=mp,t.startsWith=ka,t.subtract=Fp,t.sum=ns,t.sumBy=rs,t.template=xa,t.times=Ja,t.toInteger=Ic,t.toLength=Lc,t.toLower=Aa,t.toNumber=Oc,t.toSafeInteger=jc,t.toString=Rc,t.toUpper=Ea,t.trim=Ia,t.trimEnd=La,t.trimStart=Oa,t.truncate=Ca,t.unescape=ja,t.uniqueId=$a,t.upperCase=_p,t.upperFirst=wp,t.each=au,t.eachRight=su,t.first=hi,Ua(t,function(){var e={};return Mn(t,function(n,r){ls.call(t.prototype,r)||(e[r]=n)}),e}(),{chain:!1}),t.VERSION=ne,f(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){t[e].placeholder=t}),f(["drop","take"],function(e,t){o.prototype[e]=function(n){var r=this.__filtered__;if(r&&!t)return new o(this);n=n===te?1:Bs(Ic(n),0);var i=this.clone();return r?i.__takeCount__=Ds(n,i.__takeCount__):i.__views__.push({size:Ds(n,Oe),type:e+(i.__dir__<0?"Right":"")}),i},o.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),f(["filter","map","takeWhile"],function(e,t){var n=t+1,r=n==qe||n==xe;o.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:qo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),f(["head","last"],function(e,t){var n="take"+(t?"Right":"");o.prototype[e]=function(){return this[n](1).value()[0]}}),f(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");o.prototype[e]=function(){return this.__filtered__?new o(this):this[n](1)}}),o.prototype.compact=function(){return this.filter(Ba)},o.prototype.find=function(e){return this.filter(e).head()},o.prototype.findLast=function(e){return this.reverse().find(e)},o.prototype.invokeMap=Cu(function(e,t){return"function"==typeof e?new o(this):this.map(function(n){return Xn(n,e,t)})}),o.prototype.reject=function(e){return e=qo(e,3),this.filter(function(t){return!e(t)})},o.prototype.slice=function(e,t){e=Ic(e);var n=this;return n.__filtered__&&(e>0||0>t)?new o(n):(0>e?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==te&&(t=Ic(t),n=0>t?n.dropRight(-t):n.take(t-e)),n)},o.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},o.prototype.toArray=function(){return this.take(Oe)},Mn(o.prototype,function(e,n){var i=/^(?:filter|find|map|reject)|While$/.test(n),u=/^(?:head|last)$/.test(n),c=t[u?"take"+("last"==n?"Right":""):n],a=u||/^find/.test(n);c&&(t.prototype[n]=function(){var n=this.__wrapped__,s=u?[1]:arguments,f=n instanceof o,p=s[0],h=f||Zf(n),l=function(e){var n=c.apply(t,g([e],s));return u&&y?n[0]:n};h&&i&&"function"==typeof p&&1!=p.length&&(f=h=!1);var y=this.__chain__,d=!!this.__actions__.length,v=a&&!y,S=f&&!d;if(!a&&h){n=S?n:new o(this);var m=e.apply(n,s);return m.__actions__.push({func:Ji,args:[l],thisArg:te}),new r(m,y)}return v&&S?e.apply(this,s):(m=this.thru(l),v?u?m.value()[0]:m.value():m)})}),f(["pop","push","shift","sort","splice","unshift"],function(e){var n=ss[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:pop|shift)$/.test(e);t.prototype[e]=function(){var e=arguments;if(o&&!this.__chain__){var t=this.value();return n.apply(Zf(t)?t:[],e)}return this[r](function(t){return n.apply(Zf(t)?t:[],e)})}}),Mn(o.prototype,function(e,n){var r=t[n];if(r){var o=r.name+"",i=Zs[o]||(Zs[o]=[]);i.push({name:n,func:r})}}),Zs[co(te,ae).name]=[{name:"wrapper",func:te}],o.prototype.clone=M,o.prototype.reverse=Tt,o.prototype.value=Dt,t.prototype.at=Mf,t.prototype.chain=Vi,t.prototype.commit=$i,t.prototype.next=Ki,t.prototype.plant=Zi,t.prototype.reverse=Qi,t.prototype.toJSON=t.prototype.valueOf=t.prototype.value=eu,As&&(t.prototype[As]=Xi),t}var te,ne="4.11.1",re=200,oe="Expected a function",ie="__lodash_hash_undefined__",ue="__lodash_placeholder__",ce=1,ae=2,se=4,fe=8,pe=16,he=32,le=64,ye=128,de=256,ve=512,ge=1,Se=2,me=30,_e="...",we=150,be=16,qe=1,ke=2,xe=3,Ae=1/0,Ee=9007199254740991,Ie=1.7976931348623157e308,Le=NaN,Oe=4294967295,Ce=Oe-1,je=Oe>>>1,Re="[object Arguments]",Te="[object Array]",Pe="[object Boolean]",Me="[object Date]",Be="[object Error]",De="[object Function]",Fe="[object GeneratorFunction]",Ne="[object Map]",Ue="[object Number]",We="[object Object]",ze="[object Promise]",Ye="[object RegExp]",He="[object Set]",Ge="[object String]",Je="[object Symbol]",Ve="[object WeakMap]",$e="[object WeakSet]",Ke="[object ArrayBuffer]",Xe="[object DataView]",Ze="[object Float32Array]",Qe="[object Float64Array]",et="[object Int8Array]",tt="[object Int16Array]",nt="[object Int32Array]",rt="[object Uint8Array]",ot="[object Uint8ClampedArray]",it="[object Uint16Array]",ut="[object Uint32Array]",ct=/\b__p \+= '';/g,at=/\b(__p \+=) '' \+/g,st=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ft=/&(?:amp|lt|gt|quot|#39|#96);/g,pt=/[&<>"'`]/g,ht=RegExp(ft.source),lt=RegExp(pt.source),yt=/<%-([\s\S]+?)%>/g,dt=/<%([\s\S]+?)%>/g,vt=/<%=([\s\S]+?)%>/g,gt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,St=/^\w*$/,mt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,_t=/[\\^$.*+?()[\]{}|]/g,wt=RegExp(_t.source),bt=/^\s+|\s+$/g,qt=/^\s+/,kt=/\s+$/,xt=/[a-zA-Z0-9]+/g,At=/\\(\\)?/g,Et=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,It=/\w*$/,Lt=/^0x/i,Ot=/^[-+]0x[0-9a-f]+$/i,Ct=/^0b[01]+$/i,jt=/^\[object .+?Constructor\]$/,Rt=/^0o[0-7]+$/i,Tt=/^(?:0|[1-9]\d*)$/,Pt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Mt=/($^)/,Bt=/['\n\r\u2028\u2029\\]/g,Dt="\\ud800-\\udfff",Ft="\\u0300-\\u036f\\ufe20-\\ufe23",Nt="\\u20d0-\\u20f0",Ut="\\u2700-\\u27bf",Wt="a-z\\xdf-\\xf6\\xf8-\\xff",zt="\\xac\\xb1\\xd7\\xf7",Yt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ht="\\u2018\\u2019\\u201c\\u201d",Gt=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Jt="A-Z\\xc0-\\xd6\\xd8-\\xde",Vt="\\ufe0e\\ufe0f",$t=zt+Yt+Ht+Gt,Kt="[']",Xt="["+Dt+"]",Zt="["+$t+"]",Qt="["+Ft+Nt+"]",en="\\d+",tn="["+Ut+"]",nn="["+Wt+"]",rn="[^"+Dt+$t+en+Ut+Wt+Jt+"]",on="\\ud83c[\\udffb-\\udfff]",un="(?:"+Qt+"|"+on+")",cn="[^"+Dt+"]",an="(?:\\ud83c[\\udde6-\\uddff]){2}",sn="[\\ud800-\\udbff][\\udc00-\\udfff]",fn="["+Jt+"]",pn="\\u200d",hn="(?:"+nn+"|"+rn+")",ln="(?:"+fn+"|"+rn+")",yn="(?:"+Kt+"(?:d|ll|m|re|s|t|ve))?",dn="(?:"+Kt+"(?:D|LL|M|RE|S|T|VE))?",vn=un+"?",gn="["+Vt+"]?",Sn="(?:"+pn+"(?:"+[cn,an,sn].join("|")+")"+gn+vn+")*",mn=gn+vn+Sn,_n="(?:"+[tn,an,sn].join("|")+")"+mn,wn="(?:"+[cn+Qt+"?",Qt,an,sn,Xt].join("|")+")",bn=RegExp(Kt,"g"),qn=RegExp(Qt,"g"),kn=RegExp(on+"(?="+on+")|"+wn+mn,"g"),xn=RegExp([fn+"?"+nn+"+"+yn+"(?="+[Zt,fn,"$"].join("|")+")",ln+"+"+dn+"(?="+[Zt,fn+hn,"$"].join("|")+")",fn+"?"+hn+"+"+yn,fn+"+"+dn,en,_n].join("|"),"g"),An=RegExp("["+pn+Dt+Ft+Nt+Vt+"]"),En=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,In=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","Reflect","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ln=-1,On={};
On[Ze]=On[Qe]=On[et]=On[tt]=On[nt]=On[rt]=On[ot]=On[it]=On[ut]=!0,On[Re]=On[Te]=On[Ke]=On[Pe]=On[Xe]=On[Me]=On[Be]=On[De]=On[Ne]=On[Ue]=On[We]=On[Ye]=On[He]=On[Ge]=On[Ve]=!1;var Cn={};Cn[Re]=Cn[Te]=Cn[Ke]=Cn[Xe]=Cn[Pe]=Cn[Me]=Cn[Ze]=Cn[Qe]=Cn[et]=Cn[tt]=Cn[nt]=Cn[Ne]=Cn[Ue]=Cn[We]=Cn[Ye]=Cn[He]=Cn[Ge]=Cn[Je]=Cn[rt]=Cn[ot]=Cn[it]=Cn[ut]=!0,Cn[Be]=Cn[De]=Cn[Ve]=!1;var jn={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Rn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},Tn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},Pn={"function":!0,object:!0},Mn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Bn=parseFloat,Dn=parseInt,Fn=Pn[typeof t]&&t&&!t.nodeType?t:te,Nn=Pn[typeof e]&&e&&!e.nodeType?e:te,Un=Nn&&Nn.exports===Fn?Fn:te,Wn=M(Fn&&Nn&&"object"==typeof o&&o),zn=M(Pn[typeof self]&&self),Yn=M(Pn[typeof window]&&window),Hn=M(Pn[typeof this]&&this),Gn=Wn||Yn!==(Hn&&Hn.window)&&Yn||zn||Hn||Function("return this")(),Jn=ee();(Yn||zn||{})._=Jn,r=function(){return Jn}.call(t,n,t,e),!(r!==te&&(e.exports=r))}).call(this)}).call(t,n(105)(e),function(){return this}())},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(setImmediate,clearImmediate){!function(e,t){__WEBPACK_AMD_DEFINE_FACTORY__=t,__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof __WEBPACK_AMD_DEFINE_FACTORY__?__WEBPACK_AMD_DEFINE_FACTORY__.call(exports,__webpack_require__,exports,module):__WEBPACK_AMD_DEFINE_FACTORY__,!(void 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))}(this,function(context){function Lazy(e){if(e instanceof Array)return new ArrayWrapper(e);if("string"==typeof e)return new StringWrapper(e);if(e instanceof Sequence)return e;if(Lazy.extensions){for(var t,n=Lazy.extensions,r=n.length;!t&&r--;)t=n[r](e);if(t)return t}return new ObjectWrapper(e)}function Sequence(){}function Iterator(e){this.sequence=e,this.index=-1}function MemoizedSequence(e){this.parent=e}function MappedSequence(e,t){this.parent=e,this.mapFn=t}function MappingIterator(e,t){this.iterator=e.getIterator(),this.mapFn=t,this.index=-1}function FilteredSequence(e,t){this.parent=e,this.filterFn=t}function FilteringIterator(e,t){this.iterator=e.getIterator(),this.filterFn=t,this.index=0}function ReversedSequence(e){this.parent=e}function ReversedIterator(e){this.sequence=e}function ConcatenatedSequence(e,t){this.parent=e,this.arrays=t}function TakeSequence(e,t){this.parent=e,this.count=t}function TakeIterator(e,t){this.iterator=e.getIterator(),this.count=t}function TakeWhileSequence(e,t){this.parent=e,this.predicate=t}function InitialSequence(e,t){this.parent=e,this.count="number"==typeof t?t:1}function DropSequence(e,t){this.parent=e,this.count="number"==typeof t?t:1}function DropWhileSequence(e,t){this.parent=e,this.predicate=t}function SortedSequence(e,t){this.parent=e,this.sortFn=t}function GroupedSequence(e,t,n){this.parent=e,this.keyFn=t,this.valFn=n}function IndexedSequence(e,t,n){this.parent=e,this.keyFn=t,this.valFn=n}function CountedSequence(e,t){this.parent=e,this.keyFn=t}function UniqueSequence(e,t){this.parent=e,this.keyFn=t}function ZippedSequence(e,t){this.parent=e,this.arrays=t}function ShuffledSequence(e){this.parent=e}function FlattenedSequence(e){this.parent=e}function WithoutSequence(e,t){this.parent=e,this.values=t}function IntersectionSequence(e,t){this.parent=e,this.arrays=t}function UniqueMemoizer(e){this.iterator=e,this.set=new Set,this.memo=[],this.currentValue=void 0}function ChunkedSequence(e,t){this.parent=e,this.chunkSize=t}function ChunkedIterator(e,t){this.iterator=e.getIterator(),this.size=t}function TappedSequence(e,t){this.parent=e,this.callback=t}function SimpleIntersectionSequence(e,t){this.parent=e,this.array=t,this.each=getEachForIntersection(t)}function getEachForIntersection(e){return e.length<40?SimpleIntersectionSequence.prototype.eachArrayCache:SimpleIntersectionSequence.prototype.eachMemoizerCache}function SimpleZippedSequence(e,t){this.parent=e,this.array=t}function ArrayLikeSequence(){}function IndexedIterator(e){this.sequence=e,this.index=-1}function IndexedMappedSequence(e,t){this.parent=e,this.mapFn=t}function IndexedFilteredSequence(e,t){this.parent=e,this.filterFn=t}function IndexedReversedSequence(e){this.parent=e}function IndexedTakeSequence(e,t){this.parent=e,this.count=t}function IndexedDropSequence(e,t){this.parent=e,this.count="number"==typeof t?t:1}function IndexedConcatenatedSequence(e,t){this.parent=e,this.other=t}function IndexedUniqueSequence(e,t){this.parent=e,this.each=getEachForParent(e),this.keyFn=t}function getEachForParent(e){return e.length()<100?IndexedUniqueSequence.prototype.eachArrayCache:UniqueSequence.prototype.each}function ArrayWrapper(e){this.source=e}function MappedArrayWrapper(e,t){this.parent=e,this.mapFn=t}function FilteredArrayWrapper(e,t){this.parent=e,this.filterFn=t}function UniqueArrayWrapper(e,t){this.parent=e,this.each=getEachForSource(e.source),this.keyFn=t}function getEachForSource(e){return e.length<40?UniqueArrayWrapper.prototype.eachNoCache:e.length<100?UniqueArrayWrapper.prototype.eachArrayCache:UniqueArrayWrapper.prototype.eachSetCache}function ConcatArrayWrapper(e,t){this.parent=e,this.other=t}function ObjectLikeSequence(){}function FilteredObjectLikeSequence(e,t){this.parent=e,this.filterFn=t}function AssignSequence(e,t){this.parent=e,this.other=t}function DefaultsSequence(e,t){this.parent=e,this.defaults=t}function InvertedSequence(e){this.parent=e}function MergedSequence(e,t,n){this.parent=e,this.others=t,this.mergeFn=n}function mergeObjects(e,t){var n,r;if("undefined"==typeof t)return e;if(isVanillaObject(e)&&isVanillaObject(t))n={};else{if(!(e instanceof Array&&t instanceof Array))return t;n=[]}for(r in e)n[r]=mergeObjects(e[r],t[r]);for(r in t)n[r]||(n[r]=t[r]);return n}function isVanillaObject(e){return e&&e.constructor===Object}function PickSequence(e,t){this.parent=e,this.properties=t}function OmitSequence(e,t){this.parent=e,this.properties=t}function ObjectWrapper(e){this.source=e}function StringLikeSequence(){}function CharIterator(e){this.source=Lazy(e),this.index=-1}function StringSegment(e,t,n){this.parent=e,this.start=Math.max(0,t),this.stop=n}function MappedStringLikeSequence(e,t){this.parent=e,this.mapFn=t}function ReversedStringLikeSequence(e){this.parent=e}function StringMatchSequence(e,t){this.parent=e,this.pattern=t}function StringMatchIterator(e,t){this.source=e,this.pattern=cloneRegex(t)}function SplitStringSequence(e,t){this.parent=e,this.pattern=t}function SplitWithRegExpIterator(e,t){this.source=e,this.pattern=cloneRegex(t)}function SplitWithStringIterator(e,t){this.source=e,this.delimiter=t}function StringWrapper(e){this.source=e}function GeneratedSequence(e,t){this.get=e,this.fixedLength=t}function GeneratedIterator(e){this.sequence=e,this.index=0,this.currentValue=null}function AsyncSequence(e,t){if(e instanceof AsyncSequence)throw new Error("Sequence is already asynchronous!");this.parent=e,this.interval=t,this.onNextCallback=getOnNextCallback(t),this.cancelCallback=getCancelCallback(t)}function AsyncHandle(e){this.resolveListeners=[],this.rejectListeners=[],this.state=PENDING,this.cancelFn=e}function resolve(e,t){if(e===t)return void e._reject(new TypeError("Cannot resolve a promise to itself"));if(t instanceof AsyncHandle)return void t.then(function(t){resolve(e,t)},function(t){e._reject(t)});var n;try{n=/function|object/.test(typeof t)&&null!=t&&t.then}catch(r){return void e._reject(r)}var o=PENDING;if("function"!=typeof n)e._resolve(t);else try{n.call(t,function(t){o===PENDING&&(o=RESOLVED,resolve(e,t))},function(t){o===PENDING&&(o=REJECTED,e._reject(t))})}catch(r){if(o!==PENDING)return;e._reject(r)}}function consumeListeners(e,t,n){n||(n=getOnNextCallback()),n(function(){e.length>0&&(e.shift()(t),consumeListeners(e,t,n))})}function getOnNextCallback(e){return"undefined"==typeof e&&"function"==typeof setImmediate?setImmediate:(e=e||0,function(t){return setTimeout(t,e)})}function getCancelCallback(e){return"undefined"==typeof e&&"function"==typeof clearImmediate?clearImmediate:clearTimeout}function transform(e,t){return t instanceof AsyncHandle?t.then(function(){e(t)}):e(t)}function WatchedPropertySequence(e,t){this.listeners=[],t?t instanceof Array||(t=[t]):t=Lazy(e).keys().toArray();var n=this.listeners,r=0;Lazy(t).each(function(t){var o=e[t];Object.defineProperty(e,t,{get:function(){return o},set:function(e){for(var i=n.length-1;i>=0;--i)n[i]({property:t,value:e},r)===!1&&n.splice(i,1);o=e,++r}})})}function StreamLikeSequence(){}function SplitStreamSequence(e,t){this.parent=e,this.delimiter=t,this.each=this.getEachForDelimiter(t)}function MatchedStreamSequence(e,t){this.parent=e,this.pattern=cloneRegex(t)}function createCallback(e,t){switch(typeof e){case"function":return e;case"string":return function(t){return t[e]};case"object":return function(t){return Lazy(e).all(function(e,n){return t[n]===e})};case"undefined":return t?function(){return t}:Lazy.identity;default:throw new Error("Don't know how to make a callback from a "+typeof e+"!")}}function createComparator(e,t){return e?(e=createCallback(e),function(t,n){return compare(e(t),e(n))}):compare}function reverseArguments(e){return function(t,n){return e(n,t)}}function createSet(e){var t=new Set;return Lazy(e||[]).flatten().each(function(e){t.add(e)}),t}function compare(e,t){return e===t?0:e>t?1:-1}function forEach(e,t){for(var n=-1,r=e.length;++n<r;)if(t(e[n],n)===!1)return!1;return!0}function getFirst(e){var t;return e.each(function(e){return t=e,!1}),t}function arrayContains(e,t){var n=-1,r=e.length;if(t!==t){for(;++n<r;)if(e[n]!==e[n])return!0;return!1}for(;++n<r;)if(e[n]===t)return!0;return!1}function arrayContainsBefore(e,t,n,r){var o=-1;if(r){for(r=createCallback(r);++o<n;)if(r(e[o])===r(t))return!0}else for(;++o<n;)if(e[o]===t)return!0;return!1}function swap(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function cloneRegex(pattern){return eval(""+pattern+(pattern.global?"":"g"))}function Set(){this.table={},this.objects=[]}function Queue(e){this.contents=new Array(e),this.start=0,this.count=0}function defineSequenceType(e,t,n){var r=function(){};r.prototype=new e;for(var o in n)r.prototype[o]=n[o];for(var i=function(){var e=new r;return e.parent=this,e.init&&e.init.apply(e,arguments),e},u="string"==typeof t?[t]:t,c=0;c<u.length;++c)e.prototype[u[c]]=i;return r}Lazy.VERSION="0.4.2",Lazy.noop=function(){},Lazy.identity=function(e){return e},Lazy.strict=function(){function e(e){if(null==e)throw new Error("You cannot wrap null or undefined using Lazy.");if("number"==typeof e||"boolean"==typeof e)throw new Error("You cannot wrap primitive values using Lazy.");return Lazy(e)}return Lazy(Lazy).each(function(t,n){e[n]=t}),e},Sequence.define=function(e,t){if(!t||!t.getIterator&&!t.each)throw new Error("A custom sequence must implement *at least* getIterator or each!");return defineSequenceType(Sequence,e,t)},Sequence.prototype.size=function(){return this.getIndex().length()},Sequence.prototype.getIterator=function(){return new Iterator(this)},Sequence.prototype.root=function(){return this.parent.root()},Sequence.prototype.isAsync=function(){return this.parent?this.parent.isAsync():!1},Sequence.prototype.value=function(){return this.toArray()},Sequence.prototype.apply=function(e){var t,n=this.root(),r=n.source;try{n.source=e,t=this.value()}finally{n.source=r}return t},Iterator.prototype.current=function(){return this.cachedIndex&&this.cachedIndex.get(this.index)},Iterator.prototype.moveNext=function(){var e=this.cachedIndex;return e||(e=this.cachedIndex=this.sequence.getIndex()),this.index>=e.length()-1?!1:(++this.index,!0)},Sequence.prototype.toArray=function(){return this.reduce(function(e,t){return e.push(t),e},[])},Sequence.prototype.getIndex=function(){return new ArrayWrapper(this.toArray())},Sequence.prototype.get=function(e){var t;return this.each(function(n,r){return r===e?(t=n,!1):void 0}),t},Sequence.prototype.memoize=function(){return new MemoizedSequence(this)},Sequence.prototype.toObject=function(){return this.reduce(function(e,t){return e[t[0]]=t[1],e},{})},Sequence.prototype.each=function(e){for(var t=this.getIterator(),n=-1;t.moveNext();)if(e(t.current(),++n)===!1)return!1;return!0},Sequence.prototype.forEach=function(e){return this.each(e)},Sequence.prototype.map=function(e){return new MappedSequence(this,createCallback(e))},Sequence.prototype.collect=function(e){return this.map(e)},MappedSequence.prototype=new Sequence,MappedSequence.prototype.getIterator=function(){return new MappingIterator(this.parent,this.mapFn)},MappedSequence.prototype.each=function(e){var t=this.mapFn;return this.parent.each(function(n,r){return e(t(n,r),r)})},MappingIterator.prototype.current=function(){return this.mapFn(this.iterator.current(),this.index)},MappingIterator.prototype.moveNext=function(){return this.iterator.moveNext()?(++this.index,!0):!1},Sequence.prototype.pluck=function(e){return this.map(e)},Sequence.prototype.invoke=function(e){return this.map(function(t){return t[e]()})},Sequence.prototype.filter=function(e){return new FilteredSequence(this,createCallback(e))},Sequence.prototype.select=function(e){return this.filter(e)},FilteredSequence.prototype=new Sequence,FilteredSequence.prototype.getIterator=function(){return new FilteringIterator(this.parent,this.filterFn)},FilteredSequence.prototype.each=function(e){var t=this.filterFn,n=0;return this.parent.each(function(r,o){return t(r,o)?e(r,n++):void 0})},FilteredSequence.prototype.reverse=function(){return this.parent.reverse().filter(this.filterFn)},FilteringIterator.prototype.current=function(){return this.value},FilteringIterator.prototype.moveNext=function(){for(var e,t=this.iterator,n=this.filterFn;t.moveNext();)if(e=t.current(),n(e,this.index++))return this.value=e,!0;return this.value=void 0,!1},Sequence.prototype.reject=function(e){return e=createCallback(e),this.filter(function(t){return!e(t)})},Sequence.prototype.ofType=function(e){return this.filter(function(t){return typeof t===e})},Sequence.prototype.where=function(e){return this.filter(e)},Sequence.prototype.reverse=function(){return new ReversedSequence(this)},ReversedSequence.prototype=new Sequence,ReversedSequence.prototype.getIterator=function(){return new ReversedIterator(this.parent)},ReversedIterator.prototype.current=function(){return this.getIndex().get(this.index)},ReversedIterator.prototype.moveNext=function(){var e=this.getIndex(),t=e.length();return"undefined"==typeof this.index&&(this.index=t),--this.index>=0},ReversedIterator.prototype.getIndex=function(){return this.cachedIndex||(this.cachedIndex=this.sequence.getIndex()),this.cachedIndex},Sequence.prototype.concat=function(e){return new ConcatenatedSequence(this,arraySlice.call(arguments,0))},ConcatenatedSequence.prototype=new Sequence,ConcatenatedSequence.prototype.each=function(e){var t=!1,n=0;this.parent.each(function(r){return e(r,n++)===!1?(t=!0,!1):void 0}),t||Lazy(this.arrays).flatten().each(function(t){return e(t,n++)===!1?!1:void 0})},Sequence.prototype.first=function(e){return"undefined"==typeof e?getFirst(this):new TakeSequence(this,e)},Sequence.prototype.head=Sequence.prototype.take=function(e){return this.first(e)},TakeSequence.prototype=new Sequence,TakeSequence.prototype.getIterator=function(){return new TakeIterator(this.parent,this.count)},TakeSequence.prototype.each=function(e){var t,n=this.count,r=0,o=this.parent.each(function(o){return n>r&&(t=e(o,r++)),r>=n?!1:t});return o instanceof AsyncHandle?o:r===n&&t!==!1},TakeIterator.prototype.current=function(){return this.iterator.current()},TakeIterator.prototype.moveNext=function(){return--this.count>=0&&this.iterator.moveNext()},Sequence.prototype.takeWhile=function(e){return new TakeWhileSequence(this,e)},TakeWhileSequence.prototype=new Sequence,TakeWhileSequence.prototype.each=function(e){var t=this.predicate,n=!1,r=0,o=this.parent.each(function(o,i){return t(o,i)?e(o,r++):(n=!0,!1)});return o instanceof AsyncHandle?o:n},Sequence.prototype.initial=function(e){return new InitialSequence(this,e)},InitialSequence.prototype=new Sequence,InitialSequence.prototype.each=function(e){var t=this.parent.getIndex();return t.take(t.length()-this.count).each(e)},Sequence.prototype.last=function(e){return"undefined"==typeof e?this.reverse().first():this.reverse().take(e).reverse()},Sequence.prototype.findWhere=function(e){return this.where(e).first()},Sequence.prototype.rest=function(e){return new DropSequence(this,e)},Sequence.prototype.skip=Sequence.prototype.tail=Sequence.prototype.drop=function(e){return this.rest(e)},DropSequence.prototype=new Sequence,DropSequence.prototype.each=function(e){var t=this.count,n=0,r=0;return this.parent.each(function(o){return n++<t?void 0:e(o,r++)})},Sequence.prototype.dropWhile=function(e){return new DropWhileSequence(this,e)},Sequence.prototype.skipWhile=function(e){return this.dropWhile(e)},DropWhileSequence.prototype=new Sequence,DropWhileSequence.prototype.each=function(e){var t=this.predicate,n=!1;return this.parent.each(function(r){if(!n){if(t(r))return;n=!0}return e(r)})},Sequence.prototype.sort=function(e,t){return e||(e=compare),t&&(e=reverseArguments(e)),new SortedSequence(this,e)},Sequence.prototype.sortBy=function(e,t){return e=createComparator(e),t&&(e=reverseArguments(e)),new SortedSequence(this,e)},SortedSequence.prototype=new Sequence,SortedSequence.prototype.each=function(e){var t=this.sortFn,n=this.parent.toArray();return n.sort(t),forEach(n,e)},SortedSequence.prototype.reverse=function(){return new SortedSequence(this.parent,reverseArguments(this.sortFn))},Sequence.prototype.groupBy=function(e,t){return new GroupedSequence(this,e,t)},Sequence.prototype.indexBy=function(e,t){return new IndexedSequence(this,e,t)},Sequence.prototype.countBy=function(e){return new CountedSequence(this,e)},Sequence.prototype.uniq=function(e){return new UniqueSequence(this,e)},Sequence.prototype.unique=function(e){return this.uniq(e)},UniqueSequence.prototype=new Sequence,UniqueSequence.prototype.each=function(e){var t=new Set,n=this.keyFn,r=0;return n?(n=createCallback(n),this.parent.each(function(o){return t.add(n(o))?e(o,r++):void 0})):this.parent.each(function(n){return t.add(n)?e(n,r++):void 0})},Sequence.prototype.zip=function(e){return 1===arguments.length?new SimpleZippedSequence(this,e):new ZippedSequence(this,arraySlice.call(arguments,0))},ZippedSequence.prototype=new Sequence,ZippedSequence.prototype.each=function(e){var t=this.arrays,n=0;this.parent.each(function(r){for(var o=[r],i=0;i<t.length;++i)t[i].length>n&&o.push(t[i][n]);return e(o,n++)})},Sequence.prototype.shuffle=function(){return new ShuffledSequence(this)},ShuffledSequence.prototype=new Sequence,ShuffledSequence.prototype.each=function(e){for(var t=this.parent.toArray(),n=Math.floor,r=Math.random,o=0,i=t.length-1;i>0;--i)if(swap(t,i,n(r()*(i+1))),e(t[i],o++)===!1)return;e(t[0],o)},Sequence.prototype.flatten=function(){return new FlattenedSequence(this)},FlattenedSequence.prototype=new Sequence,FlattenedSequence.prototype.each=function(e){var t=0;return this.parent.each(function n(r){return r instanceof Array?forEach(r,n):r instanceof Sequence?r.each(n):e(r,t++)})},Sequence.prototype.compact=function(){return this.filter(function(e){return!!e})},Sequence.prototype.without=function(e){return new WithoutSequence(this,arraySlice.call(arguments,0))},Sequence.prototype.difference=function(e){return this.without.apply(this,arguments)},WithoutSequence.prototype=new Sequence,WithoutSequence.prototype.each=function(e){var t=createSet(this.values),n=0;return this.parent.each(function(r){return t.contains(r)?void 0:e(r,n++)})},Sequence.prototype.union=function(e){return this.concat(e).uniq()},Sequence.prototype.intersection=function(e){return 1===arguments.length&&arguments[0]instanceof Array?new SimpleIntersectionSequence(this,e):new IntersectionSequence(this,arraySlice.call(arguments,0))},IntersectionSequence.prototype=new Sequence,IntersectionSequence.prototype.each=function(e){var t=Lazy(this.arrays).map(function(e){return new UniqueMemoizer(Lazy(e).getIterator())}),n=new UniqueMemoizer(t.getIterator()),r=0;return this.parent.each(function(t){var o=!0;return n.each(function(e){return e.contains(t)?void 0:(o=!1,!1)}),o?e(t,r++):void 0})},UniqueMemoizer.prototype.current=function(){return this.currentValue},UniqueMemoizer.prototype.moveNext=function(){for(var e,t=this.iterator,n=this.set,r=this.memo;t.moveNext();)if(e=t.current(),n.add(e))return r.push(e),this.currentValue=e,!0;return!1},UniqueMemoizer.prototype.each=function(e){for(var t=this.memo,n=t.length,r=-1;++r<n;)if(e(t[r],r)===!1)return!1;for(;this.moveNext()&&e(this.currentValue,r++)!==!1;);},UniqueMemoizer.prototype.contains=function(e){if(this.set.contains(e))return!0;for(;this.moveNext();)if(this.currentValue===e)return!0;return!1},Sequence.prototype.every=function(e){return e=createCallback(e),this.each(function(t,n){return!!e(t,n)})},Sequence.prototype.all=function(e){return this.every(e)},Sequence.prototype.some=function(e){e=createCallback(e,!0);var t=!1;return this.each(function(n){return e(n)?(t=!0,!1):void 0}),t},Sequence.prototype.any=function(e){return this.some(e)},Sequence.prototype.none=function(e){return!this.any(e)},Sequence.prototype.isEmpty=function(){return!this.any()},Sequence.prototype.indexOf=function(e){var t=-1;return this.each(function(n,r){return n===e?(t=r,!1):void 0}),t},Sequence.prototype.lastIndexOf=function(e){var t=this.getIndex().reverse(),n=t.indexOf(e);return-1!==n&&(n=t.length()-n-1),n},Sequence.prototype.sortedIndex=function(e){for(var t,n=this.getIndex(),r=0,o=n.length();o>r;)t=r+o>>>1,-1===compare(n.get(t),e)?r=t+1:o=t;return r},Sequence.prototype.contains=function(e){return-1!==this.indexOf(e)},Sequence.prototype.reduce=function(e,t){if(arguments.length<2)return this.tail().reduce(e,this.head());var n=this.each(function(n,r){t=e(t,n,r)});return n instanceof AsyncHandle?n.then(function(){return t}):t},Sequence.prototype.inject=Sequence.prototype.foldl=function(e,t){return this.reduce(e,t)},Sequence.prototype.reduceRight=function(e,t){if(arguments.length<2)return this.initial(1).reduceRight(e,this.last());var n=this.getIndex(),r=n.length()-1;return n.reverse().reduce(function(t,n){return e(t,n,r--)},t)},Sequence.prototype.foldr=function(e,t){return this.reduceRight(e,t)},Sequence.prototype.consecutive=function(e){var t=new Queue(e),n=this.map(function(n){return t.add(n).count===e?t.toArray():void 0});return n.compact()},Sequence.prototype.chunk=function(e){if(1>e)throw new Error("You must specify a positive chunk size.");return new ChunkedSequence(this,e)},ChunkedSequence.prototype=new Sequence,ChunkedSequence.prototype.getIterator=function(){return new ChunkedIterator(this.parent,this.chunkSize)},ChunkedIterator.prototype.current=function(){return this.currentChunk},ChunkedIterator.prototype.moveNext=function(){for(var e=this.iterator,t=this.size,n=[];n.length<t&&e.moveNext();)n.push(e.current());return 0===n.length?!1:(this.currentChunk=n,!0)},Sequence.prototype.tap=function(e){return new TappedSequence(this,e)},TappedSequence.prototype=new Sequence,TappedSequence.prototype.each=function(e){var t=this.callback;return this.parent.each(function(n,r){return t(n,r),e(n,r)})},Sequence.prototype.find=function(e){return this.filter(e).first()},Sequence.prototype.detect=function(e){return this.find(e)},Sequence.prototype.min=function(e){return"undefined"!=typeof e?this.minBy(e):this.reduce(function(e,t){return e>t?t:e},1/0)},Sequence.prototype.minBy=function(e){return e=createCallback(e),this.reduce(function(t,n){return e(n)<e(t)?n:t})},Sequence.prototype.max=function(e){return"undefined"!=typeof e?this.maxBy(e):this.reduce(function(e,t){return t>e?t:e},-(1/0))},Sequence.prototype.maxBy=function(e){return e=createCallback(e),this.reduce(function(t,n){return e(n)>e(t)?n:t})},Sequence.prototype.sum=function(e){return"undefined"!=typeof e?this.sumBy(e):this.reduce(function(e,t){return e+t},0)},Sequence.prototype.sumBy=function(e){return e=createCallback(e),this.reduce(function(t,n){return t+e(n)},0)},Sequence.prototype.join=function(e){return e="string"==typeof e?e:",",this.reduce(function(t,n,r){return r>0&&(t+=e),t+n},"")},Sequence.prototype.toString=function(e){return this.join(e)},Sequence.prototype.async=function(e){return new AsyncSequence(this,e)},SimpleIntersectionSequence.prototype=new Sequence,SimpleIntersectionSequence.prototype.eachMemoizerCache=function(e){var t=new UniqueMemoizer(Lazy(this.array).getIterator()),n=0;return this.parent.each(function(r){return t.contains(r)?e(r,n++):void 0})},SimpleIntersectionSequence.prototype.eachArrayCache=function(e){var t=this.array,n=arrayContains,r=0;return this.parent.each(function(o){return n(t,o)?e(o,r++):void 0})},SimpleZippedSequence.prototype=new Sequence,SimpleZippedSequence.prototype.each=function(e){var t=this.array;return this.parent.each(function(n,r){return e([n,t[r]],r)})},ArrayLikeSequence.prototype=new Sequence,ArrayLikeSequence.define=function(e,t){if(!t||"function"!=typeof t.get)throw new Error("A custom array-like sequence must implement *at least* get!");return defineSequenceType(ArrayLikeSequence,e,t)},ArrayLikeSequence.prototype.get=function(e){return this.parent.get(e)},ArrayLikeSequence.prototype.length=function(){return this.parent.length()},ArrayLikeSequence.prototype.getIndex=function(){return this},ArrayLikeSequence.prototype.getIterator=function(){return new IndexedIterator(this)},IndexedIterator.prototype.current=function(){return this.sequence.get(this.index)},IndexedIterator.prototype.moveNext=function(){return this.index>=this.sequence.length()-1?!1:(++this.index,!0)},ArrayLikeSequence.prototype.each=function(e){for(var t=this.length(),n=-1;++n<t;)if(e(this.get(n),n)===!1)return!1;return!0},ArrayLikeSequence.prototype.pop=function(){return this.initial()},ArrayLikeSequence.prototype.shift=function(){return this.drop()},ArrayLikeSequence.prototype.slice=function(e,t){var n=this.length();0>e&&(e=n+e);var r=this.drop(e);return"number"==typeof t&&(0>t&&(t=n+t),r=r.take(t-e)),r},ArrayLikeSequence.prototype.map=function(e){return new IndexedMappedSequence(this,createCallback(e))},IndexedMappedSequence.prototype=new ArrayLikeSequence,IndexedMappedSequence.prototype.get=function(e){return 0>e||e>=this.parent.length()?void 0:this.mapFn(this.parent.get(e),e)},ArrayLikeSequence.prototype.filter=function(e){return new IndexedFilteredSequence(this,createCallback(e))},IndexedFilteredSequence.prototype=new FilteredSequence,IndexedFilteredSequence.prototype.each=function(e){for(var t,n=this.parent,r=this.filterFn,o=this.parent.length(),i=-1,u=0;++i<o;)if(t=n.get(i),r(t,i)&&e(t,u++)===!1)return!1;return!0},ArrayLikeSequence.prototype.reverse=function(){return new IndexedReversedSequence(this)},IndexedReversedSequence.prototype=new ArrayLikeSequence,IndexedReversedSequence.prototype.get=function(e){return this.parent.get(this.length()-e-1)},ArrayLikeSequence.prototype.first=function(e){return"undefined"==typeof e?this.get(0):new IndexedTakeSequence(this,e)},IndexedTakeSequence.prototype=new ArrayLikeSequence,IndexedTakeSequence.prototype.length=function(){var e=this.parent.length();return this.count<=e?this.count:e},ArrayLikeSequence.prototype.rest=function(e){return new IndexedDropSequence(this,e)},IndexedDropSequence.prototype=new ArrayLikeSequence,IndexedDropSequence.prototype.get=function(e){return this.parent.get(this.count+e)},IndexedDropSequence.prototype.length=function(){var e=this.parent.length();return this.count<=e?e-this.count:0},ArrayLikeSequence.prototype.concat=function(e){return 1===arguments.length&&arguments[0]instanceof Array?new IndexedConcatenatedSequence(this,e):Sequence.prototype.concat.apply(this,arguments)},IndexedConcatenatedSequence.prototype=new ArrayLikeSequence,IndexedConcatenatedSequence.prototype.get=function(e){var t=this.parent.length();return t>e?this.parent.get(e):this.other[e-t]},IndexedConcatenatedSequence.prototype.length=function(){return this.parent.length()+this.other.length},ArrayLikeSequence.prototype.uniq=function(e){return new IndexedUniqueSequence(this,createCallback(e))},IndexedUniqueSequence.prototype=new Sequence,IndexedUniqueSequence.prototype.eachArrayCache=function(e){for(var t,n,r=this.parent,o=this.keyFn,i=r.length(),u=[],c=arrayContains,a=-1,s=0;++a<i;)if(n=r.get(a),t=o(n),!c(u,t)&&(u.push(t),e(n,s++)===!1))return!1},IndexedUniqueSequence.prototype.eachSetCache=UniqueSequence.prototype.each,MemoizedSequence.prototype=new ArrayLikeSequence,MemoizedSequence.prototype.cache=function(){return this.cachedResult||(this.cachedResult=this.parent.toArray())},MemoizedSequence.prototype.get=function(e){return this.cache()[e]},MemoizedSequence.prototype.length=function(){return this.cache().length},MemoizedSequence.prototype.slice=function(e,t){return this.cache().slice(e,t)},MemoizedSequence.prototype.toArray=function(){return this.cache().slice(0)},ArrayWrapper.prototype=new ArrayLikeSequence,ArrayWrapper.prototype.root=function(){return this},ArrayWrapper.prototype.isAsync=function(){return!1},ArrayWrapper.prototype.get=function(e){return this.source[e]},ArrayWrapper.prototype.length=function(){return this.source.length},ArrayWrapper.prototype.each=function(e){return forEach(this.source,e)},ArrayWrapper.prototype.map=function(e){return new MappedArrayWrapper(this,createCallback(e))},ArrayWrapper.prototype.filter=function(e){return new FilteredArrayWrapper(this,createCallback(e))},ArrayWrapper.prototype.uniq=function(e){return new UniqueArrayWrapper(this,e)},ArrayWrapper.prototype.concat=function(e){return 1===arguments.length&&arguments[0]instanceof Array?new ConcatArrayWrapper(this,e):ArrayLikeSequence.prototype.concat.apply(this,arguments)},ArrayWrapper.prototype.toArray=function(){return this.source.slice(0)},MappedArrayWrapper.prototype=new ArrayLikeSequence,MappedArrayWrapper.prototype.get=function(e){var t=this.parent.source;if(!(0>e||e>=t.length))return this.mapFn(t[e])},MappedArrayWrapper.prototype.length=function(){return this.parent.source.length},MappedArrayWrapper.prototype.each=function(e){for(var t=this.parent.source,n=t.length,r=this.mapFn,o=-1;++o<n;)if(e(r(t[o],o),o)===!1)return!1;return!0},FilteredArrayWrapper.prototype=new FilteredSequence,FilteredArrayWrapper.prototype.each=function(e){for(var t,n=this.parent.source,r=this.filterFn,o=n.length,i=-1,u=0;++i<o;)if(t=n[i],r(t,i)&&e(t,u++)===!1)return!1;return!0},UniqueArrayWrapper.prototype=new Sequence,UniqueArrayWrapper.prototype.eachNoCache=function(e){for(var t,n=this.parent.source,r=this.keyFn,o=n.length,i=arrayContainsBefore,u=-1,c=0;++u<o;)if(t=n[u],!i(n,t,u,r)&&e(t,c++)===!1)return!1;return!0},UniqueArrayWrapper.prototype.eachArrayCache=function(e){var t,n,r=this.parent.source,o=this.keyFn,i=r.length,u=[],c=arrayContains,a=-1,s=0;if(o){for(o=createCallback(o);++a<i;)if(n=r[a],t=o(n),!c(u,t)&&(u.push(t),e(n,s++)===!1))return!1}else for(;++a<i;)if(n=r[a],!c(u,n)&&(u.push(n),e(n,s++)===!1))return!1;return!0},UniqueArrayWrapper.prototype.eachSetCache=UniqueSequence.prototype.each,ConcatArrayWrapper.prototype=new ArrayLikeSequence,ConcatArrayWrapper.prototype.get=function(e){var t=this.parent.source,n=t.length;return n>e?t[e]:this.other[e-n]},ConcatArrayWrapper.prototype.length=function(){return this.parent.source.length+this.other.length},ConcatArrayWrapper.prototype.each=function(e){for(var t=this.parent.source,n=t.length,r=this.other,o=r.length,i=0,u=-1;++u<n;)if(e(t[u],i++)===!1)return!1;
for(u=-1;++u<o;)if(e(r[u],i++)===!1)return!1;return!0},ObjectLikeSequence.prototype=new Sequence,ObjectLikeSequence.define=function(e,t){if(!t||"function"!=typeof t.each)throw new Error("A custom object-like sequence must implement *at least* each!");return defineSequenceType(ObjectLikeSequence,e,t)},ObjectLikeSequence.prototype.value=function(){return this.toObject()},ObjectLikeSequence.prototype.get=function(e){var t=this.pairs().find(function(t){return t[0]===e});return t?t[1]:void 0},ObjectLikeSequence.prototype.keys=function(){return this.map(function(e,t){return t})},ObjectLikeSequence.prototype.values=function(){return this.map(function(e,t){return e})},ObjectLikeSequence.prototype.async=function(){throw new Error("An ObjectLikeSequence does not support asynchronous iteration.")},ObjectLikeSequence.prototype.filter=function(e){return new FilteredObjectLikeSequence(this,createCallback(e))},FilteredObjectLikeSequence.prototype=new ObjectLikeSequence,FilteredObjectLikeSequence.prototype.each=function(e){var t=this.filterFn;return this.parent.each(function(n,r){return t(n,r)?e(n,r):void 0})},ObjectLikeSequence.prototype.reverse=function(){return this},ObjectLikeSequence.prototype.assign=function(e){return new AssignSequence(this,e)},ObjectLikeSequence.prototype.extend=function(e){return this.assign(e)},AssignSequence.prototype=new ObjectLikeSequence,AssignSequence.prototype.get=function(e){return this.other[e]||this.parent.get(e)},AssignSequence.prototype.each=function(e){var t=new Set,n=!1;return Lazy(this.other).each(function(r,o){return e(r,o)===!1?(n=!0,!1):void t.add(o)}),n?void 0:this.parent.each(function(n,r){return t.contains(r)||e(n,r)!==!1?void 0:!1})},ObjectLikeSequence.prototype.defaults=function e(e){return new DefaultsSequence(this,e)},DefaultsSequence.prototype=new ObjectLikeSequence,DefaultsSequence.prototype.get=function(e){return this.parent.get(e)||this.defaults[e]},DefaultsSequence.prototype.each=function(e){var t=new Set,n=!1;this.parent.each(function(r,o){return e(r,o)===!1?(n=!0,!1):void("undefined"!=typeof r&&t.add(o))}),n||Lazy(this.defaults).each(function(n,r){return t.contains(r)||e(n,r)!==!1?void 0:!1})},ObjectLikeSequence.prototype.invert=function(){return new InvertedSequence(this)},InvertedSequence.prototype=new ObjectLikeSequence,InvertedSequence.prototype.each=function(e){this.parent.each(function(t,n){return e(n,t)})},ObjectLikeSequence.prototype.merge=function(e){var t=arguments.length>1&&"function"==typeof arguments[arguments.length-1]?arrayPop.call(arguments):null;return new MergedSequence(this,arraySlice.call(arguments,0),t)},MergedSequence.prototype=new ObjectLikeSequence,MergedSequence.prototype.each=function(e){var t=this.others,n=this.mergeFn||mergeObjects,r={},o=this.parent.each(function(o,i){var u=o;return forEach(t,function(e){i in e&&(u=n(u,e[i]))}),r[i]=!0,e(u,i)});if(o===!1)return!1;var i={};return forEach(t,function(e){for(var t in e)r[t]||(i[t]=n(i[t],e[t]))}),Lazy(i).each(e)},ObjectLikeSequence.prototype.functions=function(){return this.filter(function(e,t){return"function"==typeof e}).map(function(e,t){return t})},ObjectLikeSequence.prototype.methods=function(){return this.functions()},ObjectLikeSequence.prototype.pick=function(e){return new PickSequence(this,e)},PickSequence.prototype=new ObjectLikeSequence,PickSequence.prototype.get=function(e){return arrayContains(this.properties,e)?this.parent.get(e):void 0},PickSequence.prototype.each=function(e){var t=arrayContains,n=this.properties;return this.parent.each(function(r,o){return t(n,o)?e(r,o):void 0})},ObjectLikeSequence.prototype.omit=function(e){return new OmitSequence(this,e)},OmitSequence.prototype=new ObjectLikeSequence,OmitSequence.prototype.get=function(e){return arrayContains(this.properties,e)?void 0:this.parent.get(e)},OmitSequence.prototype.each=function(e){var t=arrayContains,n=this.properties;return this.parent.each(function(r,o){return t(n,o)?void 0:e(r,o)})},ObjectLikeSequence.prototype.pairs=function(){return this.map(function(e,t){return[t,e]})},ObjectLikeSequence.prototype.toArray=function(){return this.pairs().toArray()},ObjectLikeSequence.prototype.toObject=function(){return this.reduce(function(e,t,n){return e[n]=t,e},{})},GroupedSequence.prototype=new ObjectLikeSequence,GroupedSequence.prototype.each=function(e){var t,n=createCallback(this.keyFn),r=createCallback(this.valFn);return t=this.parent.reduce(function(e,t){var o=n(t),i=r(t);return e[o]instanceof Array?e[o].push(i):e[o]=[i],e},{}),transform(function(t){for(var n in t)if(e(t[n],n)===!1)return!1},t)},IndexedSequence.prototype=new ObjectLikeSequence,IndexedSequence.prototype.each=function(e){var t=createCallback(this.keyFn),n=createCallback(this.valFn),r={};return this.parent.each(function(o){var i=t(o),u=n(o);return r[i]?void 0:(r[i]=u,e(u,i))})},CountedSequence.prototype=new ObjectLikeSequence,CountedSequence.prototype.each=function(e){var t=createCallback(this.keyFn),n={};this.parent.each(function(e){var r=t(e);n[r]?n[r]+=1:n[r]=1});for(var r in n)if(e(n[r],r)===!1)return!1;return!0},ObjectLikeSequence.prototype.watch=function(e){throw new Error("You can only call #watch on a directly wrapped object.")},ObjectWrapper.prototype=new ObjectLikeSequence,ObjectWrapper.prototype.root=function(){return this},ObjectWrapper.prototype.isAsync=function(){return!1},ObjectWrapper.prototype.get=function(e){return this.source[e]},ObjectWrapper.prototype.each=function(e){var t,n=this.source;for(t in n)if(e(n[t],t)===!1)return!1;return!0},StringLikeSequence.prototype=new ArrayLikeSequence,StringLikeSequence.define=function(e,t){if(!t||"function"!=typeof t.get)throw new Error("A custom string-like sequence must implement *at least* get!");return defineSequenceType(StringLikeSequence,e,t)},StringLikeSequence.prototype.value=function(){return this.toString()},StringLikeSequence.prototype.getIterator=function(){return new CharIterator(this)},CharIterator.prototype.current=function(){return this.source.charAt(this.index)},CharIterator.prototype.moveNext=function(){return++this.index<this.source.length()},StringLikeSequence.prototype.charAt=function(e){return this.get(e)},StringLikeSequence.prototype.charCodeAt=function(e){var t=this.charAt(e);return t?t.charCodeAt(0):NaN},StringLikeSequence.prototype.substring=function(e,t){return new StringSegment(this,e,t)},StringSegment.prototype=new StringLikeSequence,StringSegment.prototype.get=function(e){return this.parent.get(e+this.start)},StringSegment.prototype.length=function(){return("number"==typeof this.stop?this.stop:this.parent.length())-this.start},StringLikeSequence.prototype.first=function(e){return"undefined"==typeof e?this.charAt(0):this.substring(0,e)},StringLikeSequence.prototype.last=function(e){return"undefined"==typeof e?this.charAt(this.length()-1):this.substring(this.length()-e)},StringLikeSequence.prototype.drop=function(e){return this.substring(e)},StringLikeSequence.prototype.indexOf=function(e,t){return this.toString().indexOf(e,t)},StringLikeSequence.prototype.lastIndexOf=function(e,t){return this.toString().lastIndexOf(e,t)},StringLikeSequence.prototype.contains=function(e){return-1!==this.indexOf(e)},StringLikeSequence.prototype.endsWith=function(e){return this.substring(this.length()-e.length).toString()===e},StringLikeSequence.prototype.startsWith=function(e){return this.substring(0,e.length).toString()===e},StringLikeSequence.prototype.toUpperCase=function(){return this.mapString(function(e){return e.toUpperCase()})},StringLikeSequence.prototype.toLowerCase=function(){return this.mapString(function(e){return e.toLowerCase()})},StringLikeSequence.prototype.mapString=function(e){return new MappedStringLikeSequence(this,e)},MappedStringLikeSequence.prototype=new StringLikeSequence,MappedStringLikeSequence.prototype.get=IndexedMappedSequence.prototype.get,MappedStringLikeSequence.prototype.length=IndexedMappedSequence.prototype.length,StringLikeSequence.prototype.reverse=function(){return new ReversedStringLikeSequence(this)},ReversedStringLikeSequence.prototype=new StringLikeSequence,ReversedStringLikeSequence.prototype.get=IndexedReversedSequence.prototype.get,ReversedStringLikeSequence.prototype.length=IndexedReversedSequence.prototype.length,StringLikeSequence.prototype.toString=function(){return this.join("")},StringLikeSequence.prototype.match=function(e){return new StringMatchSequence(this,e)},StringMatchSequence.prototype=new Sequence,StringMatchSequence.prototype.getIterator=function(){return new StringMatchIterator(this.parent.toString(),this.pattern)},StringMatchIterator.prototype.current=function(){return this.match[0]},StringMatchIterator.prototype.moveNext=function(){return!!(this.match=this.pattern.exec(this.source))},StringLikeSequence.prototype.split=function(e){return new SplitStringSequence(this,e)},SplitStringSequence.prototype=new Sequence,SplitStringSequence.prototype.getIterator=function(){var e=this.parent.toString();return this.pattern instanceof RegExp?""===this.pattern.source||"(?:)"===this.pattern.source?new CharIterator(e):new SplitWithRegExpIterator(e,this.pattern):""===this.pattern?new CharIterator(e):new SplitWithStringIterator(e,this.pattern)},SplitWithRegExpIterator.prototype.current=function(){return this.source.substring(this.start,this.end)},SplitWithRegExpIterator.prototype.moveNext=function(){if(!this.pattern)return!1;var e=this.pattern.exec(this.source);return e?(this.start=this.nextStart?this.nextStart:0,this.end=e.index,this.nextStart=e.index+e[0].length,!0):this.pattern?(this.start=this.nextStart,this.end=void 0,this.nextStart=void 0,this.pattern=void 0,!0):!1},SplitWithStringIterator.prototype.current=function(){return this.source.substring(this.leftIndex,this.rightIndex)},SplitWithStringIterator.prototype.moveNext=function(){return this.finished||(this.leftIndex="undefined"!=typeof this.leftIndex?this.rightIndex+this.delimiter.length:0,this.rightIndex=this.source.indexOf(this.delimiter,this.leftIndex)),-1===this.rightIndex?(this.finished=!0,this.rightIndex=void 0,!0):!this.finished},StringWrapper.prototype=new StringLikeSequence,StringWrapper.prototype.root=function(){return this},StringWrapper.prototype.isAsync=function(){return!1},StringWrapper.prototype.get=function(e){return this.source.charAt(e)},StringWrapper.prototype.length=function(){return this.source.length},StringWrapper.prototype.toString=function(){return this.source},GeneratedSequence.prototype=new Sequence,GeneratedSequence.prototype.isAsync=function(){return!1},GeneratedSequence.prototype.length=function(){return this.fixedLength},GeneratedSequence.prototype.each=function(e){for(var t=this.get,n=this.fixedLength,r=0;"undefined"==typeof n||n>r;)if(e(t(r),r++)===!1)return!1;return!0},GeneratedSequence.prototype.getIterator=function(){return new GeneratedIterator(this)},GeneratedIterator.prototype.current=function(){return this.currentValue},GeneratedIterator.prototype.moveNext=function(){var e=this.sequence;return"number"==typeof e.fixedLength&&this.index>=e.fixedLength?!1:(this.currentValue=e.get(this.index++),!0)},AsyncSequence.prototype=new Sequence,AsyncSequence.prototype.isAsync=function(){return!0},AsyncSequence.prototype.getIterator=function(){throw new Error("An AsyncSequence does not support synchronous iteration.")},AsyncSequence.prototype.each=function(e){var t=this.parent.getIterator(),n=this.onNextCallback,r=this.cancelCallback,o=0,i=new AsyncHandle(function(){u&&r(u)}),u=n(function c(){u=null;try{t.moveNext()&&e(t.current(),o++)!==!1?u=n(c):i._resolve()}catch(r){i._reject(r)}});return i};var PENDING=1,RESOLVED=2,REJECTED=3;AsyncHandle.prototype.then=function(e,t){var n=new AsyncHandle(this.cancelFn);return this.resolveListeners.push(function(t){try{if("function"!=typeof e)return void resolve(n,t);resolve(n,e(t))}catch(r){n._reject(r)}}),this.rejectListeners.push(function(e){try{if("function"!=typeof t)return void n._reject(e);resolve(n,t(e))}catch(r){n._reject(r)}}),this.state===RESOLVED&&this._resolve(this.value),this.state===REJECTED&&this._reject(this.reason),n},AsyncHandle.prototype._resolve=function(e){this.state!==REJECTED&&(this.state===PENDING&&(this.state=RESOLVED,this.value=e),consumeListeners(this.resolveListeners,this.value))},AsyncHandle.prototype._reject=function(e){this.state!==RESOLVED&&(this.state===PENDING&&(this.state=REJECTED,this.reason=e),consumeListeners(this.rejectListeners,this.reason))},AsyncHandle.prototype.cancel=function(){this.cancelFn&&(this.cancelFn(),this.cancelFn=null,this._resolve(!1))},AsyncHandle.prototype.onComplete=function(e){return this.resolveListeners.push(e),this},AsyncHandle.prototype.onError=function(e){return this.rejectListeners.push(e),this},AsyncSequence.prototype.reverse=function(){return this.parent.reverse().async()},AsyncSequence.prototype.find=function(e){var t,n=this.each(function(n,r){return e(n,r)?(t=n,!1):void 0});return n.then(function(){return t})},AsyncSequence.prototype.indexOf=function(e){var t=-1,n=this.each(function(n,r){return n===e?(t=r,!1):void 0});return n.then(function(){return t})},AsyncSequence.prototype.contains=function(e){var t=!1,n=this.each(function(n){return n===e?(t=!0,!1):void 0});return n.then(function(){return t})},AsyncSequence.prototype.async=function(){return this},ObjectWrapper.prototype.watch=function(e){return new WatchedPropertySequence(this.source,e)},WatchedPropertySequence.prototype=new AsyncSequence,WatchedPropertySequence.prototype.each=function(e){this.listeners.push(e)},StreamLikeSequence.prototype=new AsyncSequence,StreamLikeSequence.prototype.isAsync=function(){return!0},StreamLikeSequence.prototype.split=function(e){return new SplitStreamSequence(this,e)},SplitStreamSequence.prototype=new Sequence,SplitStreamSequence.prototype.getEachForDelimiter=function(e){return e instanceof RegExp?this.regexEach:this.stringEach},SplitStreamSequence.prototype.regexEach=function(e){var t,n=cloneRegex(this.delimiter),r="",o=0,i=0,u=this.parent.each(function(u){r+=u;for(var c;c=n.exec(r);){if(t=c.index,e(r.substring(o,t),i++)===!1)return!1;o=t+c[0].length}r=r.substring(o),o=0});return u.onComplete(function(){r.length>0&&e(r,i++)}),u},SplitStreamSequence.prototype.stringEach=function(e){var t=this.delimiter,n=0,r="",o=this.parent.each(function(o){r+=o;for(var i;(i=r.indexOf(t))>=0;){var u=r.substr(0,i);if(r=r.substr(i+t.length),e(u,n++)===!1)return!1}return!0});return o.onComplete(function(){e(r,n++)}),o},StreamLikeSequence.prototype.lines=function(){return this.split("\n")},StreamLikeSequence.prototype.match=function(e){return new MatchedStreamSequence(this,e)},MatchedStreamSequence.prototype=new AsyncSequence,MatchedStreamSequence.prototype.each=function(e){var t=this.pattern,n=!1,r=0;return this.parent.each(function(o){return Lazy(o).match(t).each(function(t){return e(t,r++)===!1?(n=!0,!1):void 0}),!n})},Lazy.createWrapper=function(e){var t=function(){this.listeners=[]};return t.prototype=new StreamLikeSequence,t.prototype.each=function(e){this.listeners.push(e)},t.prototype.emit=function(e){for(var t=this.listeners,n=t.length,r=n-1;r>=0;--r)t[r](e)===!1&&t.splice(r,1)},function(){var n=new t;return e.apply(n,arguments),n}},Lazy.generate=function(e,t){return new GeneratedSequence(e,t)},Lazy.range=function(){var e=arguments.length>1?arguments[0]:0,t=arguments.length>1?arguments[1]:arguments[0],n=arguments.length>2&&arguments[2];return n===!1&&(n=t>e?1:-1),0===n?Lazy([]):Lazy.generate(function(t){return e+n*t}).take(Math.ceil((t-e)/n))},Lazy.repeat=function(e,t){return Lazy.generate(function(){return e},t)},Lazy.Sequence=Sequence,Lazy.ArrayLikeSequence=ArrayLikeSequence,Lazy.ObjectLikeSequence=ObjectLikeSequence,Lazy.StringLikeSequence=StringLikeSequence,Lazy.StreamLikeSequence=StreamLikeSequence,Lazy.GeneratedSequence=GeneratedSequence,Lazy.AsyncSequence=AsyncSequence,Lazy.AsyncHandle=AsyncHandle,Lazy.clone=function(e){return Lazy(e).value()},Lazy.deprecate=function(e,t){return function(){return console.warn(e),t.apply(this,arguments)}};var arrayPop=Array.prototype.pop,arraySlice=Array.prototype.slice;return Set.prototype.add=function(e){var t,n=this.table,r=typeof e;switch(r){case"number":case"boolean":case"undefined":return n[e]?!1:(n[e]=!0,!0);case"string":switch(e.charAt(0)){case"_":case"f":case"t":case"c":case"u":case"@":case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"N":e="@"+e}return n[e]?!1:(n[e]=!0,!0);default:return t=this.objects,arrayContains(t,e)?!1:(t.push(e),!0)}},Set.prototype.contains=function(e){var t=typeof e;switch(t){case"number":case"boolean":case"undefined":return!!this.table[e];case"string":switch(e.charAt(0)){case"_":case"f":case"t":case"c":case"u":case"@":case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"N":e="@"+e}return!!this.table[e];default:return arrayContains(this.objects,e)}},Queue.prototype.add=function(e){var t=this.contents,n=t.length,r=this.start;return this.count===n?(t[r]=e,this.start=(r+1)%n):t[this.count++]=e,this},Queue.prototype.toArray=function(){var e=this.contents,t=this.start,n=this.count,r=e.slice(t,t+n);return r.length<n&&(r=r.concat(e.slice(0,n-r.length))),r},Lazy})}).call(exports,__webpack_require__(157).setImmediate,__webpack_require__(157).clearImmediate)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(164),i=r(o),u=n(167),c=r(u),a=n(228),s=r(a),f=n(221),p=r(f),h=n(222),l=r(h),y=n(160).Buffer,d=function(){function e(t,n){(0,p["default"])(this,e),this.payload=t||null,this.hash=null,this.next=n?n instanceof Array?n:[n]:[],this.next=this.next.map(function(t){return t instanceof e?t.hash:t})}return(0,l["default"])(e,[{key:"hasChild",value:function(e){for(var t=0;t<this.next.length;t++)if(this.next[t]===e.hash)return!0;return!1}},{key:"asJson",get:function(){var t={payload:this.payload},n=this.next.map(function(t){return t instanceof e?t.hash:t});return(0,s["default"])(t,{next:n}),t}}],[{key:"create",value:function(t,n,r){if(!t)throw new Error("Node requires ipfs instance");return new c["default"](function(o,i){var u=new e(n,r);e.getIpfsHash(t,u).then(function(e){u.hash=e,o(u)})["catch"](i)})}},{key:"fromIpfsHash",value:function(t,n){if(!t)throw new Error("Node requires ipfs instance");if(!n)throw new Error("Invalid hash: "+n);return new c["default"](function(r,o){t.object.get(n).then(function(n){var i=JSON.parse(n.Data);e.create(t,i.payload,i.next).then(r)["catch"](o)})["catch"](o)})}},{key:"getIpfsHash",value:function(e,t){if(!e)throw new Error("Node requires ipfs instance");return new c["default"](function(n,r){e.object.put(new y((0,i["default"])({Data:(0,i["default"])(t.asJson)}))).then(function(e){return n(e.Hash)})["catch"](r)})}},{key:"equals",value:function(e,t){return e.hash===t.hash}}]),e}();e.exports=d},function(e,t,n){e.exports={"default":n(229),__esModule:!0}},function(e,t,n){n(230),e.exports=n(166).Object.assign},function(e,t,n){var r=n(176);r(r.S+r.F,"Object",{assign:n(231)})},function(e,t,n){var r=n(182),o=n(232),i=n(198);e.exports=n(185)(function(){var e=Object.assign,t={},n={},r=Symbol(),o="abcdefghijklmnopqrst";return t[r]=7,o.split("").forEach(function(e){n[e]=e}),7!=e({},t)[r]||Object.keys(e({},n)).join("")!=o})?function(e,t){for(var n=o(e),u=arguments,c=u.length,a=1,s=r.getKeys,f=r.getSymbols,p=r.isEnum;c>a;)for(var h,l=i(u[a++]),y=f?s(l).concat(f(l)):s(l),d=y.length,v=0;d>v;)p.call(l,h=y[v++])&&(n[h]=l[h]);return n}:Object.assign},function(e,t,n){var r=n(173);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(37),i=r(o),u=n(61),c=r(u),a=n(62),s=r(a),f=n(234),p=(n(235),n(256)),h=function(){function e(){(0,c["default"])(this,e)}return(0,s["default"])(e,null,[{key:"create",value:function(t,n,r,o,u,c,a){return new i["default"](function(i,a){var s=void 0;e._createOperation(t,r,o,u,c).then(function(e){return s=e.Post,n.add(e.Hash)}).then(function(e){return i({node:e,op:s})})["catch"](a)})}},{key:"_createOperation",value:function(e,t,n,r,o){return new i["default"](function(t,i){var u={operation:n,key:r,value:o};p.create(e,p.Types.OrbitDBItem,u).then(t)["catch"](i)})}},{key:"Types",get:function(){return f}}]),e}();e.exports=h},function(e,t){"use strict";var n={Add:"ADD",Put:"PUT",Delete:"DELETE",isInsert:function(e){return"ADD"===e||"PUT"===e},isDelete:function(e){return"DELETE"===e}};e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(236),i=r(o),u=n(61),c=r(u),a=n(240),s=r(a),f=n(249),p=r(f),h=n(255),l=function(e){function t(e,n,r){(0,c["default"])(this,t);var o=(0,s["default"])(this,(0,i["default"])(t).call(this,"orbit-db-op"));return o.op=e,o.key=n,o.value=r,o}return(0,p["default"])(t,e),t}(h);e.exports=l},function(e,t,n){e.exports={"default":n(237),__esModule:!0}},function(e,t,n){n(238),e.exports=n(15).Object.getPrototypeOf},function(e,t,n){var r=n(155);n(239)("getPrototypeOf",function(e){return function(t){return e(r(t))}})},function(e,t,n){var r=n(13),o=n(15),i=n(22);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],u={};u[e]=t(n),r(r.S+r.F*i(function(){n(1)}),"Object",u)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(241),i=r(o);t["default"]=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":(0,i["default"])(t))&&"function"!=typeof t?e:t}},function(e,t,n){"use strict";var r=n(242)["default"];t["default"]=function(e){return e&&e.constructor===r?"symbol":typeof e},t.__esModule=!0},function(e,t,n){e.exports={"default":n(243),__esModule:!0}},function(e,t,n){n(244),n(39),e.exports=n(15).Symbol},function(e,t,n){"use strict";var r=n(4),o=n(14),i=n(23),u=n(21),c=n(13),a=n(18),s=n(22),f=n(28),p=n(26),h=n(29),l=n(27),y=n(245),d=n(246),v=n(247),g=n(248),S=n(43),m=n(34),_=n(20),w=r.getDesc,b=r.setDesc,q=r.create,k=d.get,x=o.Symbol,A=o.JSON,E=A&&A.stringify,I=!1,L=l("_hidden"),O=r.isEnum,C=f("symbol-registry"),j=f("symbols"),R="function"==typeof x,T=Object.prototype,P=u&&s(function(){return 7!=q(b({},"a",{get:function(){return b(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=w(T,t);r&&delete T[t],b(e,t,n),r&&e!==T&&b(T,t,r)}:b,M=function(e){var t=j[e]=q(x.prototype);return t._k=e,u&&I&&P(T,e,{configurable:!0,set:function(t){i(this,L)&&i(this[L],e)&&(this[L][e]=!1),P(this,e,_(1,t))}}),t},B=function(e){return"symbol"==typeof e},D=function(e,t,n){return n&&i(j,t)?(n.enumerable?(i(e,L)&&e[L][t]&&(e[L][t]=!1),n=q(n,{enumerable:_(0,!1)})):(i(e,L)||b(e,L,_(1,{})),e[L][t]=!0),P(e,t,n)):b(e,t,n)},F=function(e,t){S(e);for(var n,r=v(t=m(t)),o=0,i=r.length;i>o;)D(e,n=r[o++],t[n]);return e},N=function(e,t){return void 0===t?q(e):F(q(e),t)},U=function(e){var t=O.call(this,e);return t||!i(this,e)||!i(j,e)||i(this,L)&&this[L][e]?t:!0},W=function(e,t){var n=w(e=m(e),t);return!n||!i(j,t)||i(e,L)&&e[L][t]||(n.enumerable=!0),n},z=function(e){for(var t,n=k(m(e)),r=[],o=0;n.length>o;)i(j,t=n[o++])||t==L||r.push(t);return r},Y=function(e){for(var t,n=k(m(e)),r=[],o=0;n.length>o;)i(j,t=n[o++])&&r.push(j[t]);return r},H=function(e){if(void 0!==e&&!B(e)){for(var t,n,r=[e],o=1,i=arguments;i.length>o;)r.push(i[o++]);return t=r[1],"function"==typeof t&&(n=t),!n&&g(t)||(t=function(e,t){return n&&(t=n.call(this,e,t)),B(t)?void 0:t}),r[1]=t,E.apply(A,r)}},G=s(function(){var e=x();return"[null]"!=E([e])||"{}"!=E({a:e})||"{}"!=E(Object(e))});R||(x=function(){if(B(this))throw TypeError("Symbol is not a constructor");return M(h(arguments.length>0?arguments[0]:void 0))},a(x.prototype,"toString",function(){return this._k}),B=function(e){return e instanceof x},r.create=N,r.isEnum=U,r.getDesc=W,r.setDesc=D,r.setDescs=F,r.getNames=d.get=z,r.getSymbols=Y,u&&!n(12)&&a(T,"propertyIsEnumerable",U,!0));var J={"for":function(e){return i(C,e+="")?C[e]:C[e]=x(e)},keyFor:function(e){return y(C,e)},useSetter:function(){I=!0},useSimple:function(){I=!1}};r.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(e){var t=l(e);J[e]=R?t:M(t)}),I=!0,c(c.G+c.W,{Symbol:x}),c(c.S,"Symbol",J),c(c.S+c.F*!R,"Object",{create:N,defineProperty:D,defineProperties:F,getOwnPropertyDescriptor:W,getOwnPropertyNames:z,getOwnPropertySymbols:Y}),A&&c(c.S+c.F*(!R||G),"JSON",{stringify:H}),p(x,"Symbol"),p(Math,"Math",!0),p(o.JSON,"JSON",!0)},function(e,t,n){var r=n(4),o=n(34);e.exports=function(e,t){for(var n,i=o(e),u=r.getKeys(i),c=u.length,a=0;c>a;)if(i[n=u[a++]]===t)return n}},function(e,t,n){var r=n(34),o=n(4).getNames,i={}.toString,u="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(e){try{return o(e)}catch(t){return u.slice()}};e.exports.get=function(e){return u&&"[object Window]"==i.call(e)?c(e):o(r(e))}},function(e,t,n){var r=n(4);e.exports=function(e){var t=r.getKeys(e),n=r.getSymbols;if(n)for(var o,i=n(e),u=r.isEnum,c=0;i.length>c;)u.call(e,o=i[c++])&&t.push(o);return t}},function(e,t,n){var r=n(36);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){"use strict";var r=n(250)["default"],o=n(252)["default"];t["default"]=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=r(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(o?o(e,t):e.__proto__=t)},t.__esModule=!0},function(e,t,n){e.exports={"default":n(251),__esModule:!0}},function(e,t,n){var r=n(4);e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){e.exports={"default":n(253),__esModule:!0}},function(e,t,n){n(254),e.exports=n(15).Object.setPrototypeOf},function(e,t,n){var r=n(13);r(r.S,"Object",{setPrototypeOf:n(50).set})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(61),i=r(o),u=function c(e){(0,i["default"])(this,c),this.type=e};e.exports=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(92),i=r(o),u=n(37),c=r(u),a=n(61),s=r(a),f=n(62),p=r(f),h=n(257).Buffer,l=(n(255),n(261)),y=n(262),d=n(263),v=n(235),g=n(264),S=n(265),m={Message:l,Snippet:"snippet",File:y,Directory:d,Link:"link",OrbitDBItem:v,Poll:S},_=function(){function e(){(0,s["default"])(this,e)}return(0,p["default"])(e,null,[{key:"create",value:function(e,t,n){return new c["default"](function(r,o){var u=void 0;t===m.Message?u=new m.Message(n.content):t===m.File?u=new m.File(n.name,n.hash,n.size):t==m.Directory?u=new m.Directory(n.name,n.hash,n.size):t==m.OrbitDBItem?u=new m.OrbitDBItem(n.operation,n.key,n.value):t==m.Poll&&(u=new m.Poll(n.question,n.options));var c=n.size?n.size:h.byteLength(n,"utf8");u.meta=new g(u.type,c,(new Date).getTime(),n.from),u.type&&delete u.type,e.object.put(new h((0,i["default"])({Data:(0,i["default"])(u)})),"json").then(function(e){return r({Post:u,Hash:e.Hash})})["catch"](o)})}},{key:"Types",get:function(){return m}}]),e}();e.exports=_},function(e,t,n){(function(e,r){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
"use strict";function o(){try{var e=new Uint8Array(1);return e.foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function i(){return e.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function e(t){return this instanceof e?(e.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof t?u(this,t):"string"==typeof t?c(this,t,arguments.length>1?arguments[1]:"utf8"):a(this,t)):arguments.length>1?new e(t,arguments[1]):new e(t)}function u(t,n){if(t=d(t,0>n?0:0|v(n)),!e.TYPED_ARRAY_SUPPORT)for(var r=0;n>r;r++)t[r]=0;return t}function c(e,t,n){"string"==typeof n&&""!==n||(n="utf8");var r=0|S(t,n);return e=d(e,r),e.write(t,n),e}function a(t,n){if(e.isBuffer(n))return s(t,n);if(K(n))return f(t,n);if(null==n)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(n.buffer instanceof ArrayBuffer)return p(t,n);if(n instanceof ArrayBuffer)return h(t,n)}return n.length?l(t,n):y(t,n)}function s(e,t){var n=0|v(t.length);return e=d(e,n),t.copy(e,0,0,n),e}function f(e,t){var n=0|v(t.length);e=d(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function p(e,t){var n=0|v(t.length);e=d(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function h(t,n){return n.byteLength,e.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(n),t.__proto__=e.prototype):t=p(t,new Uint8Array(n)),t}function l(e,t){var n=0|v(t.length);e=d(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function y(e,t){var n,r=0;"Buffer"===t.type&&K(t.data)&&(n=t.data,r=0|v(n.length)),e=d(e,r);for(var o=0;r>o;o+=1)e[o]=255&n[o];return e}function d(t,n){e.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(n),t.__proto__=e.prototype):t.length=n;var r=0!==n&&n<=e.poolSize>>>1;return r&&(t.parent=X),t}function v(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function g(t,n){if(!(this instanceof g))return new g(t,n);var r=new e(t,n);return delete r.parent,r}function S(e,t){"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(r)return z(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if(t=0|t,n=void 0===n||n===1/0?this.length:0|n,e||(e="utf8"),0>t&&(t=0),n>this.length&&(n=this.length),t>=n)return"";for(;;)switch(e){case"hex":return C(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return L(this,t,n);case"binary":return O(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function _(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r),r>o&&(r=o)):r=o;var i=t.length;if(i%2!==0)throw new Error("Invalid hex string");r>i/2&&(r=i/2);for(var u=0;r>u;u++){var c=parseInt(t.substr(2*u,2),16);if(isNaN(c))throw new Error("Invalid hex string");e[n+u]=c}return u}function w(e,t,n,r){return J(z(t,e.length-n),e,n,r)}function b(e,t,n,r){return J(Y(t),e,n,r)}function q(e,t,n,r){return b(e,t,n,r)}function k(e,t,n,r){return J(G(t),e,n,r)}function x(e,t,n,r){return J(H(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?V.fromByteArray(e):V.fromByteArray(e.slice(t,n))}function E(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;n>o;){var i=e[o],u=null,c=i>239?4:i>223?3:i>191?2:1;if(n>=o+c){var a,s,f,p;switch(c){case 1:128>i&&(u=i);break;case 2:a=e[o+1],128===(192&a)&&(p=(31&i)<<6|63&a,p>127&&(u=p));break;case 3:a=e[o+1],s=e[o+2],128===(192&a)&&128===(192&s)&&(p=(15&i)<<12|(63&a)<<6|63&s,p>2047&&(55296>p||p>57343)&&(u=p));break;case 4:a=e[o+1],s=e[o+2],f=e[o+3],128===(192&a)&&128===(192&s)&&128===(192&f)&&(p=(15&i)<<18|(63&a)<<12|(63&s)<<6|63&f,p>65535&&1114112>p&&(u=p))}}null===u?(u=65533,c=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),o+=c}return I(r)}function I(e){var t=e.length;if(Z>=t)return String.fromCharCode.apply(String,e);for(var n="",r=0;t>r;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Z));return n}function L(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;n>o;o++)r+=String.fromCharCode(127&e[o]);return r}function O(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;n>o;o++)r+=String.fromCharCode(e[o]);return r}function C(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var o="",i=t;n>i;i++)o+=W(e[i]);return o}function j(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function R(e,t,n){if(e%1!==0||0>e)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function T(t,n,r,o,i,u){if(!e.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(n>i||u>n)throw new RangeError("value is out of bounds");if(r+o>t.length)throw new RangeError("index out of range")}function P(e,t,n,r){0>t&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);i>o;o++)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function M(e,t,n,r){0>t&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);i>o;o++)e[n+o]=t>>>8*(r?o:3-o)&255}function B(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function D(e,t,n,r,o){return o||B(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),$.write(e,t,n,r,23,4),n+4}function F(e,t,n,r,o){return o||B(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),$.write(e,t,n,r,52,8),n+8}function N(e){if(e=U(e).replace(Q,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function U(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function W(e){return 16>e?"0"+e.toString(16):e.toString(16)}function z(e,t){t=t||1/0;for(var n,r=e.length,o=null,i=[],u=0;r>u;u++){if(n=e.charCodeAt(u),n>55295&&57344>n){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(u+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(56320>n){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,128>n){if((t-=1)<0)break;i.push(n)}else if(2048>n){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Y(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t}function H(e,t){for(var n,r,o,i=[],u=0;u<e.length&&!((t-=2)<0);u++)n=e.charCodeAt(u),r=n>>8,o=n%256,i.push(o),i.push(r);return i}function G(e){return V.toByteArray(N(e))}function J(e,t,n,r){for(var o=0;r>o&&!(o+n>=t.length||o>=e.length);o++)t[o+n]=e[o];return o}var V=n(258),$=n(259),K=n(260);t.Buffer=e,t.SlowBuffer=g,t.INSPECT_MAX_BYTES=50,e.poolSize=8192;var X={};e.TYPED_ARRAY_SUPPORT=void 0!==r.TYPED_ARRAY_SUPPORT?r.TYPED_ARRAY_SUPPORT:o(),e._augment=function(t){return t.__proto__=e.prototype,t},e.TYPED_ARRAY_SUPPORT?(e.prototype.__proto__=Uint8Array.prototype,e.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&e[Symbol.species]===e&&Object.defineProperty(e,Symbol.species,{value:null,configurable:!0})):(e.prototype.length=void 0,e.prototype.parent=void 0),e.isBuffer=function(e){return!(null==e||!e._isBuffer)},e.compare=function(t,n){if(!e.isBuffer(t)||!e.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(t===n)return 0;for(var r=t.length,o=n.length,i=0,u=Math.min(r,o);u>i;++i)if(t[i]!==n[i]){r=t[i],o=n[i];break}return o>r?-1:r>o?1:0},e.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(t,n){if(!K(t))throw new TypeError("list argument must be an Array of Buffers.");if(0===t.length)return new e(0);var r;if(void 0===n)for(n=0,r=0;r<t.length;r++)n+=t[r].length;var o=new e(n),i=0;for(r=0;r<t.length;r++){var u=t[r];u.copy(o,i),i+=u.length}return o},e.byteLength=S,e.prototype._isBuffer=!0,e.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?E(this,0,e):m.apply(this,arguments)},e.prototype.equals=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:0===e.compare(this,t)},e.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},e.prototype.compare=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return e.compare(this,t)},e.prototype.indexOf=function(t,n){function r(e,t,n){for(var r=-1,o=0;n+o<e.length;o++)if(e[n+o]===t[-1===r?0:o-r]){if(-1===r&&(r=o),o-r+1===t.length)return n+r}else r=-1;return-1}if(n>2147483647?n=2147483647:-2147483648>n&&(n=-2147483648),n>>=0,0===this.length)return-1;if(n>=this.length)return-1;if(0>n&&(n=Math.max(this.length+n,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,n);if(e.isBuffer(t))return r(this,t,n);if("number"==typeof t)return e.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,n):r(this,[t],n);throw new TypeError("val must be string, number or Buffer")},e.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))t=0|t,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0);else{var o=r;r=t,t=0|n,n=o}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(0>n||0>t)||t>this.length)throw new RangeError("attempt to write outside buffer bounds");r||(r="utf8");for(var u=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return b(this,e,t,n);case"binary":return q(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(u)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),u=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;e.prototype.slice=function(t,n){var r=this.length;t=~~t,n=void 0===n?r:~~n,0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),0>n?(n+=r,0>n&&(n=0)):n>r&&(n=r),t>n&&(n=t);var o;if(e.TYPED_ARRAY_SUPPORT)o=this.subarray(t,n),o.__proto__=e.prototype;else{var i=n-t;o=new e(i,void 0);for(var u=0;i>u;u++)o[u]=this[u+t]}return o.length&&(o.parent=this.parent||this),o},e.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||R(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},e.prototype.readUIntBE=function(e,t,n){e=0|e,t=0|t,n||R(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},e.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},e.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},e.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},e.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},e.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},e.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||R(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*t)),r},e.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||R(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},e.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},e.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},e.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},e.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},e.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},e.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),$.read(this,e,!0,23,4)},e.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),$.read(this,e,!1,23,4)},e.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),$.read(this,e,!0,52,8)},e.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),$.read(this,e,!1,52,8)},e.prototype.writeUIntLE=function(e,t,n,r){e=+e,t=0|t,n=0|n,r||T(this,e,t,n,Math.pow(2,8*n),0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},e.prototype.writeUIntBE=function(e,t,n,r){e=+e,t=0|t,n=0|n,r||T(this,e,t,n,Math.pow(2,8*n),0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},e.prototype.writeUInt8=function(t,n,r){return t=+t,n=0|n,r||T(this,t,n,1,255,0),e.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[n]=255&t,n+1},e.prototype.writeUInt16LE=function(t,n,r){return t=+t,n=0|n,r||T(this,t,n,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8):P(this,t,n,!0),n+2},e.prototype.writeUInt16BE=function(t,n,r){return t=+t,n=0|n,r||T(this,t,n,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=255&t):P(this,t,n,!1),n+2},e.prototype.writeUInt32LE=function(t,n,r){return t=+t,n=0|n,r||T(this,t,n,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=255&t):M(this,t,n,!0),n+4},e.prototype.writeUInt32BE=function(t,n,r){return t=+t,n=0|n,r||T(this,t,n,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t):M(this,t,n,!1),n+4},e.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t=0|t,!r){var o=Math.pow(2,8*n-1);T(this,e,t,n,o-1,-o)}var i=0,u=1,c=0>e?1:0;for(this[t]=255&e;++i<n&&(u*=256);)this[t+i]=(e/u>>0)-c&255;return t+n},e.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t=0|t,!r){var o=Math.pow(2,8*n-1);T(this,e,t,n,o-1,-o)}var i=n-1,u=1,c=0>e?1:0;for(this[t+i]=255&e;--i>=0&&(u*=256);)this[t+i]=(e/u>>0)-c&255;return t+n},e.prototype.writeInt8=function(t,n,r){return t=+t,n=0|n,r||T(this,t,n,1,127,-128),e.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[n]=255&t,n+1},e.prototype.writeInt16LE=function(t,n,r){return t=+t,n=0|n,r||T(this,t,n,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8):P(this,t,n,!0),n+2},e.prototype.writeInt16BE=function(t,n,r){return t=+t,n=0|n,r||T(this,t,n,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=255&t):P(this,t,n,!1),n+2},e.prototype.writeInt32LE=function(t,n,r){return t=+t,n=0|n,r||T(this,t,n,4,2147483647,-2147483648),e.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24):M(this,t,n,!0),n+4},e.prototype.writeInt32BE=function(t,n,r){return t=+t,n=0|n,r||T(this,t,n,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),e.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t):M(this,t,n,!1),n+4},e.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},e.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},e.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)},e.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)},e.prototype.copy=function(t,n,r,o){if(r||(r=0),o||0===o||(o=this.length),n>=t.length&&(n=t.length),n||(n=0),o>0&&r>o&&(o=r),o===r)return 0;if(0===t.length||0===this.length)return 0;if(0>n)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>o)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-n<o-r&&(o=t.length-n+r);var i,u=o-r;if(this===t&&n>r&&o>n)for(i=u-1;i>=0;i--)t[i+n]=this[i+r];else if(1e3>u||!e.TYPED_ARRAY_SUPPORT)for(i=0;u>i;i++)t[i+n]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+u),n);return u},e.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),t>n)throw new RangeError("end < start");if(n!==t&&0!==this.length){if(0>t||t>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof e)for(r=t;n>r;r++)this[r]=e;else{var o=z(e.toString()),i=o.length;for(r=t;n>r;r++)this[r]=o[r%i]}return this}};var Q=/[^+\/0-9A-Za-z-_]/g}).call(t,n(257).Buffer,function(){return this}())},function(e,t){"use strict";function n(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;n>t;++t)c[t]=e[t],a[e.charCodeAt(t)]=t;a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63}function r(e){var t,n,r,o,i,u,c=e.length;if(c%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===e[c-2]?2:"="===e[c-1]?1:0,u=new s(3*c/4-i),r=i>0?c-4:c;var f=0;for(t=0,n=0;r>t;t+=4,n+=3)o=a[e.charCodeAt(t)]<<18|a[e.charCodeAt(t+1)]<<12|a[e.charCodeAt(t+2)]<<6|a[e.charCodeAt(t+3)],u[f++]=o>>16&255,u[f++]=o>>8&255,u[f++]=255&o;return 2===i?(o=a[e.charCodeAt(t)]<<2|a[e.charCodeAt(t+1)]>>4,u[f++]=255&o):1===i&&(o=a[e.charCodeAt(t)]<<10|a[e.charCodeAt(t+1)]<<4|a[e.charCodeAt(t+2)]>>2,u[f++]=o>>8&255,u[f++]=255&o),u}function o(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function i(e,t,n){for(var r,i=[],u=t;n>u;u+=3)r=(e[u]<<16)+(e[u+1]<<8)+e[u+2],i.push(o(r));return i.join("")}function u(e){for(var t,n=e.length,r=n%3,o="",u=[],a=16383,s=0,f=n-r;f>s;s+=a)u.push(i(e,s,s+a>f?f:s+a));return 1===r?(t=e[n-1],o+=c[t>>2],o+=c[t<<4&63],o+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],o+=c[t>>10],o+=c[t>>4&63],o+=c[t<<2&63],o+="="),u.push(o),u.join("")}t.toByteArray=r,t.fromByteArray=u;var c=[],a=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array;n()},function(e,t){t.read=function(e,t,n,r,o){var i,u,c=8*o-r-1,a=(1<<c)-1,s=a>>1,f=-7,p=n?o-1:0,h=n?-1:1,l=e[t+p];for(p+=h,i=l&(1<<-f)-1,l>>=-f,f+=c;f>0;i=256*i+e[t+p],p+=h,f-=8);for(u=i&(1<<-f)-1,i>>=-f,f+=r;f>0;u=256*u+e[t+p],p+=h,f-=8);if(0===i)i=1-s;else{if(i===a)return u?NaN:(l?-1:1)*(1/0);u+=Math.pow(2,r),i-=s}return(l?-1:1)*u*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var u,c,a,s=8*i-o-1,f=(1<<s)-1,p=f>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,l=r?0:i-1,y=r?1:-1,d=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,u=f):(u=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-u))<1&&(u--,a*=2),t+=u+p>=1?h/a:h*Math.pow(2,1-p),t*a>=2&&(u++,a/=2),u+p>=f?(c=0,u=f):u+p>=1?(c=(t*a-1)*Math.pow(2,o),u+=p):(c=t*Math.pow(2,p-1)*Math.pow(2,o),u=0));o>=8;e[n+l]=255&c,l+=y,c/=256,o-=8);for(u=u<<o|c,s+=o;s>0;e[n+l]=255&u,l+=y,u/=256,s-=8);e[n+l-y]|=128*d}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(236),i=r(o),u=n(61),c=r(u),a=n(240),s=r(a),f=n(249),p=r(f),h=n(255),l=function(e){function t(e){(0,c["default"])(this,t);var n=(0,s["default"])(this,(0,i["default"])(t).call(this,"text"));return n.content=e,n}return(0,p["default"])(t,e),t}(h);e.exports=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(236),i=r(o),u=n(61),c=r(u),a=n(240),s=r(a),f=n(249),p=r(f),h=n(255),l=function(e){function t(e,n,r){(0,c["default"])(this,t);var o=(0,s["default"])(this,(0,i["default"])(t).call(this,"file"));return o.name=e,o.hash=n,o.size=r,o}return(0,p["default"])(t,e),t}(h);e.exports=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(236),i=r(o),u=n(61),c=r(u),a=n(240),s=r(a),f=n(249),p=r(f),h=n(255),l=function(e){function t(e,n,r){(0,c["default"])(this,t);var o=(0,s["default"])(this,(0,i["default"])(t).call(this,"directory"));return o.name=e,o.hash=n,o.size=r,o}return(0,p["default"])(t,e),t}(h);e.exports=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(61),i=r(o),u=function c(e,t,n,r){(0,i["default"])(this,c),this.type=e,this.size=t,this.ts=n,this.from=r||""};e.exports=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(236),i=r(o),u=n(61),c=r(u),a=n(240),s=r(a),f=n(249),p=r(f),h=n(255),l=function(e){function t(e,n){(0,c["default"])(this,t);var r=(0,s["default"])(this,(0,i["default"])(t).call(this,"poll"));return r.question=e,r.options=n,r}return(0,p["default"])(t,e),t}(h);e.exports=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(92),i=r(o),u=n(61),c=r(u),a=n(62),s=r(a),f=n(267),p=n(66),h=n(64).create("orbit-db.Cache"),l=p.resolve("./orbit-db-cache.json"),y=l,d={},v=function(){function e(){(0,c["default"])(this,e)}return(0,s["default"])(e,null,[{key:"set",value:function(e,t){d[e]=t,f.writeFileSync(y,(0,i["default"])(d,null,2)+"\n")}},{key:"get",value:function(e){return d[e]}},{key:"loadCache",value:function(e){y=e?e:l,f.existsSync(y)&&(h.debug("Load cache from",y),d=JSON.parse(f.readFileSync(y)))}}]),e}();e.exports=v},function(e,t){"use strict";e.exports={createWriteStream:function(e,t){},writeFileSync:function(){}}}]);