text: !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=183)}([function(e,t,n){"use strict";function r(e,t,n,r,i,a,s,u){if(o(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,a,s,u],f=0;c=new Error(t.replace(/%s/g,function(){return l[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var o=function(e){};e.exports=r},function(e,t,n){"use strict";var r=n(6),o=r;e.exports=o},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var o=new Error(n);throw o.name="Invariant Violation",o.framesToPop=1,o}e.exports=r},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function o(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}/*
  object-assign
  (c) Sindre Sorhus
  @license MIT
  */
  var i=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;e.exports=o()?Object.assign:function(e,t){for(var n,o,u=r(e),c=1;c<arguments.length;c++){n=Object(arguments[c]);for(var l in n)a.call(n,l)&&(u[l]=n[l]);if(i){o=i(n);for(var f=0;f<o.length;f++)s.call(n,o[f])&&(u[o[f]]=n[o[f]])}}return u}},function(e,t,n){"use strict";function r(e,t){return 1===e.nodeType&&e.getAttribute(h)===String(t)||8===e.nodeType&&e.nodeValue===" react-text: "+t+" "||8===e.nodeType&&e.nodeValue===" react-empty: "+t+" "}function o(e){for(var t;t=e._renderedComponent;)e=t;return e}function i(e,t){var n=o(e);n._hostNode=t,t[v]=n}function a(e){var t=e._hostNode;t&&(delete t[v],e._hostNode=null)}function s(e,t){if(!(e._flags&m.hasCachedChildNodes)){var n=e._renderedChildren,a=t.firstChild;e:for(var s in n)if(n.hasOwnProperty(s)){var u=n[s],c=o(u)._domID;if(0!==c){for(;null!==a;a=a.nextSibling)if(r(a,c)){i(u,a);continue e}f("32",c)}}e._flags|=m.hasCachedChildNodes}}function u(e){if(e[v])return e[v];for(var t=[];!e[v];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}for(var n,r;e&&(r=e[v]);e=t.pop())n=r,t.length&&s(r,e);return n}function c(e){var t=u(e);return null!=t&&t._hostNode===e?t:null}function l(e){if(void 0===e._hostNode?f("33"):void 0,e._hostNode)return e._hostNode;for(var t=[];!e._hostNode;)t.push(e),e._hostParent?void 0:f("34"),e=e._hostParent;for(;t.length;e=t.pop())s(e,e._hostNode);return e._hostNode}var f=n(2),d=n(13),p=n(59),h=(n(0),d.ID_ATTRIBUTE_NAME),m=p,v="__reactInternalInstance$"+Math.random().toString(36).slice(2),g={getClosestInstanceFromNode:u,getInstanceFromNode:c,getNodeFromInstance:l,precacheChildNodes:s,precacheNode:i,uncacheNode:a};e.exports=g},function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=o},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";var r=null;e.exports={debugTool:r}},function(e,t,n){"use strict";function r(){I.ReactReconcileTransaction&&w?void 0:l("123")}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=d.getPooled(),this.reconcileTransaction=I.ReactReconcileTransaction.getPooled(!0)}function i(e,t,n,o,i,a){return r(),w.batchedUpdates(e,t,n,o,i,a)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;t!==g.length?l("124",t,g.length):void 0,g.sort(a),y++;for(var n=0;n<t;n++){var r=g[n],o=r._pendingCallbacks;r._pendingCallbacks=null;var i;if(h.logTopLevelRenders){var s=r;r._currentElement.type.isReactTopLevelWrapper&&(s=r._renderedComponent),i="React update: "+s.getName(),console.time(i)}if(m.performUpdateIfNecessary(r,e.reconcileTransaction,y),i&&console.timeEnd(i),o)for(var u=0;u<o.length;u++)e.callbackQueue.enqueue(o[u],r.getPublicInstance())}}function u(e){return r(),w.isBatchingUpdates?(g.push(e),void(null==e._updateBatchNumber&&(e._updateBatchNumber=y+1))):void w.batchedUpdates(u,e)}function c(e,t){w.isBatchingUpdates?void 0:l("125"),_.enqueue(e,t),b=!0}var l=n(2),f=n(3),d=n(57),p=n(11),h=n(62),m=n(14),v=n(26),g=(n(0),[]),y=0,_=d.getPooled(),b=!1,w=null,E={initialize:function(){this.dirtyComponentsLength=g.length},close:function(){this.dirtyComponentsLength!==g.length?(g.splice(0,this.dirtyComponentsLength),C()):g.length=0}},x={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},k=[E,x];f(o.prototype,v,{getTransactionWrappers:function(){return k},destructor:function(){this.dirtyComponentsLength=null,d.release(this.callbackQueue),this.callbackQueue=null,I.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return v.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),p.addPoolingTo(o);var C=function(){for(;g.length||b;){if(g.length){var e=o.getPooled();e.perform(s,null,e),o.release(e)}if(b){b=!1;var t=_;_=d.getPooled(),t.notifyAll(),d.release(t)}}},S={injectReconcileTransaction:function(e){e?void 0:l("126"),I.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){e?void 0:l("127"),"function"!=typeof e.batchedUpdates?l("128"):void 0,"boolean"!=typeof e.isBatchingUpdates?l("129"):void 0,w=e}},I={ReactReconcileTransaction:null,batchedUpdates:i,enqueueUpdate:u,flushBatchedUpdates:C,injection:S,asap:c};e.exports=I},function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n;var o=this.constructor.Interface;for(var i in o)if(o.hasOwnProperty(i)){var s=o[i];s?this[i]=s(n):"target"===i?this.target=r:this[i]=n[i]}var u=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;return u?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse,this}var o=n(3),i=n(11),a=n(6),s=(n(1),"function"==typeof Proxy,["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"]),u={type:null,target:null,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};o(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=a.thatReturnsTrue)},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;for(var n=0;n<s.length;n++)this[s[n]]=null}}),r.Interface=u,r.augmentClass=function(e,t){var n=this,r=function(){};r.prototype=n.prototype;var a=new r;o(a,e.prototype),e.prototype=a,e.prototype.constructor=e,e.Interface=o({},n.Interface,t),e.augmentClass=n.augmentClass,i.addPoolingTo(e,i.fourArgumentPooler)},i.addPoolingTo(r,i.fourArgumentPooler),e.exports=r},function(e,t,n){"use strict";var r={current:null};e.exports=r},function(e,t,n){"use strict";var r=n(2),o=(n(0),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),i=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},a=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},s=function(e,t,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,e,t,n,r),i}return new o(e,t,n,r)},u=function(e){var t=this;e instanceof t?void 0:r("25"),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},c=10,l=o,f=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||l,n.poolSize||(n.poolSize=c),n.release=u,n},d={addPoolingTo:f,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:s};e.exports=d},function(e,t,n){"use strict";function r(e){if(v){var t=e.node,n=e.children;if(n.length)for(var r=0;r<n.length;r++)g(t,n[r],null);else null!=e.html?f(t,e.html):null!=e.text&&p(t,e.text)}}function o(e,t){e.parentNode.replaceChild(t.node,e),r(t)}function i(e,t){v?e.children.push(t):e.node.appendChild(t.node)}function a(e,t){v?e.html=t:f(e.node,t)}function s(e,t){v?e.text=t:p(e.node,t)}function u(){return this.node.nodeName}function c(e){return{node:e,children:[],html:null,text:null,toString:u}}var l=n(33),f=n(28),d=n(41),p=n(74),h=1,m=11,v="undefined"!=typeof document&&"number"==typeof document.documentMode||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&/\bEdge\/\d/.test(navigator.userAgent),g=d(function(e,t,n){t.node.nodeType===m||t.node.nodeType===h&&"object"===t.node.nodeName.toLowerCase()&&(null==t.node.namespaceURI||t.node.namespaceURI===l.html)?(r(t),e.insertBefore(t.node,n)):(e.insertBefore(t.node,n),r(t))});c.insertTreeBefore=g,c.replaceChildWithTree=o,c.queueChild=i,c.queueHTML=a,c.queueText=s,e.exports=c},function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var o=n(2),i=(n(0),{MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,injectDOMPropertyConfig:function(e){var t=i,n=e.Properties||{},a=e.DOMAttributeNamespaces||{},u=e.DOMAttributeNames||{},c=e.DOMPropertyNames||{},l=e.DOMMutationMethods||{};e.isCustomAttribute&&s._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var f in n){s.properties.hasOwnProperty(f)?o("48",f):void 0;var d=f.toLowerCase(),p=n[f],h={attributeName:d,attributeNamespace:null,propertyName:f,mutationMethod:null,mustUseProperty:r(p,t.MUST_USE_PROPERTY),hasBooleanValue:r(p,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(p,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(p,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(p,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(h.hasBooleanValue+h.hasNumericValue+h.hasOverloadedBooleanValue<=1?void 0:o("50",f),u.hasOwnProperty(f)){var m=u[f];h.attributeName=m}a.hasOwnProperty(f)&&(h.attributeNamespace=a[f]),c.hasOwnProperty(f)&&(h.propertyName=c[f]),l.hasOwnProperty(f)&&(h.mutationMethod=l[f]),s.properties[f]=h}}}),a=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",s={ID_ATTRIBUTE_NAME:"data-reactid",ROOT_ATTRIBUTE_NAME:"data-reactroot",ATTRIBUTE_NAME_START_CHAR:a,ATTRIBUTE_NAME_CHAR:a+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<s._isCustomAttributeFunctions.length;t++){var n=s._isCustomAttributeFunctions[t];if(n(e))return!0}return!1},injection:i};e.exports=s},function(e,t,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=n(137),i=(n(7),n(1),{mountComponent:function(e,t,n,o,i,a){var s=e.mountComponent(t,n,o,i,a);return e._currentElement&&null!=e._currentElement.ref&&t.getReactMountReady().enqueue(r,e),s},getHostNode:function(e){return e.getHostNode()},unmountComponent:function(e,t){o.detachRefs(e,e._currentElement),e.unmountComponent(t)},receiveComponent:function(e,t,n,i){var a=e._currentElement;if(t!==a||i!==e._context){var s=o.shouldUpdateRefs(a,t);s&&o.detachRefs(e,a),e.receiveComponent(t,n,i),s&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t,n){e._updateBatchNumber===n&&e.performUpdateIfNecessary(t)}});e.exports=i},function(e,t,n){"use strict";var r=n(3),o=n(167),i=n(48),a=n(172),s=n(168),u=n(169),c=n(16),l=n(170),f=n(173),d=n(174),p=(n(1),c.createElement),h=c.createFactory,m=c.cloneElement,v=r,g={Children:{map:o.map,forEach:o.forEach,count:o.count,toArray:o.toArray,only:d},Component:i,PureComponent:a,createElement:p,cloneElement:m,isValidElement:c.isValidElement,PropTypes:l,createClass:s.createClass,createFactory:h,createMixin:function(e){return e},DOM:u,version:f,__spread:v};e.exports=g},function(e,t,n){"use strict";function r(e){return void 0!==e.ref}function o(e){return void 0!==e.key}var i=n(3),a=n(10),s=(n(1),n(79),Object.prototype.hasOwnProperty),u=n(77),c={key:!0,ref:!0,__self:!0,__source:!0},l=function(e,t,n,r,o,i,a){var s={$$typeof:u,type:e,key:t,ref:n,props:a,_owner:i};return s};l.createElement=function(e,t,n){var i,u={},f=null,d=null,p=null,h=null;if(null!=t){r(t)&&(d=t.ref),o(t)&&(f=""+t.key),p=void 0===t.__self?null:t.__self,h=void 0===t.__source?null:t.__source;for(i in t)s.call(t,i)&&!c.hasOwnProperty(i)&&(u[i]=t[i])}var m=arguments.length-2;if(1===m)u.children=n;else if(m>1){for(var v=Array(m),g=0;g<m;g++)v[g]=arguments[g+2];u.children=v}if(e&&e.defaultProps){var y=e.defaultProps;for(i in y)void 0===u[i]&&(u[i]=y[i])}return l(e,f,d,p,h,a.current,u)},l.createFactory=function(e){var t=l.createElement.bind(null,e);return t.type=e,t},l.cloneAndReplaceKey=function(e,t){var n=l(e.type,t,e.ref,e._self,e._source,e._owner,e.props);return n},l.cloneElement=function(e,t,n){var u,f=i({},e.props),d=e.key,p=e.ref,h=e._self,m=e._source,v=e._owner;if(null!=t){r(t)&&(p=t.ref,v=a.current),o(t)&&(d=""+t.key);var g;e.type&&e.type.defaultProps&&(g=e.type.defaultProps);for(u in t)s.call(t,u)&&!c.hasOwnProperty(u)&&(void 0===t[u]&&void 0!==g?f[u]=g[u]:f[u]=t[u])}var y=arguments.length-2;if(1===y)f.children=n;else if(y>1){for(var _=Array(y),b=0;b<y;b++)_[b]=arguments[b+2];f.children=_}return l(e.type,d,p,h,m,v,f)},l.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===u},e.exports=l},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var o=new Error(n);throw o.name="Invariant Violation",o.framesToPop=1,o}e.exports=r},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";function r(e){return"button"===e||"input"===e||"select"===e||"textarea"===e}function o(e,t,n){switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||!r(t));default:return!1}}var i=n(2),a=n(34),s=n(35),u=n(39),c=n(68),l=n(69),f=(n(0),{}),d=null,p=function(e,t){e&&(s.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},h=function(e){return p(e,!0)},m=function(e){return p(e,!1)},v=function(e){return"."+e._rootNodeID},g={injection:{injectEventPluginOrder:a.injectEventPluginOrder,injectEventPluginsByName:a.injectEventPluginsByName},putListener:function(e,t,n){"function"!=typeof n?i("94",t,typeof n):void 0;var r=v(e),o=f[t]||(f[t]={});o[r]=n;var s=a.registrationNameModules[t];s&&s.didPutListener&&s.didPutListener(e,t,n)},getListener:function(e,t){var n=f[t];if(o(t,e._currentElement.type,e._currentElement.props))return null;var r=v(e);return n&&n[r]},deleteListener:function(e,t){var n=a.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var r=f[t];if(r){var o=v(e);delete r[o]}},deleteAllListeners:function(e){var t=v(e);for(var n in f)if(f.hasOwnProperty(n)&&f[n][t]){var r=a.registrationNameModules[n];r&&r.willDeleteListener&&r.willDeleteListener(e,n),delete f[n][t]}},extractEvents:function(e,t,n,r){for(var o,i=a.plugins,s=0;s<i.length;s++){var u=i[s];if(u){var l=u.extractEvents(e,t,n,r);l&&(o=c(o,l))}}return o},enqueueEvents:function(e){e&&(d=c(d,e))},processEventQueue:function(e){var t=d;d=null,e?l(t,h):l(t,m),d?i("95"):void 0,u.rethrowCaughtError()},__purge:function(){f={}},__getListenerBank:function(){return f}};e.exports=g},function(e,t,n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return g(e,r)}function o(e,t,n){var o=r(e,n,t);o&&(n._dispatchListeners=m(n._dispatchListeners,o),n._dispatchInstances=m(n._dispatchInstances,e))}function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&h.traverseTwoPhase(e._targetInst,o,e)}function a(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst,n=t?h.getParentInstance(t):null;h.traverseTwoPhase(n,o,e)}}function s(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=g(e,r);o&&(n._dispatchListeners=m(n._dispatchListeners,o),n._dispatchInstances=m(n._dispatchInstances,e))}}function u(e){e&&e.dispatchConfig.registrationName&&s(e._targetInst,null,e)}function c(e){v(e,i)}function l(e){v(e,a)}function f(e,t,n,r){h.traverseEnterLeave(n,r,s,e,t)}function d(e){v(e,u)}var p=n(19),h=n(35),m=n(68),v=n(69),g=(n(1),p.getListener),y={accumulateTwoPhaseDispatches:c,accumulateTwoPhaseDispatchesSkipTarget:l,accumulateDirectDispatches:d,accumulateEnterLeaveDispatches:f};e.exports=y},function(e,t,n){"use strict";var r={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(9),i=n(44),a={view:function(e){if(e.view)return e.view;var t=i(e);if(t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";e.exports=n(15)},function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,m)||(e[m]=p++,f[e[m]]={}),f[e[m]]}var o,i=n(3),a=n(34),s=n(129),u=n(67),c=n(162),l=n(45),f={},d=!1,p=0,h={topAbort:"abort",topAnimationEnd:c("animationend")||"animationend",topAnimationIteration:c("animationiteration")||"animationiteration",topAnimationStart:c("animationstart")||"animationstart",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:c("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},m="_reactListenersID"+String(Math.random()).slice(2),v=i({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(v.handleTopLevel),v.ReactEventListener=e}},setEnabled:function(e){v.ReactEventListener&&v.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!v.ReactEventListener||!v.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,o=r(n),i=a.registrationNameDependencies[e],s=0;s<i.length;s++){var u=i[s];o.hasOwnProperty(u)&&o[u]||("topWheel"===u?l("wheel")?v.ReactEventListener.trapBubbledEvent("topWheel","wheel",n):l("mousewheel")?v.ReactEventListener.trapBubbledEvent("topWheel","mousewheel",n):v.ReactEventListener.trapBubbledEvent("topWheel","DOMMouseScroll",n):"topScroll"===u?l("scroll",!0)?v.ReactEventListener.trapCapturedEvent("topScroll","scroll",n):v.ReactEventListener.trapBubbledEvent("topScroll","scroll",v.ReactEventListener.WINDOW_HANDLE):"topFocus"===u||"topBlur"===u?(l("focus",!0)?(v.ReactEventListener.trapCapturedEvent("topFocus","focus",n),v.ReactEventListener.trapCapturedEvent("topBlur","blur",n)):l("focusin")&&(v.ReactEventListener.trapBubbledEvent("topFocus","focusin",n),v.ReactEventListener.trapBubbledEvent("topBlur","focusout",n)),o.topBlur=!0,o.topFocus=!0):h.hasOwnProperty(u)&&v.ReactEventListener.trapBubbledEvent(u,h[u],n),o[u]=!0)}},trapBubbledEvent:function(e,t,n){return v.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return v.ReactEventListener.trapCapturedEvent(e,t,n)},supportsEventPageXY:function(){if(!document.createEvent)return!1;var e=document.createEvent("MouseEvent");return null!=e&&"pageX"in e},ensureScrollValueMonitoring:function(){if(void 0===o&&(o=v.supportsEventPageXY()),!o&&!d){var e=u.refreshScrollValues;v.ReactEventListener.monitorScrollValue(e),d=!0}}});e.exports=v},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(22),i=n(67),a=n(43),s={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:a,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+i.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+i.currentScrollTop}};o.augmentClass(r,s),e.exports=r},function(e,t,n){"use strict";var r=n(2),o=(n(0),{}),i={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,t,n,o,i,a,s,u){this.isInTransaction()?r("27"):void 0;var c,l;try{this._isInTransaction=!0,c=!0,this.initializeAll(0),l=e.call(t,n,o,i,a,s,u),c=!1}finally{try{if(c)try{this.closeAll(0)}catch(e){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return l},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var r=t[n];try{this.wrapperInitData[n]=o,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===o)try{this.initializeAll(n+1)}catch(e){}}}},closeAll:function(e){this.isInTransaction()?void 0:r("28");for(var t=this.transactionWrappers,n=e;n<t.length;n++){var i,a=t[n],s=this.wrapperInitData[n];try{i=!0,s!==o&&a.close&&a.close.call(this,s),i=!1}finally{if(i)try{this.closeAll(n+1)}catch(e){}}}this.wrapperInitData.length=0}};e.exports=i},function(e,t,n){"use strict";function r(e){var t=""+e,n=i.exec(t);if(!n)return t;var r,o="",a=0,s=0;for(a=n.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:r="&quot;";break;case 38:r="&amp;";break;case 39:r="&#x27;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;default:continue}s!==a&&(o+=t.substring(s,a)),s=a+1,o+=r}return s!==a?o+t.substring(s,a):o}function o(e){return"boolean"==typeof e||"number"==typeof e?""+e:r(e)}var i=/["'&<>]/;e.exports=o},function(e,t,n){"use strict";var r,o=n(5),i=n(33),a=/^[ \r\n\t\f]/,s=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,u=n(41),c=u(function(e,t){if(e.namespaceURI!==i.svg||"innerHTML"in e)e.innerHTML=t;else{r=r||document.createElement("div"),r.innerHTML="<svg>"+t+"</svg>";for(var n=r.firstChild;n.firstChild;)e.appendChild(n.firstChild)}});if(o.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(c=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),a.test(t)||"<"===t[0]&&s.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),l=null}e.exports=c},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<t.length;o++){var a=t[o];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function o(e,t){if(r(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++)if(!i.call(t,n[a])||!r(e[n[a]],t[n[a]]))return!1;return!0}var i=Object.prototype.hasOwnProperty;e.exports=o},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function i(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function a(){m&&p&&(m=!1,p.length?h=p.concat(h):v=-1,h.length&&s())}function s(){if(!m){var e=o(a);m=!0;for(var t=h.length;t;){for(p=h,h=[];++v<t;)p&&p[v].run();v=-1,t=h.length}p=null,m=!1,i(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var l,f,d=e.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(e){l=n}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(e){f=r}}();var p,h=[],m=!1,v=-1;d.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];h.push(new u(e,t)),1!==h.length||m||o(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=c,d.addListener=c,d.once=c,d.off=c,d.removeListener=c,d.removeAllListeners=c,d.emit=c,d.binding=function(e){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(e){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},function(e,t,n){"use strict";function r(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}function o(e,t,n){l.insertTreeBefore(e,t,n)}function i(e,t,n){Array.isArray(t)?s(e,t[0],t[1],n):m(e,t,n)}function a(e,t){if(Array.isArray(t)){var n=t[1];t=t[0],u(e,t,n),e.removeChild(n)}e.removeChild(t)}function s(e,t,n,r){for(var o=t;;){var i=o.nextSibling;if(m(e,o,r),o===n)break;o=i}}function u(e,t,n){for(;;){var r=t.nextSibling;if(r===n)break;e.removeChild(r)}}function c(e,t,n){var r=e.parentNode,o=e.nextSibling;o===t?n&&m(r,document.createTextNode(n),o):n?(h(o,n),u(r,o,t)):u(r,e,t)}var l=n(12),f=n(106),d=(n(4),n(7),n(41)),p=n(28),h=n(74),m=d(function(e,t,n){e.insertBefore(t,n)}),v=f.dangerouslyReplaceNodeWithMarkup,g={dangerouslyReplaceNodeWithMarkup:v,replaceDelimitedText:c,processUpdates:function(e,t){for(var n=0;n<t.length;n++){var s=t[n];switch(s.type){case"INSERT_MARKUP":o(e,s.content,r(e,s.afterNode));break;case"MOVE_EXISTING":i(e,s.fromNode,r(e,s.afterNode));break;case"SET_MARKUP":p(e,s.content);break;case"TEXT_CONTENT":h(e,s.content);break;case"REMOVE_NODE":a(e,s.fromNode)}}}};e.exports=g},function(e,t,n){"use strict";var r={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};e.exports=r},function(e,t,n){"use strict";function r(){if(s)for(var e in u){var t=u[e],n=s.indexOf(e);if(n>-1?void 0:a("96",e),!c.plugins[n]){t.extractEvents?void 0:a("97",e),c.plugins[n]=t;var r=t.eventTypes;for(var i in r)o(r[i],t,i)?void 0:a("98",i,e)}}}function o(e,t,n){c.eventNameDispatchConfigs.hasOwnProperty(n)?a("99",n):void 0,c.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var s=r[o];i(s,t,n)}return!0}return!!e.registrationName&&(i(e.registrationName,t,n),!0)}function i(e,t,n){c.registrationNameModules[e]?a("100",e):void 0,c.registrationNameModules[e]=t,c.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(2),s=(n(0),null),u={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){s?a("101"):void 0,s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];u.hasOwnProperty(n)&&u[n]===o||(u[n]?a("102",n):void 0,u[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return c.registrationNameModules[t.registrationName]||null;if(void 0!==t.phasedRegistrationNames){var n=t.phasedRegistrationNames;for(var r in n)if(n.hasOwnProperty(r)){var o=c.registrationNameModules[n[r]];if(o)return o}}return null},_resetEventPlugins:function(){s=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];c.plugins.length=0;var t=c.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=c.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};e.exports=c},function(e,t,n){"use strict";function r(e){return"topMouseUp"===e||"topTouchEnd"===e||"topTouchCancel"===e}function o(e){return"topMouseMove"===e||"topTouchMove"===e}function i(e){return"topMouseDown"===e||"topTouchStart"===e}function a(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=g.getNodeFromInstance(r),t?m.invokeGuardedCallbackWithCatch(o,n,e):m.invokeGuardedCallback(o,n,e),e.currentTarget=null}function s(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)a(e,t,n[o],r[o]);else n&&a(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null}function u(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t)){for(var r=0;r<t.length&&!e.isPropagationStopped();r++)if(t[r](e,n[r]))return n[r]}else if(t&&t(e,n))return n;return null}function c(e){var t=u(e);return e._dispatchInstances=null,e._dispatchListeners=null,t}function l(e){var t=e._dispatchListeners,n=e._dispatchInstances;Array.isArray(t)?h("103"):void 0,e.currentTarget=t?g.getNodeFromInstance(n):null;var r=t?t(e):null;return e.currentTarget=null,e._dispatchListeners=null,e._dispatchInstances=null,r}function f(e){return!!e._dispatchListeners}var d,p,h=n(2),m=n(39),v=(n(0),n(1),{injectComponentTree:function(e){d=e},injectTreeTraversal:function(e){p=e}}),g={isEndish:r,isMoveish:o,isStartish:i,executeDirectDispatch:l,executeDispatchesInOrder:s,executeDispatchesInOrderStopAtTrue:c,hasDispatches:f,getInstanceFromNode:function(e){return d.getInstanceFromNode(e)},getNodeFromInstance:function(e){return d.getNodeFromInstance(e)},isAncestor:function(e,t){return p.isAncestor(e,t)},getLowestCommonAncestor:function(e,t){return p.getLowestCommonAncestor(e,t)},getParentInstance:function(e){return p.getParentInstance(e)},traverseTwoPhase:function(e,t,n){return p.traverseTwoPhase(e,t,n)},traverseEnterLeave:function(e,t,n,r,o){return p.traverseEnterLeave(e,t,n,r,o)},injection:v};e.exports=g},function(e,t,n){"use strict";function r(e){var t=/[=:]/g,n={"=":"=0",":":"=2"},r=(""+e).replace(t,function(e){return n[e]});return"$"+r}function o(e){var t=/(=0|=2)/g,n={"=0":"=","=2":":"},r="."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1);return(""+r).replace(t,function(e){return n[e]})}var i={escape:r,unescape:o};e.exports=i},function(e,t,n){"use strict";function r(e){null!=e.checkedLink&&null!=e.valueLink?s("87"):void 0}function o(e){r(e),null!=e.value||null!=e.onChange?s("88"):void 0}function i(e){r(e),null!=e.checked||null!=e.onChange?s("89"):void 0}function a(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var s=n(2),u=n(15),c=n(135),l=(n(0),n(1),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,
  submit:!0}),f={value:function(e,t,n){return!e[t]||l[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:u.PropTypes.func},d={},p={checkPropTypes:function(e,t,n){for(var r in f){if(f.hasOwnProperty(r))var o=f[r](t,r,e,"prop",null,c);if(o instanceof Error&&!(o.message in d)){d[o.message]=!0;a(n)}}},getValue:function(e){return e.valueLink?(o(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(i(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(o(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(i(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};e.exports=p},function(e,t,n){"use strict";var r=n(2),o=(n(0),!1),i={replaceNodeWithMarkup:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){o?r("104"):void 0,i.replaceNodeWithMarkup=e.replaceNodeWithMarkup,i.processChildrenUpdates=e.processChildrenUpdates,o=!0}}};e.exports=i},function(e,t,n){"use strict";function r(e,t,n){try{t(n)}catch(e){null===o&&(o=e)}}var o=null,i={invokeGuardedCallback:r,invokeGuardedCallbackWithCatch:r,rethrowCaughtError:function(){if(o){var e=o;throw o=null,e}}};e.exports=i},function(e,t,n){"use strict";function r(e){u.enqueueUpdate(e)}function o(e){var t=typeof e;if("object"!==t)return t;var n=e.constructor&&e.constructor.name||t,r=Object.keys(e);return r.length>0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function i(e,t){var n=s.get(e);if(!n){return null}return n}var a=n(2),s=(n(10),n(21)),u=(n(7),n(8)),c=(n(0),n(1),{isMounted:function(e){var t=s.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){c.validateCallback(t,n);var o=i(e);return o?(o._pendingCallbacks?o._pendingCallbacks.push(t):o._pendingCallbacks=[t],void r(o)):null},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=i(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=i(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=i(e,"setState");if(n){var o=n._pendingStateQueue||(n._pendingStateQueue=[]);o.push(t),r(n)}},enqueueElementInternal:function(e,t,n){e._pendingElement=t,e._context=n,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e?a("122",t,o(e)):void 0}});e.exports=c},function(e,t,n){"use strict";var r=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e};e.exports=r},function(e,t,n){"use strict";function r(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}e.exports=r},function(e,t,n){"use strict";function r(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=i[e];return!!r&&!!n[r]}function o(e){return r}var i={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=o},function(e,t,n){"use strict";function r(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}e.exports=r},function(e,t,n){"use strict";/**
   * Checks if an event is supported in the current execution environment.
   *
   * NOTE: This will not work correctly for non-generic events such as `change`,
   * `reset`, `load`, `error`, and `select`.
   *
   * Borrows from Modernizr.
   *
   * @param {string} eventNameSuffix Event name, e.g. "click".
   * @param {?boolean} capture Check if the capture phase is supported.
   * @return {boolean} True if the event is supported.
   * @internal
   * @license Modernizr 3.0.0pre (Custom Build) | MIT
   */
  function r(e,t){if(!i.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,i=n(5);i.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=r},function(e,t,n){"use strict";function r(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var o=typeof e,i=typeof t;return"string"===o||"number"===o?"string"===i||"number"===i:"object"===i&&e.type===t.type&&e.key===t.key}e.exports=r},function(e,t,n){"use strict";var r=(n(3),n(6)),o=(n(1),r);e.exports=o},function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=a,this.updater=n||i}var o=n(17),i=n(49),a=(n(79),n(18));n(0),n(1);r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e?o("85"):void 0,this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t,"setState")},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e,"forceUpdate")};e.exports=r},function(e,t,n){"use strict";function r(e,t){}var o=(n(1),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){r(e,"forceUpdate")},enqueueReplaceState:function(e,t){r(e,"replaceState")},enqueueSetState:function(e,t){r(e,"setState")}});e.exports=o},function(e,t){function n(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=d[r.id];if(o){o.refs++;for(var i=0;i<o.parts.length;i++)o.parts[i](r.parts[i]);for(;i<r.parts.length;i++)o.parts.push(u(r.parts[i],t))}else{for(var a=[],i=0;i<r.parts.length;i++)a.push(u(r.parts[i],t));d[r.id]={id:r.id,refs:1,parts:a}}}}function r(e){for(var t=[],n={},r=0;r<e.length;r++){var o=e[r],i=o[0],a=o[1],s=o[2],u=o[3],c={css:a,media:s,sourceMap:u};n[i]?n[i].parts.push(c):t.push(n[i]={id:i,parts:[c]})}return t}function o(e,t){var n=m(),r=y[y.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),y.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function i(e){e.parentNode.removeChild(e);var t=y.indexOf(e);t>=0&&y.splice(t,1)}function a(e){var t=document.createElement("style");return t.type="text/css",o(e,t),t}function s(e){var t=document.createElement("link");return t.rel="stylesheet",o(e,t),t}function u(e,t){var n,r,o;if(t.singleton){var u=g++;n=v||(v=a(t)),r=c.bind(null,n,u,!1),o=c.bind(null,n,u,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=s(t),r=f.bind(null,n),o=function(){i(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(t),r=l.bind(null,n),o=function(){i(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}function c(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=_(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function l(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function f(e,t){var n=t.css,r=t.sourceMap;r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var o=new Blob([n],{type:"text/css"}),i=e.href;e.href=URL.createObjectURL(o),i&&URL.revokeObjectURL(i)}var d={},p=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},h=p(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),m=p(function(){return document.head||document.getElementsByTagName("head")[0]}),v=null,g=0,y=[];e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},"undefined"==typeof t.singleton&&(t.singleton=h()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var o=r(e);return n(o,t),function(e){for(var i=[],a=0;a<o.length;a++){var s=o[a],u=d[s.id];u.refs--,i.push(u)}if(e){var c=r(e);n(c,t)}for(var a=0;a<i.length;a++){var u=i[a];if(0===u.refs){for(var l=0;l<u.parts.length;l++)u.parts[l]();delete d[u.id]}}}};var _=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(6),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};e.exports=o},function(e,t,n){"use strict";function r(e){try{e.focus()}catch(e){}}e.exports=r},function(e,t,n){"use strict";function r(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}e.exports=r},function(e,t,n){(function(e,r){var o;(function(){function i(e,t){return e.set(t[0],t[1]),e}function a(e,t){return e.add(t),e}function s(e,t,n){switch(n.length){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 u(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function c(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function l(e,t){for(var n=null==e?0:e.length;n--&&t(e[n],n,e)!==!1;);return e}function f(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function d(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function p(e,t){var n=null==e?0:e.length;return!!n&&k(e,t,0)>-1}function h(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function m(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function v(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function g(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function y(e,t,n,r){var o=null==e?0: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=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function b(e){return e.split("")}function w(e){return e.match(qt)||[]}function E(e,t,n){var r;return n(e,function(e,n,o){if(t(e,n,o))return r=n,!1}),r}function x(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function k(e,t,n){return t===t?Q(e,t,n):x(e,S,n)}function C(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function S(e){return e!==e}function I(e,t){var n=null==e?0:e.length;return n?L(e,t)/n:Ne}function T(e){return function(t){return null==t?oe:t[e]}}function A(e){return function(t){return null==e?oe:e[t]}}function P(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}function R(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!==oe&&(n=n===oe?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 M(e,t){return m(t,function(t){return[t,e[t]]})}function B(e){return function(t){return e(t)}}function U(e,t){return m(t,function(t){return e[t]})}function N(e,t){return e.has(t)}function D(e,t){for(var n=-1,r=e.length;++n<r&&k(t,e[n],0)>-1;);return n}function j(e,t){for(var n=e.length;n--&&k(t,e[n],0)>-1;);return n}function F(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}function H(e){return"\\"+nr[e]}function W(e,t){return null==e?oe:e[t]}function q(e){return $n.test(e)}function z(e){return Yn.test(e)}function V(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function K(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function $(e,t){return function(n){return e(t(n))}}function Y(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==fe||(e[n]=fe,i[o++]=n)}return i}function G(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function X(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function Q(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}function Z(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}function J(e){return q(e)?te(e):_r(e)}function ee(e){return q(e)?ne(e):b(e)}function te(e){for(var t=Vn.lastIndex=0;Vn.test(e);)++t;return t}function ne(e){return e.match(Vn)||[]}function re(e){return e.match(Kn)||[]}var oe,ie="4.17.4",ae=200,se="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",ue="Expected a function",ce="__lodash_hash_undefined__",le=500,fe="__lodash_placeholder__",de=1,pe=2,he=4,me=1,ve=2,ge=1,ye=2,_e=4,be=8,we=16,Ee=32,xe=64,ke=128,Ce=256,Se=512,Ie=30,Te="...",Ae=800,Pe=16,Re=1,Le=2,Oe=3,Me=1/0,Be=9007199254740991,Ue=1.7976931348623157e308,Ne=NaN,De=4294967295,je=De-1,Fe=De>>>1,He=[["ary",ke],["bind",ge],["bindKey",ye],["curry",be],["curryRight",we],["flip",Se],["partial",Ee],["partialRight",xe],["rearg",Ce]],We="[object Arguments]",qe="[object Array]",ze="[object AsyncFunction]",Ve="[object Boolean]",Ke="[object Date]",$e="[object DOMException]",Ye="[object Error]",Ge="[object Function]",Xe="[object GeneratorFunction]",Qe="[object Map]",Ze="[object Number]",Je="[object Null]",et="[object Object]",tt="[object Promise]",nt="[object Proxy]",rt="[object RegExp]",ot="[object Set]",it="[object String]",at="[object Symbol]",st="[object Undefined]",ut="[object WeakMap]",ct="[object WeakSet]",lt="[object ArrayBuffer]",ft="[object DataView]",dt="[object Float32Array]",pt="[object Float64Array]",ht="[object Int8Array]",mt="[object Int16Array]",vt="[object Int32Array]",gt="[object Uint8Array]",yt="[object Uint8ClampedArray]",_t="[object Uint16Array]",bt="[object Uint32Array]",wt=/\b__p \+= '';/g,Et=/\b(__p \+=) '' \+/g,xt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,kt=/&(?:amp|lt|gt|quot|#39);/g,Ct=/[&<>"']/g,St=RegExp(kt.source),It=RegExp(Ct.source),Tt=/<%-([\s\S]+?)%>/g,At=/<%([\s\S]+?)%>/g,Pt=/<%=([\s\S]+?)%>/g,Rt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Lt=/^\w*$/,Ot=/^\./,Mt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Bt=/[\\^$.*+?()[\]{}|]/g,Ut=RegExp(Bt.source),Nt=/^\s+|\s+$/g,Dt=/^\s+/,jt=/\s+$/,Ft=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ht=/\{\n\/\* \[wrapped with (.+)\] \*/,Wt=/,? & /,qt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,zt=/\\(\\)?/g,Vt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Kt=/\w*$/,$t=/^[-+]0x[0-9a-f]+$/i,Yt=/^0b[01]+$/i,Gt=/^\[object .+?Constructor\]$/,Xt=/^0o[0-7]+$/i,Qt=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Jt=/($^)/,en=/['\n\r\u2028\u2029\\]/g,tn="\\ud800-\\udfff",nn="\\u0300-\\u036f",rn="\\ufe20-\\ufe2f",on="\\u20d0-\\u20ff",an=nn+rn+on,sn="\\u2700-\\u27bf",un="a-z\\xdf-\\xf6\\xf8-\\xff",cn="\\xac\\xb1\\xd7\\xf7",ln="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",fn="\\u2000-\\u206f",dn=" \\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",pn="A-Z\\xc0-\\xd6\\xd8-\\xde",hn="\\ufe0e\\ufe0f",mn=cn+ln+fn+dn,vn="['’]",gn="["+tn+"]",yn="["+mn+"]",_n="["+an+"]",bn="\\d+",wn="["+sn+"]",En="["+un+"]",xn="[^"+tn+mn+bn+sn+un+pn+"]",kn="\\ud83c[\\udffb-\\udfff]",Cn="(?:"+_n+"|"+kn+")",Sn="[^"+tn+"]",In="(?:\\ud83c[\\udde6-\\uddff]){2}",Tn="[\\ud800-\\udbff][\\udc00-\\udfff]",An="["+pn+"]",Pn="\\u200d",Rn="(?:"+En+"|"+xn+")",Ln="(?:"+An+"|"+xn+")",On="(?:"+vn+"(?:d|ll|m|re|s|t|ve))?",Mn="(?:"+vn+"(?:D|LL|M|RE|S|T|VE))?",Bn=Cn+"?",Un="["+hn+"]?",Nn="(?:"+Pn+"(?:"+[Sn,In,Tn].join("|")+")"+Un+Bn+")*",Dn="\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)",jn="\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)",Fn=Un+Bn+Nn,Hn="(?:"+[wn,In,Tn].join("|")+")"+Fn,Wn="(?:"+[Sn+_n+"?",_n,In,Tn,gn].join("|")+")",qn=RegExp(vn,"g"),zn=RegExp(_n,"g"),Vn=RegExp(kn+"(?="+kn+")|"+Wn+Fn,"g"),Kn=RegExp([An+"?"+En+"+"+On+"(?="+[yn,An,"$"].join("|")+")",Ln+"+"+Mn+"(?="+[yn,An+Rn,"$"].join("|")+")",An+"?"+Rn+"+"+On,An+"+"+Mn,jn,Dn,bn,Hn].join("|"),"g"),$n=RegExp("["+Pn+tn+an+hn+"]"),Yn=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Gn=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Xn=-1,Qn={};Qn[dt]=Qn[pt]=Qn[ht]=Qn[mt]=Qn[vt]=Qn[gt]=Qn[yt]=Qn[_t]=Qn[bt]=!0,Qn[We]=Qn[qe]=Qn[lt]=Qn[Ve]=Qn[ft]=Qn[Ke]=Qn[Ye]=Qn[Ge]=Qn[Qe]=Qn[Ze]=Qn[et]=Qn[rt]=Qn[ot]=Qn[it]=Qn[ut]=!1;var Zn={};Zn[We]=Zn[qe]=Zn[lt]=Zn[ft]=Zn[Ve]=Zn[Ke]=Zn[dt]=Zn[pt]=Zn[ht]=Zn[mt]=Zn[vt]=Zn[Qe]=Zn[Ze]=Zn[et]=Zn[rt]=Zn[ot]=Zn[it]=Zn[at]=Zn[gt]=Zn[yt]=Zn[_t]=Zn[bt]=!0,Zn[Ye]=Zn[Ge]=Zn[ut]=!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","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","Ĳ":"IJ","ĳ":"ij","Œ":"Oe","œ":"oe","ŉ":"'n","ſ":"s"},er={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},tr={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},nr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},rr=parseFloat,or=parseInt,ir="object"==typeof e&&e&&e.Object===Object&&e,ar="object"==typeof self&&self&&self.Object===Object&&self,sr=ir||ar||Function("return this")(),ur="object"==typeof t&&t&&!t.nodeType&&t,cr=ur&&"object"==typeof r&&r&&!r.nodeType&&r,lr=cr&&cr.exports===ur,fr=lr&&ir.process,dr=function(){try{return fr&&fr.binding&&fr.binding("util")}catch(e){}}(),pr=dr&&dr.isArrayBuffer,hr=dr&&dr.isDate,mr=dr&&dr.isMap,vr=dr&&dr.isRegExp,gr=dr&&dr.isSet,yr=dr&&dr.isTypedArray,_r=T("length"),br=A(Jn),wr=A(er),Er=A(tr),xr=function e(t){function n(e){if(cu(e)&&!wd(e)&&!(e instanceof b)){if(e instanceof o)return e;if(bl.call(e,"__wrapped__"))return aa(e)}return new o(e)}function r(){}function o(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=oe}function b(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=De,this.__views__=[]}function A(){var e=new b(this.__wrapped__);return e.__actions__=Ho(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ho(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ho(this.__views__),e}function Q(){if(this.__filtered__){var e=new b(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function te(){var e=this.__wrapped__.value(),t=this.__dir__,n=wd(e),r=t<0,o=n?e.length:0,i=Pi(0,o,this.__views__),a=i.start,s=i.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,d=0,p=Xl(u,this.__takeCount__);if(!n||!r&&o==u&&p==u)return Eo(e,this.__actions__);var h=[];e:for(;u--&&d<p;){c+=t;for(var m=-1,v=e[c];++m<f;){var g=l[m],y=g.iteratee,_=g.type,b=y(v);if(_==Le)v=b;else if(!b){if(_==Re)continue e;break e}}h[d++]=v}return h}function ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qt(){this.__data__=sf?sf(null):{},this.size=0}function tn(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function nn(e){var t=this.__data__;if(sf){var n=t[e];return n===ce?oe:n}return bl.call(t,e)?t[e]:oe}function rn(e){var t=this.__data__;return sf?t[e]!==oe:bl.call(t,e)}function on(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=sf&&t===oe?ce:t,this}function an(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function sn(){this.__data__=[],this.size=0}function un(e){var t=this.__data__,n=On(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Ml.call(t,n,1),--this.size,!0}function cn(e){var t=this.__data__,n=On(t,e);return n<0?oe:t[n][1]}function ln(e){return On(this.__data__,e)>-1}function fn(e,t){var n=this.__data__,r=On(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function dn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function pn(){this.size=0,this.__data__={hash:new ne,map:new(nf||an),string:new ne}}function hn(e){var t=Si(this,e).delete(e);return this.size-=t?1:0,t}function mn(e){return Si(this,e).get(e)}function vn(e){return Si(this,e).has(e)}function gn(e,t){var n=Si(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function yn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new dn;++t<n;)this.add(e[t])}function _n(e){return this.__data__.set(e,ce),this}function bn(e){return this.__data__.has(e)}function wn(e){var t=this.__data__=new an(e);this.size=t.size}function En(){this.__data__=new an,this.size=0}function xn(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function kn(e){return this.__data__.get(e)}function Cn(e){return this.__data__.has(e)}function Sn(e,t){var n=this.__data__;if(n instanceof an){var r=n.__data__;if(!nf||r.length<ae-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new dn(r)}return n.set(e,t),this.size=n.size,this}function In(e,t){var n=wd(e),r=!n&&bd(e),o=!n&&!r&&xd(e),i=!n&&!r&&!o&&Td(e),a=n||r||o||i,s=a?O(e.length,pl):[],u=s.length;for(var c in e)!t&&!bl.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Di(c,u))||s.push(c);return s}function Tn(e){var t=e.length;return t?e[no(0,t-1)]:oe}function An(e,t){return na(Ho(e),jn(t,0,e.length))}function Pn(e){return na(Ho(e))}function Rn(e,t,n){(n===oe||Gs(e[t],n))&&(n!==oe||t in e)||Nn(e,t,n)}function Ln(e,t,n){var r=e[t];bl.call(e,t)&&Gs(r,n)&&(n!==oe||t in e)||Nn(e,t,n)}function On(e,t){for(var n=e.length;n--;)if(Gs(e[n][0],t))return n;return-1}function Mn(e,t,n,r){return _f(e,function(e,o,i){t(r,e,n(e),i)}),r}function Bn(e,t){return e&&Wo(t,zu(t),e)}function Un(e,t){return e&&Wo(t,Vu(t),e)}function Nn(e,t,n){"__proto__"==t&&Dl?Dl(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Dn(e,t){for(var n=-1,r=t.length,o=al(r),i=null==e;++n<r;)o[n]=i?oe:Hu(e,t[n]);return o}function jn(e,t,n){return e===e&&(n!==oe&&(e=e<=n?e:n),t!==oe&&(e=e>=t?e:t)),e}function Fn(e,t,n,r,o,i){var a,s=t&de,u=t&pe,l=t&he;if(n&&(a=o?n(e,r,o,i):n(e)),a!==oe)return a;if(!uu(e))return e;var f=wd(e);if(f){if(a=Oi(e),!s)return Ho(e,a)}else{var d=Rf(e),p=d==Ge||d==Xe;if(xd(e))return Ao(e,s);if(d==et||d==We||p&&!o){if(a=u||p?{}:Mi(e),!s)return u?zo(e,Un(a,e)):qo(e,Bn(a,e))}else{if(!Zn[d])return o?e:{};a=Bi(e,d,Fn,s)}}i||(i=new wn);var h=i.get(e);if(h)return h;i.set(e,a);var m=l?u?Ei:wi:u?Vu:zu,v=f?oe:m(e);return c(v||e,function(r,o){v&&(o=r,r=e[o]),Ln(a,o,Fn(r,t,n,o,e,i))}),a}function Hn(e){var t=zu(e);return function(n){return Wn(n,e,t)}}function Wn(e,t,n){var r=n.length;if(null==e)return!r;for(e=fl(e);r--;){var o=n[r],i=t[o],a=e[o];if(a===oe&&!(o in e)||!i(a))return!1}return!0}function Vn(e,t,n){if("function"!=typeof e)throw new hl(ue);return Mf(function(){e.apply(oe,n)},t)}function Kn(e,t,n,r){var o=-1,i=p,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=m(t,B(n))),r?(i=h,a=!1):t.length>=ae&&(i=N,a=!1,t=new yn(t));e:for(;++o<s;){var l=e[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f===f){for(var d=c;d--;)if(t[d]===f)continue e;u.push(l)}else i(t,f,r)||u.push(l)}return u}function $n(e,t){var n=!0;return _f(e,function(e,r,o){return n=!!t(e,r,o)}),n}function Yn(e,t,n){for(var r=-1,o=e.length;++r<o;){var i=e[r],a=t(i);if(null!=a&&(s===oe?a===a&&!bu(a):n(a,s)))var s=a,u=i}return u}function Jn(e,t,n,r){var o=e.length;for(n=Su(n),n<0&&(n=-n>o?0:o+n),r=r===oe||r>o?o:Su(r),r<0&&(r+=o),r=n>r?0:Iu(r);n<r;)e[n++]=t;return e}function er(e,t){var n=[];return _f(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}function tr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=Ni),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?tr(s,t-1,n,r,o):v(o,s):r||(o[o.length]=s)}return o}function nr(e,t){return e&&wf(e,t,zu)}function ir(e,t){return e&&Ef(e,t,zu)}function ar(e,t){return d(t,function(t){return iu(e[t])})}function ur(e,t){t=Io(t,e);for(var n=0,r=t.length;null!=e&&n<r;)e=e[ra(t[n++])];return n&&n==r?e:oe}function cr(e,t,n){var r=t(e);return wd(e)?r:v(r,n(e))}function fr(e){return null==e?e===oe?st:Je:Nl&&Nl in fl(e)?Ai(e):Xi(e)}function dr(e,t){return e>t}function _r(e,t){return null!=e&&bl.call(e,t)}function xr(e,t){return null!=e&&t in fl(e)}function Cr(e,t,n){return e>=Xl(t,n)&&e<Gl(t,n)}function Sr(e,t,n){for(var r=n?h:p,o=e[0].length,i=e.length,a=i,s=al(i),u=1/0,c=[];a--;){var l=e[a];a&&t&&(l=m(l,B(t))),u=Xl(l.length,u),s[a]=!n&&(t||o>=120&&l.length>=120)?new yn(a&&l):oe}l=e[0];var f=-1,d=s[0];e:for(;++f<o&&c.length<u;){var v=l[f],g=t?t(v):v;if(v=n||0!==v?v:0,!(d?N(d,g):r(c,g,n))){for(a=i;--a;){var y=s[a];if(!(y?N(y,g):r(e[a],g,n)))continue e}d&&d.push(g),c.push(v)}}return c}function Ir(e,t,n,r){return nr(e,function(e,o,i){t(r,n(e),o,i)}),r}function Tr(e,t,n){t=Io(t,e),e=Zi(e,t);var r=null==e?e:e[ra(Ca(t))];return null==r?oe:s(r,e,n)}function Ar(e){return cu(e)&&fr(e)==We}function Pr(e){return cu(e)&&fr(e)==lt}function Rr(e){return cu(e)&&fr(e)==Ke}function Lr(e,t,n,r,o){return e===t||(null==e||null==t||!cu(e)&&!cu(t)?e!==e&&t!==t:Or(e,t,n,r,Lr,o))}function Or(e,t,n,r,o,i){var a=wd(e),s=wd(t),u=a?qe:Rf(e),c=s?qe:Rf(t);u=u==We?et:u,c=c==We?et:c;var l=u==et,f=c==et,d=u==c;if(d&&xd(e)){if(!xd(t))return!1;a=!0,l=!1}if(d&&!l)return i||(i=new wn),a||Td(e)?gi(e,t,n,r,o,i):yi(e,t,u,n,r,o,i);if(!(n&me)){var p=l&&bl.call(e,"__wrapped__"),h=f&&bl.call(t,"__wrapped__");if(p||h){var m=p?e.value():e,v=h?t.value():t;return i||(i=new wn),o(m,v,n,r,i)}}return!!d&&(i||(i=new wn),_i(e,t,n,r,o,i))}function Mr(e){return cu(e)&&Rf(e)==Qe}function Br(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=fl(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){s=n[o];var u=s[0],c=e[u],l=s[1];if(a&&s[2]){if(c===oe&&!(u in e))return!1}else{var f=new wn;if(r)var d=r(c,l,u,e,t,f);if(!(d===oe?Lr(l,c,me|ve,r,f):d))return!1}}return!0}function Ur(e){if(!uu(e)||qi(e))return!1;var t=iu(e)?Sl:Gt;return t.test(oa(e))}function Nr(e){return cu(e)&&fr(e)==rt}function Dr(e){return cu(e)&&Rf(e)==ot}function jr(e){return cu(e)&&su(e.length)&&!!Qn[fr(e)]}function Fr(e){return"function"==typeof e?e:null==e?Mc:"object"==typeof e?wd(e)?Kr(e[0],e[1]):Vr(e):Wc(e)}function Hr(e){if(!zi(e))return Yl(e);var t=[];for(var n in fl(e))bl.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Wr(e){if(!uu(e))return Gi(e);var t=zi(e),n=[];for(var r in e)("constructor"!=r||!t&&bl.call(e,r))&&n.push(r);return n}function qr(e,t){return e<t}function zr(e,t){var n=-1,r=Xs(e)?al(e.length):[];return _f(e,function(e,o,i){r[++n]=t(e,o,i)}),r}function Vr(e){var t=Ii(e);return 1==t.length&&t[0][2]?Ki(t[0][0],t[0][1]):function(n){return n===e||Br(n,e,t)}}function Kr(e,t){return Fi(e)&&Vi(t)?Ki(ra(e),t):function(n){var r=Hu(n,e);return r===oe&&r===t?qu(n,e):Lr(t,r,me|ve)}}function $r(e,t,n,r,o){e!==t&&wf(t,function(i,a){if(uu(i))o||(o=new wn),Yr(e,t,a,n,$r,r,o);else{var s=r?r(e[a],i,a+"",e,t,o):oe;s===oe&&(s=i),Rn(e,a,s)}},Vu)}function Yr(e,t,n,r,o,i,a){var s=e[n],u=t[n],c=a.get(u);if(c)return void Rn(e,n,c);var l=i?i(s,u,n+"",e,t,a):oe,f=l===oe;if(f){var d=wd(u),p=!d&&xd(u),h=!d&&!p&&Td(u);l=u,d||p||h?wd(s)?l=s:Qs(s)?l=Ho(s):p?(f=!1,l=Ao(u,!0)):h?(f=!1,l=Uo(u,!0)):l=[]:gu(u)||bd(u)?(l=s,bd(s)?l=Au(s):(!uu(s)||r&&iu(s))&&(l=Mi(u))):f=!1}f&&(a.set(u,l),o(l,u,r,i,a),a.delete(u)),Rn(e,n,l)}function Gr(e,t){var n=e.length;if(n)return t+=t<0?n:0,Di(t,n)?e[t]:oe}function Xr(e,t,n){var r=-1;t=m(t.length?t:[Mc],B(Ci()));var o=zr(e,function(e,n,o){var i=m(t,function(t){return t(e)});return{criteria:i,index:++r,value:e}});return R(o,function(e,t){return Do(e,t,n)})}function Qr(e,t){return Zr(e,t,function(t,n){return qu(e,n)})}function Zr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=ur(e,a);n(s,a)&&uo(i,Io(a,e),s)}return i}function Jr(e){return function(t){return ur(t,e)}}function eo(e,t,n,r){var o=r?C:k,i=-1,a=t.length,s=e;for(e===t&&(t=Ho(t)),n&&(s=m(e,B(n)));++i<a;)for(var u=0,c=t[i],l=n?n(c):c;(u=o(s,l,u,r))>-1;)s!==e&&Ml.call(s,u,1),Ml.call(e,u,1);return e}function to(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;Di(o)?Ml.call(e,o,1):_o(e,o)}}return e}function no(e,t){return e+ql(Jl()*(t-e+1))}function ro(e,t,n,r){for(var o=-1,i=Gl(Wl((t-e)/(n||1)),0),a=al(i);i--;)a[r?i:++o]=e,e+=n;return a}function oo(e,t){var n="";if(!e||t<1||t>Be)return n;do t%2&&(n+=e),t=ql(t/2),t&&(e+=e);while(t);return n}function io(e,t){return Bf(Qi(e,t,Mc),e+"")}function ao(e){return Tn(rc(e))}function so(e,t){var n=rc(e);return na(n,jn(t,0,n.length))}function uo(e,t,n,r){if(!uu(e))return e;t=Io(t,e);for(var o=-1,i=t.length,a=i-1,s=e;null!=s&&++o<i;){var u=ra(t[o]),c=n;if(o!=a){var l=s[u];c=r?r(l,u,s):oe,c===oe&&(c=uu(l)?l:Di(t[o+1])?[]:{})}Ln(s,u,c),s=s[u]}return e}function co(e){return na(rc(e))}function lo(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=al(o);++r<o;)i[r]=e[r+t];return i}function fo(e,t){var n;return _f(e,function(e,r,o){return n=t(e,r,o),!n}),!!n}function po(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t===t&&o<=Fe){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!bu(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return ho(e,t,Mc,n)}function ho(e,t,n,r){t=n(t);for(var o=0,i=null==e?0:e.length,a=t!==t,s=null===t,u=bu(t),c=t===oe;o<i;){var l=ql((o+i)/2),f=n(e[l]),d=f!==oe,p=null===f,h=f===f,m=bu(f);if(a)var v=r||h;else v=c?h&&(r||d):s?h&&d&&(r||!p):u?h&&d&&!p&&(r||!m):!p&&!m&&(r?f<=t:f<t);v?o=l+1:i=l}return Xl(i,je)}function mo(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Gs(s,u)){var u=s;i[o++]=0===a?0:a}}return i}function vo(e){return"number"==typeof e?e:bu(e)?Ne:+e}function go(e){if("string"==typeof e)return e;if(wd(e))return m(e,go)+"";if(bu(e))return gf?gf.call(e):"";var t=e+"";return"0"==t&&1/e==-Me?"-0":t}function yo(e,t,n){var r=-1,o=p,i=e.length,a=!0,s=[],u=s;if(n)a=!1,o=h;else if(i>=ae){var c=t?null:If(e);if(c)return G(c);a=!1,o=N,u=new yn}else u=t?[]:s;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f===f){for(var d=u.length;d--;)if(u[d]===f)continue e;t&&u.push(f),s.push(l)}else o(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}function _o(e,t){return t=Io(t,e),e=Zi(e,t),null==e||delete e[ra(Ca(t))]}function bo(e,t,n,r){return uo(e,t,n(ur(e,t)),r)}function wo(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?lo(e,r?0:i,r?i+1:o):lo(e,r?i+1:0,r?o:i)}function Eo(e,t){var n=e;return n instanceof b&&(n=n.value()),g(t,function(e,t){return t.func.apply(t.thisArg,v([e],t.args))},n)}function xo(e,t,n){var r=e.length;if(r<2)return r?yo(e[0]):[];for(var o=-1,i=al(r);++o<r;)for(var a=e[o],s=-1;++s<r;)s!=o&&(i[o]=Kn(i[o]||a,e[s],t,n));return yo(tr(i,1),t,n)}function ko(e,t,n){for(var r=-1,o=e.length,i=t.length,a={};++r<o;){var s=r<i?t[r]:oe;n(a,e[r],s)}return a}function Co(e){return Qs(e)?e:[]}function So(e){return"function"==typeof e?e:Mc}function Io(e,t){return wd(e)?e:Fi(e,t)?[e]:Uf(Ru(e))}function To(e,t,n){var r=e.length;return n=n===oe?r:n,!t&&n>=r?e:lo(e,t,n)}function Ao(e,t){if(t)return e.slice();var n=e.length,r=Pl?Pl(n):new e.constructor(n);return e.copy(r),r}function Po(e){var t=new e.constructor(e.byteLength);return new Al(t).set(new Al(e)),t}function Ro(e,t){var n=t?Po(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Lo(e,t,n){var r=t?n(K(e),de):K(e);return g(r,i,new e.constructor)}function Oo(e){var t=new e.constructor(e.source,Kt.exec(e));return t.lastIndex=e.lastIndex,t}function Mo(e,t,n){var r=t?n(G(e),de):G(e);return g(r,a,new e.constructor)}function Bo(e){return vf?fl(vf.call(e)):{}}function Uo(e,t){var n=t?Po(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function No(e,t){if(e!==t){var n=e!==oe,r=null===e,o=e===e,i=bu(e),a=t!==oe,s=null===t,u=t===t,c=bu(t);if(!s&&!c&&!i&&e>t||i&&a&&u&&!s&&!c||r&&a&&u||!n&&u||!o)return 1;if(!r&&!i&&!c&&e<t||c&&n&&o&&!r&&!i||s&&n&&o||!a&&o||!u)return-1}return 0}function Do(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var u=No(o[r],i[r]);if(u){if(r>=s)return u;var c=n[r];return u*("desc"==c?-1:1)}}return e.index-t.index}function jo(e,t,n,r){for(var o=-1,i=e.length,a=n.length,s=-1,u=t.length,c=Gl(i-a,0),l=al(u+c),f=!r;++s<u;)l[s]=t[s];for(;++o<a;)(f||o<i)&&(l[n[o]]=e[o]);for(;c--;)l[s++]=e[o++];return l}function Fo(e,t,n,r){for(var o=-1,i=e.length,a=-1,s=n.length,u=-1,c=t.length,l=Gl(i-s,0),f=al(l+c),d=!r;++o<l;)f[o]=e[o];for(var p=o;++u<c;)f[p+u]=t[u];for(;++a<s;)(d||o<i)&&(f[p+n[a]]=e[o++]);return f}function Ho(e,t){var n=-1,r=e.length;for(t||(t=al(r));++n<r;)t[n]=e[n];return t}function Wo(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var s=t[i],u=r?r(n[s],e[s],s,n,e):oe;u===oe&&(u=e[s]),o?Nn(n,s,u):Ln(n,s,u)}return n}function qo(e,t){return Wo(e,Af(e),t)}function zo(e,t){return Wo(e,Pf(e),t)}function Vo(e,t){return function(n,r){var o=wd(n)?u:Mn,i=t?t():{};return o(n,e,Ci(r,2),i)}}function Ko(e){return io(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:oe,a=o>2?n[2]:oe;for(i=e.length>3&&"function"==typeof i?(o--,i):oe,a&&ji(n[0],n[1],a)&&(i=o<3?oe:i,o=1),t=fl(t);++r<o;){var s=n[r];s&&e(t,s,r,i)}return t})}function $o(e,t){return function(n,r){if(null==n)return n;if(!Xs(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=fl(n);(t?i--:++i<o)&&r(a[i],i,a)!==!1;);return n}}function Yo(e){return function(t,n,r){for(var o=-1,i=fl(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(n(i[u],u,i)===!1)break}return t}}function Go(e,t,n){function r(){var t=this&&this!==sr&&this instanceof r?i:e;return t.apply(o?n:this,arguments)}var o=t&ge,i=Zo(e);return r}function Xo(e){return function(t){t=Ru(t);var n=q(t)?ee(t):oe,r=n?n[0]:t.charAt(0),o=n?To(n,1).join(""):t.slice(1);return r[e]()+o}}function Qo(e){return function(t){
  return g(Ac(cc(t).replace(qn,"")),e,"")}}function Zo(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=yf(e.prototype),r=e.apply(n,t);return uu(r)?r:n}}function Jo(e,t,n){function r(){for(var i=arguments.length,a=al(i),u=i,c=ki(r);u--;)a[u]=arguments[u];var l=i<3&&a[0]!==c&&a[i-1]!==c?[]:Y(a,c);if(i-=l.length,i<n)return li(e,t,ni,r.placeholder,oe,a,l,oe,oe,n-i);var f=this&&this!==sr&&this instanceof r?o:e;return s(f,this,a)}var o=Zo(e);return r}function ei(e){return function(t,n,r){var o=fl(t);if(!Xs(t)){var i=Ci(n,3);t=zu(t),n=function(e){return i(o[e],e,o)}}var a=e(t,n,r);return a>-1?o[i?t[a]:a]:oe}}function ti(e){return bi(function(t){var n=t.length,r=n,i=o.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new hl(ue);if(i&&!s&&"wrapper"==xi(a))var s=new o([],!0)}for(r=s?r:n;++r<n;){a=t[r];var u=xi(a),c="wrapper"==u?Tf(a):oe;s=c&&Wi(c[0])&&c[1]==(ke|be|Ee|Ce)&&!c[4].length&&1==c[9]?s[xi(c[0])].apply(s,c[3]):1==a.length&&Wi(a)?s[u]():s.thru(a)}return function(){var e=arguments,r=e[0];if(s&&1==e.length&&wd(r))return s.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 ni(e,t,n,r,o,i,a,s,u,c){function l(){for(var g=arguments.length,y=al(g),_=g;_--;)y[_]=arguments[_];if(h)var b=ki(l),w=F(y,b);if(r&&(y=jo(y,r,o,h)),i&&(y=Fo(y,i,a,h)),g-=w,h&&g<c){var E=Y(y,b);return li(e,t,ni,l.placeholder,n,y,E,s,u,c-g)}var x=d?n:this,k=p?x[e]:e;return g=y.length,s?y=Ji(y,s):m&&g>1&&y.reverse(),f&&u<g&&(y.length=u),this&&this!==sr&&this instanceof l&&(k=v||Zo(k)),k.apply(x,y)}var f=t&ke,d=t&ge,p=t&ye,h=t&(be|we),m=t&Se,v=p?oe:Zo(e);return l}function ri(e,t){return function(n,r){return Ir(n,e,t(r),{})}}function oi(e,t){return function(n,r){var o;if(n===oe&&r===oe)return t;if(n!==oe&&(o=n),r!==oe){if(o===oe)return r;"string"==typeof n||"string"==typeof r?(n=go(n),r=go(r)):(n=vo(n),r=vo(r)),o=e(n,r)}return o}}function ii(e){return bi(function(t){return t=m(t,B(Ci())),io(function(n){var r=this;return e(t,function(e){return s(e,r,n)})})})}function ai(e,t){t=t===oe?" ":go(t);var n=t.length;if(n<2)return n?oo(t,e):t;var r=oo(t,Wl(e/J(t)));return q(t)?To(ee(r),0,e).join(""):r.slice(0,e)}function si(e,t,n,r){function o(){for(var t=-1,u=arguments.length,c=-1,l=r.length,f=al(l+u),d=this&&this!==sr&&this instanceof o?a:e;++c<l;)f[c]=r[c];for(;u--;)f[c++]=arguments[++t];return s(d,i?n:this,f)}var i=t&ge,a=Zo(e);return o}function ui(e){return function(t,n,r){return r&&"number"!=typeof r&&ji(t,n,r)&&(n=r=oe),t=Cu(t),n===oe?(n=t,t=0):n=Cu(n),r=r===oe?t<n?1:-1:Cu(r),ro(t,n,r,e)}}function ci(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Tu(t),n=Tu(n)),e(t,n)}}function li(e,t,n,r,o,i,a,s,u,c){var l=t&be,f=l?a:oe,d=l?oe:a,p=l?i:oe,h=l?oe:i;t|=l?Ee:xe,t&=~(l?xe:Ee),t&_e||(t&=~(ge|ye));var m=[e,t,o,p,f,h,d,s,u,c],v=n.apply(oe,m);return Wi(e)&&Of(v,m),v.placeholder=r,ea(v,e,t)}function fi(e){var t=ll[e];return function(e,n){if(e=Tu(e),n=null==n?0:Xl(Su(n),292)){var r=(Ru(e)+"e").split("e"),o=t(r[0]+"e"+(+r[1]+n));return r=(Ru(o)+"e").split("e"),+(r[0]+"e"+(+r[1]-n))}return t(e)}}function di(e){return function(t){var n=Rf(t);return n==Qe?K(t):n==ot?X(t):M(t,e(t))}}function pi(e,t,n,r,o,i,a,s){var u=t&ye;if(!u&&"function"!=typeof e)throw new hl(ue);var c=r?r.length:0;if(c||(t&=~(Ee|xe),r=o=oe),a=a===oe?a:Gl(Su(a),0),s=s===oe?s:Su(s),c-=o?o.length:0,t&xe){var l=r,f=o;r=o=oe}var d=u?oe:Tf(e),p=[e,t,n,r,o,l,f,i,a,s];if(d&&Yi(p,d),e=p[0],t=p[1],n=p[2],r=p[3],o=p[4],s=p[9]=p[9]===oe?u?0:e.length:Gl(p[9]-c,0),!s&&t&(be|we)&&(t&=~(be|we)),t&&t!=ge)h=t==be||t==we?Jo(e,t,s):t!=Ee&&t!=(ge|Ee)||o.length?ni.apply(oe,p):si(e,t,n,r);else var h=Go(e,t,n);var m=d?xf:Of;return ea(m(h,p),e,t)}function hi(e,t,n,r){return e===oe||Gs(e,gl[n])&&!bl.call(r,n)?t:e}function mi(e,t,n,r,o,i){return uu(e)&&uu(t)&&(i.set(t,e),$r(e,t,oe,mi,i),i.delete(t)),e}function vi(e){return gu(e)?oe:e}function gi(e,t,n,r,o,i){var a=n&me,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=i.get(e);if(c&&i.get(t))return c==t;var l=-1,f=!0,d=n&ve?new yn:oe;for(i.set(e,t),i.set(t,e);++l<s;){var p=e[l],h=t[l];if(r)var m=a?r(h,p,l,t,e,i):r(p,h,l,e,t,i);if(m!==oe){if(m)continue;f=!1;break}if(d){if(!_(t,function(e,t){if(!N(d,t)&&(p===e||o(p,e,n,r,i)))return d.push(t)})){f=!1;break}}else if(p!==h&&!o(p,h,n,r,i)){f=!1;break}}return i.delete(e),i.delete(t),f}function yi(e,t,n,r,o,i,a){switch(n){case ft:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case lt:return!(e.byteLength!=t.byteLength||!i(new Al(e),new Al(t)));case Ve:case Ke:case Ze:return Gs(+e,+t);case Ye:return e.name==t.name&&e.message==t.message;case rt:case it:return e==t+"";case Qe:var s=K;case ot:var u=r&me;if(s||(s=G),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=ve,a.set(e,t);var l=gi(s(e),s(t),r,o,i,a);return a.delete(e),l;case at:if(vf)return vf.call(e)==vf.call(t)}return!1}function _i(e,t,n,r,o,i){var a=n&me,s=wi(e),u=s.length,c=wi(t),l=c.length;if(u!=l&&!a)return!1;for(var f=u;f--;){var d=s[f];if(!(a?d in t:bl.call(t,d)))return!1}var p=i.get(e);if(p&&i.get(t))return p==t;var h=!0;i.set(e,t),i.set(t,e);for(var m=a;++f<u;){d=s[f];var v=e[d],g=t[d];if(r)var y=a?r(g,v,d,t,e,i):r(v,g,d,e,t,i);if(!(y===oe?v===g||o(v,g,n,r,i):y)){h=!1;break}m||(m="constructor"==d)}if(h&&!m){var _=e.constructor,b=t.constructor;_!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b)&&(h=!1)}return i.delete(e),i.delete(t),h}function bi(e){return Bf(Qi(e,oe,ga),e+"")}function wi(e){return cr(e,zu,Af)}function Ei(e){return cr(e,Vu,Pf)}function xi(e){for(var t=e.name+"",n=cf[t],r=bl.call(cf,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function ki(e){var t=bl.call(n,"placeholder")?n:e;return t.placeholder}function Ci(){var e=n.iteratee||Bc;return e=e===Bc?Fr:e,arguments.length?e(arguments[0],arguments[1]):e}function Si(e,t){var n=e.__data__;return Hi(t)?n["string"==typeof t?"string":"hash"]:n.map}function Ii(e){for(var t=zu(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Vi(o)]}return t}function Ti(e,t){var n=W(e,t);return Ur(n)?n:oe}function Ai(e){var t=bl.call(e,Nl),n=e[Nl];try{e[Nl]=oe;var r=!0}catch(e){}var o=xl.call(e);return r&&(t?e[Nl]=n:delete e[Nl]),o}function Pi(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=Xl(t,e+a);break;case"takeRight":e=Gl(e,t-a)}}return{start:e,end:t}}function Ri(e){var t=e.match(Ht);return t?t[1].split(Wt):[]}function Li(e,t,n){t=Io(t,e);for(var r=-1,o=t.length,i=!1;++r<o;){var a=ra(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:(o=null==e?0:e.length,!!o&&su(o)&&Di(a,o)&&(wd(e)||bd(e)))}function Oi(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&bl.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function Mi(e){return"function"!=typeof e.constructor||zi(e)?{}:yf(Rl(e))}function Bi(e,t,n,r){var o=e.constructor;switch(t){case lt:return Po(e);case Ve:case Ke:return new o(+e);case ft:return Ro(e,r);case dt:case pt:case ht:case mt:case vt:case gt:case yt:case _t:case bt:return Uo(e,r);case Qe:return Lo(e,r,n);case Ze:case it:return new o(e);case rt:return Oo(e);case ot:return Mo(e,r,n);case at:return Bo(e)}}function Ui(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Ft,"{\n/* [wrapped with "+t+"] */\n")}function Ni(e){return wd(e)||bd(e)||!!(Bl&&e&&e[Bl])}function Di(e,t){return t=null==t?Be:t,!!t&&("number"==typeof e||Qt.test(e))&&e>-1&&e%1==0&&e<t}function ji(e,t,n){if(!uu(n))return!1;var r=typeof t;return!!("number"==r?Xs(n)&&Di(t,n.length):"string"==r&&t in n)&&Gs(n[t],e)}function Fi(e,t){if(wd(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!bu(e))||(Lt.test(e)||!Rt.test(e)||null!=t&&e in fl(t))}function Hi(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Wi(e){var t=xi(e),r=n[t];if("function"!=typeof r||!(t in b.prototype))return!1;if(e===r)return!0;var o=Tf(r);return!!o&&e===o[0]}function qi(e){return!!El&&El in e}function zi(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||gl;return e===n}function Vi(e){return e===e&&!uu(e)}function Ki(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==oe||e in fl(n)))}}function $i(e){var t=Bs(e,function(e){return n.size===le&&n.clear(),e}),n=t.cache;return t}function Yi(e,t){var n=e[1],r=t[1],o=n|r,i=o<(ge|ye|ke),a=r==ke&&n==be||r==ke&&n==Ce&&e[7].length<=t[8]||r==(ke|Ce)&&t[7].length<=t[8]&&n==be;if(!i&&!a)return e;r&ge&&(e[2]=t[2],o|=n&ge?0:_e);var s=t[3];if(s){var u=e[3];e[3]=u?jo(u,s,t[4]):s,e[4]=u?Y(e[3],fe):t[4]}return s=t[5],s&&(u=e[5],e[5]=u?Fo(u,s,t[6]):s,e[6]=u?Y(e[5],fe):t[6]),s=t[7],s&&(e[7]=s),r&ke&&(e[8]=null==e[8]?t[8]:Xl(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o,e}function Gi(e){var t=[];if(null!=e)for(var n in fl(e))t.push(n);return t}function Xi(e){return xl.call(e)}function Qi(e,t,n){return t=Gl(t===oe?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=Gl(r.length-t,0),a=al(i);++o<i;)a[o]=r[t+o];o=-1;for(var u=al(t+1);++o<t;)u[o]=r[o];return u[t]=n(a),s(e,this,u)}}function Zi(e,t){return t.length<2?e:ur(e,lo(t,0,-1))}function Ji(e,t){for(var n=e.length,r=Xl(t.length,n),o=Ho(e);r--;){var i=t[r];e[r]=Di(i,n)?o[i]:oe}return e}function ea(e,t,n){var r=t+"";return Bf(e,Ui(r,ia(Ri(r),n)))}function ta(e){var t=0,n=0;return function(){var r=Ql(),o=Pe-(r-n);if(n=r,o>0){if(++t>=Ae)return arguments[0]}else t=0;return e.apply(oe,arguments)}}function na(e,t){var n=-1,r=e.length,o=r-1;for(t=t===oe?r:t;++n<t;){var i=no(n,o),a=e[i];e[i]=e[n],e[n]=a}return e.length=t,e}function ra(e){if("string"==typeof e||bu(e))return e;var t=e+"";return"0"==t&&1/e==-Me?"-0":t}function oa(e){if(null!=e){try{return _l.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function ia(e,t){return c(He,function(n){var r="_."+n[0];t&n[1]&&!p(e,r)&&e.push(r)}),e.sort()}function aa(e){if(e instanceof b)return e.clone();var t=new o(e.__wrapped__,e.__chain__);return t.__actions__=Ho(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function sa(e,t,n){t=(n?ji(e,t,n):t===oe)?1:Gl(Su(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var o=0,i=0,a=al(Wl(r/t));o<r;)a[i++]=lo(e,o,o+=t);return a}function ua(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o}function ca(){var e=arguments.length;if(!e)return[];for(var t=al(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return v(wd(n)?Ho(n):[n],tr(t,1))}function la(e,t,n){var r=null==e?0:e.length;return r?(t=n||t===oe?1:Su(t),lo(e,t<0?0:t,r)):[]}function fa(e,t,n){var r=null==e?0:e.length;return r?(t=n||t===oe?1:Su(t),t=r-t,lo(e,0,t<0?0:t)):[]}function da(e,t){return e&&e.length?wo(e,Ci(t,3),!0,!0):[]}function pa(e,t){return e&&e.length?wo(e,Ci(t,3),!0):[]}function ha(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&ji(e,t,n)&&(n=0,r=o),Jn(e,t,n,r)):[]}function ma(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Su(n);return o<0&&(o=Gl(r+o,0)),x(e,Ci(t,3),o)}function va(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==oe&&(o=Su(n),o=n<0?Gl(r+o,0):Xl(o,r-1)),x(e,Ci(t,3),o,!0)}function ga(e){var t=null==e?0:e.length;return t?tr(e,1):[]}function ya(e){var t=null==e?0:e.length;return t?tr(e,Me):[]}function _a(e,t){var n=null==e?0:e.length;return n?(t=t===oe?1:Su(t),tr(e,t)):[]}function ba(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r}function wa(e){return e&&e.length?e[0]:oe}function Ea(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:Su(n);return o<0&&(o=Gl(r+o,0)),k(e,t,o)}function xa(e){var t=null==e?0:e.length;return t?lo(e,0,-1):[]}function ka(e,t){return null==e?"":$l.call(e,t)}function Ca(e){var t=null==e?0:e.length;return t?e[t-1]:oe}function Sa(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==oe&&(o=Su(n),o=o<0?Gl(r+o,0):Xl(o,r-1)),t===t?Z(e,t,o):x(e,S,o,!0)}function Ia(e,t){return e&&e.length?Gr(e,Su(t)):oe}function Ta(e,t){return e&&e.length&&t&&t.length?eo(e,t):e}function Aa(e,t,n){return e&&e.length&&t&&t.length?eo(e,t,Ci(n,2)):e}function Pa(e,t,n){return e&&e.length&&t&&t.length?eo(e,t,oe,n):e}function Ra(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=Ci(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return to(e,o),n}function La(e){return null==e?e:ef.call(e)}function Oa(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&ji(e,t,n)?(t=0,n=r):(t=null==t?0:Su(t),n=n===oe?r:Su(n)),lo(e,t,n)):[]}function Ma(e,t){return po(e,t)}function Ba(e,t,n){return ho(e,t,Ci(n,2))}function Ua(e,t){var n=null==e?0:e.length;if(n){var r=po(e,t);if(r<n&&Gs(e[r],t))return r}return-1}function Na(e,t){return po(e,t,!0)}function Da(e,t,n){return ho(e,t,Ci(n,2),!0)}function ja(e,t){var n=null==e?0:e.length;if(n){var r=po(e,t,!0)-1;if(Gs(e[r],t))return r}return-1}function Fa(e){return e&&e.length?mo(e):[]}function Ha(e,t){return e&&e.length?mo(e,Ci(t,2)):[]}function Wa(e){var t=null==e?0:e.length;return t?lo(e,1,t):[]}function qa(e,t,n){return e&&e.length?(t=n||t===oe?1:Su(t),lo(e,0,t<0?0:t)):[]}function za(e,t,n){var r=null==e?0:e.length;return r?(t=n||t===oe?1:Su(t),t=r-t,lo(e,t<0?0:t,r)):[]}function Va(e,t){return e&&e.length?wo(e,Ci(t,3),!1,!0):[]}function Ka(e,t){return e&&e.length?wo(e,Ci(t,3)):[]}function $a(e){return e&&e.length?yo(e):[]}function Ya(e,t){return e&&e.length?yo(e,Ci(t,2)):[]}function Ga(e,t){return t="function"==typeof t?t:oe,e&&e.length?yo(e,oe,t):[]}function Xa(e){if(!e||!e.length)return[];var t=0;return e=d(e,function(e){if(Qs(e))return t=Gl(e.length,t),!0}),O(t,function(t){return m(e,T(t))})}function Qa(e,t){if(!e||!e.length)return[];var n=Xa(e);return null==t?n:m(n,function(e){return s(t,oe,e)})}function Za(e,t){return ko(e||[],t||[],Ln)}function Ja(e,t){return ko(e||[],t||[],uo)}function es(e){var t=n(e);return t.__chain__=!0,t}function ts(e,t){return t(e),e}function ns(e,t){return t(e)}function rs(){return es(this)}function os(){return new o(this.value(),this.__chain__)}function is(){this.__values__===oe&&(this.__values__=ku(this.value()));var e=this.__index__>=this.__values__.length,t=e?oe:this.__values__[this.__index__++];return{done:e,value:t}}function as(){return this}function ss(e){for(var t,n=this;n instanceof r;){var o=aa(n);o.__index__=0,o.__values__=oe,t?i.__wrapped__=o:t=o;var i=o;n=n.__wrapped__}return i.__wrapped__=e,t}function us(){var e=this.__wrapped__;if(e instanceof b){var t=e;return this.__actions__.length&&(t=new b(this)),t=t.reverse(),t.__actions__.push({func:ns,args:[La],thisArg:oe}),new o(t,this.__chain__)}return this.thru(La)}function cs(){return Eo(this.__wrapped__,this.__actions__)}function ls(e,t,n){var r=wd(e)?f:$n;return n&&ji(e,t,n)&&(t=oe),r(e,Ci(t,3))}function fs(e,t){var n=wd(e)?d:er;return n(e,Ci(t,3))}function ds(e,t){return tr(ys(e,t),1)}function ps(e,t){return tr(ys(e,t),Me)}function hs(e,t,n){return n=n===oe?1:Su(n),tr(ys(e,t),n)}function ms(e,t){var n=wd(e)?c:_f;return n(e,Ci(t,3))}function vs(e,t){var n=wd(e)?l:bf;return n(e,Ci(t,3))}function gs(e,t,n,r){e=Xs(e)?e:rc(e),n=n&&!r?Su(n):0;var o=e.length;return n<0&&(n=Gl(o+n,0)),_u(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&k(e,t,n)>-1}function ys(e,t){var n=wd(e)?m:zr;return n(e,Ci(t,3))}function _s(e,t,n,r){return null==e?[]:(wd(t)||(t=null==t?[]:[t]),n=r?oe:n,wd(n)||(n=null==n?[]:[n]),Xr(e,t,n))}function bs(e,t,n){var r=wd(e)?g:P,o=arguments.length<3;return r(e,Ci(t,4),n,o,_f)}function ws(e,t,n){var r=wd(e)?y:P,o=arguments.length<3;return r(e,Ci(t,4),n,o,bf)}function Es(e,t){var n=wd(e)?d:er;return n(e,Us(Ci(t,3)))}function xs(e){var t=wd(e)?Tn:ao;return t(e)}function ks(e,t,n){t=(n?ji(e,t,n):t===oe)?1:Su(t);var r=wd(e)?An:so;return r(e,t)}function Cs(e){var t=wd(e)?Pn:co;return t(e)}function Ss(e){if(null==e)return 0;if(Xs(e))return _u(e)?J(e):e.length;var t=Rf(e);return t==Qe||t==ot?e.size:Hr(e).length}function Is(e,t,n){var r=wd(e)?_:fo;return n&&ji(e,t,n)&&(t=oe),r(e,Ci(t,3))}function Ts(e,t){if("function"!=typeof t)throw new hl(ue);return e=Su(e),function(){if(--e<1)return t.apply(this,arguments)}}function As(e,t,n){return t=n?oe:t,t=e&&null==t?e.length:t,pi(e,ke,oe,oe,oe,oe,t)}function Ps(e,t){var n;if("function"!=typeof t)throw new hl(ue);return e=Su(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=oe),n}}function Rs(e,t,n){t=n?oe:t;var r=pi(e,be,oe,oe,oe,oe,oe,t);return r.placeholder=Rs.placeholder,r}function Ls(e,t,n){t=n?oe:t;var r=pi(e,we,oe,oe,oe,oe,oe,t);return r.placeholder=Ls.placeholder,r}function Os(e,t,n){function r(t){var n=d,r=p;return d=p=oe,y=t,m=e.apply(r,n)}function o(e){return y=e,v=Mf(s,t),_?r(e):m}function i(e){var n=e-g,r=e-y,o=t-n;return b?Xl(o,h-r):o}function a(e){var n=e-g,r=e-y;return g===oe||n>=t||n<0||b&&r>=h}function s(){var e=cd();return a(e)?u(e):void(v=Mf(s,i(e)))}function u(e){return v=oe,w&&d?r(e):(d=p=oe,m)}function c(){v!==oe&&Sf(v),y=0,d=g=p=v=oe}function l(){return v===oe?m:u(cd())}function f(){var e=cd(),n=a(e);if(d=arguments,p=this,g=e,n){if(v===oe)return o(g);if(b)return v=Mf(s,t),r(g)}return v===oe&&(v=Mf(s,t)),m}var d,p,h,m,v,g,y=0,_=!1,b=!1,w=!0;if("function"!=typeof e)throw new hl(ue);return t=Tu(t)||0,uu(n)&&(_=!!n.leading,b="maxWait"in n,h=b?Gl(Tu(n.maxWait)||0,t):h,w="trailing"in n?!!n.trailing:w),f.cancel=c,f.flush=l,f}function Ms(e){return pi(e,Se)}function Bs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new hl(ue);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 a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Bs.Cache||dn),n}function Us(e){if("function"!=typeof e)throw new hl(ue);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Ns(e){return Ps(2,e)}function Ds(e,t){if("function"!=typeof e)throw new hl(ue);return t=t===oe?t:Su(t),io(e,t)}function js(e,t){if("function"!=typeof e)throw new hl(ue);return t=null==t?0:Gl(Su(t),0),io(function(n){var r=n[t],o=To(n,0,t);return r&&v(o,r),s(e,this,o)})}function Fs(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new hl(ue);return uu(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Os(e,t,{leading:r,maxWait:t,trailing:o})}function Hs(e){return As(e,1)}function Ws(e,t){return md(So(t),e)}function qs(){if(!arguments.length)return[];var e=arguments[0];return wd(e)?e:[e]}function zs(e){return Fn(e,he)}function Vs(e,t){return t="function"==typeof t?t:oe,Fn(e,he,t)}function Ks(e){return Fn(e,de|he)}function $s(e,t){return t="function"==typeof t?t:oe,Fn(e,de|he,t)}function Ys(e,t){return null==t||Wn(e,t,zu(t))}function Gs(e,t){return e===t||e!==e&&t!==t}function Xs(e){return null!=e&&su(e.length)&&!iu(e)}function Qs(e){return cu(e)&&Xs(e)}function Zs(e){return e===!0||e===!1||cu(e)&&fr(e)==Ve}function Js(e){return cu(e)&&1===e.nodeType&&!gu(e)}function eu(e){if(null==e)return!0;if(Xs(e)&&(wd(e)||"string"==typeof e||"function"==typeof e.splice||xd(e)||Td(e)||bd(e)))return!e.length;var t=Rf(e);if(t==Qe||t==ot)return!e.size;if(zi(e))return!Hr(e).length;for(var n in e)if(bl.call(e,n))return!1;return!0}function tu(e,t){return Lr(e,t)}function nu(e,t,n){n="function"==typeof n?n:oe;var r=n?n(e,t):oe;return r===oe?Lr(e,t,oe,n):!!r}function ru(e){if(!cu(e))return!1;var t=fr(e);return t==Ye||t==$e||"string"==typeof e.message&&"string"==typeof e.name&&!gu(e)}function ou(e){return"number"==typeof e&&Kl(e)}function iu(e){if(!uu(e))return!1;var t=fr(e);return t==Ge||t==Xe||t==ze||t==nt}function au(e){return"number"==typeof e&&e==Su(e)}function su(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Be}function uu(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function cu(e){return null!=e&&"object"==typeof e}function lu(e,t){return e===t||Br(e,t,Ii(t))}function fu(e,t,n){return n="function"==typeof n?n:oe,Br(e,t,Ii(t),n)}function du(e){return vu(e)&&e!=+e}function pu(e){if(Lf(e))throw new ul(se);return Ur(e)}function hu(e){return null===e}function mu(e){return null==e}function vu(e){return"number"==typeof e||cu(e)&&fr(e)==Ze}function gu(e){if(!cu(e)||fr(e)!=et)return!1;var t=Rl(e);if(null===t)return!0;var n=bl.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&_l.call(n)==kl}function yu(e){return au(e)&&e>=-Be&&e<=Be}function _u(e){return"string"==typeof e||!wd(e)&&cu(e)&&fr(e)==it}function bu(e){return"symbol"==typeof e||cu(e)&&fr(e)==at}function wu(e){return e===oe}function Eu(e){return cu(e)&&Rf(e)==ut}function xu(e){return cu(e)&&fr(e)==ct}function ku(e){if(!e)return[];if(Xs(e))return _u(e)?ee(e):Ho(e);if(Ul&&e[Ul])return V(e[Ul]());var t=Rf(e),n=t==Qe?K:t==ot?G:rc;return n(e)}function Cu(e){if(!e)return 0===e?e:0;if(e=Tu(e),e===Me||e===-Me){var t=e<0?-1:1;return t*Ue}return e===e?e:0}function Su(e){var t=Cu(e),n=t%1;return t===t?n?t-n:t:0}function Iu(e){return e?jn(Su(e),0,De):0}function Tu(e){if("number"==typeof e)return e;if(bu(e))return Ne;if(uu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=uu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Nt,"");var n=Yt.test(e);return n||Xt.test(e)?or(e.slice(2),n?2:8):$t.test(e)?Ne:+e}function Au(e){return Wo(e,Vu(e))}function Pu(e){return e?jn(Su(e),-Be,Be):0===e?e:0}function Ru(e){return null==e?"":go(e)}function Lu(e,t){var n=yf(e);return null==t?n:Bn(n,t)}function Ou(e,t){return E(e,Ci(t,3),nr)}function Mu(e,t){return E(e,Ci(t,3),ir)}function Bu(e,t){return null==e?e:wf(e,Ci(t,3),Vu)}function Uu(e,t){return null==e?e:Ef(e,Ci(t,3),Vu)}function Nu(e,t){return e&&nr(e,Ci(t,3))}function Du(e,t){return e&&ir(e,Ci(t,3))}function ju(e){return null==e?[]:ar(e,zu(e))}function Fu(e){return null==e?[]:ar(e,Vu(e))}function Hu(e,t,n){var r=null==e?oe:ur(e,t);return r===oe?n:r}function Wu(e,t){return null!=e&&Li(e,t,_r)}function qu(e,t){return null!=e&&Li(e,t,xr)}function zu(e){return Xs(e)?In(e):Hr(e)}function Vu(e){return Xs(e)?In(e,!0):Wr(e)}function Ku(e,t){var n={};return t=Ci(t,3),nr(e,function(e,r,o){Nn(n,t(e,r,o),e)}),n}function $u(e,t){var n={};return t=Ci(t,3),nr(e,function(e,r,o){Nn(n,r,t(e,r,o))}),n}function Yu(e,t){return Gu(e,Us(Ci(t)))}function Gu(e,t){if(null==e)return{};var n=m(Ei(e),function(e){return[e]});return t=Ci(t),Zr(e,n,function(e,n){return t(e,n[0])})}function Xu(e,t,n){t=Io(t,e);var r=-1,o=t.length;for(o||(o=1,e=oe);++r<o;){var i=null==e?oe:e[ra(t[r])];i===oe&&(r=o,i=n),e=iu(i)?i.call(e):i}return e}function Qu(e,t,n){return null==e?e:uo(e,t,n)}function Zu(e,t,n,r){return r="function"==typeof r?r:oe,null==e?e:uo(e,t,n,r)}function Ju(e,t,n){var r=wd(e),o=r||xd(e)||Td(e);if(t=Ci(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:uu(e)&&iu(i)?yf(Rl(e)):{}}return(o?c:nr)(e,function(e,r,o){return t(n,e,r,o)}),n}function ec(e,t){return null==e||_o(e,t)}function tc(e,t,n){return null==e?e:bo(e,t,So(n))}function nc(e,t,n,r){return r="function"==typeof r?r:oe,null==e?e:bo(e,t,So(n),r)}function rc(e){return null==e?[]:U(e,zu(e))}function oc(e){return null==e?[]:U(e,Vu(e))}function ic(e,t,n){return n===oe&&(n=t,t=oe),n!==oe&&(n=Tu(n),n=n===n?n:0),t!==oe&&(t=Tu(t),t=t===t?t:0),jn(Tu(e),t,n)}function ac(e,t,n){return t=Cu(t),n===oe?(n=t,t=0):n=Cu(n),e=Tu(e),Cr(e,t,n)}function sc(e,t,n){if(n&&"boolean"!=typeof n&&ji(e,t,n)&&(t=n=oe),n===oe&&("boolean"==typeof t?(n=t,t=oe):"boolean"==typeof e&&(n=e,e=oe)),e===oe&&t===oe?(e=0,t=1):(e=Cu(e),t===oe?(t=e,e=0):t=Cu(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=Jl();return Xl(e+o*(t-e+rr("1e-"+((o+"").length-1))),t)}return no(e,t)}function uc(e){return ep(Ru(e).toLowerCase())}function cc(e){return e=Ru(e),e&&e.replace(Zt,br).replace(zn,"")}function lc(e,t,n){e=Ru(e),t=go(t);var r=e.length;n=n===oe?r:jn(Su(n),0,r);var o=n;return n-=t.length,n>=0&&e.slice(n,o)==t}function fc(e){return e=Ru(e),e&&It.test(e)?e.replace(Ct,wr):e}function dc(e){return e=Ru(e),e&&Ut.test(e)?e.replace(Bt,"\\$&"):e}function pc(e,t,n){e=Ru(e),t=Su(t);var r=t?J(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return ai(ql(o),n)+e+ai(Wl(o),n)}function hc(e,t,n){e=Ru(e),t=Su(t);var r=t?J(e):0;return t&&r<t?e+ai(t-r,n):e}function mc(e,t,n){e=Ru(e),t=Su(t);var r=t?J(e):0;return t&&r<t?ai(t-r,n)+e:e}function vc(e,t,n){return n||null==t?t=0:t&&(t=+t),Zl(Ru(e).replace(Dt,""),t||0)}function gc(e,t,n){return t=(n?ji(e,t,n):t===oe)?1:Su(t),oo(Ru(e),t)}function yc(){var e=arguments,t=Ru(e[0]);return e.length<3?t:t.replace(e[1],e[2])}function _c(e,t,n){return n&&"number"!=typeof n&&ji(e,t,n)&&(t=n=oe),(n=n===oe?De:n>>>0)?(e=Ru(e),e&&("string"==typeof t||null!=t&&!Sd(t))&&(t=go(t),!t&&q(e))?To(ee(e),0,n):e.split(t,n)):[]}function bc(e,t,n){return e=Ru(e),n=null==n?0:jn(Su(n),0,e.length),t=go(t),e.slice(n,n+t.length)==t}function wc(e,t,r){var o=n.templateSettings;r&&ji(e,t,r)&&(t=oe),e=Ru(e),t=Od({},t,o,hi);var i,a,s=Od({},t.imports,o.imports,hi),u=zu(s),c=U(s,u),l=0,f=t.interpolate||Jt,d="__p += '",p=dl((t.escape||Jt).source+"|"+f.source+"|"+(f===Pt?Vt:Jt).source+"|"+(t.evaluate||Jt).source+"|$","g"),h="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++Xn+"]")+"\n";e.replace(p,function(t,n,r,o,s,u){return r||(r=o),d+=e.slice(l,u).replace(en,H),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t}),d+="';\n";var m=t.variable;m||(d="with (obj) {\n"+d+"\n}\n"),d=(a?d.replace(wt,""):d).replace(Et,"$1").replace(xt,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=tp(function(){return cl(u,h+"return "+d).apply(oe,c)});if(v.source=d,ru(v))throw v;return v}function Ec(e){return Ru(e).toLowerCase()}function xc(e){return Ru(e).toUpperCase()}function kc(e,t,n){if(e=Ru(e),e&&(n||t===oe))return e.replace(Nt,"");if(!e||!(t=go(t)))return e;var r=ee(e),o=ee(t),i=D(r,o),a=j(r,o)+1;return To(r,i,a).join("")}function Cc(e,t,n){if(e=Ru(e),e&&(n||t===oe))return e.replace(jt,"");if(!e||!(t=go(t)))return e;var r=ee(e),o=j(r,ee(t))+1;return To(r,0,o).join("")}function Sc(e,t,n){if(e=Ru(e),e&&(n||t===oe))return e.replace(Dt,"");if(!e||!(t=go(t)))return e;var r=ee(e),o=D(r,ee(t));return To(r,o).join("")}function Ic(e,t){var n=Ie,r=Te;if(uu(t)){var o="separator"in t?t.separator:o;n="length"in t?Su(t.length):n,r="omission"in t?go(t.omission):r}e=Ru(e);var i=e.length;if(q(e)){var a=ee(e);i=a.length}if(n>=i)return e;var s=n-J(r);if(s<1)return r;var u=a?To(a,0,s).join(""):e.slice(0,s);if(o===oe)return u+r;if(a&&(s+=u.length-s),Sd(o)){if(e.slice(s).search(o)){var c,l=u;for(o.global||(o=dl(o.source,Ru(Kt.exec(o))+"g")),o.lastIndex=0;c=o.exec(l);)var f=c.index;u=u.slice(0,f===oe?s:f)}}else if(e.indexOf(go(o),s)!=s){var d=u.lastIndexOf(o);d>-1&&(u=u.slice(0,d))}return u+r}function Tc(e){return e=Ru(e),e&&St.test(e)?e.replace(kt,Er):e}function Ac(e,t,n){return e=Ru(e),t=n?oe:t,t===oe?z(e)?re(e):w(e):e.match(t)||[]}function Pc(e){var t=null==e?0:e.length,n=Ci();return e=t?m(e,function(e){if("function"!=typeof e[1])throw new hl(ue);return[n(e[0]),e[1]]}):[],io(function(n){for(var r=-1;++r<t;){var o=e[r];if(s(o[0],this,n))return s(o[1],this,n)}})}function Rc(e){return Hn(Fn(e,de))}function Lc(e){return function(){return e}}function Oc(e,t){return null==e||e!==e?t:e}function Mc(e){return e}function Bc(e){return Fr("function"==typeof e?e:Fn(e,de))}function Uc(e){return Vr(Fn(e,de))}function Nc(e,t){return Kr(e,Fn(t,de))}function Dc(e,t,n){var r=zu(t),o=ar(t,r);null!=n||uu(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=ar(t,zu(t)));var i=!(uu(n)&&"chain"in n&&!n.chain),a=iu(e);return c(o,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=Ho(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,v([this.value()],arguments))})}),e}function jc(){return sr._===this&&(sr._=Cl),this}function Fc(){}function Hc(e){return e=Su(e),io(function(t){return Gr(t,e)})}function Wc(e){return Fi(e)?T(ra(e)):Jr(e)}function qc(e){return function(t){return null==e?oe:ur(e,t)}}function zc(){return[]}function Vc(){return!1}function Kc(){return{}}function $c(){return""}function Yc(){return!0}function Gc(e,t){if(e=Su(e),e<1||e>Be)return[];var n=De,r=Xl(e,De);t=Ci(t),e-=De;for(var o=O(r,t);++n<e;)t(n);return o}function Xc(e){return wd(e)?m(e,ra):bu(e)?[e]:Ho(Uf(Ru(e)))}function Qc(e){var t=++wl;return Ru(e)+t}function Zc(e){return e&&e.length?Yn(e,Mc,dr):oe}function Jc(e,t){return e&&e.length?Yn(e,Ci(t,2),dr):oe}function el(e){return I(e,Mc)}function tl(e,t){return I(e,Ci(t,2))}function nl(e){return e&&e.length?Yn(e,Mc,qr):oe}function rl(e,t){return e&&e.length?Yn(e,Ci(t,2),qr):oe}function ol(e){return e&&e.length?L(e,Mc):0}function il(e,t){return e&&e.length?L(e,Ci(t,2)):0}t=null==t?sr:kr.defaults(sr.Object(),t,kr.pick(sr,Gn));var al=t.Array,sl=t.Date,ul=t.Error,cl=t.Function,ll=t.Math,fl=t.Object,dl=t.RegExp,pl=t.String,hl=t.TypeError,ml=al.prototype,vl=cl.prototype,gl=fl.prototype,yl=t["__core-js_shared__"],_l=vl.toString,bl=gl.hasOwnProperty,wl=0,El=function(){var e=/[^.]+$/.exec(yl&&yl.keys&&yl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),xl=gl.toString,kl=_l.call(fl),Cl=sr._,Sl=dl("^"+_l.call(bl).replace(Bt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Il=lr?t.Buffer:oe,Tl=t.Symbol,Al=t.Uint8Array,Pl=Il?Il.allocUnsafe:oe,Rl=$(fl.getPrototypeOf,fl),Ll=fl.create,Ol=gl.propertyIsEnumerable,Ml=ml.splice,Bl=Tl?Tl.isConcatSpreadable:oe,Ul=Tl?Tl.iterator:oe,Nl=Tl?Tl.toStringTag:oe,Dl=function(){try{var e=Ti(fl,"defineProperty");return e({},"",{}),e}catch(e){}}(),jl=t.clearTimeout!==sr.clearTimeout&&t.clearTimeout,Fl=sl&&sl.now!==sr.Date.now&&sl.now,Hl=t.setTimeout!==sr.setTimeout&&t.setTimeout,Wl=ll.ceil,ql=ll.floor,zl=fl.getOwnPropertySymbols,Vl=Il?Il.isBuffer:oe,Kl=t.isFinite,$l=ml.join,Yl=$(fl.keys,fl),Gl=ll.max,Xl=ll.min,Ql=sl.now,Zl=t.parseInt,Jl=ll.random,ef=ml.reverse,tf=Ti(t,"DataView"),nf=Ti(t,"Map"),rf=Ti(t,"Promise"),of=Ti(t,"Set"),af=Ti(t,"WeakMap"),sf=Ti(fl,"create"),uf=af&&new af,cf={},lf=oa(tf),ff=oa(nf),df=oa(rf),pf=oa(of),hf=oa(af),mf=Tl?Tl.prototype:oe,vf=mf?mf.valueOf:oe,gf=mf?mf.toString:oe,yf=function(){function e(){}return function(t){if(!uu(t))return{};if(Ll)return Ll(t);e.prototype=t;var n=new e;return e.prototype=oe,n}}();n.templateSettings={escape:Tt,evaluate:At,interpolate:Pt,variable:"",imports:{_:n}},n.prototype=r.prototype,n.prototype.constructor=n,o.prototype=yf(r.prototype),o.prototype.constructor=o,b.prototype=yf(r.prototype),b.prototype.constructor=b,ne.prototype.clear=qt,ne.prototype.delete=tn,ne.prototype.get=nn,ne.prototype.has=rn,ne.prototype.set=on,an.prototype.clear=sn,an.prototype.delete=un,an.prototype.get=cn,an.prototype.has=ln,an.prototype.set=fn,dn.prototype.clear=pn,dn.prototype.delete=hn,dn.prototype.get=mn,dn.prototype.has=vn,dn.prototype.set=gn,yn.prototype.add=yn.prototype.push=_n,yn.prototype.has=bn,wn.prototype.clear=En,wn.prototype.delete=xn,wn.prototype.get=kn,wn.prototype.has=Cn,wn.prototype.set=Sn;var _f=$o(nr),bf=$o(ir,!0),wf=Yo(),Ef=Yo(!0),xf=uf?function(e,t){return uf.set(e,t),e}:Mc,kf=Dl?function(e,t){return Dl(e,"toString",{configurable:!0,enumerable:!1,value:Lc(t),writable:!0})}:Mc,Cf=io,Sf=jl||function(e){return sr.clearTimeout(e)},If=of&&1/G(new of([,-0]))[1]==Me?function(e){return new of(e)}:Fc,Tf=uf?function(e){
  return uf.get(e)}:Fc,Af=zl?function(e){return null==e?[]:(e=fl(e),d(zl(e),function(t){return Ol.call(e,t)}))}:zc,Pf=zl?function(e){for(var t=[];e;)v(t,Af(e)),e=Rl(e);return t}:zc,Rf=fr;(tf&&Rf(new tf(new ArrayBuffer(1)))!=ft||nf&&Rf(new nf)!=Qe||rf&&Rf(rf.resolve())!=tt||of&&Rf(new of)!=ot||af&&Rf(new af)!=ut)&&(Rf=function(e){var t=fr(e),n=t==et?e.constructor:oe,r=n?oa(n):"";if(r)switch(r){case lf:return ft;case ff:return Qe;case df:return tt;case pf:return ot;case hf:return ut}return t});var Lf=yl?iu:Vc,Of=ta(xf),Mf=Hl||function(e,t){return sr.setTimeout(e,t)},Bf=ta(kf),Uf=$i(function(e){var t=[];return Ot.test(e)&&t.push(""),e.replace(Mt,function(e,n,r,o){t.push(r?o.replace(zt,"$1"):n||e)}),t}),Nf=io(function(e,t){return Qs(e)?Kn(e,tr(t,1,Qs,!0)):[]}),Df=io(function(e,t){var n=Ca(t);return Qs(n)&&(n=oe),Qs(e)?Kn(e,tr(t,1,Qs,!0),Ci(n,2)):[]}),jf=io(function(e,t){var n=Ca(t);return Qs(n)&&(n=oe),Qs(e)?Kn(e,tr(t,1,Qs,!0),oe,n):[]}),Ff=io(function(e){var t=m(e,Co);return t.length&&t[0]===e[0]?Sr(t):[]}),Hf=io(function(e){var t=Ca(e),n=m(e,Co);return t===Ca(n)?t=oe:n.pop(),n.length&&n[0]===e[0]?Sr(n,Ci(t,2)):[]}),Wf=io(function(e){var t=Ca(e),n=m(e,Co);return t="function"==typeof t?t:oe,t&&n.pop(),n.length&&n[0]===e[0]?Sr(n,oe,t):[]}),qf=io(Ta),zf=bi(function(e,t){var n=null==e?0:e.length,r=Dn(e,t);return to(e,m(t,function(e){return Di(e,n)?+e:e}).sort(No)),r}),Vf=io(function(e){return yo(tr(e,1,Qs,!0))}),Kf=io(function(e){var t=Ca(e);return Qs(t)&&(t=oe),yo(tr(e,1,Qs,!0),Ci(t,2))}),$f=io(function(e){var t=Ca(e);return t="function"==typeof t?t:oe,yo(tr(e,1,Qs,!0),oe,t)}),Yf=io(function(e,t){return Qs(e)?Kn(e,t):[]}),Gf=io(function(e){return xo(d(e,Qs))}),Xf=io(function(e){var t=Ca(e);return Qs(t)&&(t=oe),xo(d(e,Qs),Ci(t,2))}),Qf=io(function(e){var t=Ca(e);return t="function"==typeof t?t:oe,xo(d(e,Qs),oe,t)}),Zf=io(Xa),Jf=io(function(e){var t=e.length,n=t>1?e[t-1]:oe;return n="function"==typeof n?(e.pop(),n):oe,Qa(e,n)}),ed=bi(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return Dn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof b&&Di(n)?(r=r.slice(n,+n+(t?1:0)),r.__actions__.push({func:ns,args:[i],thisArg:oe}),new o(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(oe),e})):this.thru(i)}),td=Vo(function(e,t,n){bl.call(e,n)?++e[n]:Nn(e,n,1)}),nd=ei(ma),rd=ei(va),od=Vo(function(e,t,n){bl.call(e,n)?e[n].push(t):Nn(e,n,[t])}),id=io(function(e,t,n){var r=-1,o="function"==typeof t,i=Xs(e)?al(e.length):[];return _f(e,function(e){i[++r]=o?s(t,e,n):Tr(e,t,n)}),i}),ad=Vo(function(e,t,n){Nn(e,n,t)}),sd=Vo(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),ud=io(function(e,t){if(null==e)return[];var n=t.length;return n>1&&ji(e,t[0],t[1])?t=[]:n>2&&ji(t[0],t[1],t[2])&&(t=[t[0]]),Xr(e,tr(t,1),[])}),cd=Fl||function(){return sr.Date.now()},ld=io(function(e,t,n){var r=ge;if(n.length){var o=Y(n,ki(ld));r|=Ee}return pi(e,r,t,n,o)}),fd=io(function(e,t,n){var r=ge|ye;if(n.length){var o=Y(n,ki(fd));r|=Ee}return pi(t,r,e,n,o)}),dd=io(function(e,t){return Vn(e,1,t)}),pd=io(function(e,t,n){return Vn(e,Tu(t)||0,n)});Bs.Cache=dn;var hd=Cf(function(e,t){t=1==t.length&&wd(t[0])?m(t[0],B(Ci())):m(tr(t,1),B(Ci()));var n=t.length;return io(function(r){for(var o=-1,i=Xl(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return s(e,this,r)})}),md=io(function(e,t){var n=Y(t,ki(md));return pi(e,Ee,oe,t,n)}),vd=io(function(e,t){var n=Y(t,ki(vd));return pi(e,xe,oe,t,n)}),gd=bi(function(e,t){return pi(e,Ce,oe,oe,oe,t)}),yd=ci(dr),_d=ci(function(e,t){return e>=t}),bd=Ar(function(){return arguments}())?Ar:function(e){return cu(e)&&bl.call(e,"callee")&&!Ol.call(e,"callee")},wd=al.isArray,Ed=pr?B(pr):Pr,xd=Vl||Vc,kd=hr?B(hr):Rr,Cd=mr?B(mr):Mr,Sd=vr?B(vr):Nr,Id=gr?B(gr):Dr,Td=yr?B(yr):jr,Ad=ci(qr),Pd=ci(function(e,t){return e<=t}),Rd=Ko(function(e,t){if(zi(t)||Xs(t))return void Wo(t,zu(t),e);for(var n in t)bl.call(t,n)&&Ln(e,n,t[n])}),Ld=Ko(function(e,t){Wo(t,Vu(t),e)}),Od=Ko(function(e,t,n,r){Wo(t,Vu(t),e,r)}),Md=Ko(function(e,t,n,r){Wo(t,zu(t),e,r)}),Bd=bi(Dn),Ud=io(function(e){return e.push(oe,hi),s(Od,oe,e)}),Nd=io(function(e){return e.push(oe,mi),s(Wd,oe,e)}),Dd=ri(function(e,t,n){e[t]=n},Lc(Mc)),jd=ri(function(e,t,n){bl.call(e,t)?e[t].push(n):e[t]=[n]},Ci),Fd=io(Tr),Hd=Ko(function(e,t,n){$r(e,t,n)}),Wd=Ko(function(e,t,n,r){$r(e,t,n,r)}),qd=bi(function(e,t){var n={};if(null==e)return n;var r=!1;t=m(t,function(t){return t=Io(t,e),r||(r=t.length>1),t}),Wo(e,Ei(e),n),r&&(n=Fn(n,de|pe|he,vi));for(var o=t.length;o--;)_o(n,t[o]);return n}),zd=bi(function(e,t){return null==e?{}:Qr(e,t)}),Vd=di(zu),Kd=di(Vu),$d=Qo(function(e,t,n){return t=t.toLowerCase(),e+(n?uc(t):t)}),Yd=Qo(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Gd=Qo(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Xd=Xo("toLowerCase"),Qd=Qo(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Zd=Qo(function(e,t,n){return e+(n?" ":"")+ep(t)}),Jd=Qo(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),ep=Xo("toUpperCase"),tp=io(function(e,t){try{return s(e,oe,t)}catch(e){return ru(e)?e:new ul(e)}}),np=bi(function(e,t){return c(t,function(t){t=ra(t),Nn(e,t,ld(e[t],e))}),e}),rp=ti(),op=ti(!0),ip=io(function(e,t){return function(n){return Tr(n,e,t)}}),ap=io(function(e,t){return function(n){return Tr(e,n,t)}}),sp=ii(m),up=ii(f),cp=ii(_),lp=ui(),fp=ui(!0),dp=oi(function(e,t){return e+t},0),pp=fi("ceil"),hp=oi(function(e,t){return e/t},1),mp=fi("floor"),vp=oi(function(e,t){return e*t},1),gp=fi("round"),yp=oi(function(e,t){return e-t},0);return n.after=Ts,n.ary=As,n.assign=Rd,n.assignIn=Ld,n.assignInWith=Od,n.assignWith=Md,n.at=Bd,n.before=Ps,n.bind=ld,n.bindAll=np,n.bindKey=fd,n.castArray=qs,n.chain=es,n.chunk=sa,n.compact=ua,n.concat=ca,n.cond=Pc,n.conforms=Rc,n.constant=Lc,n.countBy=td,n.create=Lu,n.curry=Rs,n.curryRight=Ls,n.debounce=Os,n.defaults=Ud,n.defaultsDeep=Nd,n.defer=dd,n.delay=pd,n.difference=Nf,n.differenceBy=Df,n.differenceWith=jf,n.drop=la,n.dropRight=fa,n.dropRightWhile=da,n.dropWhile=pa,n.fill=ha,n.filter=fs,n.flatMap=ds,n.flatMapDeep=ps,n.flatMapDepth=hs,n.flatten=ga,n.flattenDeep=ya,n.flattenDepth=_a,n.flip=Ms,n.flow=rp,n.flowRight=op,n.fromPairs=ba,n.functions=ju,n.functionsIn=Fu,n.groupBy=od,n.initial=xa,n.intersection=Ff,n.intersectionBy=Hf,n.intersectionWith=Wf,n.invert=Dd,n.invertBy=jd,n.invokeMap=id,n.iteratee=Bc,n.keyBy=ad,n.keys=zu,n.keysIn=Vu,n.map=ys,n.mapKeys=Ku,n.mapValues=$u,n.matches=Uc,n.matchesProperty=Nc,n.memoize=Bs,n.merge=Hd,n.mergeWith=Wd,n.method=ip,n.methodOf=ap,n.mixin=Dc,n.negate=Us,n.nthArg=Hc,n.omit=qd,n.omitBy=Yu,n.once=Ns,n.orderBy=_s,n.over=sp,n.overArgs=hd,n.overEvery=up,n.overSome=cp,n.partial=md,n.partialRight=vd,n.partition=sd,n.pick=zd,n.pickBy=Gu,n.property=Wc,n.propertyOf=qc,n.pull=qf,n.pullAll=Ta,n.pullAllBy=Aa,n.pullAllWith=Pa,n.pullAt=zf,n.range=lp,n.rangeRight=fp,n.rearg=gd,n.reject=Es,n.remove=Ra,n.rest=Ds,n.reverse=La,n.sampleSize=ks,n.set=Qu,n.setWith=Zu,n.shuffle=Cs,n.slice=Oa,n.sortBy=ud,n.sortedUniq=Fa,n.sortedUniqBy=Ha,n.split=_c,n.spread=js,n.tail=Wa,n.take=qa,n.takeRight=za,n.takeRightWhile=Va,n.takeWhile=Ka,n.tap=ts,n.throttle=Fs,n.thru=ns,n.toArray=ku,n.toPairs=Vd,n.toPairsIn=Kd,n.toPath=Xc,n.toPlainObject=Au,n.transform=Ju,n.unary=Hs,n.union=Vf,n.unionBy=Kf,n.unionWith=$f,n.uniq=$a,n.uniqBy=Ya,n.uniqWith=Ga,n.unset=ec,n.unzip=Xa,n.unzipWith=Qa,n.update=tc,n.updateWith=nc,n.values=rc,n.valuesIn=oc,n.without=Yf,n.words=Ac,n.wrap=Ws,n.xor=Gf,n.xorBy=Xf,n.xorWith=Qf,n.zip=Zf,n.zipObject=Za,n.zipObjectDeep=Ja,n.zipWith=Jf,n.entries=Vd,n.entriesIn=Kd,n.extend=Ld,n.extendWith=Od,Dc(n,n),n.add=dp,n.attempt=tp,n.camelCase=$d,n.capitalize=uc,n.ceil=pp,n.clamp=ic,n.clone=zs,n.cloneDeep=Ks,n.cloneDeepWith=$s,n.cloneWith=Vs,n.conformsTo=Ys,n.deburr=cc,n.defaultTo=Oc,n.divide=hp,n.endsWith=lc,n.eq=Gs,n.escape=fc,n.escapeRegExp=dc,n.every=ls,n.find=nd,n.findIndex=ma,n.findKey=Ou,n.findLast=rd,n.findLastIndex=va,n.findLastKey=Mu,n.floor=mp,n.forEach=ms,n.forEachRight=vs,n.forIn=Bu,n.forInRight=Uu,n.forOwn=Nu,n.forOwnRight=Du,n.get=Hu,n.gt=yd,n.gte=_d,n.has=Wu,n.hasIn=qu,n.head=wa,n.identity=Mc,n.includes=gs,n.indexOf=Ea,n.inRange=ac,n.invoke=Fd,n.isArguments=bd,n.isArray=wd,n.isArrayBuffer=Ed,n.isArrayLike=Xs,n.isArrayLikeObject=Qs,n.isBoolean=Zs,n.isBuffer=xd,n.isDate=kd,n.isElement=Js,n.isEmpty=eu,n.isEqual=tu,n.isEqualWith=nu,n.isError=ru,n.isFinite=ou,n.isFunction=iu,n.isInteger=au,n.isLength=su,n.isMap=Cd,n.isMatch=lu,n.isMatchWith=fu,n.isNaN=du,n.isNative=pu,n.isNil=mu,n.isNull=hu,n.isNumber=vu,n.isObject=uu,n.isObjectLike=cu,n.isPlainObject=gu,n.isRegExp=Sd,n.isSafeInteger=yu,n.isSet=Id,n.isString=_u,n.isSymbol=bu,n.isTypedArray=Td,n.isUndefined=wu,n.isWeakMap=Eu,n.isWeakSet=xu,n.join=ka,n.kebabCase=Yd,n.last=Ca,n.lastIndexOf=Sa,n.lowerCase=Gd,n.lowerFirst=Xd,n.lt=Ad,n.lte=Pd,n.max=Zc,n.maxBy=Jc,n.mean=el,n.meanBy=tl,n.min=nl,n.minBy=rl,n.stubArray=zc,n.stubFalse=Vc,n.stubObject=Kc,n.stubString=$c,n.stubTrue=Yc,n.multiply=vp,n.nth=Ia,n.noConflict=jc,n.noop=Fc,n.now=cd,n.pad=pc,n.padEnd=hc,n.padStart=mc,n.parseInt=vc,n.random=sc,n.reduce=bs,n.reduceRight=ws,n.repeat=gc,n.replace=yc,n.result=Xu,n.round=gp,n.runInContext=e,n.sample=xs,n.size=Ss,n.snakeCase=Qd,n.some=Is,n.sortedIndex=Ma,n.sortedIndexBy=Ba,n.sortedIndexOf=Ua,n.sortedLastIndex=Na,n.sortedLastIndexBy=Da,n.sortedLastIndexOf=ja,n.startCase=Zd,n.startsWith=bc,n.subtract=yp,n.sum=ol,n.sumBy=il,n.template=wc,n.times=Gc,n.toFinite=Cu,n.toInteger=Su,n.toLength=Iu,n.toLower=Ec,n.toNumber=Tu,n.toSafeInteger=Pu,n.toString=Ru,n.toUpper=xc,n.trim=kc,n.trimEnd=Cc,n.trimStart=Sc,n.truncate=Ic,n.unescape=Tc,n.uniqueId=Qc,n.upperCase=Jd,n.upperFirst=ep,n.each=ms,n.eachRight=vs,n.first=wa,Dc(n,function(){var e={};return nr(n,function(t,r){bl.call(n.prototype,r)||(e[r]=t)}),e}(),{chain:!1}),n.VERSION=ie,c(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){n[e].placeholder=n}),c(["drop","take"],function(e,t){b.prototype[e]=function(n){n=n===oe?1:Gl(Su(n),0);var r=this.__filtered__&&!t?new b(this):this.clone();return r.__filtered__?r.__takeCount__=Xl(n,r.__takeCount__):r.__views__.push({size:Xl(n,De),type:e+(r.__dir__<0?"Right":"")}),r},b.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),c(["filter","map","takeWhile"],function(e,t){var n=t+1,r=n==Re||n==Oe;b.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Ci(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),c(["head","last"],function(e,t){var n="take"+(t?"Right":"");b.prototype[e]=function(){return this[n](1).value()[0]}}),c(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");b.prototype[e]=function(){return this.__filtered__?new b(this):this[n](1)}}),b.prototype.compact=function(){return this.filter(Mc)},b.prototype.find=function(e){return this.filter(e).head()},b.prototype.findLast=function(e){return this.reverse().find(e)},b.prototype.invokeMap=io(function(e,t){return"function"==typeof e?new b(this):this.map(function(n){return Tr(n,e,t)})}),b.prototype.reject=function(e){return this.filter(Us(Ci(e)))},b.prototype.slice=function(e,t){e=Su(e);var n=this;return n.__filtered__&&(e>0||t<0)?new b(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==oe&&(t=Su(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},b.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},b.prototype.toArray=function(){return this.take(De)},nr(b.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),a=n[i?"take"+("last"==t?"Right":""):t],s=i||/^find/.test(t);a&&(n.prototype[t]=function(){var t=this.__wrapped__,u=i?[1]:arguments,c=t instanceof b,l=u[0],f=c||wd(t),d=function(e){var t=a.apply(n,v([e],u));return i&&p?t[0]:t};f&&r&&"function"==typeof l&&1!=l.length&&(c=f=!1);var p=this.__chain__,h=!!this.__actions__.length,m=s&&!p,g=c&&!h;if(!s&&f){t=g?t:new b(this);var y=e.apply(t,u);return y.__actions__.push({func:ns,args:[d],thisArg:oe}),new o(y,p)}return m&&g?e.apply(this,u):(y=this.thru(d),m?i?y.value()[0]:y.value():y)})}),c(["pop","push","shift","sort","splice","unshift"],function(e){var t=ml[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:pop|shift)$/.test(e);n.prototype[e]=function(){var e=arguments;if(o&&!this.__chain__){var n=this.value();return t.apply(wd(n)?n:[],e)}return this[r](function(n){return t.apply(wd(n)?n:[],e)})}}),nr(b.prototype,function(e,t){var r=n[t];if(r){var o=r.name+"",i=cf[o]||(cf[o]=[]);i.push({name:t,func:r})}}),cf[ni(oe,ye).name]=[{name:"wrapper",func:oe}],b.prototype.clone=A,b.prototype.reverse=Q,b.prototype.value=te,n.prototype.at=ed,n.prototype.chain=rs,n.prototype.commit=os,n.prototype.next=is,n.prototype.plant=ss,n.prototype.reverse=us,n.prototype.toJSON=n.prototype.valueOf=n.prototype.value=cs,n.prototype.first=n.prototype.head,Ul&&(n.prototype[Ul]=as),n},kr=xr();sr._=kr,o=function(){return kr}.call(t,n,t,r),!(o!==oe&&(r.exports=o))}).call(this)}).call(t,n(51),n(181)(e))},function(e,t,n){"use strict";function r(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var o={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},i=["Webkit","ms","Moz","O"];Object.keys(o).forEach(function(e){i.forEach(function(t){o[r(t,e)]=o[e]})});var a={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},s={isUnitlessNumber:o,shorthandPropertyExpansions:a};e.exports=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=n(2),i=n(11),a=(n(0),function(){function e(t){r(this,e),this._callbacks=null,this._contexts=null,this._arg=t}return e.prototype.enqueue=function(e,t){this._callbacks=this._callbacks||[],this._callbacks.push(e),this._contexts=this._contexts||[],this._contexts.push(t)},e.prototype.notifyAll=function(){var e=this._callbacks,t=this._contexts,n=this._arg;if(e&&t){e.length!==t.length?o("24"):void 0,this._callbacks=null,this._contexts=null;for(var r=0;r<e.length;r++)e[r].call(t[r],n);e.length=0,t.length=0}},e.prototype.checkpoint=function(){return this._callbacks?this._callbacks.length:0},e.prototype.rollback=function(e){this._callbacks&&this._contexts&&(this._callbacks.length=e,this._contexts.length=e)},e.prototype.reset=function(){this._callbacks=null,this._contexts=null},e.prototype.destructor=function(){this.reset()},e}());e.exports=i.addPoolingTo(a)},function(e,t,n){"use strict";function r(e){return!!c.hasOwnProperty(e)||!u.hasOwnProperty(e)&&(s.test(e)?(c[e]=!0,!0):(u[e]=!0,!1))}function o(e,t){return null==t||e.hasBooleanValue&&!t||e.hasNumericValue&&isNaN(t)||e.hasPositiveNumericValue&&t<1||e.hasOverloadedBooleanValue&&t===!1}var i=n(13),a=(n(4),n(7),n(163)),s=(n(1),new RegExp("^["+i.ATTRIBUTE_NAME_START_CHAR+"]["+i.ATTRIBUTE_NAME_CHAR+"]*$")),u={},c={},l={createMarkupForID:function(e){return i.ID_ATTRIBUTE_NAME+"="+a(e)},setAttributeForID:function(e,t){e.setAttribute(i.ID_ATTRIBUTE_NAME,t)},createMarkupForRoot:function(){return i.ROOT_ATTRIBUTE_NAME+'=""'},setAttributeForRoot:function(e){e.setAttribute(i.ROOT_ATTRIBUTE_NAME,"")},createMarkupForProperty:function(e,t){var n=i.properties.hasOwnProperty(e)?i.properties[e]:null;if(n){if(o(n,t))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&t===!0?r+'=""':r+"="+a(t)}return i.isCustomAttribute(e)?null==t?"":e+"="+a(t):null},createMarkupForCustomAttribute:function(e,t){return r(e)&&null!=t?e+"="+a(t):""},setValueForProperty:function(e,t,n){var r=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(r){var a=r.mutationMethod;if(a)a(e,n);else{if(o(r,n))return void this.deleteValueForProperty(e,t);if(r.mustUseProperty)e[r.propertyName]=n;else{var s=r.attributeName,u=r.attributeNamespace;u?e.setAttributeNS(u,s,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&n===!0?e.setAttribute(s,""):e.setAttribute(s,""+n)}}}else if(i.isCustomAttribute(t))return void l.setValueForAttribute(e,t,n)},setValueForAttribute:function(e,t,n){if(r(t)){null==n?e.removeAttribute(t):e.setAttribute(t,""+n)}},deleteValueForAttribute:function(e,t){e.removeAttribute(t)},deleteValueForProperty:function(e,t){var n=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(n){var r=n.mutationMethod;if(r)r(e,void 0);else if(n.mustUseProperty){var o=n.propertyName;n.hasBooleanValue?e[o]=!1:e[o]=""}else e.removeAttribute(n.attributeName)}else i.isCustomAttribute(t)&&e.removeAttribute(t)}};e.exports=l},function(e,t,n){"use strict";var r={hasCachedChildNodes:1};e.exports=r},function(e,t,n){"use strict";function r(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var e=this._currentElement.props,t=s.getValue(e);null!=t&&o(this,Boolean(e.multiple),t)}}function o(e,t,n){var r,o,i=u.getNodeFromInstance(e).options;if(t){for(r={},o=0;o<n.length;o++)r[""+n[o]]=!0;for(o=0;o<i.length;o++){var a=r.hasOwnProperty(i[o].value);i[o].selected!==a&&(i[o].selected=a)}}else{for(r=""+n,o=0;o<i.length;o++)if(i[o].value===r)return void(i[o].selected=!0);i.length&&(i[0].selected=!0)}}function i(e){var t=this._currentElement.props,n=s.executeOnChange(t,e);return this._rootNodeID&&(this._wrapperState.pendingUpdate=!0),c.asap(r,this),n}var a=n(3),s=n(37),u=n(4),c=n(8),l=(n(1),!1),f={getHostProps:function(e,t){return a({},t,{onChange:e._wrapperState.onChange,value:void 0})},mountWrapper:function(e,t){var n=s.getValue(t);e._wrapperState={pendingUpdate:!1,initialValue:null!=n?n:t.defaultValue,listeners:null,onChange:i.bind(e),wasMultiple:Boolean(t.multiple)},void 0===t.value||void 0===t.defaultValue||l||(l=!0)},getSelectValueContext:function(e){return e._wrapperState.initialValue},postUpdateWrapper:function(e){var t=e._currentElement.props;e._wrapperState.initialValue=void 0;var n=e._wrapperState.wasMultiple;e._wrapperState.wasMultiple=Boolean(t.multiple);var r=s.getValue(t);null!=r?(e._wrapperState.pendingUpdate=!1,o(e,Boolean(t.multiple),r)):n!==Boolean(t.multiple)&&(null!=t.defaultValue?o(e,Boolean(t.multiple),t.defaultValue):o(e,Boolean(t.multiple),t.multiple?[]:""))}};e.exports=f},function(e,t,n){"use strict";var r,o={injectEmptyComponentFactory:function(e){r=e}},i={create:function(e){return r(e)}};i.injection=o,e.exports=i},function(e,t,n){"use strict";var r={logTopLevelRenders:!1};e.exports=r},function(e,t,n){"use strict";function r(e){return s?void 0:a("111",e.type),new s(e)}function o(e){return new u(e)}function i(e){return e instanceof u}var a=n(2),s=(n(0),null),u=null,c={injectGenericComponentClass:function(e){s=e},injectTextComponentClass:function(e){u=e}},l={createInternalComponent:r,createInstanceForText:o,isTextComponent:i,injection:c};e.exports=l},function(e,t,n){"use strict";function r(e){return i(document.documentElement,e)}var o=n(122),i=n(91),a=n(53),s=n(54),u={hasSelectionCapabilities:function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)},getSelectionInformation:function(){var e=s();return{focusedElem:e,selectionRange:u.hasSelectionCapabilities(e)?u.getSelection(e):null}},restoreSelection:function(e){var t=s(),n=e.focusedElem,o=e.selectionRange;t!==n&&r(n)&&(u.hasSelectionCapabilities(n)&&u.setSelection(n,o),a(n))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=o.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;if(void 0===r&&(r=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length);else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var i=e.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",r-n),i.select()}else o.setOffsets(e,t)}};e.exports=u},function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function o(e){return e?e.nodeType===M?e.documentElement:e.firstChild:null}function i(e){return e.getAttribute&&e.getAttribute(R)||""}function a(e,t,n,r,o){var i;if(w.logTopLevelRenders){var a=e._currentElement.props.child,s=a.type;i="React mount: "+("string"==typeof s?s:s.displayName||s.name),console.time(i)}var u=k.mountComponent(e,n,null,_(e,t),o,0);i&&console.timeEnd(i),e._renderedComponent._topLevelWrapper=e,j._mountImageIntoNode(u,t,e,r,n)}function s(e,t,n,r){var o=S.ReactReconcileTransaction.getPooled(!n&&b.useCreateElement);o.perform(a,null,e,t,o,n,r),S.ReactReconcileTransaction.release(o)}function u(e,t,n){for(k.unmountComponent(e,n),t.nodeType===M&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function c(e){var t=o(e);if(t){var n=y.getInstanceFromNode(t);return!(!n||!n._hostParent)}}function l(e){return!(!e||e.nodeType!==O&&e.nodeType!==M&&e.nodeType!==B)}function f(e){var t=o(e),n=t&&y.getInstanceFromNode(t);return n&&!n._hostParent?n:null}function d(e){var t=f(e);return t?t._hostContainerInfo._topLevelWrapper:null}var p=n(2),h=n(12),m=n(13),v=n(15),g=n(24),y=(n(10),n(4)),_=n(116),b=n(118),w=n(62),E=n(21),x=(n(7),n(132)),k=n(14),C=n(40),S=n(8),I=n(18),T=n(72),A=(n(0),n(28)),P=n(46),R=(n(1),m.ID_ATTRIBUTE_NAME),L=m.ROOT_ATTRIBUTE_NAME,O=1,M=9,B=11,U={},N=1,D=function(){this.rootID=N++};D.prototype.isReactComponent={},D.prototype.render=function(){return this.props.child},D.isReactTopLevelWrapper=!0;var j={TopLevelWrapper:D,_instancesByReactRootID:U,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r,o){return j.scrollMonitor(r,function(){C.enqueueElementInternal(e,t,n),o&&C.enqueueCallbackInternal(e,o)}),e},_renderNewRootComponent:function(e,t,n,r){l(t)?void 0:p("37"),g.ensureScrollValueMonitoring();var o=T(e,!1);S.batchedUpdates(s,o,t,n,r);var i=o._instance.rootID;return U[i]=o,o},renderSubtreeIntoContainer:function(e,t,n,r){return null!=e&&E.has(e)?void 0:p("38"),j._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){C.validateCallback(r,"ReactDOM.render"),v.isValidElement(t)?void 0:p("39","string"==typeof t?" Instead of passing a string like 'div', pass React.createElement('div') or <div />.":"function"==typeof t?" Instead of passing a class like Foo, pass React.createElement(Foo) or <Foo />.":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":"");var a,s=v.createElement(D,{child:t});if(e){var u=E.get(e);a=u._processChildContext(u._context)}else a=I;var l=d(n);if(l){var f=l._currentElement,h=f.props.child;if(P(h,t)){var m=l._renderedComponent.getPublicInstance(),g=r&&function(){r.call(m)};return j._updateRootComponent(l,s,a,n,g),m}j.unmountComponentAtNode(n)}var y=o(n),_=y&&!!i(y),b=c(n),w=_&&!l&&!b,x=j._renderNewRootComponent(s,n,w,a)._renderedComponent.getPublicInstance();return r&&r.call(x),x},render:function(e,t,n){return j._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){l(e)?void 0:p("40");var t=d(e);if(!t){c(e),1===e.nodeType&&e.hasAttribute(L);return!1}return delete U[t._instance.rootID],S.batchedUpdates(u,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,i,a){if(l(t)?void 0:p("41"),i){var s=o(t);if(x.canReuseMarkup(e,s))return void y.precacheNode(n,s);var u=s.getAttribute(x.CHECKSUM_ATTR_NAME);s.removeAttribute(x.CHECKSUM_ATTR_NAME);var c=s.outerHTML;s.setAttribute(x.CHECKSUM_ATTR_NAME,u);var f=e,d=r(f,c),m=" (client) "+f.substring(d-20,d+20)+"\n (server) "+c.substring(d-20,d+20);t.nodeType===M?p("42",m):void 0}if(t.nodeType===M?p("43"):void 0,a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);h.insertTreeBefore(t,e,null)}else A(t,e),y.precacheNode(n,t.firstChild)}};e.exports=j},function(e,t,n){"use strict";var r=n(2),o=n(15),i=(n(0),{HOST:0,COMPOSITE:1,EMPTY:2,getType:function(e){return null===e||e===!1?i.EMPTY:o.isValidElement(e)?"function"==typeof e.type?i.COMPOSITE:i.HOST:void r("26",e)}});e.exports=i},function(e,t,n){"use strict";var r={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){r.currentScrollLeft=e.x,r.currentScrollTop=e.y}};e.exports=r},function(e,t,n){"use strict";function r(e,t){return null==t?o("30"):void 0,null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}var o=n(2);n(0);e.exports=r},function(e,t,n){"use strict";function r(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}e.exports=r},function(e,t,n){"use strict";function r(e){for(var t;(t=e._renderedNodeType)===o.COMPOSITE;)e=e._renderedComponent;return t===o.HOST?e._renderedComponent:t===o.EMPTY?null:void 0}var o=n(66);e.exports=r},function(e,t,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=n(5),i=null;e.exports=r},function(e,t,n){"use strict";function r(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}function o(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function i(e,t){var n;if(null===e||e===!1)n=c.create(i);else if("object"==typeof e){var s=e,u=s.type;if("function"!=typeof u&&"string"!=typeof u){var d="";d+=r(s._owner),a("130",null==u?u:typeof u,d)}"string"==typeof s.type?n=l.createInternalComponent(s):o(s.type)?(n=new s.type(s),n.getHostNode||(n.getHostNode=n.getNativeNode)):n=new f(s)}else"string"==typeof e||"number"==typeof e?n=l.createInstanceForText(e):a("131",typeof e);return n._mountIndex=0,n._mountImage=null,n}var a=n(2),s=n(3),u=n(113),c=n(61),l=n(63),f=(n(160),n(0),n(1),function(e){this.construct(e)});s(f.prototype,u,{_instantiateReactComponent:i}),e.exports=i},function(e,t,n){"use strict";function r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!o[e.type]:"textarea"===t}var o={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=r},function(e,t,n){"use strict";var r=n(5),o=n(27),i=n(28),a=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){return 3===e.nodeType?void(e.nodeValue=t):void i(e,o(t))})),e.exports=a},function(e,t,n){"use strict";function r(e,t){return e&&"object"==typeof e&&null!=e.key?c.escape(e.key):t.toString(36)}function o(e,t,n,i){var d=typeof e;if("undefined"!==d&&"boolean"!==d||(e=null),null===e||"string"===d||"number"===d||"object"===d&&e.$$typeof===s)return n(i,e,""===t?l+r(e,0):t),1;var p,h,m=0,v=""===t?l:t+f;if(Array.isArray(e))for(var g=0;g<e.length;g++)p=e[g],h=v+r(p,g),m+=o(p,h,n,i);else{var y=u(e);if(y){var _,b=y.call(e);if(y!==e.entries)for(var w=0;!(_=b.next()).done;)p=_.value,h=v+r(p,w++),m+=o(p,h,n,i);else for(;!(_=b.next()).done;){var E=_.value;E&&(p=E[1],h=v+c.escape(E[0])+f+r(p,0),m+=o(p,h,n,i))}}else if("object"===d){var x="",k=String(e);a("31","[object Object]"===k?"object with keys {"+Object.keys(e).join(", ")+"}":k,x)}}return m}function i(e,t,n){return null==e?0:o(e,"",t,n)}var a=n(2),s=(n(10),n(128)),u=n(159),c=(n(0),n(36)),l=(n(1),"."),f=":";e.exports=i},function(e,t,n){"use strict";function r(e){var t=Function.prototype.toString,n=Object.prototype.hasOwnProperty,r=RegExp("^"+t.call(n).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");try{var o=t.call(e);return r.test(o)}catch(e){return!1}}function o(e){var t=c(e);if(t){var n=t.childIDs;l(e),n.forEach(o)}}function i(e,t,n){return"\n    in "+(e||"Unknown")+(t?" (at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+")":n?" (created by "+n+")":"")}function a(e){return null==e?"#empty":"string"==typeof e||"number"==typeof e?"#text":"string"==typeof e.type?e.type:e.type.displayName||e.type.name||"Unknown"}function s(e){var t,n=C.getDisplayName(e),r=C.getElement(e),o=C.getOwnerID(e);return o&&(t=C.getDisplayName(o)),i(n,r&&r._source,t)}var u,c,l,f,d,p,h,m=n(17),v=n(10),g=(n(0),n(1),"function"==typeof Array.from&&"function"==typeof Map&&r(Map)&&null!=Map.prototype&&"function"==typeof Map.prototype.keys&&r(Map.prototype.keys)&&"function"==typeof Set&&r(Set)&&null!=Set.prototype&&"function"==typeof Set.prototype.keys&&r(Set.prototype.keys));if(g){var y=new Map,_=new Set;u=function(e,t){y.set(e,t)},c=function(e){return y.get(e)},l=function(e){y.delete(e)},f=function(){return Array.from(y.keys())},d=function(e){_.add(e)},p=function(e){_.delete(e)},h=function(){return Array.from(_.keys())}}else{var b={},w={},E=function(e){return"."+e},x=function(e){return parseInt(e.substr(1),10)};u=function(e,t){var n=E(e);b[n]=t},c=function(e){var t=E(e);return b[t]},l=function(e){var t=E(e);delete b[t]},f=function(){return Object.keys(b).map(x)},d=function(e){var t=E(e);w[t]=!0},p=function(e){var t=E(e);delete w[t]},h=function(){return Object.keys(w).map(x)}}var k=[],C={onSetChildren:function(e,t){var n=c(e);n?void 0:m("144"),n.childIDs=t;for(var r=0;r<t.length;r++){var o=t[r],i=c(o);i?void 0:m("140"),null==i.childIDs&&"object"==typeof i.element&&null!=i.element?m("141"):void 0,i.isMounted?void 0:m("71"),null==i.parentID&&(i.parentID=e),i.parentID!==e?m("142",o,i.parentID,e):void 0}},onBeforeMountComponent:function(e,t,n){var r={element:t,parentID:n,text:null,childIDs:[],isMounted:!1,updateCount:0};u(e,r)},onBeforeUpdateComponent:function(e,t){var n=c(e);n&&n.isMounted&&(n.element=t)},onMountComponent:function(e){var t=c(e);t?void 0:m("144"),t.isMounted=!0;var n=0===t.parentID;n&&d(e)},onUpdateComponent:function(e){var t=c(e);t&&t.isMounted&&t.updateCount++},onUnmountComponent:function(e){var t=c(e);if(t){t.isMounted=!1;var n=0===t.parentID;n&&p(e)}k.push(e)},purgeUnmountedComponents:function(){if(!C._preventPurging){for(var e=0;e<k.length;e++){var t=k[e];o(t)}k.length=0}},isMounted:function(e){var t=c(e);return!!t&&t.isMounted},getCurrentStackAddendum:function(e){var t="";if(e){var n=a(e),r=e._owner;t+=i(n,e._source,r&&r.getName())}var o=v.current,s=o&&o._debugID;return t+=C.getStackAddendumByID(s)},getStackAddendumByID:function(e){for(var t="";e;)t+=s(e),e=C.getParentID(e);return t},getChildIDs:function(e){var t=c(e);return t?t.childIDs:[]},getDisplayName:function(e){var t=C.getElement(e);return t?a(t):null},getElement:function(e){var t=c(e);return t?t.element:null},getOwnerID:function(e){var t=C.getElement(e);return t&&t._owner?t._owner._debugID:null},getParentID:function(e){var t=c(e);return t?t.parentID:null},getSource:function(e){var t=c(e),n=t?t.element:null,r=null!=n?n._source:null;return r},getText:function(e){var t=C.getElement(e);return"string"==typeof t?t:"number"==typeof t?""+t:null},getUpdateCount:function(e){var t=c(e);return t?t.updateCount:0},getRootIDs:h,getRegisteredIDs:f
  };e.exports=C},function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=r},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";var r=!1;e.exports=r},function(e,t,n){"use strict";function r(e){var t=e&&(o&&e[o]||e[i]);if("function"==typeof t)return t}var o="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(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=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=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),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(23),c=r(u),l=n(55),f=n(85),d=r(f),p=n(84),h=r(p);n(177);var m=n(182),v=function(e){function t(){o(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.state={},(0,l.bindAll)(e,"onFilesPicked"),e.client=new m,e}return a(t,e),s(t,[{key:"onFilesPicked",value:function(e){var t=this;this.client.seed(e,void 0,function(e){t.setState({sharedTorrent:e})})}},{key:"render",value:function(){if(!m.WEBRTC_SUPPORT)return c.default.createElement("div",null,"Your browser isn't supported :(");var e=void 0,t=void 0,n=void 0;return this.props.shareURL||(this.state.sharedTorrent?t=c.default.createElement(h.default,{torrent:this.state.sharedTorrent}):e=c.default.createElement(d.default,{onFilesPicked:this.onFilesPicked})),c.default.createElement("div",null,e,t,n)}}]),t}(c.default.Component);t.default=v},function(e,t,n){e.exports=n.p+"index.html"},function(e,t,n){"use strict";e.exports=n(114)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(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=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=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),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(23),c=r(u);n(178);var l=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return console.log("torrent seeded",e.torrent,e.torrent.magnetURI),n.setupListeners(e.torrent),n}return a(t,e),s(t,[{key:"setupListeners",value:function(e){var t=this;_.map(["infoHash","metadata","ready","warning","error","wire","noPeers","download","upload"],function(n){e.on(n,function(e){console.log(n,e);var r="event-"+n;t[r]&&t[r](args)})})}},{key:"render",value:function(){var e=this.props.torrent.magnetURI,t=""+location.host+location.pathname+"?share="+encodeURIComponent(e);return c.default.createElement("div",{className:"shared-torrent"},c.default.createElement("h1",null,"Great! Now just copy the url below and give it to a friend"),c.default.createElement("input",{type:"text",value:t}))}}]),t}(c.default.Component);t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(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=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=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),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(23),c=r(u),l=n(55);n(179);var f=function(e){function t(){o(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return(0,l.bindAll)(e,"onFilesChanged"),e}return a(t,e),s(t,[{key:"onFilesChanged",value:function(e){this.props.onFilesPicked(e.currentTarget.files)}},{key:"render",value:function(){return c.default.createElement("div",{className:"torrent-creator"},c.default.createElement("h1",null,"Lets get started!"),c.default.createElement("label",null,"Pick some files",c.default.createElement("input",{type:"file",id:"myfileinput",multiple:!0,onChange:this.onFilesChanged})))}}]),t}(c.default.Component);t.default=f},function(e,t,n){t=e.exports=n(29)(),t.push([e.i,"body,html{height:100%;font-family:arial,sans-serif;font-size:12px;margin:0;padding:0}",""])},function(e,t,n){t=e.exports=n(29)(),t.push([e.i,".shared-torrent{padding:3em;text-align:center;background:#f8f8ff}.shared-torrent input{display:block;width:50%;margin:0 auto;padding:15px;font-size:1.5em}",""])},function(e,t,n){t=e.exports=n(29)(),t.push([e.i,".torrent-creator{padding:3em;text-align:center;background:#f8f8ff}.torrent-creator label{border:1px solid #ddd;padding:20px 30px;background:#bbb;border-radius:3px;cursor:pointer;font-size:1.5em;margin:1em 0;display:inline-block}.torrent-creator label:hover{background:#aaa}.torrent-creator input{display:none}",""])},function(e,t,n){"use strict";function r(e){return e.replace(o,function(e,t){return t.toUpperCase()})}var o=/-(.)/g;e.exports=r},function(e,t,n){"use strict";function r(e){return o(e.replace(i,"ms-"))}var o=n(89),i=/^-ms-/;e.exports=r},function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!o(e)&&(o(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var o=n(99);e.exports=r},function(e,t,n){"use strict";function r(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?a(!1):void 0,"number"!=typeof t?a(!1):void 0,0===t||t-1 in e?void 0:a(!1),"function"==typeof e.callee?a(!1):void 0,e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(e){}for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}function o(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function i(e){return o(e)?Array.isArray(e)?e.slice():r(e):[e]}var a=n(0);e.exports=i},function(e,t,n){"use strict";function r(e){var t=e.match(l);return t&&t[1].toLowerCase()}function o(e,t){var n=c;c?void 0:u(!1);var o=r(e),i=o&&s(o);if(i){n.innerHTML=i[1]+e+i[2];for(var l=i[0];l--;)n=n.lastChild}else n.innerHTML=e;var f=n.getElementsByTagName("script");f.length&&(t?void 0:u(!1),a(f).forEach(t));for(var d=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return d}var i=n(5),a=n(92),s=n(94),u=n(0),c=i.canUseDOM?document.createElement("div"):null,l=/^\s*<(\w+)/;e.exports=o},function(e,t,n){"use strict";function r(e){return a?void 0:i(!1),d.hasOwnProperty(e)||(e="*"),s.hasOwnProperty(e)||("*"===e?a.innerHTML="<link />":a.innerHTML="<"+e+"></"+e+">",s[e]=!a.firstChild),s[e]?d[e]:null}var o=n(5),i=n(0),a=o.canUseDOM?document.createElement("div"):null,s={},u=[1,'<select multiple="true">',"</select>"],c=[1,"<table>","</table>"],l=[3,"<table><tbody><tr>","</tr></tbody></table>"],f=[1,'<svg xmlns="http://www.w3.org/2000/svg">',"</svg>"],d={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:u,option:u,caption:c,colgroup:c,tbody:c,tfoot:c,thead:c,td:l,th:l},p=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];p.forEach(function(e){d[e]=f,s[e]=!0}),e.exports=r},function(e,t,n){"use strict";function r(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}e.exports=r},function(e,t,n){"use strict";function r(e){return e.replace(o,"-$1").toLowerCase()}var o=/([A-Z])/g;e.exports=r},function(e,t,n){"use strict";function r(e){return o(e).replace(i,"-ms-")}var o=n(96),i=/^ms-/;e.exports=r},function(e,t,n){"use strict";function r(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=r},function(e,t,n){"use strict";function r(e){return o(e)&&3==e.nodeType}var o=n(98);e.exports=r},function(e,t,n){"use strict";function r(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}e.exports=r},function(e,t,n){"use strict";var r={Properties:{"aria-current":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},DOMAttributeNames:{},DOMPropertyNames:{}};e.exports=r},function(e,t,n){"use strict";var r=n(4),o=n(53),i={focusDOMComponent:function(){o(r.getNodeFromInstance(this))}};e.exports=i},function(e,t,n){"use strict";function r(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function o(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function i(e){switch(e){case"topCompositionStart":return S.compositionStart;case"topCompositionEnd":return S.compositionEnd;case"topCompositionUpdate":return S.compositionUpdate}}function a(e,t){return"topKeyDown"===e&&t.keyCode===_}function s(e,t){switch(e){case"topKeyUp":return y.indexOf(t.keyCode)!==-1;case"topKeyDown":return t.keyCode!==_;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function u(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function c(e,t,n,r){var o,c;if(b?o=i(e):T?s(e,n)&&(o=S.compositionEnd):a(e,n)&&(o=S.compositionStart),!o)return null;x&&(T||o!==S.compositionStart?o===S.compositionEnd&&T&&(c=T.getData()):T=m.getPooled(r));var l=v.getPooled(o,t,n,r);if(c)l.data=c;else{var f=u(n);null!==f&&(l.data=f)}return p.accumulateTwoPhaseDispatches(l),l}function l(e,t){switch(e){case"topCompositionEnd":return u(t);case"topKeyPress":var n=t.which;return n!==k?null:(I=!0,C);case"topTextInput":var r=t.data;return r===C&&I?null:r;default:return null}}function f(e,t){if(T){if("topCompositionEnd"===e||!b&&s(e,t)){var n=T.getData();return m.release(T),T=null,n}return null}switch(e){case"topPaste":return null;case"topKeyPress":return t.which&&!o(t)?String.fromCharCode(t.which):null;case"topCompositionEnd":return x?null:t.data;default:return null}}function d(e,t,n,r){var o;if(o=E?l(e,n):f(e,n),!o)return null;var i=g.getPooled(S.beforeInput,t,n,r);return i.data=o,p.accumulateTwoPhaseDispatches(i),i}var p=n(20),h=n(5),m=n(109),v=n(146),g=n(149),y=[9,13,27,32],_=229,b=h.canUseDOM&&"CompositionEvent"in window,w=null;h.canUseDOM&&"documentMode"in document&&(w=document.documentMode);var E=h.canUseDOM&&"TextEvent"in window&&!w&&!r(),x=h.canUseDOM&&(!b||w&&w>8&&w<=11),k=32,C=String.fromCharCode(k),S={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},I=!1,T=null,A={eventTypes:S,extractEvents:function(e,t,n,r){return[c(e,t,n,r),d(e,t,n,r)]}};e.exports=A},function(e,t,n){"use strict";var r=n(56),o=n(5),i=(n(7),n(90),n(155)),a=n(97),s=n(100),u=(n(1),s(function(e){return a(e)})),c=!1,l="cssFloat";if(o.canUseDOM){var f=document.createElement("div").style;try{f.font=""}catch(e){c=!0}void 0===document.documentElement.style.cssFloat&&(l="styleFloat")}var d={createMarkupForStyles:function(e,t){var n="";for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];null!=o&&(n+=u(r)+":",n+=i(r,o,t)+";")}return n||null},setValueForStyles:function(e,t,n){var o=e.style;for(var a in t)if(t.hasOwnProperty(a)){var s=i(a,t[a],n);if("float"!==a&&"cssFloat"!==a||(a=l),s)o[a]=s;else{var u=c&&r.shorthandPropertyExpansions[a];if(u)for(var f in u)o[f]="";else o[a]=""}}}};e.exports=d},function(e,t,n){"use strict";function r(e){var t=e.nodeName&&e.nodeName.toLowerCase();return"select"===t||"input"===t&&"file"===e.type}function o(e){var t=x.getPooled(I.change,A,e,k(e));_.accumulateTwoPhaseDispatches(t),E.batchedUpdates(i,t)}function i(e){y.enqueueEvents(e),y.processEventQueue(!1)}function a(e,t){T=e,A=t,T.attachEvent("onchange",o)}function s(){T&&(T.detachEvent("onchange",o),T=null,A=null)}function u(e,t){if("topChange"===e)return t}function c(e,t,n){"topFocus"===e?(s(),a(t,n)):"topBlur"===e&&s()}function l(e,t){T=e,A=t,P=e.value,R=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(T,"value",M),T.attachEvent?T.attachEvent("onpropertychange",d):T.addEventListener("propertychange",d,!1)}function f(){T&&(delete T.value,T.detachEvent?T.detachEvent("onpropertychange",d):T.removeEventListener("propertychange",d,!1),T=null,A=null,P=null,R=null)}function d(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==P&&(P=t,o(e))}}function p(e,t){if("topInput"===e)return t}function h(e,t,n){"topFocus"===e?(f(),l(t,n)):"topBlur"===e&&f()}function m(e,t){if(("topSelectionChange"===e||"topKeyUp"===e||"topKeyDown"===e)&&T&&T.value!==P)return P=T.value,A}function v(e){return e.nodeName&&"input"===e.nodeName.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function g(e,t){if("topClick"===e)return t}var y=n(19),_=n(20),b=n(5),w=n(4),E=n(8),x=n(9),k=n(44),C=n(45),S=n(73),I={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:["topBlur","topChange","topClick","topFocus","topInput","topKeyDown","topKeyUp","topSelectionChange"]}},T=null,A=null,P=null,R=null,L=!1;b.canUseDOM&&(L=C("change")&&(!document.documentMode||document.documentMode>8));var O=!1;b.canUseDOM&&(O=C("input")&&(!document.documentMode||document.documentMode>11));var M={get:function(){return R.get.call(this)},set:function(e){P=""+e,R.set.call(this,e)}},B={eventTypes:I,extractEvents:function(e,t,n,o){var i,a,s=t?w.getNodeFromInstance(t):window;if(r(s)?L?i=u:a=c:S(s)?O?i=p:(i=m,a=h):v(s)&&(i=g),i){var l=i(e,t);if(l){var f=x.getPooled(I.change,l,n,o);return f.type="change",_.accumulateTwoPhaseDispatches(f),f}}a&&a(e,s,t)}};e.exports=B},function(e,t,n){"use strict";var r=n(2),o=n(12),i=n(5),a=n(93),s=n(6),u=(n(0),{dangerouslyReplaceNodeWithMarkup:function(e,t){if(i.canUseDOM?void 0:r("56"),t?void 0:r("57"),"HTML"===e.nodeName?r("58"):void 0,"string"==typeof t){var n=a(t,s)[0];e.parentNode.replaceChild(n,e)}else o.replaceChildWithTree(e,t)}});e.exports=u},function(e,t,n){"use strict";var r=["ResponderEventPlugin","SimpleEventPlugin","TapEventPlugin","EnterLeaveEventPlugin","ChangeEventPlugin","SelectEventPlugin","BeforeInputEventPlugin"];e.exports=r},function(e,t,n){"use strict";var r=n(20),o=n(4),i=n(25),a={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},s={eventTypes:a,extractEvents:function(e,t,n,s){if("topMouseOver"===e&&(n.relatedTarget||n.fromElement))return null;if("topMouseOut"!==e&&"topMouseOver"!==e)return null;var u;if(s.window===s)u=s;else{var c=s.ownerDocument;u=c?c.defaultView||c.parentWindow:window}var l,f;if("topMouseOut"===e){l=t;var d=n.relatedTarget||n.toElement;f=d?o.getClosestInstanceFromNode(d):null}else l=null,f=t;if(l===f)return null;var p=null==l?u:o.getNodeFromInstance(l),h=null==f?u:o.getNodeFromInstance(f),m=i.getPooled(a.mouseLeave,l,n,s);m.type="mouseleave",m.target=p,m.relatedTarget=h;var v=i.getPooled(a.mouseEnter,f,n,s);return v.type="mouseenter",v.target=h,v.relatedTarget=p,r.accumulateEnterLeaveDispatches(m,v,l,f),[m,v]}};e.exports=s},function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var o=n(3),i=n(11),a=n(71);o(r.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[a()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);var s=t>1?1-t:void 0;return this._fallbackText=o.slice(e,s),this._fallbackText}}),i.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";var r=n(13),o=r.injection.MUST_USE_PROPERTY,i=r.injection.HAS_BOOLEAN_VALUE,a=r.injection.HAS_NUMERIC_VALUE,s=r.injection.HAS_POSITIVE_NUMERIC_VALUE,u=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,c={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:i,allowTransparency:0,alt:0,as:0,async:i,autoComplete:0,autoPlay:i,capture:i,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:o|i,cite:0,classID:0,className:0,cols:s,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:i,coords:0,crossOrigin:0,data:0,dateTime:0,default:i,defer:i,dir:0,disabled:i,download:u,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:i,formTarget:0,frameBorder:0,headers:0,height:0,hidden:i,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:i,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:o|i,muted:o|i,name:0,nonce:0,noValidate:i,open:i,optimum:0,pattern:0,placeholder:0,playsInline:i,poster:0,preload:0,profile:0,radioGroup:0,readOnly:i,referrerPolicy:0,rel:0,required:i,reversed:i,role:0,rows:s,rowSpan:a,sandbox:0,scope:0,scoped:i,scrolling:0,seamless:i,selected:o|i,shape:0,size:s,sizes:0,span:s,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:a,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:i,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{}};e.exports=c},function(e,t,n){"use strict";(function(t){function r(e,t,n,r){var o=void 0===e[n];null!=t&&o&&(e[n]=i(t,!0))}var o=n(14),i=n(72),a=(n(36),n(46)),s=n(75);n(1);"undefined"!=typeof t&&t.env,1;var u={instantiateChildren:function(e,t,n,o){if(null==e)return null;var i={};return s(e,r,i),i},updateChildren:function(e,t,n,r,s,u,c,l,f){if(t||e){var d,p;for(d in t)if(t.hasOwnProperty(d)){p=e&&e[d];var h=p&&p._currentElement,m=t[d];if(null!=p&&a(h,m))o.receiveComponent(p,m,s,l),t[d]=p;else{p&&(r[d]=o.getHostNode(p),o.unmountComponent(p,!1));var v=i(m,!0);t[d]=v;var g=o.mountComponent(v,s,u,c,l,f);n.push(g)}}for(d in e)!e.hasOwnProperty(d)||t&&t.hasOwnProperty(d)||(p=e[d],r[d]=o.getHostNode(p),o.unmountComponent(p,!1))}},unmountChildren:function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];o.unmountComponent(r,t)}}};e.exports=u}).call(t,n(31))},function(e,t,n){"use strict";var r=n(32),o=n(119),i={processChildrenUpdates:o.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup};e.exports=i},function(e,t,n){"use strict";function r(e){}function o(e,t){}function i(e){return!(!e.prototype||!e.prototype.isReactComponent)}function a(e){return!(!e.prototype||!e.prototype.isPureReactComponent)}var s=n(2),u=n(3),c=n(15),l=n(38),f=n(10),d=n(39),p=n(21),h=(n(7),n(66)),m=n(14),v=n(18),g=(n(0),n(30)),y=n(46),_=(n(1),{ImpureClass:0,PureClass:1,StatelessFunctional:2});r.prototype.render=function(){var e=p.get(this)._currentElement.type,t=e(this.props,this.context,this.updater);return o(e,t),t};var b=1,w={construct:function(e){this._currentElement=e,this._rootNodeID=0,this._compositeType=null,this._instance=null,this._hostParent=null,this._hostContainerInfo=null,this._updateBatchNumber=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedNodeType=null,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null,this._calledComponentWillUnmount=!1},mountComponent:function(e,t,n,u){this._context=u,this._mountOrder=b++,this._hostParent=t,this._hostContainerInfo=n;var l,f=this._currentElement.props,d=this._processContext(u),h=this._currentElement.type,m=e.getUpdateQueue(),g=i(h),y=this._constructComponent(g,f,d,m);g||null!=y&&null!=y.render?a(h)?this._compositeType=_.PureClass:this._compositeType=_.ImpureClass:(l=y,o(h,l),null===y||y===!1||c.isValidElement(y)?void 0:s("105",h.displayName||h.name||"Component"),y=new r(h),this._compositeType=_.StatelessFunctional);y.props=f,y.context=d,y.refs=v,y.updater=m,this._instance=y,p.set(y,this);var w=y.state;void 0===w&&(y.state=w=null),"object"!=typeof w||Array.isArray(w)?s("106",this.getName()||"ReactCompositeComponent"):void 0,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var E;return E=y.unstable_handleError?this.performInitialMountWithErrorHandling(l,t,n,e,u):this.performInitialMount(l,t,n,e,u),y.componentDidMount&&e.getReactMountReady().enqueue(y.componentDidMount,y),E},_constructComponent:function(e,t,n,r){return this._constructComponentWithoutOwner(e,t,n,r)},_constructComponentWithoutOwner:function(e,t,n,r){var o=this._currentElement.type;return e?new o(t,n,r):o(t,n,r)},performInitialMountWithErrorHandling:function(e,t,n,r,o){var i,a=r.checkpoint();try{i=this.performInitialMount(e,t,n,r,o)}catch(s){r.rollback(a),this._instance.unstable_handleError(s),this._pendingStateQueue&&(this._instance.state=this._processPendingState(this._instance.props,this._instance.context)),a=r.checkpoint(),this._renderedComponent.unmountComponent(!0),r.rollback(a),i=this.performInitialMount(e,t,n,r,o)}return i},performInitialMount:function(e,t,n,r,o){var i=this._instance,a=0;i.componentWillMount&&(i.componentWillMount(),this._pendingStateQueue&&(i.state=this._processPendingState(i.props,i.context))),void 0===e&&(e=this._renderValidatedComponent());var s=h.getType(e);this._renderedNodeType=s;var u=this._instantiateReactComponent(e,s!==h.EMPTY);this._renderedComponent=u;var c=m.mountComponent(u,r,t,n,this._processChildContext(o),a);return c},getHostNode:function(){return m.getHostNode(this._renderedComponent)},unmountComponent:function(e){if(this._renderedComponent){var t=this._instance;if(t.componentWillUnmount&&!t._calledComponentWillUnmount)if(t._calledComponentWillUnmount=!0,e){var n=this.getName()+".componentWillUnmount()";d.invokeGuardedCallback(n,t.componentWillUnmount.bind(t))}else t.componentWillUnmount();this._renderedComponent&&(m.unmountComponent(this._renderedComponent,e),this._renderedNodeType=null,this._renderedComponent=null,this._instance=null),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=0,this._topLevelWrapper=null,p.remove(t)}},_maskContext:function(e){var t=this._currentElement.type,n=t.contextTypes;if(!n)return v;var r={};for(var o in n)r[o]=e[o];return r},_processContext:function(e){var t=this._maskContext(e);return t},_processChildContext:function(e){var t,n=this._currentElement.type,r=this._instance;if(r.getChildContext&&(t=r.getChildContext()),t){"object"!=typeof n.childContextTypes?s("107",this.getName()||"ReactCompositeComponent"):void 0;for(var o in t)o in n.childContextTypes?void 0:s("108",this.getName()||"ReactCompositeComponent",o);return u({},e,t)}return e},_checkContextTypes:function(e,t,n){},receiveComponent:function(e,t,n){var r=this._currentElement,o=this._context;this._pendingElement=null,this.updateComponent(t,r,e,o,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement?m.receiveComponent(this,this._pendingElement,e,this._context):null!==this._pendingStateQueue||this._pendingForceUpdate?this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context):this._updateBatchNumber=null},updateComponent:function(e,t,n,r,o){var i=this._instance;null==i?s("136",this.getName()||"ReactCompositeComponent"):void 0;var a,u=!1;this._context===o?a=i.context:(a=this._processContext(o),u=!0);var c=t.props,l=n.props;t!==n&&(u=!0),u&&i.componentWillReceiveProps&&i.componentWillReceiveProps(l,a);var f=this._processPendingState(l,a),d=!0;this._pendingForceUpdate||(i.shouldComponentUpdate?d=i.shouldComponentUpdate(l,f,a):this._compositeType===_.PureClass&&(d=!g(c,l)||!g(i.state,f))),this._updateBatchNumber=null,d?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,l,f,a,e,o)):(this._currentElement=n,this._context=o,i.props=l,i.state=f,i.context=a)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,o=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(o&&1===r.length)return r[0];for(var i=u({},o?r[0]:n.state),a=o?1:0;a<r.length;a++){var s=r[a];u(i,"function"==typeof s?s.call(n,i,e,t):s)}return i},_performComponentUpdate:function(e,t,n,r,o,i){var a,s,u,c=this._instance,l=Boolean(c.componentDidUpdate);l&&(a=c.props,s=c.state,u=c.context),c.componentWillUpdate&&c.componentWillUpdate(t,n,r),this._currentElement=e,this._context=i,c.props=t,c.state=n,c.context=r,this._updateRenderedComponent(o,i),l&&o.getReactMountReady().enqueue(c.componentDidUpdate.bind(c,a,s,u),c)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,r=n._currentElement,o=this._renderValidatedComponent(),i=0;if(y(r,o))m.receiveComponent(n,o,e,this._processChildContext(t));else{var a=m.getHostNode(n);m.unmountComponent(n,!1);var s=h.getType(o);this._renderedNodeType=s;var u=this._instantiateReactComponent(o,s!==h.EMPTY);this._renderedComponent=u;var c=m.mountComponent(u,e,this._hostParent,this._hostContainerInfo,this._processChildContext(t),i);this._replaceNodeWithMarkup(a,c,n)}},_replaceNodeWithMarkup:function(e,t,n){l.replaceNodeWithMarkup(e,t,n)},_renderValidatedComponentWithoutOwnerOrContext:function(){var e,t=this._instance;return e=t.render()},_renderValidatedComponent:function(){var e;if(this._compositeType!==_.StatelessFunctional){f.current=this;try{e=this._renderValidatedComponentWithoutOwnerOrContext()}finally{f.current=null}}else e=this._renderValidatedComponentWithoutOwnerOrContext();return null===e||e===!1||c.isValidElement(e)?void 0:s("109",this.getName()||"ReactCompositeComponent"),e},attachRef:function(e,t){var n=this.getPublicInstance();null==n?s("110"):void 0;var r=t.getPublicInstance(),o=n.refs===v?n.refs={}:n.refs;o[e]=r},detachRef:function(e){var t=this.getPublicInstance().refs;delete t[e]},getName:function(){var e=this._currentElement.type,t=this._instance&&this._instance.constructor;return e.displayName||t&&t.displayName||e.name||t&&t.name||null},getPublicInstance:function(){var e=this._instance;return this._compositeType===_.StatelessFunctional?null:e},_instantiateReactComponent:null};e.exports=w},function(e,t,n){"use strict";var r=n(4),o=n(127),i=n(65),a=n(14),s=n(8),u=n(140),c=n(156),l=n(70),f=n(164);n(1);o.inject();var d={findDOMNode:c,render:i.render,unmountComponentAtNode:i.unmountComponentAtNode,version:u,unstable_batchedUpdates:s.batchedUpdates,unstable_renderSubtreeIntoContainer:f};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:r.getClosestInstanceFromNode,getNodeFromInstance:function(e){return e._renderedComponent&&(e=l(e)),e?r.getNodeFromInstance(e):null}},Mount:i,Reconciler:a});e.exports=d},function(e,t,n){"use strict";function r(e){if(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function o(e,t){t&&(Y[e._tag]&&(null!=t.children||null!=t.dangerouslySetInnerHTML?m("137",e._tag,e._currentElement._owner?" Check the render method of "+e._currentElement._owner.getName()+".":""):void 0),null!=t.dangerouslySetInnerHTML&&(null!=t.children?m("60"):void 0,"object"==typeof t.dangerouslySetInnerHTML&&W in t.dangerouslySetInnerHTML?void 0:m("61")),null!=t.style&&"object"!=typeof t.style?m("62",r(e)):void 0)}function i(e,t,n,r){if(!(r instanceof O)){var o=e._hostContainerInfo,i=o._node&&o._node.nodeType===z,s=i?o._node:o._ownerDocument;D(t,s),r.getReactMountReady().enqueue(a,{inst:e,registrationName:t,listener:n})}}function a(){var e=this;x.putListener(e.inst,e.registrationName,e.listener)}function s(){var e=this;T.postMountWrapper(e)}function u(){var e=this;R.postMountWrapper(e)}function c(){var e=this;A.postMountWrapper(e)}function l(){var e=this;e._rootNodeID?void 0:m("63");var t=N(e);switch(t?void 0:m("64"),e._tag){case"iframe":case"object":e._wrapperState.listeners=[C.trapBubbledEvent("topLoad","load",t)];break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in V)V.hasOwnProperty(n)&&e._wrapperState.listeners.push(C.trapBubbledEvent(n,V[n],t));break;case"source":e._wrapperState.listeners=[C.trapBubbledEvent("topError","error",t)];break;case"img":e._wrapperState.listeners=[C.trapBubbledEvent("topError","error",t),C.trapBubbledEvent("topLoad","load",t)];break;case"form":e._wrapperState.listeners=[C.trapBubbledEvent("topReset","reset",t),C.trapBubbledEvent("topSubmit","submit",t)];
  break;case"input":case"select":case"textarea":e._wrapperState.listeners=[C.trapBubbledEvent("topInvalid","invalid",t)]}}function f(){P.postUpdateWrapper(this)}function d(e){Q.call(X,e)||(G.test(e)?void 0:m("65",e),X[e]=!0)}function p(e,t){return e.indexOf("-")>=0||null!=t.is}function h(e){var t=e.type;d(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var m=n(2),v=n(3),g=n(102),y=n(104),_=n(12),b=n(33),w=n(13),E=n(58),x=n(19),k=n(34),C=n(24),S=n(59),I=n(4),T=n(120),A=n(121),P=n(60),R=n(124),L=(n(7),n(133)),O=n(138),M=(n(6),n(27)),B=(n(0),n(45),n(30),n(47),n(1),S),U=x.deleteListener,N=I.getNodeFromInstance,D=C.listenTo,j=k.registrationNameModules,F={string:!0,number:!0},H="style",W="__html",q={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},z=11,V={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},K={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},$={listing:!0,pre:!0,textarea:!0},Y=v({menuitem:!0},K),G=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,X={},Q={}.hasOwnProperty,Z=1;h.displayName="ReactDOMComponent",h.Mixin={mountComponent:function(e,t,n,r){this._rootNodeID=Z++,this._domID=n._idCounter++,this._hostParent=t,this._hostContainerInfo=n;var i=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(l,this);break;case"input":T.mountWrapper(this,i,t),i=T.getHostProps(this,i),e.getReactMountReady().enqueue(l,this);break;case"option":A.mountWrapper(this,i,t),i=A.getHostProps(this,i);break;case"select":P.mountWrapper(this,i,t),i=P.getHostProps(this,i),e.getReactMountReady().enqueue(l,this);break;case"textarea":R.mountWrapper(this,i,t),i=R.getHostProps(this,i),e.getReactMountReady().enqueue(l,this)}o(this,i);var a,f;null!=t?(a=t._namespaceURI,f=t._tag):n._tag&&(a=n._namespaceURI,f=n._tag),(null==a||a===b.svg&&"foreignobject"===f)&&(a=b.html),a===b.html&&("svg"===this._tag?a=b.svg:"math"===this._tag&&(a=b.mathml)),this._namespaceURI=a;var d;if(e.useCreateElement){var p,h=n._ownerDocument;if(a===b.html)if("script"===this._tag){var m=h.createElement("div"),v=this._currentElement.type;m.innerHTML="<"+v+"></"+v+">",p=m.removeChild(m.firstChild)}else p=i.is?h.createElement(this._currentElement.type,i.is):h.createElement(this._currentElement.type);else p=h.createElementNS(a,this._currentElement.type);I.precacheNode(this,p),this._flags|=B.hasCachedChildNodes,this._hostParent||E.setAttributeForRoot(p),this._updateDOMProperties(null,i,e);var y=_(p);this._createInitialChildren(e,i,r,y),d=y}else{var w=this._createOpenTagMarkupAndPutListeners(e,i),x=this._createContentMarkup(e,i,r);d=!x&&K[this._tag]?w+"/>":w+">"+x+"</"+this._currentElement.type+">"}switch(this._tag){case"input":e.getReactMountReady().enqueue(s,this),i.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"textarea":e.getReactMountReady().enqueue(u,this),i.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"select":i.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"button":i.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(c,this)}return d},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];if(null!=o)if(j.hasOwnProperty(r))o&&i(this,r,o,e);else{r===H&&(o&&(o=this._previousStyleCopy=v({},t.style)),o=y.createMarkupForStyles(o,this));var a=null;null!=this._tag&&p(this._tag,t)?q.hasOwnProperty(r)||(a=E.createMarkupForCustomAttribute(r,o)):a=E.createMarkupForProperty(r,o),a&&(n+=" "+a)}}return e.renderToStaticMarkup?n:(this._hostParent||(n+=" "+E.createMarkupForRoot()),n+=" "+E.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var i=F[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)r=M(i);else if(null!=a){var s=this.mountChildren(a,e,n);r=s.join("")}}return $[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&_.queueHTML(r,o.__html);else{var i=F[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)""!==i&&_.queueText(r,i);else if(null!=a)for(var s=this.mountChildren(a,e,n),u=0;u<s.length;u++)_.queueChild(r,s[u])}},receiveComponent:function(e,t,n){var r=this._currentElement;this._currentElement=e,this.updateComponent(t,r,e,n)},updateComponent:function(e,t,n,r){var i=t.props,a=this._currentElement.props;switch(this._tag){case"input":i=T.getHostProps(this,i),a=T.getHostProps(this,a);break;case"option":i=A.getHostProps(this,i),a=A.getHostProps(this,a);break;case"select":i=P.getHostProps(this,i),a=P.getHostProps(this,a);break;case"textarea":i=R.getHostProps(this,i),a=R.getHostProps(this,a)}switch(o(this,a),this._updateDOMProperties(i,a,e),this._updateDOMChildren(i,a,e,r),this._tag){case"input":T.updateWrapper(this);break;case"textarea":R.updateWrapper(this);break;case"select":e.getReactMountReady().enqueue(f,this)}},_updateDOMProperties:function(e,t,n){var r,o,a;for(r in e)if(!t.hasOwnProperty(r)&&e.hasOwnProperty(r)&&null!=e[r])if(r===H){var s=this._previousStyleCopy;for(o in s)s.hasOwnProperty(o)&&(a=a||{},a[o]="");this._previousStyleCopy=null}else j.hasOwnProperty(r)?e[r]&&U(this,r):p(this._tag,e)?q.hasOwnProperty(r)||E.deleteValueForAttribute(N(this),r):(w.properties[r]||w.isCustomAttribute(r))&&E.deleteValueForProperty(N(this),r);for(r in t){var u=t[r],c=r===H?this._previousStyleCopy:null!=e?e[r]:void 0;if(t.hasOwnProperty(r)&&u!==c&&(null!=u||null!=c))if(r===H)if(u?u=this._previousStyleCopy=v({},u):this._previousStyleCopy=null,c){for(o in c)!c.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(a=a||{},a[o]="");for(o in u)u.hasOwnProperty(o)&&c[o]!==u[o]&&(a=a||{},a[o]=u[o])}else a=u;else if(j.hasOwnProperty(r))u?i(this,r,u,n):c&&U(this,r);else if(p(this._tag,t))q.hasOwnProperty(r)||E.setValueForAttribute(N(this),r,u);else if(w.properties[r]||w.isCustomAttribute(r)){var l=N(this);null!=u?E.setValueForProperty(l,r,u):E.deleteValueForProperty(l,r)}}a&&y.setValueForStyles(N(this),a,this)},_updateDOMChildren:function(e,t,n,r){var o=F[typeof e.children]?e.children:null,i=F[typeof t.children]?t.children:null,a=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,s=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,u=null!=o?null:e.children,c=null!=i?null:t.children,l=null!=o||null!=a,f=null!=i||null!=s;null!=u&&null==c?this.updateChildren(null,n,r):l&&!f&&this.updateTextContent(""),null!=i?o!==i&&this.updateTextContent(""+i):null!=s?a!==s&&this.updateMarkup(""+s):null!=c&&this.updateChildren(c,n,r)},getHostNode:function(){return N(this)},unmountComponent:function(e){switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":var t=this._wrapperState.listeners;if(t)for(var n=0;n<t.length;n++)t[n].remove();break;case"html":case"head":case"body":m("66",this._tag)}this.unmountChildren(e),I.uncacheNode(this),x.deleteAllListeners(this),this._rootNodeID=0,this._domID=0,this._wrapperState=null},getPublicInstance:function(){return N(this)}},v(h.prototype,h.Mixin,L.Mixin),e.exports=h},function(e,t,n){"use strict";function r(e,t){var n={_topLevelWrapper:e,_idCounter:1,_ownerDocument:t?t.nodeType===o?t:t.ownerDocument:null,_node:t,_tag:t?t.nodeName.toLowerCase():null,_namespaceURI:t?t.namespaceURI:null};return n}var o=(n(47),9);e.exports=r},function(e,t,n){"use strict";var r=n(3),o=n(12),i=n(4),a=function(e){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};r(a.prototype,{mountComponent:function(e,t,n,r){var a=n._idCounter++;this._domID=a,this._hostParent=t,this._hostContainerInfo=n;var s=" react-empty: "+this._domID+" ";if(e.useCreateElement){var u=n._ownerDocument,c=u.createComment(s);return i.precacheNode(this,c),o(c)}return e.renderToStaticMarkup?"":"<!--"+s+"-->"},receiveComponent:function(){},getHostNode:function(){return i.getNodeFromInstance(this)},unmountComponent:function(){i.uncacheNode(this)}}),e.exports=a},function(e,t,n){"use strict";var r={useCreateElement:!0,useFiber:!1};e.exports=r},function(e,t,n){"use strict";var r=n(32),o=n(4),i={dangerouslyProcessChildrenUpdates:function(e,t){var n=o.getNodeFromInstance(e);r.processUpdates(n,t)}};e.exports=i},function(e,t,n){"use strict";function r(){this._rootNodeID&&f.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=u.executeOnChange(t,e);l.asap(r,this);var o=t.name;if("radio"===t.type&&null!=o){for(var a=c.getNodeFromInstance(this),s=a;s.parentNode;)s=s.parentNode;for(var f=s.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),d=0;d<f.length;d++){var p=f[d];if(p!==a&&p.form===a.form){var h=c.getInstanceFromNode(p);h?void 0:i("90"),l.asap(r,h)}}}return n}var i=n(2),a=n(3),s=n(58),u=n(37),c=n(4),l=n(8),f=(n(0),n(1),{getHostProps:function(e,t){var n=u.getValue(t),r=u.getChecked(t),o=a({type:void 0,step:void 0,min:void 0,max:void 0},t,{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:e._wrapperState.initialValue,checked:null!=r?r:e._wrapperState.initialChecked,onChange:e._wrapperState.onChange});return o},mountWrapper:function(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:null!=t.checked?t.checked:t.defaultChecked,initialValue:null!=t.value?t.value:n,listeners:null,onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=t.checked;null!=n&&s.setValueForProperty(c.getNodeFromInstance(e),"checked",n||!1);var r=c.getNodeFromInstance(e),o=u.getValue(t);if(null!=o){var i=""+o;i!==r.value&&(r.value=i)}else null==t.value&&null!=t.defaultValue&&r.defaultValue!==""+t.defaultValue&&(r.defaultValue=""+t.defaultValue),null==t.checked&&null!=t.defaultChecked&&(r.defaultChecked=!!t.defaultChecked)},postMountWrapper:function(e){var t=e._currentElement.props,n=c.getNodeFromInstance(e);switch(t.type){case"submit":case"reset":break;case"color":case"date":case"datetime":case"datetime-local":case"month":case"time":case"week":n.value="",n.value=n.defaultValue;break;default:n.value=n.value}var r=n.name;""!==r&&(n.name=""),n.defaultChecked=!n.defaultChecked,n.defaultChecked=!n.defaultChecked,""!==r&&(n.name=r)}});e.exports=f},function(e,t,n){"use strict";function r(e){var t="";return i.Children.forEach(e,function(e){null!=e&&("string"==typeof e||"number"==typeof e?t+=e:u||(u=!0))}),t}var o=n(3),i=n(15),a=n(4),s=n(60),u=(n(1),!1),c={mountWrapper:function(e,t,n){var o=null;if(null!=n){var i=n;"optgroup"===i._tag&&(i=i._hostParent),null!=i&&"select"===i._tag&&(o=s.getSelectValueContext(i))}var a=null;if(null!=o){var u;if(u=null!=t.value?t.value+"":r(t.children),a=!1,Array.isArray(o)){for(var c=0;c<o.length;c++)if(""+o[c]===u){a=!0;break}}else a=""+o===u}e._wrapperState={selected:a}},postMountWrapper:function(e){var t=e._currentElement.props;if(null!=t.value){var n=a.getNodeFromInstance(e);n.setAttribute("value",t.value)}},getHostProps:function(e,t){var n=o({selected:void 0,children:void 0},t);null!=e._wrapperState.selected&&(n.selected=e._wrapperState.selected);var i=r(t.children);return i&&(n.children=i),n}};e.exports=c},function(e,t,n){"use strict";function r(e,t,n,r){return e===n&&t===r}function o(e){var t=document.selection,n=t.createRange(),r=n.text.length,o=n.duplicate();o.moveToElementText(e),o.setEndPoint("EndToStart",n);var i=o.text.length,a=i+r;return{start:i,end:a}}function i(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var n=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,s=t.getRangeAt(0);try{s.startContainer.nodeType,s.endContainer.nodeType}catch(e){return null}var u=r(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),c=u?0:s.toString().length,l=s.cloneRange();l.selectNodeContents(e),l.setEnd(s.startContainer,s.startOffset);var f=r(l.startContainer,l.startOffset,l.endContainer,l.endOffset),d=f?0:l.toString().length,p=d+c,h=document.createRange();h.setStart(n,o),h.setEnd(i,a);var m=h.collapsed;return{start:m?p:d,end:m?d:p}}function a(e,t){var n,r,o=document.selection.createRange().duplicate();void 0===t.end?(n=t.start,r=n):t.start>t.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function s(e,t){if(window.getSelection){var n=window.getSelection(),r=e[l()].length,o=Math.min(t.start,r),i=void 0===t.end?o:Math.min(t.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var s=c(e,o),u=c(e,i);if(s&&u){var f=document.createRange();f.setStart(s.node,s.offset),n.removeAllRanges(),o>i?(n.addRange(f),n.extend(u.node,u.offset)):(f.setEnd(u.node,u.offset),n.addRange(f))}}}var u=n(5),c=n(161),l=n(71),f=u.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:f?o:i,setOffsets:f?a:s};e.exports=d},function(e,t,n){"use strict";var r=n(2),o=n(3),i=n(32),a=n(12),s=n(4),u=n(27),c=(n(0),n(47),function(e){this._currentElement=e,this._stringText=""+e,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(c.prototype,{mountComponent:function(e,t,n,r){var o=n._idCounter++,i=" react-text: "+o+" ",c=" /react-text ";if(this._domID=o,this._hostParent=t,e.useCreateElement){var l=n._ownerDocument,f=l.createComment(i),d=l.createComment(c),p=a(l.createDocumentFragment());return a.queueChild(p,a(f)),this._stringText&&a.queueChild(p,a(l.createTextNode(this._stringText))),a.queueChild(p,a(d)),s.precacheNode(this,f),this._closingComment=d,p}var h=u(this._stringText);return e.renderToStaticMarkup?h:"<!--"+i+"-->"+h+"<!--"+c+"-->"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getHostNode();i.replaceDelimitedText(r[0],r[1],n)}}},getHostNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=s.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n?r("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return e=[this._hostNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,s.uncacheNode(this)}}),e.exports=c},function(e,t,n){"use strict";function r(){this._rootNodeID&&l.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=s.executeOnChange(t,e);return c.asap(r,this),n}var i=n(2),a=n(3),s=n(37),u=n(4),c=n(8),l=(n(0),n(1),{getHostProps:function(e,t){null!=t.dangerouslySetInnerHTML?i("91"):void 0;var n=a({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return n},mountWrapper:function(e,t){var n=s.getValue(t),r=n;if(null==n){var a=t.defaultValue,u=t.children;null!=u&&(null!=a?i("92"):void 0,Array.isArray(u)&&(u.length<=1?void 0:i("93"),u=u[0]),a=""+u),null==a&&(a=""),r=a}e._wrapperState={initialValue:""+r,listeners:null,onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=u.getNodeFromInstance(e),r=s.getValue(t);if(null!=r){var o=""+r;o!==n.value&&(n.value=o),null==t.defaultValue&&(n.defaultValue=o)}null!=t.defaultValue&&(n.defaultValue=t.defaultValue)},postMountWrapper:function(e){var t=u.getNodeFromInstance(e),n=t.textContent;n===e._wrapperState.initialValue&&(t.value=n)}});e.exports=l},function(e,t,n){"use strict";function r(e,t){"_hostNode"in e?void 0:u("33"),"_hostNode"in t?void 0:u("33");for(var n=0,r=e;r;r=r._hostParent)n++;for(var o=0,i=t;i;i=i._hostParent)o++;for(;n-o>0;)e=e._hostParent,n--;for(;o-n>0;)t=t._hostParent,o--;for(var a=n;a--;){if(e===t)return e;e=e._hostParent,t=t._hostParent}return null}function o(e,t){"_hostNode"in e?void 0:u("35"),"_hostNode"in t?void 0:u("35");for(;t;){if(t===e)return!0;t=t._hostParent}return!1}function i(e){return"_hostNode"in e?void 0:u("36"),e._hostParent}function a(e,t,n){for(var r=[];e;)r.push(e),e=e._hostParent;var o;for(o=r.length;o-- >0;)t(r[o],"captured",n);for(o=0;o<r.length;o++)t(r[o],"bubbled",n)}function s(e,t,n,o,i){for(var a=e&&t?r(e,t):null,s=[];e&&e!==a;)s.push(e),e=e._hostParent;for(var u=[];t&&t!==a;)u.push(t),t=t._hostParent;var c;for(c=0;c<s.length;c++)n(s[c],"bubbled",o);for(c=u.length;c-- >0;)n(u[c],"captured",i)}var u=n(2);n(0);e.exports={isAncestor:o,getLowestCommonAncestor:r,getParentInstance:i,traverseTwoPhase:a,traverseEnterLeave:s}},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=n(3),i=n(8),a=n(26),s=n(6),u={initialize:s,close:function(){d.isBatchingUpdates=!1}},c={initialize:s,close:i.flushBatchedUpdates.bind(i)},l=[c,u];o(r.prototype,a,{getTransactionWrappers:function(){return l}});var f=new r,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,i){var a=d.isBatchingUpdates;return d.isBatchingUpdates=!0,a?e(t,n,r,o,i):f.perform(e,null,t,n,r,o,i)}};e.exports=d},function(e,t,n){"use strict";function r(){x||(x=!0,y.EventEmitter.injectReactEventListener(g),y.EventPluginHub.injectEventPluginOrder(s),y.EventPluginUtils.injectComponentTree(d),y.EventPluginUtils.injectTreeTraversal(h),y.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:E,EnterLeaveEventPlugin:u,ChangeEventPlugin:a,SelectEventPlugin:w,BeforeInputEventPlugin:i}),y.HostComponent.injectGenericComponentClass(f),y.HostComponent.injectTextComponentClass(m),y.DOMProperty.injectDOMPropertyConfig(o),y.DOMProperty.injectDOMPropertyConfig(c),y.DOMProperty.injectDOMPropertyConfig(b),y.EmptyComponent.injectEmptyComponentFactory(function(e){return new p(e)}),y.Updates.injectReconcileTransaction(_),y.Updates.injectBatchingStrategy(v),y.Component.injectEnvironment(l))}var o=n(101),i=n(103),a=n(105),s=n(107),u=n(108),c=n(110),l=n(112),f=n(115),d=n(4),p=n(117),h=n(125),m=n(123),v=n(126),g=n(130),y=n(131),_=n(136),b=n(141),w=n(142),E=n(143),x=!1;e.exports={inject:r}},function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=r},function(e,t,n){"use strict";function r(e){o.enqueueEvents(e),o.processEventQueue(!1)}var o=n(19),i={handleTopLevel:function(e,t,n,i){var a=o.extractEvents(e,t,n,i);r(a)}};e.exports=i},function(e,t,n){"use strict";function r(e){for(;e._hostParent;)e=e._hostParent;var t=f.getNodeFromInstance(e),n=t.parentNode;return f.getClosestInstanceFromNode(n)}function o(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function i(e){var t=p(e.nativeEvent),n=f.getClosestInstanceFromNode(t),o=n;do e.ancestors.push(o),o=o&&r(o);while(o);for(var i=0;i<e.ancestors.length;i++)n=e.ancestors[i],m._handleTopLevel(e.topLevelType,n,e.nativeEvent,p(e.nativeEvent))}function a(e){var t=h(window);e(t)}var s=n(3),u=n(52),c=n(5),l=n(11),f=n(4),d=n(8),p=n(44),h=n(95);s(o.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),l.addPoolingTo(o,l.twoArgumentPooler);var m={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:c.canUseDOM?window:null,setHandleTopLevel:function(e){m._handleTopLevel=e},setEnabled:function(e){m._enabled=!!e},isEnabled:function(){return m._enabled},trapBubbledEvent:function(e,t,n){return n?u.listen(n,t,m.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){return n?u.capture(n,t,m.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=a.bind(null,e);u.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(m._enabled){var n=o.getPooled(e,t);try{d.batchedUpdates(i,n)}finally{o.release(n)}}}};e.exports=m},function(e,t,n){"use strict";var r=n(13),o=n(19),i=n(35),a=n(38),s=n(61),u=n(24),c=n(63),l=n(8),f={Component:a.injection,DOMProperty:r.injection,EmptyComponent:s.injection,EventPluginHub:o.injection,EventPluginUtils:i.injection,EventEmitter:u.injection,HostComponent:c.injection,Updates:l.injection};e.exports=f},function(e,t,n){"use strict";var r=n(154),o=/\/?>/,i=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return i.test(e)?e:e.replace(o," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=r(e);return o===n}};e.exports=a},function(e,t,n){"use strict";function r(e,t,n){return{type:"INSERT_MARKUP",content:e,fromIndex:null,fromNode:null,toIndex:n,afterNode:t}}function o(e,t,n){return{type:"MOVE_EXISTING",content:null,fromIndex:e._mountIndex,fromNode:d.getHostNode(e),toIndex:n,afterNode:t}}function i(e,t){return{type:"REMOVE_NODE",content:null,fromIndex:e._mountIndex,fromNode:t,toIndex:null,afterNode:null}}function a(e){return{type:"SET_MARKUP",content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function s(e){return{type:"TEXT_CONTENT",content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function u(e,t){return t&&(e=e||[],e.push(t)),e}function c(e,t){f.processChildrenUpdates(e,t)}var l=n(2),f=n(38),d=(n(21),n(7),n(10),n(14)),p=n(111),h=(n(6),n(157)),m=(n(0),{Mixin:{_reconcilerInstantiateChildren:function(e,t,n){return p.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,r,o,i){var a,s=0;return a=h(t,s),p.updateChildren(e,a,n,r,o,this,this._hostContainerInfo,i,s),a},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var o=[],i=0;for(var a in r)if(r.hasOwnProperty(a)){var s=r[a],u=0,c=d.mountComponent(s,t,this,this._hostContainerInfo,n,u);s._mountIndex=i++,o.push(c)}return o},updateTextContent:function(e){var t=this._renderedChildren;p.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&l("118");var r=[s(e)];c(this,r)},updateMarkup:function(e){var t=this._renderedChildren;p.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&l("118");var r=[a(e)];c(this,r)},updateChildren:function(e,t,n){this._updateChildren(e,t,n)},_updateChildren:function(e,t,n){var r=this._renderedChildren,o={},i=[],a=this._reconcilerUpdateChildren(r,e,i,o,t,n);if(a||r){var s,l=null,f=0,p=0,h=0,m=null;for(s in a)if(a.hasOwnProperty(s)){var v=r&&r[s],g=a[s];v===g?(l=u(l,this.moveChild(v,m,f,p)),p=Math.max(v._mountIndex,p),v._mountIndex=f):(v&&(p=Math.max(v._mountIndex,p)),l=u(l,this._mountChildAtIndex(g,i[h],m,f,t,n)),h++),f++,m=d.getHostNode(g)}for(s in o)o.hasOwnProperty(s)&&(l=u(l,this._unmountChild(r[s],o[s])));l&&c(this,l),this._renderedChildren=a}},unmountChildren:function(e){var t=this._renderedChildren;p.unmountChildren(t,e),this._renderedChildren=null},moveChild:function(e,t,n,r){if(e._mountIndex<r)return o(e,t,n)},createChild:function(e,t,n){return r(n,t,e._mountIndex)},removeChild:function(e,t){return i(e,t)},_mountChildAtIndex:function(e,t,n,r,o,i){return e._mountIndex=r,this.createChild(e,n,t)},_unmountChild:function(e,t){var n=this.removeChild(e,t);return e._mountIndex=null,n}}});e.exports=m},function(e,t,n){"use strict";function r(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)}var o=n(2),i=(n(0),{addComponentAsRefTo:function(e,t,n){r(n)?void 0:o("119"),n.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,n){r(n)?void 0:o("120");var i=n.getPublicInstance();i&&i.refs[t]===e.getPublicInstance()&&n.detachRef(t)}});e.exports=i},function(e,t,n){"use strict";var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=r},function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=i.getPooled(null),this.useCreateElement=e}var o=n(3),i=n(57),a=n(11),s=n(24),u=n(64),c=(n(7),n(26)),l=n(40),f={initialize:u.getSelectionInformation,close:u.restoreSelection},d={initialize:function(){var e=s.isEnabled();return s.setEnabled(!1),e},close:function(e){s.setEnabled(e)}},p={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},h=[f,d,p],m={getTransactionWrappers:function(){return h},getReactMountReady:function(){return this.reactMountReady},getUpdateQueue:function(){return l},checkpoint:function(){return this.reactMountReady.checkpoint()},rollback:function(e){this.reactMountReady.rollback(e)},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null}};o(r.prototype,c,m),a.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):i.addComponentAsRefTo(t,e,n)}function o(e,t,n){"function"==typeof e?e(null):i.removeComponentAsRefFrom(t,e,n)}var i=n(134),a={};a.attachRefs=function(e,t){if(null!==t&&"object"==typeof t){var n=t.ref;null!=n&&r(n,e,t._owner)}},a.shouldUpdateRefs=function(e,t){var n=null,r=null;null!==e&&"object"==typeof e&&(n=e.ref,r=e._owner);var o=null,i=null;return null!==t&&"object"==typeof t&&(o=t.ref,i=t._owner),n!==o||"string"==typeof o&&i!==r},a.detachRefs=function(e,t){if(null!==t&&"object"==typeof t){var n=t.ref;null!=n&&o(n,e,t._owner)}},e.exports=a},function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.useCreateElement=!1,this.updateQueue=new s(this)}var o=n(3),i=n(11),a=n(26),s=(n(7),n(139)),u=[],c={enqueue:function(){}},l={getTransactionWrappers:function(){return u},getReactMountReady:function(){return c},getUpdateQueue:function(){return this.updateQueue},destructor:function(){},checkpoint:function(){},rollback:function(){}};o(r.prototype,a,l),i.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){}var i=n(40),a=(n(1),function(){function e(t){r(this,e),this.transaction=t}return e.prototype.isMounted=function(e){return!1},e.prototype.enqueueCallback=function(e,t,n){this.transaction.isInTransaction()&&i.enqueueCallback(e,t,n)},e.prototype.enqueueForceUpdate=function(e){this.transaction.isInTransaction()?i.enqueueForceUpdate(e):o(e,"forceUpdate")},e.prototype.enqueueReplaceState=function(e,t){this.transaction.isInTransaction()?i.enqueueReplaceState(e,t):o(e,"replaceState")},e.prototype.enqueueSetState=function(e,t){this.transaction.isInTransaction()?i.enqueueSetState(e,t):o(e,"setState")},e}());e.exports=a},function(e,t,n){"use strict";e.exports="15.4.2"},function(e,t,n){"use strict";var r={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},o={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",
  xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},i={Properties:{},DOMAttributeNamespaces:{xlinkActuate:r.xlink,xlinkArcrole:r.xlink,xlinkHref:r.xlink,xlinkRole:r.xlink,xlinkShow:r.xlink,xlinkTitle:r.xlink,xlinkType:r.xlink,xmlBase:r.xml,xmlLang:r.xml,xmlSpace:r.xml},DOMAttributeNames:{}};Object.keys(o).forEach(function(e){i.Properties[e]=0,o[e]&&(i.DOMAttributeNames[e]=o[e])}),e.exports=i},function(e,t,n){"use strict";function r(e){if("selectionStart"in e&&u.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function o(e,t){if(y||null==m||m!==l())return null;var n=r(m);if(!g||!d(g,n)){g=n;var o=c.getPooled(h.select,v,e,t);return o.type="select",o.target=m,i.accumulateTwoPhaseDispatches(o),o}return null}var i=n(20),a=n(5),s=n(4),u=n(64),c=n(9),l=n(54),f=n(73),d=n(30),p=a.canUseDOM&&"documentMode"in document&&document.documentMode<=11,h={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},m=null,v=null,g=null,y=!1,_=!1,b={eventTypes:h,extractEvents:function(e,t,n,r){if(!_)return null;var i=t?s.getNodeFromInstance(t):window;switch(e){case"topFocus":(f(i)||"true"===i.contentEditable)&&(m=i,v=t,g=null);break;case"topBlur":m=null,v=null,g=null;break;case"topMouseDown":y=!0;break;case"topContextMenu":case"topMouseUp":return y=!1,o(n,r);case"topSelectionChange":if(p)break;case"topKeyDown":case"topKeyUp":return o(n,r)}return null},didPutListener:function(e,t,n){"onSelect"===t&&(_=!0)}};e.exports=b},function(e,t,n){"use strict";function r(e){return"."+e._rootNodeID}function o(e){return"button"===e||"input"===e||"select"===e||"textarea"===e}var i=n(2),a=n(52),s=n(20),u=n(4),c=n(144),l=n(145),f=n(9),d=n(148),p=n(150),h=n(25),m=n(147),v=n(151),g=n(152),y=n(22),_=n(153),b=n(6),w=n(42),E=(n(0),{}),x={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(e){var t=e[0].toUpperCase()+e.slice(1),n="on"+t,r="top"+t,o={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[r]};E[e]=o,x[r]=o});var k={},C={eventTypes:E,extractEvents:function(e,t,n,r){var o=x[e];if(!o)return null;var a;switch(e){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":a=f;break;case"topKeyPress":if(0===w(n))return null;case"topKeyDown":case"topKeyUp":a=p;break;case"topBlur":case"topFocus":a=d;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":a=h;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":a=m;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":a=v;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":a=c;break;case"topTransitionEnd":a=g;break;case"topScroll":a=y;break;case"topWheel":a=_;break;case"topCopy":case"topCut":case"topPaste":a=l}a?void 0:i("86",e);var u=a.getPooled(o,t,n,r);return s.accumulateTwoPhaseDispatches(u),u},didPutListener:function(e,t,n){if("onClick"===t&&!o(e._tag)){var i=r(e),s=u.getNodeFromInstance(e);k[i]||(k[i]=a.listen(s,"click",b))}},willDeleteListener:function(e,t){if("onClick"===t&&!o(e._tag)){var n=r(e);k[n].remove(),delete k[n]}}};e.exports=C},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(9),i={animationName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(9),i={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(9),i={data:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(25),i={dataTransfer:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(22),i={relatedTarget:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(9),i={data:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(22),i=n(42),a=n(158),s=n(43),u={key:a,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:s,charCode:function(e){return"keypress"===e.type?i(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?i(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};o.augmentClass(r,u),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(22),i=n(43),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:i};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(9),i={propertyName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(25),i={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e){for(var t=1,n=0,r=0,i=e.length,a=i&-4;r<a;){for(var s=Math.min(r+4096,a);r<s;r+=4)n+=(t+=e.charCodeAt(r))+(t+=e.charCodeAt(r+1))+(t+=e.charCodeAt(r+2))+(t+=e.charCodeAt(r+3));t%=o,n%=o}for(;r<i;r++)n+=t+=e.charCodeAt(r);return t%=o,n%=o,t|n<<16}var o=65521;e.exports=r},function(e,t,n){"use strict";function r(e,t,n){var r=null==t||"boolean"==typeof t||""===t;if(r)return"";var o=isNaN(t);if(o||0===t||i.hasOwnProperty(e)&&i[e])return""+t;if("string"==typeof t){t=t.trim()}return t+"px"}var o=n(56),i=(n(1),o.isUnitlessNumber);e.exports=r},function(e,t,n){"use strict";function r(e){if(null==e)return null;if(1===e.nodeType)return e;var t=a.get(e);return t?(t=s(t),t?i.getNodeFromInstance(t):null):void("function"==typeof e.render?o("44"):o("45",Object.keys(e)))}var o=n(2),i=(n(10),n(4)),a=n(21),s=n(70);n(0),n(1);e.exports=r},function(e,t,n){"use strict";(function(t){function r(e,t,n,r){if(e&&"object"==typeof e){var o=e,i=void 0===o[n];i&&null!=t&&(o[n]=t)}}function o(e,t){if(null==e)return e;var n={};return i(e,r,n),n}var i=(n(36),n(75));n(1);"undefined"!=typeof t&&t.env,1,e.exports=o}).call(t,n(31))},function(e,t,n){"use strict";function r(e){if(e.key){var t=i[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=o(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?a[e.keyCode]||"Unidentified":""}var o=n(42),i={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=r},function(e,t,n){"use strict";function r(e){var t=e&&(o&&e[o]||e[i]);if("function"==typeof t)return t}var o="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";e.exports=r},function(e,t,n){"use strict";function r(){return o++}var o=1;e.exports=r},function(e,t,n){"use strict";function r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function o(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function i(e,t){for(var n=r(e),i=0,a=0;n;){if(3===n.nodeType){if(a=i+n.textContent.length,i<=t&&a>=t)return{node:n,offset:t-i};i=a}n=r(o(n))}}e.exports=i},function(e,t,n){"use strict";function r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function o(e){if(s[e])return s[e];if(!a[e])return e;var t=a[e];for(var n in t)if(t.hasOwnProperty(n)&&n in u)return s[e]=t[n];return""}var i=n(5),a={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},s={},u={};i.canUseDOM&&(u=document.createElement("div").style,"AnimationEvent"in window||(delete a.animationend.animation,delete a.animationiteration.animation,delete a.animationstart.animation),"TransitionEvent"in window||delete a.transitionend.transition),e.exports=o},function(e,t,n){"use strict";function r(e){return'"'+o(e)+'"'}var o=n(27);e.exports=r},function(e,t,n){"use strict";var r=n(65);e.exports=r.renderSubtreeIntoContainer},function(e,t,n){"use strict";function r(e){var t=/[=:]/g,n={"=":"=0",":":"=2"},r=(""+e).replace(t,function(e){return n[e]});return"$"+r}function o(e){var t=/(=0|=2)/g,n={"=0":"=","=2":":"},r="."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1);return(""+r).replace(t,function(e){return n[e]})}var i={escape:r,unescape:o};e.exports=i},function(e,t,n){"use strict";var r=n(17),o=(n(0),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),i=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},a=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},s=function(e,t,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,e,t,n,r),i}return new o(e,t,n,r)},u=function(e){var t=this;e instanceof t?void 0:r("25"),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},c=10,l=o,f=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||l,n.poolSize||(n.poolSize=c),n.release=u,n},d={addPoolingTo:f,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:s};e.exports=d},function(e,t,n){"use strict";function r(e){return(""+e).replace(b,"$&/")}function o(e,t){this.func=e,this.context=t,this.count=0}function i(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function a(e,t,n){if(null==e)return e;var r=o.getPooled(t,n);g(e,i,r),o.release(r)}function s(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function u(e,t,n){var o=e.result,i=e.keyPrefix,a=e.func,s=e.context,u=a.call(s,t,e.count++);Array.isArray(u)?c(u,o,n,v.thatReturnsArgument):null!=u&&(m.isValidElement(u)&&(u=m.cloneAndReplaceKey(u,i+(!u.key||t&&t.key===u.key?"":r(u.key)+"/")+n)),o.push(u))}function c(e,t,n,o,i){var a="";null!=n&&(a=r(n)+"/");var c=s.getPooled(t,a,o,i);g(e,u,c),s.release(c)}function l(e,t,n){if(null==e)return e;var r=[];return c(e,r,null,t,n),r}function f(e,t,n){return null}function d(e,t){return g(e,f,null)}function p(e){var t=[];return c(e,t,null,v.thatReturnsArgument),t}var h=n(166),m=n(16),v=n(6),g=n(175),y=h.twoArgumentPooler,_=h.fourArgumentPooler,b=/\/+/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,y),s.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(s,_);var w={forEach:a,map:l,mapIntoWithKeyPrefixInternal:c,count:d,toArray:p};e.exports=w},function(e,t,n){"use strict";function r(e){return e}function o(e,t){var n=b.hasOwnProperty(t)?b[t]:null;E.hasOwnProperty(t)&&("OVERRIDE_BASE"!==n?d("73",t):void 0),e&&("DEFINE_MANY"!==n&&"DEFINE_MANY_MERGED"!==n?d("74",t):void 0)}function i(e,t){if(t){"function"==typeof t?d("75"):void 0,m.isValidElement(t)?d("76"):void 0;var n=e.prototype,r=n.__reactAutoBindPairs;t.hasOwnProperty(y)&&w.mixins(e,t.mixins);for(var i in t)if(t.hasOwnProperty(i)&&i!==y){var a=t[i],s=n.hasOwnProperty(i);if(o(s,i),w.hasOwnProperty(i))w[i](e,a);else{var l=b.hasOwnProperty(i),f="function"==typeof a,p=f&&!l&&!s&&t.autobind!==!1;if(p)r.push(i,a),n[i]=a;else if(s){var h=b[i];!l||"DEFINE_MANY_MERGED"!==h&&"DEFINE_MANY"!==h?d("77",h,i):void 0,"DEFINE_MANY_MERGED"===h?n[i]=u(n[i],a):"DEFINE_MANY"===h&&(n[i]=c(n[i],a))}else n[i]=a}}}else;}function a(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in w;o?d("78",n):void 0;var i=n in e;i?d("79",n):void 0,e[n]=r}}}function s(e,t){e&&t&&"object"==typeof e&&"object"==typeof t?void 0:d("80");for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]?d("81",n):void 0,e[n]=t[n]);return e}function u(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return s(o,n),s(o,r),o}}function c(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function l(e,t){var n=t.bind(e);return n}function f(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],o=t[n+1];e[r]=l(e,o)}}var d=n(17),p=n(3),h=n(48),m=n(16),v=(n(78),n(49)),g=n(18),y=(n(0),n(1),"mixins"),_=[],b={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},w={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)i(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=p({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=p({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=u(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=p({},e.propTypes,t)},statics:function(e,t){a(e,t)},autobind:function(){}},E={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e),t&&this.updater.enqueueCallback(this,t,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},x=function(){};p(x.prototype,h.prototype,E);var k={createClass:function(e){var t=r(function(e,n,r){this.__reactAutoBindPairs.length&&f(this),this.props=e,this.context=n,this.refs=g,this.updater=r||v,this.state=null;var o=this.getInitialState?this.getInitialState():null;"object"!=typeof o||Array.isArray(o)?d("82",t.displayName||"ReactCompositeComponent"):void 0,this.state=o});t.prototype=new x,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],_.forEach(i.bind(null,t)),i(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),t.prototype.render?void 0:d("83");for(var n in b)t.prototype[n]||(t.prototype[n]=null);return t},injection:{injectMixin:function(e){_.push(e)}}};e.exports=k},function(e,t,n){"use strict";var r=n(16),o=r.createFactory,i={a:o("a"),abbr:o("abbr"),address:o("address"),area:o("area"),article:o("article"),aside:o("aside"),audio:o("audio"),b:o("b"),base:o("base"),bdi:o("bdi"),bdo:o("bdo"),big:o("big"),blockquote:o("blockquote"),body:o("body"),br:o("br"),button:o("button"),canvas:o("canvas"),caption:o("caption"),cite:o("cite"),code:o("code"),col:o("col"),colgroup:o("colgroup"),data:o("data"),datalist:o("datalist"),dd:o("dd"),del:o("del"),details:o("details"),dfn:o("dfn"),dialog:o("dialog"),div:o("div"),dl:o("dl"),dt:o("dt"),em:o("em"),embed:o("embed"),fieldset:o("fieldset"),figcaption:o("figcaption"),figure:o("figure"),footer:o("footer"),form:o("form"),h1:o("h1"),h2:o("h2"),h3:o("h3"),h4:o("h4"),h5:o("h5"),h6:o("h6"),head:o("head"),header:o("header"),hgroup:o("hgroup"),hr:o("hr"),html:o("html"),i:o("i"),iframe:o("iframe"),img:o("img"),input:o("input"),ins:o("ins"),kbd:o("kbd"),keygen:o("keygen"),label:o("label"),legend:o("legend"),li:o("li"),link:o("link"),main:o("main"),map:o("map"),mark:o("mark"),menu:o("menu"),menuitem:o("menuitem"),meta:o("meta"),meter:o("meter"),nav:o("nav"),noscript:o("noscript"),object:o("object"),ol:o("ol"),optgroup:o("optgroup"),option:o("option"),output:o("output"),p:o("p"),param:o("param"),picture:o("picture"),pre:o("pre"),progress:o("progress"),q:o("q"),rp:o("rp"),rt:o("rt"),ruby:o("ruby"),s:o("s"),samp:o("samp"),script:o("script"),section:o("section"),select:o("select"),small:o("small"),source:o("source"),span:o("span"),strong:o("strong"),style:o("style"),sub:o("sub"),summary:o("summary"),sup:o("sup"),table:o("table"),tbody:o("tbody"),td:o("td"),textarea:o("textarea"),tfoot:o("tfoot"),th:o("th"),thead:o("thead"),time:o("time"),title:o("title"),tr:o("tr"),track:o("track"),u:o("u"),ul:o("ul"),var:o("var"),video:o("video"),wbr:o("wbr"),circle:o("circle"),clipPath:o("clipPath"),defs:o("defs"),ellipse:o("ellipse"),g:o("g"),image:o("image"),line:o("line"),linearGradient:o("linearGradient"),mask:o("mask"),path:o("path"),pattern:o("pattern"),polygon:o("polygon"),polyline:o("polyline"),radialGradient:o("radialGradient"),rect:o("rect"),stop:o("stop"),svg:o("svg"),text:o("text"),tspan:o("tspan")};e.exports=i},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function o(e){this.message=e,this.stack=""}function i(e){function t(t,n,r,i,a,s,u){i=i||S,s=s||r;if(null==n[r]){var c=E[a];return t?new o(null===n[r]?"The "+c+" `"+s+"` is marked as required "+("in `"+i+"`, but its value is `null`."):"The "+c+" `"+s+"` is marked as required in "+("`"+i+"`, but its value is `undefined`.")):null}return e(n,r,i,a,s)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function a(e){function t(t,n,r,i,a,s){var u=t[n],c=y(u);if(c!==e){var l=E[i],f=_(u);return new o("Invalid "+l+" `"+a+"` of type "+("`"+f+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return i(t)}function s(){return i(k.thatReturns(null))}function u(e){function t(t,n,r,i,a){if("function"!=typeof e)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){var u=E[i],c=y(s);return new o("Invalid "+u+" `"+a+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l<s.length;l++){var f=e(s,l,r,i,a+"["+l+"]",x);if(f instanceof Error)return f}return null}return i(t)}function c(){function e(e,t,n,r,i){var a=e[t];if(!w.isValidElement(a)){var s=E[r],u=y(a);return new o("Invalid "+s+" `"+i+"` of type "+("`"+u+"` supplied to `"+n+"`, expected a single ReactElement."))}return null}return i(e)}function l(e){function t(t,n,r,i,a){if(!(t[n]instanceof e)){var s=E[i],u=e.name||S,c=b(t[n]);return new o("Invalid "+s+" `"+a+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("instance of `"+u+"`."))}return null}return i(t)}function f(e){function t(t,n,i,a,s){for(var u=t[n],c=0;c<e.length;c++)if(r(u,e[c]))return null;var l=E[a],f=JSON.stringify(e);return new o("Invalid "+l+" `"+s+"` of value `"+u+"` "+("supplied to `"+i+"`, expected one of "+f+"."))}return Array.isArray(e)?i(t):k.thatReturnsNull}function d(e){function t(t,n,r,i,a){if("function"!=typeof e)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var s=t[n],u=y(s);if("object"!==u){var c=E[i];return new o("Invalid "+c+" `"+a+"` of type "+("`"+u+"` supplied to `"+r+"`, expected an object."))}for(var l in s)if(s.hasOwnProperty(l)){var f=e(s,l,r,i,a+"."+l,x);if(f instanceof Error)return f}return null}return i(t)}function p(e){function t(t,n,r,i,a){for(var s=0;s<e.length;s++){var u=e[s];if(null==u(t,n,r,i,a,x))return null}var c=E[i];return new o("Invalid "+c+" `"+a+"` supplied to "+("`"+r+"`."))}return Array.isArray(e)?i(t):k.thatReturnsNull}function h(){function e(e,t,n,r,i){if(!v(e[t])){var a=E[r];return new o("Invalid "+a+" `"+i+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return i(e)}function m(e){function t(t,n,r,i,a){var s=t[n],u=y(s);if("object"!==u){var c=E[i];return new o("Invalid "+c+" `"+a+"` of type `"+u+"` "+("supplied to `"+r+"`, expected `object`."))}for(var l in e){var f=e[l];if(f){var d=f(s,l,r,i,a+"."+l,x);if(d)return d}}return null}return i(t)}function v(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(v);if(null===e||w.isValidElement(e))return!0;var t=C(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!v(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!v(o[1]))return!1}return!0;default:return!1}}function g(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function y(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":g(t,e)?"symbol":t}function _(e){var t=y(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function b(e){return e.constructor&&e.constructor.name?e.constructor.name:S}var w=n(16),E=n(78),x=n(171),k=n(6),C=n(80),S=(n(1),"<<anonymous>>"),I={array:a("array"),bool:a("boolean"),func:a("function"),number:a("number"),object:a("object"),string:a("string"),symbol:a("symbol"),any:s(),arrayOf:u,element:c(),instanceOf:l,node:h(),objectOf:d,oneOf:f,oneOfType:p,shape:m};o.prototype=Error.prototype,e.exports=I},function(e,t,n){"use strict";var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=r},function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=u,this.updater=n||s}function o(){}var i=n(3),a=n(48),s=n(49),u=n(18);o.prototype=a.prototype,r.prototype=new o,r.prototype.constructor=r,i(r.prototype,a.prototype),r.prototype.isPureReactComponent=!0,e.exports=r},function(e,t,n){"use strict";e.exports="15.4.2"},function(e,t,n){"use strict";function r(e){return i.isValidElement(e)?void 0:o("143"),e}var o=n(17),i=n(16);n(0);e.exports=r},function(e,t,n){"use strict";function r(e,t){return e&&"object"==typeof e&&null!=e.key?c.escape(e.key):t.toString(36)}function o(e,t,n,i){var d=typeof e;if("undefined"!==d&&"boolean"!==d||(e=null),null===e||"string"===d||"number"===d||"object"===d&&e.$$typeof===s)return n(i,e,""===t?l+r(e,0):t),1;var p,h,m=0,v=""===t?l:t+f;if(Array.isArray(e))for(var g=0;g<e.length;g++)p=e[g],h=v+r(p,g),m+=o(p,h,n,i);else{var y=u(e);if(y){var _,b=y.call(e);if(y!==e.entries)for(var w=0;!(_=b.next()).done;)p=_.value,h=v+r(p,w++),m+=o(p,h,n,i);else for(;!(_=b.next()).done;){var E=_.value;E&&(p=E[1],h=v+c.escape(E[0])+f+r(p,0),m+=o(p,h,n,i))}}else if("object"===d){var x="",k=String(e);a("31","[object Object]"===k?"object with keys {"+Object.keys(e).join(", ")+"}":k,x)}}return m}function i(e,t,n){return null==e?0:o(e,"",t,n)}var a=n(17),s=(n(10),n(77)),u=n(80),c=(n(0),n(165)),l=(n(1),"."),f=":";e.exports=i},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return m[h]=r,p(h),h++}function o(e){delete m[e]}function i(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}function a(e){if(v)setTimeout(a,0,e);else{var t=m[e];if(t){v=!0;try{i(t)}finally{o(e),v=!1}}}}function s(){p=function(e){t.nextTick(function(){a(e)})}}function u(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}function c(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"==typeof n.data&&0===n.data.indexOf(t)&&a(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),p=function(n){e.postMessage(t+n,"*")}}function l(){var e=new MessageChannel;e.port1.onmessage=function(e){var t=e.data;a(t)},p=function(t){e.port2.postMessage(t)}}function f(){var e=g.documentElement;p=function(t){var n=g.createElement("script");n.onreadystatechange=function(){a(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}function d(){p=function(e){setTimeout(a,0,e)}}if(!e.setImmediate){var p,h=1,m={},v=!1,g=e.document,y=Object.getPrototypeOf&&Object.getPrototypeOf(e);y=y&&y.setTimeout?y:e,"[object process]"==={}.toString.call(e.process)?s():u()?c():e.MessageChannel?l():g&&"onreadystatechange"in g.createElement("script")?f():d(),y.setImmediate=r,y.clearImmediate=o}}("undefined"==typeof self?"undefined"==typeof e?this:e:self)}).call(t,n(51),n(31))},function(e,t,n){var r=n(86);"string"==typeof r&&(r=[[e.i,r,""]]);n(50)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){var r=n(87);"string"==typeof r&&(r=[[e.i,r,""]]);n(50)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){var r=n(88);"string"==typeof r&&(r=[[e.i,r,""]]);n(50)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){function r(e,t){this._id=e,this._clearFn=t}var o=Function.prototype.apply;t.setTimeout=function(){return new r(o.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new r(o.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.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))},n(176),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){(function(t,n){var r,r;!function(t){e.exports=t()}(function(){var e;return function e(t,n,o){function i(s,u){if(!n[s]){if(!t[s]){var c="function"==typeof r&&r;if(!u&&c)return r(s,!0);if(a)return a(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var f=n[s]={exports:{}};t[s][0].call(f.exports,function(e){var n=t[s][1][e];return i(n?n:e)},f,f.exports,e,t,n,o)}return n[s].exports}for(var a="function"==typeof r&&r,s=0;s<o.length;s++)i(o[s]);return i}({1:[function(e,t,n){function r(e,t){a.Readable.call(this,t),this.destroyed=!1,this._torrent=e._torrent;var n=t&&t.start||0,r=t&&t.end&&t.end<e.length?t.end:e.length-1,o=e._torrent.pieceLength;this._startPiece=(n+e.offset)/o|0,this._endPiece=(r+e.offset)/o|0,this._piece=this._startPiece,this._offset=n+e.offset-this._startPiece*o,this._missing=r-n+1,this._reading=!1,this._notifying=!1,this._criticalLength=Math.min(1048576/o|0,2)}t.exports=r;var o=e("debug")("webtorrent:file-stream"),i=e("inherits"),a=e("readable-stream");i(r,a.Readable),r.prototype._read=function(){this._reading||(this._reading=!0,this._notify())},r.prototype._notify=function(){var e=this;if(e._reading&&0!==e._missing){if(!e._torrent.bitfield.get(e._piece))return e._torrent.critical(e._piece,e._piece+e._criticalLength);if(!e._notifying){e._notifying=!0;var t=e._piece;e._torrent.store.get(t,function(n,r){if(e._notifying=!1,!e.destroyed){if(n)return e._destroy(n);o("read %s (length %s) (err %s)",t,r.length,n&&n.message),e._offset&&(r=r.slice(e._offset),e._offset=0),e._missing<r.length&&(r=r.slice(0,e._missing)),e._missing-=r.length,o("pushing buffer of length %s",r.length),e._reading=!1,e.push(r),0===e._missing&&e.push(null)}}),e._piece+=1}}},r.prototype.destroy=function(e){this._destroy(null,e)},r.prototype._destroy=function(e,t){this.destroyed||(this.destroyed=!0,this._torrent.destroyed||this._torrent.deselect(this._startPiece,this._endPiece,!0),e&&this.emit("error",e),this.emit("close"),t&&t())}},{debug:30,inherits:42,"readable-stream":82}],2:[function(e,t,n){(function(n){function r(e,t){i.call(this),this._torrent=e,this._destroyed=!1,this.name=t.name,this.path=t.path,this.length=t.length,this.offset=t.offset,this.done=!1;var n=t.offset,r=n+t.length-1;this._startPiece=n/this._torrent.pieceLength|0,this._endPiece=r/this._torrent.pieceLength|0,0===this.length&&(this.done=!0,this.emit("done"))}t.exports=r;var o=e("end-of-stream"),i=e("events").EventEmitter,a=e("./file-stream"),s=e("inherits"),u=e("path"),c=e("render-media"),l=e("readable-stream"),f=e("stream-to-blob"),d=e("stream-to-blob-url"),p=e("stream-with-known-length-to-buffer");s(r,i),Object.defineProperty(r.prototype,"downloaded",{get:function(){if(!this._torrent.bitfield)return 0;for(var e=0,t=this._startPiece;t<=this._endPiece;++t)if(this._torrent.bitfield.get(t))e+=this._torrent.pieceLength;else{var n=this._torrent.pieces[t];e+=n.length-n.missing}return e}}),r.prototype.select=function(e){0!==this.length&&this._torrent.select(this._startPiece,this._endPiece,e)},r.prototype.deselect=function(){0!==this.length&&this._torrent.deselect(this._startPiece,this._endPiece,!1)},r.prototype.createReadStream=function(e){var t=this;if(0===this.length){var r=new l.PassThrough;return n.nextTick(function(){r.end()}),r}var i=new a(t,e);return t._torrent.select(i._startPiece,i._endPiece,!0,function(){i._notify()}),o(i,function(){t._destroyed||t._torrent.destroyed||t._torrent.deselect(i._startPiece,i._endPiece,!0)}),i},r.prototype.getBuffer=function(e){p(this.createReadStream(),this.length,e)},r.prototype.getBlob=function(e){if("undefined"==typeof window)throw new Error("browser-only method");f(this.createReadStream(),this._getMimeType(),e)},r.prototype.getBlobURL=function(e){if("undefined"==typeof window)throw new Error("browser-only method");d(this.createReadStream(),this._getMimeType(),e)},r.prototype.appendTo=function(e,t,n){if("undefined"==typeof window)throw new Error("browser-only method");c.append(this,e,t,n)},r.prototype.renderTo=function(e,t,n){if("undefined"==typeof window)throw new Error("browser-only method");
  c.render(this,e,t,n)},r.prototype._getMimeType=function(){return c.mime[u.extname(this.name).toLowerCase()]},r.prototype._destroy=function(){this._destroyed=!0,this._torrent=null}}).call(this,e("_process"))},{"./file-stream":1,_process:67,"end-of-stream":33,events:35,inherits:42,path:64,"readable-stream":82,"render-media":83,"stream-to-blob":100,"stream-to-blob-url":99,"stream-with-known-length-to-buffer":101}],3:[function(e,t,n){function r(e,t){var n=this;n.id=e,n.type=t,a("new Peer %s",e),n.addr=null,n.conn=null,n.swarm=null,n.wire=null,n.connected=!1,n.destroyed=!1,n.timeout=null,n.retries=0,n.sentHandshake=!1}function o(){}var i=e("unordered-array-remove"),a=e("debug")("webtorrent:peer"),s=e("bittorrent-protocol"),u=e("./webconn"),c=5e3,l=25e3,f=25e3;n.createWebRTCPeer=function(e,t){var n=new r(e.id,"webrtc");return n.conn=e,n.swarm=t,n.conn.connected?n.onConnect():(n.conn.once("connect",function(){n.onConnect()}),n.conn.once("error",function(e){n.destroy(e)}),n.startConnectTimeout()),n},n.createTCPIncomingPeer=function(e){var t=e.remoteAddress+":"+e.remotePort,n=new r(t,"tcpIncoming");return n.conn=e,n.addr=t,n.onConnect(),n},n.createTCPOutgoingPeer=function(e,t){var n=new r(e,"tcpOutgoing");return n.addr=e,n.swarm=t,n},n.createWebSeedPeer=function(e,t){var n=new r(e,"webSeed");return n.swarm=t,n.conn=new u(e,t),n.onConnect(),n},r.prototype.onConnect=function(){var e=this;if(!e.destroyed){e.connected=!0,a("Peer %s connected",e.id),clearTimeout(e.connectTimeout);var t=e.conn;t.once("end",function(){e.destroy()}),t.once("close",function(){e.destroy()}),t.once("finish",function(){e.destroy()}),t.once("error",function(t){e.destroy(t)});var n=e.wire=new s;n.type=e.type,n.once("end",function(){e.destroy()}),n.once("close",function(){e.destroy()}),n.once("finish",function(){e.destroy()}),n.once("error",function(t){e.destroy(t)}),n.once("handshake",function(t,n){e.onHandshake(t,n)}),e.startHandshakeTimeout(),t.pipe(n).pipe(t),e.swarm&&!e.sentHandshake&&e.handshake()}},r.prototype.onHandshake=function(e,t){var n=this;if(n.swarm&&!n.destroyed){if(n.swarm.destroyed)return n.destroy(new Error("swarm already destroyed"));if(e!==n.swarm.infoHash)return n.destroy(new Error("unexpected handshake info hash for this swarm"));if(t===n.swarm.peerId)return n.destroy(new Error("refusing to connect to ourselves"));a("Peer %s got handshake %s",n.id,e),clearTimeout(n.handshakeTimeout),n.retries=0;var r=n.addr;!r&&n.conn.remoteAddress&&(r=n.conn.remoteAddress+":"+n.conn.remotePort),n.swarm._onWire(n.wire,r),n.swarm&&!n.swarm.destroyed&&(n.sentHandshake||n.handshake())}},r.prototype.handshake=function(){var e=this,t={dht:!e.swarm.private&&!!e.swarm.client.dht};e.wire.handshake(e.swarm.infoHash,e.swarm.client.peerId,t),e.sentHandshake=!0},r.prototype.startConnectTimeout=function(){var e=this;clearTimeout(e.connectTimeout),e.connectTimeout=setTimeout(function(){e.destroy(new Error("connect timeout"))},"webrtc"===e.type?l:c),e.connectTimeout.unref&&e.connectTimeout.unref()},r.prototype.startHandshakeTimeout=function(){var e=this;clearTimeout(e.handshakeTimeout),e.handshakeTimeout=setTimeout(function(){e.destroy(new Error("handshake timeout"))},f),e.handshakeTimeout.unref&&e.handshakeTimeout.unref()},r.prototype.destroy=function(e){var t=this;if(!t.destroyed){t.destroyed=!0,t.connected=!1,a("destroy %s (error: %s)",t.id,e&&(e.message||e)),clearTimeout(t.connectTimeout),clearTimeout(t.handshakeTimeout);var n=t.swarm,r=t.conn,s=t.wire;t.swarm=null,t.conn=null,t.wire=null,n&&s&&i(n.wires,n.wires.indexOf(s)),r&&(r.on("error",o),r.destroy()),s&&s.destroy(),n&&n.removePeer(t.id)}}},{"./webconn":6,"bittorrent-protocol":14,debug:30,"unordered-array-remove":111}],4:[function(e,t,n){function r(e){var t=this;t._torrent=e,t._numPieces=e.pieces.length,t._pieces=[],t._onWire=function(e){t.recalculate(),t._initWire(e)},t._onWireHave=function(e){t._pieces[e]+=1},t._onWireBitfield=function(){t.recalculate()},t._torrent.wires.forEach(function(e){t._initWire(e)}),t._torrent.on("wire",t._onWire),t.recalculate()}function o(){return!0}t.exports=r,r.prototype.getRarestPiece=function(e){e||(e=o);for(var t=[],n=1/0,r=0;r<this._numPieces;++r)if(e(r)){var i=this._pieces[r];i===n?t.push(r):i<n&&(t=[r],n=i)}return t.length>0?t[Math.random()*t.length|0]:-1},r.prototype.destroy=function(){var e=this;e._torrent.removeListener("wire",e._onWire),e._torrent.wires.forEach(function(t){e._cleanupWireEvents(t)}),e._torrent=null,e._pieces=null,e._onWire=null,e._onWireHave=null,e._onWireBitfield=null},r.prototype._initWire=function(e){var t=this;e._onClose=function(){t._cleanupWireEvents(e);for(var n=0;n<this._numPieces;++n)t._pieces[n]-=e.peerPieces.get(n)},e.on("have",t._onWireHave),e.on("bitfield",t._onWireBitfield),e.once("close",e._onClose)},r.prototype.recalculate=function(){var e;for(e=0;e<this._numPieces;++e)this._pieces[e]=0;var t=this._torrent.wires.length;for(e=0;e<t;++e)for(var n=this._torrent.wires[e],r=0;r<this._numPieces;++r)this._pieces[r]+=n.peerPieces.get(r)},r.prototype._cleanupWireEvents=function(e){e.removeListener("have",this._onWireHave),e.removeListener("bitfield",this._onWireBitfield),e._onClose&&e.removeListener("close",e._onClose),e._onClose=null}},{}],5:[function(e,n,r){(function(t,r){function o(e,t,n){m.call(this),this._debugId="unknown infohash",this.client=t,this.announce=n.announce,this.urlList=n.urlList,this.path=n.path,this._store=n.store||_,this._getAnnounceOpts=n.getAnnounceOpts,this.strategy=n.strategy||"sequential",this.maxWebConns=n.maxWebConns||4,this._rechokeNumSlots=n.uploads===!1||0===n.uploads?0:+n.uploads||10,this._rechokeOptimisticWire=null,this._rechokeOptimisticTime=0,this._rechokeIntervalId=null,this.ready=!1,this.destroyed=!1,this.paused=!1,this.done=!1,this.metadata=null,this.store=null,this.files=[],this.pieces=[],this._amInterested=!1,this._selections=[],this._critical=[],this.wires=[],this._queue=[],this._peers={},this._peersLength=0,this.received=0,this.uploaded=0,this._downloadSpeed=M(),this._uploadSpeed=M(),this._servers=[],this._xsRequests=[],this._fileModtimes=n.fileModtimes,null!==e&&this._onTorrentId(e),this._debug("new torrent")}function i(e,t){return 2+Math.ceil(t*e.downloadSpeed()/P.BLOCK_LENGTH)}function a(e,t,n){return 1+Math.ceil(t*e.downloadSpeed()/n)}function s(e){return Math.random()*e|0}function u(){}n.exports=o;var c,l=e("addr-to-ip-port"),f=e("bitfield"),d=e("chunk-store-stream/write"),p=e("debug")("webtorrent:torrent"),h=e("torrent-discovery"),m=e("events").EventEmitter,v=e("xtend"),g=e("xtend/mutable"),y=e("fs"),_=e("fs-chunk-store"),b=e("simple-get"),w=e("immediate-chunk-store"),E=e("inherits"),x=e("multistream"),k=e("net"),C=e("os"),S=e("run-parallel"),I=e("run-parallel-limit"),T=e("parse-torrent"),A=e("path"),P=e("torrent-piece"),R=e("pump"),L=e("random-iterate"),O=e("simple-sha1"),M=e("speedometer"),B=e("uniq"),U=e("ut_metadata"),N=e("ut_pex"),D=e("./file"),j=e("./peer"),F=e("./rarity-map"),H=e("./server"),W=131072,q=3e4,z=5e3,V=3*P.BLOCK_LENGTH,K=.5,$=1,Y=1e4,G=2,X=2,Q=[1e3,5e3,15e3],Z=e("../package.json").version,J="WebTorrent/"+Z+" (https://webtorrent.io)";try{c=A.join(y.statSync("/tmp")&&"/tmp","webtorrent")}catch(e){c=A.join("function"==typeof C.tmpDir?C.tmpDir():"/","webtorrent")}E(o,m),Object.defineProperty(o.prototype,"timeRemaining",{get:function(){return this.done?0:0===this.downloadSpeed?1/0:(this.length-this.downloaded)/this.downloadSpeed*1e3}}),Object.defineProperty(o.prototype,"downloaded",{get:function(){if(!this.bitfield)return 0;for(var e=0,t=0,n=this.pieces.length;t<n;++t)if(this.bitfield.get(t))e+=t===n-1?this.lastPieceLength:this.pieceLength;else{var r=this.pieces[t];e+=r.length-r.missing}return e}}),Object.defineProperty(o.prototype,"downloadSpeed",{get:function(){return this._downloadSpeed()}}),Object.defineProperty(o.prototype,"uploadSpeed",{get:function(){return this._uploadSpeed()}}),Object.defineProperty(o.prototype,"progress",{get:function(){return this.length?this.downloaded/this.length:0}}),Object.defineProperty(o.prototype,"ratio",{get:function(){return this.uploaded/(this.received||1)}}),Object.defineProperty(o.prototype,"numPeers",{get:function(){return this.wires.length}}),Object.defineProperty(o.prototype,"torrentFileBlobURL",{get:function(){if("undefined"==typeof window)throw new Error("browser-only property");return this.torrentFile?URL.createObjectURL(new Blob([this.torrentFile],{type:"application/x-bittorrent"})):null}}),Object.defineProperty(o.prototype,"_numQueued",{get:function(){return this._queue.length+(this._peersLength-this._numConns)}}),Object.defineProperty(o.prototype,"_numConns",{get:function(){var e=this,t=0;for(var n in e._peers)e._peers[n].connected&&(t+=1);return t}}),Object.defineProperty(o.prototype,"swarm",{get:function(){return console.warn("WebTorrent: `torrent.swarm` is deprecated. Use `torrent` directly instead."),this}}),o.prototype._onTorrentId=function(e){var n=this;if(!n.destroyed){var r;try{r=T(e)}catch(e){}r?(n.infoHash=r.infoHash,n._debugId=r.infoHash.toString("hex").substring(0,7),t.nextTick(function(){n.destroyed||n._onParsedTorrent(r)})):T.remote(e,function(e,t){if(!n.destroyed)return e?n._destroy(e):void n._onParsedTorrent(t)})}},o.prototype._onParsedTorrent=function(e){var t=this;if(!t.destroyed){if(t._processParsedTorrent(e),!t.infoHash)return t._destroy(new Error("Malformed torrent data: No info hash"));t.path||(t.path=A.join(c,t.infoHash)),t._rechokeIntervalId=setInterval(function(){t._rechoke()},Y),t._rechokeIntervalId.unref&&t._rechokeIntervalId.unref(),t.emit("_infoHash",t.infoHash),t.destroyed||(t.emit("infoHash",t.infoHash),t.destroyed||(t.client.listening?t._onListening():t.client.once("listening",function(){t._onListening()})))}},o.prototype._processParsedTorrent=function(e){this._debugId=e.infoHash.toString("hex").substring(0,7),this.announce&&(e.announce=e.announce.concat(this.announce)),this.client.tracker&&r.WEBTORRENT_ANNOUNCE&&!this.private&&(e.announce=e.announce.concat(r.WEBTORRENT_ANNOUNCE)),this.urlList&&(e.urlList=e.urlList.concat(this.urlList)),B(e.announce),B(e.urlList),g(this,e),this.magnetURI=T.toMagnetURI(e),this.torrentFile=T.toTorrentFile(e)},o.prototype._onListening=function(){function e(e){i._destroy(e)}function t(e){"string"==typeof e&&i.done||i.addPeer(e)}function n(){i.emit("trackerAnnounce"),0===i.numPeers&&i.emit("noPeers","tracker")}function r(){i.emit("dhtAnnounce"),0===i.numPeers&&i.emit("noPeers","dht")}function o(e){i.emit("warning",e)}var i=this;if(!i.discovery&&!i.destroyed){var a=i.client.tracker;a&&(a=v(i.client.tracker,{getAnnounceOpts:function(){var e={uploaded:i.uploaded,downloaded:i.downloaded,left:Math.max(i.length-i.downloaded,0)};return i.client.tracker.getAnnounceOpts&&g(e,i.client.tracker.getAnnounceOpts()),i._getAnnounceOpts&&g(e,i._getAnnounceOpts()),e}})),i.discovery=new h({infoHash:i.infoHash,announce:i.announce,peerId:i.client.peerId,dht:!i.private&&i.client.dht,tracker:a,port:i.client.torrentPort,userAgent:J}),i.discovery.on("error",e),i.discovery.on("peer",t),i.discovery.on("trackerAnnounce",n),i.discovery.on("dhtAnnounce",r),i.discovery.on("warning",o),i.info?i._onMetadata(i):i.xs&&i._getMetadataFromServer()}},o.prototype._getMetadataFromServer=function(){function e(e,n){function r(r,o,i){if(t.destroyed)return n(null);if(t.metadata)return n(null);if(r)return t.emit("warning",new Error("http error from xs param: "+e)),n(null);if(200!==o.statusCode)return t.emit("warning",new Error("non-200 status code "+o.statusCode+" from xs param: "+e)),n(null);var a;try{a=T(i)}catch(e){}return a?a.infoHash!==t.infoHash?(t.emit("warning",new Error("got torrent file with incorrect info hash from xs param: "+e)),n(null)):(t._onMetadata(a),void n(null)):(t.emit("warning",new Error("got invalid torrent file from xs param: "+e)),n(null))}if(0!==e.indexOf("http://")&&0!==e.indexOf("https://"))return t.emit("warning",new Error("skipping non-http xs param: "+e)),n(null);var o,i={url:e,method:"GET",headers:{"user-agent":J}};try{o=b.concat(i,r)}catch(r){return t.emit("warning",new Error("skipping invalid url xs param: "+e)),n(null)}t._xsRequests.push(o)}var t=this,n=Array.isArray(t.xs)?t.xs:[t.xs],r=n.map(function(t){return function(n){e(t,n)}});S(r)},o.prototype._onMetadata=function(e){var t=this;if(!t.metadata&&!t.destroyed){t._debug("got metadata"),t._xsRequests.forEach(function(e){e.abort()}),t._xsRequests=[];var n;if(e&&e.infoHash)n=e;else try{n=T(e)}catch(e){return t._destroy(e)}t._processParsedTorrent(n),t.metadata=t.torrentFile,t.client.enableWebSeeds&&t.urlList.forEach(function(e){t.addWebSeed(e)}),0!==t.pieces.length&&t.select(0,t.pieces.length-1,!1),t._rarityMap=new F(t),t.store=new w(new t._store(t.pieceLength,{torrent:{infoHash:t.infoHash},files:t.files.map(function(e){return{path:A.join(t.path,e.path),length:e.length,offset:e.offset}}),length:t.length})),t.files=t.files.map(function(e){return new D(t,e)}),t._hashes=t.pieces,t.pieces=t.pieces.map(function(e,n){var r=n===t.pieces.length-1?t.lastPieceLength:t.pieceLength;return new P(r)}),t._reservations=t.pieces.map(function(){return[]}),t.bitfield=new f(t.pieces.length),t.wires.forEach(function(e){e.ut_metadata&&e.ut_metadata.setMetadata(t.metadata),t._onWireWithMetadata(e)}),t._debug("verifying existing torrent data"),t._fileModtimes&&t._store===_?t.getFileModtimes(function(e,n){if(e)return t._destroy(e);var r=t.files.map(function(e,r){return n[r]===t._fileModtimes[r]}).every(function(e){return e});if(r){for(var o=0;o<t.pieces.length;o++)t._markVerified(o);t._onStore()}else t._verifyPieces()}):t._verifyPieces(),t.emit("metadata")}},o.prototype.getFileModtimes=function(e){var t=this,n=[];I(t.files.map(function(e,r){return function(o){y.stat(A.join(t.path,e.path),function(e,t){return e&&"ENOENT"!==e.code?o(e):(n[r]=t&&t.mtime.getTime(),void o(null))})}}),X,function(r){t._debug("done getting file modtimes"),e(r,n)})},o.prototype._verifyPieces=function(){var e=this;I(e.pieces.map(function(n,r){return function(n){return e.destroyed?n(new Error("torrent is destroyed")):void e.store.get(r,function(o,i){return e.destroyed?n(new Error("torrent is destroyed")):o?t.nextTick(n,null):void O(i,function(t){if(e.destroyed)return n(new Error("torrent is destroyed"));if(t===e._hashes[r]){if(!e.pieces[r])return;e._debug("piece verified %s",r),e._markVerified(r)}else e._debug("piece invalid %s",r);n(null)})})}}),X,function(t){return t?e._destroy(t):(e._debug("done verifying"),void e._onStore())})},o.prototype._markVerified=function(e){this.pieces[e]=null,this._reservations[e]=null,this.bitfield.set(e,!0)},o.prototype._onStore=function(){var e=this;e.destroyed||(e._debug("on store"),e.ready=!0,e.emit("ready"),e._checkDone(),e._updateSelections())},o.prototype.destroy=function(e){var t=this;t._destroy(null,e)},o.prototype._destroy=function(e,t){var n=this;if(!n.destroyed){n.destroyed=!0,n._debug("destroy"),n.client._remove(n),clearInterval(n._rechokeIntervalId),n._xsRequests.forEach(function(e){e.abort()}),n._rarityMap&&n._rarityMap.destroy();for(var r in n._peers)n.removePeer(r);n.files.forEach(function(e){e instanceof D&&e._destroy()});var o=n._servers.map(function(e){return function(t){e.destroy(t)}});n.discovery&&o.push(function(e){n.discovery.destroy(e)}),n.store&&o.push(function(e){n.store.close(e)}),S(o,t),e&&(0===n.listenerCount("error")?n.client.emit("error",e):n.emit("error",e)),n.emit("close"),n.client=null,n.files=[],n.discovery=null,n.store=null,n._rarityMap=null,n._peers=null,n._servers=null,n._xsRequests=null}},o.prototype.addPeer=function(e){var t=this;if(t.destroyed)throw new Error("torrent is destroyed");if(!t.infoHash)throw new Error("addPeer() must not be called before the `infoHash` event");if(t.client.blocked){var n;if("string"==typeof e){var r;try{r=l(e)}catch(n){return t._debug("ignoring peer: invalid %s",e),t.emit("invalidPeer",e),!1}n=r[0]}else"string"==typeof e.remoteAddress&&(n=e.remoteAddress);if(n&&t.client.blocked.contains(n))return t._debug("ignoring peer: blocked %s",e),"string"!=typeof e&&e.destroy(),t.emit("blockedPeer",e),!1}var o=!!t._addPeer(e);return o?t.emit("peer",e):t.emit("invalidPeer",e),o},o.prototype._addPeer=function(e){var t=this;if(t.destroyed)return"string"!=typeof e&&e.destroy(),null;if("string"==typeof e&&!t._validAddr(e))return t._debug("ignoring peer: invalid %s",e),null;var n=e&&e.id||e;if(t._peers[n])return t._debug("ignoring peer: duplicate (%s)",n),"string"!=typeof e&&e.destroy(),null;if(t.paused)return t._debug("ignoring peer: torrent is paused"),"string"!=typeof e&&e.destroy(),null;t._debug("add peer %s",n);var r;return r="string"==typeof e?j.createTCPOutgoingPeer(e,t):j.createWebRTCPeer(e,t),t._peers[r.id]=r,t._peersLength+=1,"string"==typeof e&&(t._queue.push(r),t._drain()),r},o.prototype.addWebSeed=function(e){if(this.destroyed)throw new Error("torrent is destroyed");if(!/^https?:\/\/.+/.test(e))return this.emit("warning",new Error("ignoring invalid web seed: "+e)),void this.emit("invalidPeer",e);if(this._peers[e])return this.emit("warning",new Error("ignoring duplicate web seed: "+e)),void this.emit("invalidPeer",e);this._debug("add web seed %s",e);var t=j.createWebSeedPeer(e,this);this._peers[t.id]=t,this._peersLength+=1,this.emit("peer",e)},o.prototype._addIncomingPeer=function(e){var t=this;return t.destroyed?e.destroy(new Error("torrent is destroyed")):t.paused?e.destroy(new Error("torrent is paused")):(this._debug("add incoming peer %s",e.id),t._peers[e.id]=e,void(t._peersLength+=1))},o.prototype.removePeer=function(e){var t=this,n=e&&e.id||e;e=t._peers[n],e&&(this._debug("removePeer %s",n),delete t._peers[n],t._peersLength-=1,e.destroy(),t._drain())},o.prototype.select=function(e,t,n,r){var o=this;if(o.destroyed)throw new Error("torrent is destroyed");if(e<0||t<e||o.pieces.length<=t)throw new Error("invalid selection ",e,":",t);n=Number(n)||0,o._debug("select %s-%s (priority %s)",e,t,n),o._selections.push({from:e,to:t,offset:0,priority:n,notify:r||u}),o._selections.sort(function(e,t){return t.priority-e.priority}),o._updateSelections()},o.prototype.deselect=function(e,t,n){var r=this;if(r.destroyed)throw new Error("torrent is destroyed");n=Number(n)||0,r._debug("deselect %s-%s (priority %s)",e,t,n);for(var o=0;o<r._selections.length;++o){var i=r._selections[o];if(i.from===e&&i.to===t&&i.priority===n){r._selections.splice(o--,1);break}}r._updateSelections()},o.prototype.critical=function(e,t){var n=this;if(n.destroyed)throw new Error("torrent is destroyed");n._debug("critical %s-%s",e,t);for(var r=e;r<=t;++r)n._critical[r]=!0;n._updateSelections()},o.prototype._onWire=function(e,n){var r=this;if(r._debug("got wire %s (%s)",e._debugId,n||"Unknown"),e.on("download",function(e){r.destroyed||(r.received+=e,r._downloadSpeed(e),r.client._downloadSpeed(e),r.emit("download",e),r.client.emit("download",e))}),e.on("upload",function(e){r.destroyed||(r.uploaded+=e,r._uploadSpeed(e),r.client._uploadSpeed(e),r.emit("upload",e),r.client.emit("upload",e))}),r.wires.push(e),n){var o=l(n);e.remoteAddress=o[0],e.remotePort=o[1]}r.client.dht&&r.client.dht.listening&&e.on("port",function(t){if(!r.destroyed&&!r.client.dht.destroyed){if(!e.remoteAddress)return r._debug("ignoring PORT from peer with no address");if(0===t||t>65536)return r._debug("ignoring invalid PORT from peer");r._debug("port: %s (from %s)",t,n),r.client.dht.addNode({host:e.remoteAddress,port:t})}}),e.on("timeout",function(){r._debug("wire timeout (%s)",n),e.destroy()}),e.setTimeout(q,!0),e.setKeepAlive(!0),e.use(U(r.metadata)),e.ut_metadata.on("warning",function(e){r._debug("ut_metadata warning: %s",e.message)}),r.metadata||(e.ut_metadata.on("metadata",function(e){r._debug("got metadata via ut_metadata"),r._onMetadata(e)}),e.ut_metadata.fetch()),"function"!=typeof N||r.private||(e.use(N()),e.ut_pex.on("peer",function(e){r.done||(r._debug("ut_pex: got peer: %s (from %s)",e,n),r.addPeer(e))}),e.ut_pex.on("dropped",function(e){var t=r._peers[e];t&&!t.connected&&(r._debug("ut_pex: dropped peer: %s (from %s)",e,n),r.removePeer(e))}),e.once("close",function(){e.ut_pex.reset()})),r.emit("wire",e,n),r.metadata&&t.nextTick(function(){r._onWireWithMetadata(e)})},o.prototype._onWireWithMetadata=function(e){function t(){r.destroyed||e.destroyed||(r._numQueued>2*(r._numConns-r.numPeers)&&e.amInterested?e.destroy():(o=setTimeout(t,z),o.unref&&o.unref()))}function n(){if(e.peerPieces.length===r.pieces.length){for(;i<r.pieces.length;++i)if(!e.peerPieces.get(i))return;e.isSeeder=!0,e.choke()}}var r=this,o=null,i=0;e.on("bitfield",function(){n(),r._update()}),e.on("have",function(){n(),r._update()}),e.once("interested",function(){e.unchoke()}),e.once("close",function(){clearTimeout(o)}),e.on("choke",function(){clearTimeout(o),o=setTimeout(t,z),o.unref&&o.unref()}),e.on("unchoke",function(){clearTimeout(o),r._update()}),e.on("request",function(t,n,o,i){return o>W?e.destroy():void(r.pieces[t]||r.store.get(t,{offset:n,length:o},i))}),e.bitfield(r.bitfield),e.interested(),e.peerExtensions.dht&&r.client.dht&&r.client.dht.listening&&e.port(r.client.dht.address().port),"webSeed"!==e.type&&(o=setTimeout(t,z),o.unref&&o.unref()),e.isSeeder=!1,n()},o.prototype._updateSelections=function(){var e=this;e.ready&&!e.destroyed&&(t.nextTick(function(){e._gcSelections()}),e._updateInterest(),e._update())},o.prototype._gcSelections=function(){for(var e=this,t=0;t<e._selections.length;t++){for(var n=e._selections[t],r=n.offset;e.bitfield.get(n.from+n.offset)&&n.from+n.offset<n.to;)n.offset++;r!==n.offset&&n.notify(),n.to===n.from+n.offset&&e.bitfield.get(n.from+n.offset)&&(e._selections.splice(t--,1),n.notify(),e._updateInterest())}e._selections.length||e.emit("idle")},o.prototype._updateInterest=function(){var e=this,t=e._amInterested;e._amInterested=!!e._selections.length,e.wires.forEach(function(t){e._amInterested?t.interested():t.uninterested()}),t!==e._amInterested&&(e._amInterested?e.emit("interested"):e.emit("uninterested"))},o.prototype._update=function(){var e=this;if(!e.destroyed)for(var t,n=L(e.wires);t=n();)e._updateWire(t)},o.prototype._updateWire=function(e){function t(t,n,r,o){return function(i){return i>=t&&i<=n&&!(i in r)&&e.peerPieces.get(i)&&(!o||o(i))}}function n(){if(!e.requests.length)for(var n=s._selections.length;n--;){var r,o=s._selections[n];if("rarest"===s.strategy)for(var i=o.from+o.offset,a=o.to,u=a-i+1,c={},l=0,f=t(i,a,c);l<u&&(r=s._rarityMap.getRarestPiece(f),!(r<0));){if(s._request(e,r,!1))return;c[r]=!0,l+=1}else for(r=o.to;r>=o.from+o.offset;--r)if(e.peerPieces.get(r)&&s._request(e,r,!1))return}}function r(){var t=e.downloadSpeed()||1;if(t>V)return function(){return!0};var n=Math.max(1,e.requests.length)*P.BLOCK_LENGTH/t,r=10,o=0;return function(e){if(!r||s.bitfield.get(e))return!0;for(var i=s.pieces[e].missing;o<s.wires.length;o++){var a=s.wires[o],u=a.downloadSpeed();if(!(u<V)&&!(u<=t)&&a.peerPieces.get(e)&&!((i-=u*n)>0))return r--,!1}return!0}}function o(e){for(var t=e,n=e;n<s._selections.length&&s._selections[n].priority;n++)t=n;var r=s._selections[e];s._selections[e]=s._selections[t],s._selections[t]=r}function a(n){if(e.requests.length>=c)return!0;for(var i=r(),a=0;a<s._selections.length;a++){var u,l=s._selections[a];if("rarest"===s.strategy)for(var f=l.from+l.offset,d=l.to,p=d-f+1,h={},m=0,v=t(f,d,h,i);m<p&&(u=s._rarityMap.getRarestPiece(v),!(u<0));){for(;s._request(e,u,s._critical[u]||n););if(!(e.requests.length<c))return l.priority&&o(a),!0;h[u]=!0,m++}else for(u=l.from+l.offset;u<=l.to;u++)if(e.peerPieces.get(u)&&i(u)){for(;s._request(e,u,s._critical[u]||n););if(!(e.requests.length<c))return l.priority&&o(a),!0}}return!1}var s=this;if(!e.peerChoking){if(!e.downloaded)return n();var u=i(e,K);if(!(e.requests.length>=u)){var c=i(e,$);a(!1)||a(!0)}}},o.prototype._rechoke=function(){function e(e,t){return e.downloadSpeed!==t.downloadSpeed?t.downloadSpeed-e.downloadSpeed:e.uploadSpeed!==t.uploadSpeed?t.uploadSpeed-e.uploadSpeed:e.wire.amChoking!==t.wire.amChoking?e.wire.amChoking?1:-1:e.salt-t.salt}var t=this;if(t.ready){t._rechokeOptimisticTime>0?t._rechokeOptimisticTime-=1:t._rechokeOptimisticWire=null;var n=[];t.wires.forEach(function(e){e.isSeeder||e===t._rechokeOptimisticWire||n.push({wire:e,downloadSpeed:e.downloadSpeed(),uploadSpeed:e.uploadSpeed(),salt:Math.random(),isChoked:!0})}),n.sort(e);for(var r=0,o=0;o<n.length&&r<t._rechokeNumSlots;++o)n[o].isChoked=!1,n[o].wire.peerInterested&&(r+=1);if(!t._rechokeOptimisticWire&&o<n.length&&t._rechokeNumSlots){var i=n.slice(o).filter(function(e){return e.wire.peerInterested}),a=i[s(i.length)];a&&(a.isChoked=!1,t._rechokeOptimisticWire=a.wire,t._rechokeOptimisticTime=G)}n.forEach(function(e){e.wire.amChoking!==e.isChoked&&(e.isChoked?e.wire.choke():e.wire.unchoke())})}},o.prototype._hotswap=function(e,t){var n=this,r=e.downloadSpeed();if(r<P.BLOCK_LENGTH)return!1;if(!n._reservations[t])return!1;var o=n._reservations[t];if(!o)return!1;var i,a,s=1/0;for(a=0;a<o.length;a++){var u=o[a];if(u&&u!==e){var c=u.downloadSpeed();c>=V||2*c>r||c>s||(i=u,s=c)}}if(!i)return!1;for(a=0;a<o.length;a++)o[a]===i&&(o[a]=null);for(a=0;a<i.requests.length;a++){var l=i.requests[a];l.piece===t&&n.pieces[t].cancel(l.offset/P.BLOCK_LENGTH|0)}return n.emit("hotswap",i,e,t),!0},o.prototype._request=function(e,n,r){function o(){t.nextTick(function(){s._update()})}var s=this,u=e.requests.length,c="webSeed"===e.type;if(s.bitfield.get(n))return!1;var l=c?Math.min(a(e,$,s.pieceLength),s.maxWebConns):i(e,$);if(u>=l)return!1;var f=s.pieces[n],d=c?f.reserveRemaining():f.reserve();if(d===-1&&r&&s._hotswap(e,n)&&(d=c?f.reserveRemaining():f.reserve()),d===-1)return!1;var p=s._reservations[n];p||(p=s._reservations[n]=[]);var h=p.indexOf(null);h===-1&&(h=p.length),p[h]=e;var m=f.chunkOffset(d),v=c?f.chunkLengthRemaining(d):f.chunkLength(d);return e.request(n,m,v,function t(r,i){if(!s.ready)return s.once("ready",function(){t(r,i)});if(p[h]===e&&(p[h]=null),f!==s.pieces[n])return o();if(r)return s._debug("error getting piece %s (offset: %s length: %s) from %s: %s",n,m,v,e.remoteAddress+":"+e.remotePort,r.message),c?f.cancelRemaining(d):f.cancel(d),void o();if(s._debug("got piece %s (offset: %s length: %s) from %s",n,m,v,e.remoteAddress+":"+e.remotePort),!f.set(d,i,e))return o();var a=f.flush();O(a,function(e){if(!s.destroyed){if(e===s._hashes[n]){if(!s.pieces[n])return;s._debug("piece verified %s",n),s.pieces[n]=null,s._reservations[n]=null,s.bitfield.set(n,!0),s.store.put(n,a),s.wires.forEach(function(e){e.have(n)}),s._checkDone()&&!s.destroyed&&s.discovery.complete()}else s.pieces[n]=new P(f.length),s.emit("warning",new Error("Piece "+n+" failed verification"));o()}})}),!0},o.prototype._checkDone=function(){var e=this;if(!e.destroyed){e.files.forEach(function(t){if(!t.done){for(var n=t._startPiece;n<=t._endPiece;++n)if(!e.bitfield.get(n))return;t.done=!0,t.emit("done"),e._debug("file done: "+t.name)}});for(var t=!0,n=0;n<e._selections.length;n++){for(var r=e._selections[n],o=r.from;o<=r.to;o++)if(!e.bitfield.get(o)){t=!1;break}if(!t)break}return!e.done&&t&&(e.done=!0,e._debug("torrent done: "+e.infoHash),e.emit("done")),e._gcSelections(),t}},o.prototype.load=function(e,t){var n=this;if(n.destroyed)throw new Error("torrent is destroyed");if(!n.ready)return n.once("ready",function(){n.load(e,t)});Array.isArray(e)||(e=[e]),t||(t=u);var r=new x(e),o=new d(n.store,n.pieceLength);R(r,o,function(e){return e?t(e):(n.pieces.forEach(function(e,t){n.pieces[t]=null,n._reservations[t]=null,n.bitfield.set(t,!0)}),n._checkDone(),void t(null))})},o.prototype.createServer=function(e){if("function"!=typeof H)throw new Error("node.js-only method");if(this.destroyed)throw new Error("torrent is destroyed");var t=new H(this,e);return this._servers.push(t),t},o.prototype.pause=function(){this.destroyed||(this._debug("pause"),this.paused=!0)},o.prototype.resume=function(){this.destroyed||(this._debug("resume"),this.paused=!1,this._drain())},o.prototype._debug=function(){var e=[].slice.call(arguments);e[0]="["+this.client._debugId+"] ["+this._debugId+"] "+e[0],p.apply(null,e)},o.prototype._drain=function(){var e=this;if(this._debug("_drain numConns %s maxConns %s",e._numConns,e.client.maxConns),!("function"!=typeof k.connect||e.destroyed||e.paused||e._numConns>=e.client.maxConns)){this._debug("drain (%s queued, %s/%s peers)",e._numQueued,e.numPeers,e.client.maxConns);var t=e._queue.shift();if(t){this._debug("tcp connect attempt to %s",t.addr);var n=l(t.addr),r={host:n[0],port:n[1]},o=t.conn=k.connect(r);o.once("connect",function(){t.onConnect()}),o.once("error",function(e){t.destroy(e)}),t.startConnectTimeout(),o.on("close",function(){if(!e.destroyed){if(t.retries>=Q.length)return void e._debug("conn %s closed: will not re-add (max %s attempts)",t.addr,Q.length);var n=Q[t.retries];e._debug("conn %s closed: will re-add to queue in %sms (attempt %s)",t.addr,n,t.retries+1);var r=setTimeout(function(){var n=e._addPeer(t.addr);n&&(n.retries=t.retries+1)},n);r.unref&&r.unref()}})}}},o.prototype._validAddr=function(e){var t;try{t=l(e)}catch(e){return!1}var n=t[0],r=t[1];return r>0&&r<65535&&!("127.0.0.1"===n&&r===this.client.torrentPort)}}).call(this,e("_process"),"undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":122,"./file":2,"./peer":3,"./rarity-map":4,"./server":21,_process:67,"addr-to-ip-port":7,bitfield:13,"chunk-store-stream/write":26,debug:30,events:35,fs:22,"fs-chunk-store":51,"immediate-chunk-store":41,inherits:42,multistream:59,net:21,os:21,"parse-torrent":63,path:64,pump:68,"random-iterate":73,"run-parallel":86,"run-parallel-limit":85,"simple-get":90,"simple-sha1":92,speedometer:94,"torrent-discovery":106,"torrent-piece":107,uniq:110,ut_metadata:114,ut_pex:21,xtend:119,"xtend/mutable":120}],6:[function(e,t,n){function r(e,t){l.call(this),this.url=e,this.webPeerId=c.sync(e),this._torrent=t,this._init()}t.exports=r;var o=e("bitfield"),i=e("safe-buffer").Buffer,a=e("debug")("webtorrent:webconn"),s=e("simple-get"),u=e("inherits"),c=e("simple-sha1"),l=e("bittorrent-protocol"),f=e("../package.json").version;u(r,l),r.prototype._init=function(){var e=this;e.setKeepAlive(!0),e.once("handshake",function(t,n){if(!e.destroyed){e.handshake(t,e.webPeerId);for(var r=e._torrent.pieces.length,i=new o(r),a=0;a<=r;a++)i.set(a,!0);e.bitfield(i)}}),e.once("interested",function(){a("interested"),e.unchoke()}),e.on("uninterested",function(){a("uninterested")}),e.on("choke",function(){a("choke")}),e.on("unchoke",function(){a("unchoke")}),e.on("bitfield",function(){a("bitfield")}),e.on("request",function(t,n,r,o){a("request pieceIndex=%d offset=%d length=%d",t,n,r),e.httpRequest(t,n,r,o)})},r.prototype.httpRequest=function(e,t,n,r){var o,u=this,c=e*u._torrent.pieceLength,l=c+t,d=l+n-1,p=u._torrent.files;if(p.length<=1)o=[{url:u.url,start:l,end:d}];else{var h=p.filter(function(e){return e.offset<=d&&e.offset+e.length>l});if(h.length<1)return r(new Error("Could not find file corresponnding to web seed range request"));o=h.map(function(e){var t=e.offset+e.length-1,n=u.url+("/"===u.url[u.url.length-1]?"":"/")+e.path;return{url:n,fileOffsetInRange:Math.max(e.offset-l,0),start:Math.max(l-e.offset,0),end:Math.min(t,d-e.offset)}})}var m,v=0,g=!1;o.length>1&&(m=i.alloc(n)),o.forEach(function(i){function u(e,t){return e.statusCode<200||e.statusCode>=300?(g=!0,r(new Error("Unexpected HTTP status code "+e.statusCode))):(a("Got data of length %d",t.length),void(1===o.length?r(null,t):(t.copy(m,i.fileOffsetInRange),++v===o.length&&r(null,m))))}var c=i.url,l=i.start,d=i.end;a("Requesting url=%s pieceIndex=%d offset=%d length=%d start=%d end=%d",c,e,t,n,l,d);var p={url:c,method:"GET",headers:{"user-agent":"WebTorrent/"+f+" (https://webtorrent.io)",range:"bytes="+l+"-"+d}};s.concat(p,function(e,t,n){if(!g)return e?"undefined"==typeof window||c.startsWith(window.location.origin+"/")?(g=!0,r(e)):s.head(c,function(t,n){if(!g){if(t)return g=!0,r(t);if(n.statusCode<200||n.statusCode>=300)return g=!0,r(new Error("Unexpected HTTP status code "+n.statusCode));if(n.url===c)return g=!0,r(e);p.url=n.url,s.concat(p,function(e,t,n){
  if(!g)return e?(g=!0,r(e)):void u(t,n)})}}):void u(t,n)})})},r.prototype.destroy=function(){l.prototype.destroy.call(this),this._torrent=null}},{"../package.json":122,bitfield:13,"bittorrent-protocol":14,debug:30,inherits:42,"safe-buffer":88,"simple-get":90,"simple-sha1":92}],7:[function(e,t,n){var r=/^\[?([^\]]+)\]?:(\d+)$/,o={},i=0;t.exports=function(e){if(1e5===i&&t.exports.reset(),!o[e]){var n=r.exec(e);if(!n)throw new Error("invalid addr: "+e);o[e]=[n[1],Number(n[2])],i+=1}return o[e]},t.exports.reset=function(){o={},i=0}},{}],8:[function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function o(e){return 3*e.length/4-r(e)}function i(e){var t,n,o,i,a,s,u=e.length;a=r(e),s=new f(3*u/4-a),o=a>0?u-4:u;var c=0;for(t=0,n=0;t<o;t+=4,n+=3)i=l[e.charCodeAt(t)]<<18|l[e.charCodeAt(t+1)]<<12|l[e.charCodeAt(t+2)]<<6|l[e.charCodeAt(t+3)],s[c++]=i>>16&255,s[c++]=i>>8&255,s[c++]=255&i;return 2===a?(i=l[e.charCodeAt(t)]<<2|l[e.charCodeAt(t+1)]>>4,s[c++]=255&i):1===a&&(i=l[e.charCodeAt(t)]<<10|l[e.charCodeAt(t+1)]<<4|l[e.charCodeAt(t+2)]>>2,s[c++]=i>>8&255,s[c++]=255&i),s}function a(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function s(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16)+(e[i+1]<<8)+e[i+2],o.push(a(r));return o.join("")}function u(e){for(var t,n=e.length,r=n%3,o="",i=[],a=16383,u=0,l=n-r;u<l;u+=a)i.push(s(e,u,u+a>l?l:u+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+="="),i.push(o),i.join("")}n.byteLength=o,n.toByteArray=i,n.fromByteArray=u;for(var c=[],l=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,h=d.length;p<h;++p)c[p]=d[p],l[d.charCodeAt(p)]=p;l["-".charCodeAt(0)]=62,l["_".charCodeAt(0)]=63},{}],9:[function(e,t,n){(function(e){function n(e,t,n){for(var r=0,o=1,i=t;i<n;i++){var a=e[i];if(a<58&&a>=48)r=10*r+(a-48);else if(i!==t||43!==a){if(i!==t||45!==a){if(46===a)break;throw new Error("not a number: buffer["+i+"] = "+a)}o=-1}}return r*o}function r(t,n,o,i){return null==t||0===t.length?null:("number"!=typeof n&&null==i&&(i=n,n=void 0),"number"!=typeof o&&null==i&&(i=o,o=void 0),r.position=0,r.encoding=i||null,r.data=e.isBuffer(t)?t.slice(n,o):new e(t),r.bytes=r.data.length,r.next())}r.bytes=0,r.position=0,r.data=null,r.encoding=null,r.next=function(){switch(r.data[r.position]){case 100:return r.dictionary();case 108:return r.list();case 105:return r.integer();default:return r.buffer()}},r.find=function(e){for(var t=r.position,n=r.data.length,o=r.data;t<n;){if(o[t]===e)return t;t++}throw new Error('Invalid data: Missing delimiter "'+String.fromCharCode(e)+'" [0x'+e.toString(16)+"]")},r.dictionary=function(){r.position++;for(var e={};101!==r.data[r.position];)e[r.buffer()]=r.next();return r.position++,e},r.list=function(){r.position++;for(var e=[];101!==r.data[r.position];)e.push(r.next());return r.position++,e},r.integer=function(){var e=r.find(101),t=n(r.data,r.position+1,e);return r.position+=e+1-r.position,t},r.buffer=function(){var e=r.find(58),t=n(r.data,r.position,e),o=++e+t;return r.position=o,r.encoding?r.data.toString(r.encoding,e,o):r.data.slice(e,o)},t.exports=r}).call(this,e("buffer").Buffer)},{buffer:24}],10:[function(e,t,n){(function(e){function n(t,r,o){var i=[],a=null;return n._encode(i,t),a=e.concat(i),n.bytes=a.length,e.isBuffer(r)?(a.copy(r,o),r):a}n.bytes=-1,n._floatConversionDetected=!1,n._encode=function(t,r){if(e.isBuffer(r))return t.push(new e(r.length+":")),void t.push(r);if(null!=r)switch(typeof r){case"string":n.buffer(t,r);break;case"number":n.number(t,r);break;case"object":r.constructor===Array?n.list(t,r):n.dict(t,r);break;case"boolean":n.number(t,r?1:0)}};var r=new e("e"),o=new e("d"),i=new e("l");n.buffer=function(t,n){t.push(new e(e.byteLength(n)+":"+n))},n.number=function(t,r){var o=2147483648,i=r/o<<0,a=r%o<<0,s=i*o+a;t.push(new e("i"+s+"e")),s===r||n._floatConversionDetected||(n._floatConversionDetected=!0,console.warn('WARNING: Possible data corruption detected with value "'+r+'":','Bencoding only defines support for integers, value was converted to "'+s+'"'),console.trace())},n.dict=function(e,t){e.push(o);for(var i,a=0,s=Object.keys(t).sort(),u=s.length;a<u;a++)i=s[a],null!=t[i]&&(n.buffer(e,i),n._encode(e,t[i]));e.push(r)},n.list=function(e,t){var o=0,a=t.length;for(e.push(i);o<a;o++)null!=t[o]&&n._encode(e,t[o]);e.push(r)},t.exports=n}).call(this,e("buffer").Buffer)},{buffer:24}],11:[function(e,t,n){var r=t.exports;r.encode=e("./encode"),r.decode=e("./decode"),r.byteLength=r.encodingLength=function(e){return r.encode(e).length}},{"./decode":9,"./encode":10}],12:[function(e,t,n){t.exports=function(e,t,n,r,o){var i,a;if(void 0===r)r=0;else if(r|=0,r<0||r>=e.length)throw new RangeError("invalid lower bound");if(void 0===o)o=e.length-1;else if(o|=0,o<r||o>=e.length)throw new RangeError("invalid upper bound");for(;r<=o;)if(i=r+(o-r>>1),a=+n(e[i],t,i,e),a<0)r=i+1;else{if(!(a>0))return i;o=i-1}return~r}},{}],13:[function(e,t,n){(function(e){function n(e,t){return this instanceof n?(0===arguments.length&&(e=0),this.grow=t&&(isFinite(t.grow)&&r(t.grow)||t.grow)||0,"number"!=typeof e&&void 0!==e||(e=new o(r(e)),e.fill&&!e._isBuffer&&e.fill(0)),void(this.buffer=e)):new n(e,t)}function r(e){var t=e>>3;return e%8!==0&&t++,t}var o="undefined"!=typeof e?e:"undefined"!=typeof Int8Array?Int8Array:function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0};n.prototype.get=function(e){var t=e>>3;return t<this.buffer.length&&!!(this.buffer[t]&128>>e%8)},n.prototype.set=function(e,t){var n=e>>3;t||1===arguments.length?(this.buffer.length<n+1&&this._grow(Math.max(n+1,Math.min(2*this.buffer.length,this.grow))),this.buffer[n]|=128>>e%8):n<this.buffer.length&&(this.buffer[n]&=~(128>>e%8))},n.prototype._grow=function(e){if(this.buffer.length<e&&e<=this.grow){var t=new o(e);if(t.fill&&t.fill(0),this.buffer.copy)this.buffer.copy(t,0);else for(var n=0;n<this.buffer.length;n++)t[n]=this.buffer[n];this.buffer=t}},"undefined"!=typeof t&&(t.exports=n)}).call(this,e("buffer").Buffer)},{buffer:24}],14:[function(e,t,n){function r(e,t,n,r){this.piece=e,this.offset=t,this.length=n,this.callback=r}function o(){return this instanceof o?(h.Duplex.call(this),this._debugId=d(4).toString("hex"),this._debug("new wire"),this.peerId=null,this.peerIdBuffer=null,this.type=null,this.amChoking=!0,this.amInterested=!1,this.peerChoking=!0,this.peerInterested=!1,this.peerPieces=new s(0,{grow:m}),this.peerExtensions={},this.requests=[],this.peerRequests=[],this.extendedMapping={},this.peerExtendedMapping={},this.extendedHandshake={},this.peerExtendedHandshake={},this._ext={},this._nextExt=1,this.uploaded=0,this.downloaded=0,this.uploadSpeed=p(),this.downloadSpeed=p(),this._keepAliveInterval=null,this._timeout=null,this._timeoutMs=0,this.destroyed=!1,this._finished=!1,this._parserSize=0,this._parser=null,this._buffer=[],this._bufferSize=0,this.on("finish",this._onFinish),void this._parseHandshake()):new o}function i(e,t,n,r){for(var o=0;o<e.length;o++){var i=e[o];if(i.piece===t&&i.offset===n&&i.length===r)return 0===o?e.shift():e.splice(o,1),i}return null}t.exports=o;var a=e("bencode"),s=e("bitfield"),u=e("safe-buffer").Buffer,c=e("debug")("bittorrent-protocol"),l=e("xtend"),f=e("inherits"),d=e("randombytes"),p=e("speedometer"),h=e("readable-stream"),m=4e5,v=55e3,g=u.from("BitTorrent protocol"),y=u.from([0,0,0,0]),_=u.from([0,0,0,1,0]),b=u.from([0,0,0,1,1]),w=u.from([0,0,0,1,2]),E=u.from([0,0,0,1,3]),x=[0,0,0,0,0,0,0,0],k=[0,0,0,3,9,0,0];f(o,h.Duplex),o.prototype.setKeepAlive=function(e){var t=this;t._debug("setKeepAlive %s",e),clearInterval(t._keepAliveInterval),e!==!1&&(t._keepAliveInterval=setInterval(function(){t.keepAlive()},v))},o.prototype.setTimeout=function(e,t){this._debug("setTimeout ms=%d unref=%s",e,t),this._clearTimeout(),this._timeoutMs=e,this._timeoutUnref=!!t,this._updateTimeout()},o.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this._debug("destroy"),this.emit("close"),this.end())},o.prototype.end=function(){this._debug("end"),this._onUninterested(),this._onChoke(),h.Duplex.prototype.end.apply(this,arguments)},o.prototype.use=function(e){function t(){}var n=e.prototype.name;if(!n)throw new Error('Extension class requires a "name" property on the prototype');this._debug("use extension.name=%s",n);var r=this._nextExt,o=new e(this);"function"!=typeof o.onHandshake&&(o.onHandshake=t),"function"!=typeof o.onExtendedHandshake&&(o.onExtendedHandshake=t),"function"!=typeof o.onMessage&&(o.onMessage=t),this.extendedMapping[r]=n,this._ext[n]=o,this[n]=o,this._nextExt+=1},o.prototype.keepAlive=function(){this._debug("keep-alive"),this._push(y)},o.prototype.handshake=function(e,t,n){var r,o;if("string"==typeof e?r=u.from(e,"hex"):(r=e,e=r.toString("hex")),"string"==typeof t?o=u.from(t,"hex"):(o=t,t=o.toString("hex")),20!==r.length||20!==o.length)throw new Error("infoHash and peerId MUST have length 20");this._debug("handshake i=%s p=%s exts=%o",e,t,n);var i=u.from(x);i[5]|=16,n&&n.dht&&(i[7]|=1),this._push(u.concat([g,i,r,o])),this._handshakeSent=!0,this.peerExtensions.extended&&!this._extendedHandshakeSent&&this._sendExtendedHandshake()},o.prototype._sendExtendedHandshake=function(){var e=l(this.extendedHandshake);e.m={};for(var t in this.extendedMapping){var n=this.extendedMapping[t];e.m[n]=Number(t)}this.extended(0,a.encode(e)),this._extendedHandshakeSent=!0},o.prototype.choke=function(){this.amChoking||(this.amChoking=!0,this._debug("choke"),this.peerRequests.splice(0,this.peerRequests.length),this._push(_))},o.prototype.unchoke=function(){this.amChoking&&(this.amChoking=!1,this._debug("unchoke"),this._push(b))},o.prototype.interested=function(){this.amInterested||(this.amInterested=!0,this._debug("interested"),this._push(w))},o.prototype.uninterested=function(){this.amInterested&&(this.amInterested=!1,this._debug("uninterested"),this._push(E))},o.prototype.have=function(e){this._debug("have %d",e),this._message(4,[e],null)},o.prototype.bitfield=function(e){this._debug("bitfield"),u.isBuffer(e)||(e=e.buffer),this._message(5,[],e)},o.prototype.request=function(e,t,n,o){return o||(o=function(){}),this._finished?o(new Error("wire is closed")):this.peerChoking?o(new Error("peer is choking")):(this._debug("request index=%d offset=%d length=%d",e,t,n),this.requests.push(new r(e,t,n,o)),this._updateTimeout(),void this._message(6,[e,t,n],null))},o.prototype.piece=function(e,t,n){this._debug("piece index=%d offset=%d",e,t),this.uploaded+=n.length,this.uploadSpeed(n.length),this.emit("upload",n.length),this._message(7,[e,t],n)},o.prototype.cancel=function(e,t,n){this._debug("cancel index=%d offset=%d length=%d",e,t,n),this._callback(i(this.requests,e,t,n),new Error("request was cancelled"),null),this._message(8,[e,t,n],null)},o.prototype.port=function(e){this._debug("port %d",e);var t=u.from(k);t.writeUInt16BE(e,5),this._push(t)},o.prototype.extended=function(e,t){if(this._debug("extended ext=%s",e),"string"==typeof e&&this.peerExtendedMapping[e]&&(e=this.peerExtendedMapping[e]),"number"!=typeof e)throw new Error("Unrecognized extension: "+e);var n=u.from([e]),r=u.isBuffer(t)?t:a.encode(t);this._message(20,[],u.concat([n,r]))},o.prototype._read=function(){},o.prototype._message=function(e,t,n){var r=n?n.length:0,o=u.allocUnsafe(5+4*t.length);o.writeUInt32BE(o.length+r-4,0),o[4]=e;for(var i=0;i<t.length;i++)o.writeUInt32BE(t[i],5+4*i);this._push(o),n&&this._push(n)},o.prototype._push=function(e){if(!this._finished)return this.push(e)},o.prototype._onKeepAlive=function(){this._debug("got keep-alive"),this.emit("keep-alive")},o.prototype._onHandshake=function(e,t,n){var r=e.toString("hex"),o=t.toString("hex");this._debug("got handshake i=%s p=%s exts=%o",r,o,n),this.peerId=o,this.peerIdBuffer=t,this.peerExtensions=n,this.emit("handshake",r,o,n);var i;for(i in this._ext)this._ext[i].onHandshake(r,o,n);n.extended&&this._handshakeSent&&!this._extendedHandshakeSent&&this._sendExtendedHandshake()},o.prototype._onChoke=function(){for(this.peerChoking=!0,this._debug("got choke"),this.emit("choke");this.requests.length;)this._callback(this.requests.shift(),new Error("peer is choking"),null)},o.prototype._onUnchoke=function(){this.peerChoking=!1,this._debug("got unchoke"),this.emit("unchoke")},o.prototype._onInterested=function(){this.peerInterested=!0,this._debug("got interested"),this.emit("interested")},o.prototype._onUninterested=function(){this.peerInterested=!1,this._debug("got uninterested"),this.emit("uninterested")},o.prototype._onHave=function(e){this.peerPieces.get(e)||(this._debug("got have %d",e),this.peerPieces.set(e,!0),this.emit("have",e))},o.prototype._onBitField=function(e){this.peerPieces=new s(e),this._debug("got bitfield"),this.emit("bitfield",this.peerPieces)},o.prototype._onRequest=function(e,t,n){var o=this;if(!o.amChoking){o._debug("got request index=%d offset=%d length=%d",e,t,n);var a=function(r,a){if(s===i(o.peerRequests,e,t,n))return r?o._debug("error satisfying request index=%d offset=%d length=%d (%s)",e,t,n,r.message):void o.piece(e,t,a)},s=new r(e,t,n,a);o.peerRequests.push(s),o.emit("request",e,t,n,a)}},o.prototype._onPiece=function(e,t,n){this._debug("got piece index=%d offset=%d",e,t),this._callback(i(this.requests,e,t,n.length),null,n),this.downloaded+=n.length,this.downloadSpeed(n.length),this.emit("download",n.length),this.emit("piece",e,t,n)},o.prototype._onCancel=function(e,t,n){this._debug("got cancel index=%d offset=%d length=%d",e,t,n),i(this.peerRequests,e,t,n),this.emit("cancel",e,t,n)},o.prototype._onPort=function(e){this._debug("got port %d",e),this.emit("port",e)},o.prototype._onExtended=function(e,t){if(0===e){var n;try{n=a.decode(t)}catch(e){this._debug("ignoring invalid extended handshake: %s",e.message||e)}if(!n)return;this.peerExtendedHandshake=n;var r;if("object"==typeof n.m)for(r in n.m)this.peerExtendedMapping[r]=Number(n.m[r].toString());for(r in this._ext)this.peerExtendedMapping[r]&&this._ext[r].onExtendedHandshake(this.peerExtendedHandshake);this._debug("got extended handshake"),this.emit("extended","handshake",this.peerExtendedHandshake)}else this.extendedMapping[e]&&(e=this.extendedMapping[e],this._ext[e]&&this._ext[e].onMessage(t)),this._debug("got extended message ext=%s",e),this.emit("extended",e,t)},o.prototype._onTimeout=function(){this._debug("request timed out"),this._callback(this.requests.shift(),new Error("request has timed out"),null),this.emit("timeout")},o.prototype._write=function(e,t,n){for(this._bufferSize+=e.length,this._buffer.push(e);this._bufferSize>=this._parserSize;){var r=1===this._buffer.length?this._buffer[0]:u.concat(this._buffer);this._bufferSize-=this._parserSize,this._buffer=this._bufferSize?[r.slice(this._parserSize)]:[],this._parser(r.slice(0,this._parserSize))}n(null)},o.prototype._callback=function(e,t,n){e&&(this._clearTimeout(),this.peerChoking||this._finished||this._updateTimeout(),e.callback(t,n))},o.prototype._clearTimeout=function(){this._timeout&&(clearTimeout(this._timeout),this._timeout=null)},o.prototype._updateTimeout=function(){var e=this;e._timeoutMs&&e.requests.length&&!e._timeout&&(e._timeout=setTimeout(function(){e._onTimeout()},e._timeoutMs),e._timeoutUnref&&e._timeout.unref&&e._timeout.unref())},o.prototype._parse=function(e,t){this._parserSize=e,this._parser=t},o.prototype._onMessageLength=function(e){var t=e.readUInt32BE(0);t>0?this._parse(t,this._onMessage):(this._onKeepAlive(),this._parse(4,this._onMessageLength))},o.prototype._onMessage=function(e){switch(this._parse(4,this._onMessageLength),e[0]){case 0:return this._onChoke();case 1:return this._onUnchoke();case 2:return this._onInterested();case 3:return this._onUninterested();case 4:return this._onHave(e.readUInt32BE(1));case 5:return this._onBitField(e.slice(1));case 6:return this._onRequest(e.readUInt32BE(1),e.readUInt32BE(5),e.readUInt32BE(9));case 7:return this._onPiece(e.readUInt32BE(1),e.readUInt32BE(5),e.slice(9));case 8:return this._onCancel(e.readUInt32BE(1),e.readUInt32BE(5),e.readUInt32BE(9));case 9:return this._onPort(e.readUInt16BE(1));case 20:return this._onExtended(e.readUInt8(1),e.slice(2));default:return this._debug("got unknown message"),this.emit("unknownmessage",e)}},o.prototype._parseHandshake=function(){var e=this;e._parse(1,function(t){var n=t.readUInt8(0);e._parse(n+48,function(t){var r=t.slice(0,n);return"BitTorrent protocol"!==r.toString()?(e._debug("Error: wire not speaking BitTorrent protocol (%s)",r.toString()),void e.end()):(t=t.slice(n),e._onHandshake(t.slice(8,28),t.slice(28,48),{dht:!!(1&t[7]),extended:!!(16&t[5])}),void e._parse(4,e._onMessageLength))})})},o.prototype._onFinish=function(){for(this._finished=!0,this.push(null);this.read(););for(clearInterval(this._keepAliveInterval),this._parse(Number.MAX_VALUE,function(){}),this.peerRequests=[];this.requests.length;)this._callback(this.requests.shift(),new Error("wire was closed"),null)},o.prototype._debug=function(){var e=[].slice.call(arguments);e[0]="["+this._debugId+"] "+e[0],c.apply(null,e)}},{bencode:11,bitfield:13,debug:30,inherits:42,randombytes:74,"readable-stream":82,"safe-buffer":88,speedometer:94,xtend:119}],15:[function(e,t,n){(function(n){function r(e){function t(e){n.nextTick(function(){s.emit("warning",e)})}var s=this;if(!(s instanceof r))return new r(e);if(a.call(s),e||(e={}),!e.peerId)throw new Error("Option `peerId` is required");if(!e.infoHash)throw new Error("Option `infoHash` is required");if(!e.announce)throw new Error("Option `announce` is required");if(!n.browser&&!e.port)throw new Error("Option `port` is required");s.peerId="string"==typeof e.peerId?e.peerId:e.peerId.toString("hex"),s._peerIdBuffer=o.from(s.peerId,"hex"),s._peerIdBinary=s._peerIdBuffer.toString("binary"),s.infoHash="string"==typeof e.infoHash?e.infoHash:e.infoHash.toString("hex"),s._infoHashBuffer=o.from(s.infoHash,"hex"),s._infoHashBinary=s._infoHashBuffer.toString("binary"),i("new client %s",s.infoHash),s.destroyed=!1,s._port=e.port,s._getAnnounceOpts=e.getAnnounceOpts,s._rtcConfig=e.rtcConfig,s._userAgent=e.userAgent,s._wrtc="function"==typeof e.wrtc?e.wrtc():e.wrtc;var u="string"==typeof e.announce?[e.announce]:null==e.announce?[]:e.announce;u=u.map(function(e){return e=e.toString(),"/"===e[e.length-1]&&(e=e.substring(0,e.length-1)),e}),u=d(u);var c=s._wrtc!==!1&&(!!s._wrtc||f.WEBRTC_SUPPORT);s._trackers=u.map(function(e){var n=p.parse(e).protocol;return"http:"!==n&&"https:"!==n||"function"!=typeof m?"udp:"===n&&"function"==typeof v?new v(s,e):"ws:"!==n&&"wss:"!==n||!c?(t(new Error("Unsupported tracker protocol: "+e)),null):"ws:"===n&&"undefined"!=typeof window&&"https:"===window.location.protocol?(t(new Error("Unsupported tracker protocol: "+e)),null):new g(s,e):new m(s,e)}).filter(Boolean)}t.exports=r;var o=e("safe-buffer").Buffer,i=e("debug")("bittorrent-tracker:client"),a=e("events").EventEmitter,s=e("xtend"),u=e("inherits"),c=e("once"),l=e("run-parallel"),f=e("simple-peer"),d=e("uniq"),p=e("url"),h=e("./lib/common"),m=e("./lib/client/http-tracker"),v=e("./lib/client/udp-tracker"),g=e("./lib/client/websocket-tracker");u(r,a),r.scrape=function(e,t){if(t=c(t),!e.infoHash)throw new Error("Option `infoHash` is required");if(!e.announce)throw new Error("Option `announce` is required");var n=s(e,{infoHash:Array.isArray(e.infoHash)?e.infoHash[0]:e.infoHash,peerId:o.from("01234567890123456789"),port:6881}),i=new r(n);i.once("error",t),i.once("warning",t);var a=Array.isArray(e.infoHash)?e.infoHash.length:1,u={};return i.on("scrape",function(e){if(a-=1,u[e.infoHash]=e,0===a){i.destroy();var n=Object.keys(u);1===n.length?t(null,u[n[0]]):t(null,u)}}),e.infoHash=Array.isArray(e.infoHash)?e.infoHash.map(function(e){return o.from(e,"hex")}):o.from(e.infoHash,"hex"),i.scrape({infoHash:e.infoHash}),i},r.prototype.start=function(e){var t=this;i("send `start`"),e=t._defaultAnnounceOpts(e),e.event="started",t._announce(e),t._trackers.forEach(function(e){e.setInterval()})},r.prototype.stop=function(e){var t=this;i("send `stop`"),e=t._defaultAnnounceOpts(e),e.event="stopped",t._announce(e)},r.prototype.complete=function(e){var t=this;i("send `complete`"),e||(e={}),e=t._defaultAnnounceOpts(e),e.event="completed",t._announce(e)},r.prototype.update=function(e){var t=this;i("send `update`"),e=t._defaultAnnounceOpts(e),e.event&&delete e.event,t._announce(e)},r.prototype._announce=function(e){var t=this;t._trackers.forEach(function(t){t.announce(e)})},r.prototype.scrape=function(e){var t=this;i("send `scrape`"),e||(e={}),t._trackers.forEach(function(t){t.scrape(e)})},r.prototype.setInterval=function(e){var t=this;i("setInterval %d",e),t._trackers.forEach(function(t){t.setInterval(e)})},r.prototype.destroy=function(e){var t=this;if(!t.destroyed){t.destroyed=!0,i("destroy");var n=t._trackers.map(function(e){return function(t){e.destroy(t)}});l(n,e),t._trackers=[],t._getAnnounceOpts=null}},r.prototype._defaultAnnounceOpts=function(e){var t=this;return e||(e={}),null==e.numwant&&(e.numwant=h.DEFAULT_ANNOUNCE_PEERS),null==e.uploaded&&(e.uploaded=0),null==e.downloaded&&(e.downloaded=0),t._getAnnounceOpts&&(e=s(e,t._getAnnounceOpts())),e}}).call(this,e("_process"))},{"./lib/client/http-tracker":21,"./lib/client/udp-tracker":21,"./lib/client/websocket-tracker":17,"./lib/common":18,_process:67,debug:30,events:35,inherits:42,once:61,"run-parallel":86,"safe-buffer":88,"simple-peer":91,uniq:110,url:112,xtend:119}],16:[function(e,t,n){function r(e,t){var n=this;o.call(n),n.client=e,n.announceUrl=t,n.interval=null,n.destroyed=!1}t.exports=r;var o=e("events").EventEmitter,i=e("inherits");i(r,o),r.prototype.setInterval=function(e){var t=this;null==e&&(e=t.DEFAULT_ANNOUNCE_INTERVAL),clearInterval(t.interval),e&&(t.interval=setInterval(function(){t.announce(t.client._defaultAnnounceOpts())},e),t.interval.unref&&t.interval.unref())}},{events:35,inherits:42}],17:[function(e,t,n){function r(e,t,n){var r=this;d.call(r,e,t),i("new websocket tracker %s",t),r.peers={},r.socket=null,r.reconnecting=!1,r.retries=0,r.reconnectTimer=null,r.expectingResponse=!1,r._openSocket()}function o(){}t.exports=r;var i=e("debug")("bittorrent-tracker:websocket-tracker"),a=e("xtend"),s=e("inherits"),u=e("simple-peer"),c=e("randombytes"),l=e("simple-websocket"),f=e("../common"),d=e("./tracker"),p={},h=15e3,m=18e5,v=3e4,g=5e4;s(r,d),r.prototype.DEFAULT_ANNOUNCE_INTERVAL=3e4,r.prototype.announce=function(e){var t=this;if(!t.destroyed&&!t.reconnecting){if(!t.socket.connected)return void t.socket.once("connect",function(){t.announce(e)});var n=a(e,{action:"announce",info_hash:t.client._infoHashBinary,peer_id:t.client._peerIdBinary});if(t._trackerId&&(n.trackerid=t._trackerId),"stopped"===e.event)t._send(n);else{var r=Math.min(e.numwant,10);t._generateOffers(r,function(e){n.numwant=r,n.offers=e,t._send(n)})}}},r.prototype.scrape=function(e){var t=this;if(!t.destroyed&&!t.reconnecting){if(!t.socket.connected)return void t.socket.once("connect",function(){t.scrape(e)});var n=Array.isArray(e.infoHash)&&e.infoHash.length>0?e.infoHash.map(function(e){return e.toString("binary")}):e.infoHash&&e.infoHash.toString("binary")||t.client._infoHashBinary,r={action:"scrape",info_hash:n};t._send(r)}},r.prototype.destroy=function(e){function t(){s&&(clearTimeout(s),s=null),a.removeListener("data",t),a.destroy(),a=null}var n=this;if(e||(e=o),n.destroyed)return e(null);n.destroyed=!0,clearInterval(n.interval),clearTimeout(n.reconnectTimer);for(var r in n.peers){var i=n.peers[r];clearTimeout(i.trackerTimeout),i.destroy()}if(n.peers=null,n.socket&&(n.socket.removeListener("connect",n._onSocketConnectBound),n.socket.removeListener("data",n._onSocketDataBound),n.socket.removeListener("close",n._onSocketCloseBound),n.socket.removeListener("error",n._onSocketErrorBound),n.socket=null),n._onSocketConnectBound=null,n._onSocketErrorBound=null,n._onSocketDataBound=null,n._onSocketCloseBound=null,p[n.announceUrl]&&(p[n.announceUrl].consumers-=1),p[n.announceUrl].consumers>0)return e();var a=p[n.announceUrl];if(delete p[n.announceUrl],a.on("error",o),a.once("close",e),!n.expectingResponse)return t();var s=setTimeout(t,f.DESTROY_TIMEOUT);a.once("data",t)},r.prototype._openSocket=function(){var e=this;e.destroyed=!1,e.peers||(e.peers={}),e._onSocketConnectBound=function(){e._onSocketConnect()},e._onSocketErrorBound=function(t){e._onSocketError(t)},e._onSocketDataBound=function(t){e._onSocketData(t)},e._onSocketCloseBound=function(){e._onSocketClose()},e.socket=p[e.announceUrl],e.socket?p[e.announceUrl].consumers+=1:(e.socket=p[e.announceUrl]=new l(e.announceUrl),e.socket.consumers=1,e.socket.once("connect",e._onSocketConnectBound)),e.socket.on("data",e._onSocketDataBound),e.socket.once("close",e._onSocketCloseBound),e.socket.once("error",e._onSocketErrorBound)},r.prototype._onSocketConnect=function(){var e=this;e.destroyed||e.reconnecting&&(e.reconnecting=!1,e.retries=0,e.announce(e.client._defaultAnnounceOpts()))},r.prototype._onSocketData=function(e){var t=this;if(!t.destroyed){t.expectingResponse=!1;try{e=JSON.parse(e)}catch(e){return void t.client.emit("warning",new Error("Invalid tracker response"))}"announce"===e.action?t._onAnnounceResponse(e):"scrape"===e.action?t._onScrapeResponse(e):t._onSocketError(new Error("invalid action in WS response: "+e.action))}},r.prototype._onAnnounceResponse=function(e){var t=this;if(e.info_hash!==t.client._infoHashBinary)return void i("ignoring websocket data from %s for %s (looking for %s: reused socket)",t.announceUrl,f.binaryToHex(e.info_hash),t.client.infoHash);if(!e.peer_id||e.peer_id!==t.client._peerIdBinary){i("received %s from %s for %s",JSON.stringify(e),t.announceUrl,t.client.infoHash);var n=e["failure reason"];if(n)return t.client.emit("warning",new Error(n));var r=e["warning message"];r&&t.client.emit("warning",new Error(r));var o=e.interval||e["min interval"];o&&t.setInterval(1e3*o);var a=e["tracker id"];a&&(t._trackerId=a),null!=e.complete&&t.client.emit("update",{announce:t.announceUrl,complete:e.complete,incomplete:e.incomplete});var s;if(e.offer&&e.peer_id&&(i("creating peer (from remote offer)"),s=new u({trickle:!1,config:t.client._rtcConfig,wrtc:t.client._wrtc}),s.id=f.binaryToHex(e.peer_id),s.once("signal",function(n){var r={action:"announce",info_hash:t.client._infoHashBinary,peer_id:t.client._peerIdBinary,to_peer_id:e.peer_id,answer:n,offer_id:e.offer_id};t._trackerId&&(r.trackerid=t._trackerId),t._send(r)}),s.signal(e.offer),t.client.emit("peer",s)),e.answer&&e.peer_id){var c=f.binaryToHex(e.offer_id);s=t.peers[c],s?(s.id=f.binaryToHex(e.peer_id),s.signal(e.answer),t.client.emit("peer",s),clearTimeout(s.trackerTimeout),s.trackerTimeout=null,delete t.peers[c]):i("got unexpected answer: "+JSON.stringify(e.answer))}}},r.prototype._onScrapeResponse=function(e){var t=this;e=e.files||{};var n=Object.keys(e);return 0===n.length?void t.client.emit("warning",new Error("invalid scrape response")):void n.forEach(function(n){var r=e[n];t.client.emit("scrape",{announce:t.announceUrl,infoHash:f.binaryToHex(n),complete:r.complete,incomplete:r.incomplete,downloaded:r.downloaded})})},r.prototype._onSocketClose=function(){var e=this;e.destroyed||(e.destroy(),e._startReconnectTimer())},r.prototype._onSocketError=function(e){var t=this;t.destroyed||(t.destroy(),t.client.emit("warning",e),t._startReconnectTimer())},r.prototype._startReconnectTimer=function(){var e=this,t=Math.floor(Math.random()*v)+Math.min(Math.pow(2,e.retries)*h,m);e.reconnecting=!0,clearTimeout(e.reconnectTimer),e.reconnectTimer=setTimeout(function(){e.retries++,e._openSocket()},t),e.reconnectTimer.unref&&e.reconnectTimer.unref(),i("reconnecting socket in %s ms",t)},r.prototype._send=function(e){var t=this;if(!t.destroyed){t.expectingResponse=!0;var n=JSON.stringify(e);i("send %s",n),t.socket.send(n)}},r.prototype._generateOffers=function(e,t){function n(){var e=c(20).toString("hex");i("creating peer (from _generateOffers)");var t=o.peers[e]=new u({initiator:!0,trickle:!1,config:o.client._rtcConfig,wrtc:o.client._wrtc});t.once("signal",function(t){a.push({offer:t,offer_id:f.hexToBinary(e)}),r()}),t.trackerTimeout=setTimeout(function(){i("tracker timeout: destroying peer"),t.trackerTimeout=null,delete o.peers[e],t.destroy()},g),t.trackerTimeout.unref&&t.trackerTimeout.unref()}function r(){a.length===e&&(i("generated %s offers",e),t(a))}var o=this,a=[];i("generating %s offers",e);for(var s=0;s<e;++s)n();r()}},{"../common":18,"./tracker":16,debug:30,inherits:42,randombytes:74,"simple-peer":91,"simple-websocket":93,xtend:119}],18:[function(e,t,n){var r=e("safe-buffer").Buffer,o=e("xtend/mutable");n.DEFAULT_ANNOUNCE_PEERS=50,n.MAX_ANNOUNCE_PEERS=82,n.binaryToHex=function(e){return"string"!=typeof e&&(e=String(e)),r.from(e,"binary").toString("hex")},n.hexToBinary=function(e){return"string"!=typeof e&&(e=String(e)),r.from(e,"hex").toString("binary")};var i=e("./common-node");o(n,i)},{"./common-node":21,"safe-buffer":88,"xtend/mutable":120}],19:[function(e,t,n){(function(e){t.exports=function(t,n){function r(t){o.removeEventListener("loadend",r,!1),t.error?n(t.error):n(null,new e(o.result))}if("undefined"==typeof Blob||!(t instanceof Blob))throw new Error("first argument must be a Blob");if("function"!=typeof n)throw new Error("second argument must be a function");var o=new FileReader;o.addEventListener("loadend",r,!1),o.readAsArrayBuffer(t)}}).call(this,e("buffer").Buffer)},{buffer:24}],20:[function(e,t,n){(function(n){function r(e,t){return this instanceof r?(i.call(this),t||(t={}),"object"==typeof e&&(t=e,e=t.size),this.size=e||512,t.nopad?this._zeroPadding=!1:this._zeroPadding=a(t.zeroPadding,!0),this._buffered=[],void(this._bufferedBytes=0)):new r(e,t)}var o=e("inherits"),i=e("readable-stream").Transform,a=e("defined");t.exports=r,o(r,i),r.prototype._transform=function(e,t,r){for(this._bufferedBytes+=e.length,this._buffered.push(e);this._bufferedBytes>=this.size;){var o=n.concat(this._buffered);this._bufferedBytes-=this.size,this.push(o.slice(0,this.size)),this._buffered=[o.slice(this.size,o.length)]}r()},r.prototype._flush=function(){if(this._bufferedBytes&&this._zeroPadding){var e=new n(this.size-this._bufferedBytes);e.fill(0),this._buffered.push(e),this.push(n.concat(this._buffered)),this._buffered=null}else this._bufferedBytes&&(this.push(n.concat(this._buffered)),this._buffered=null);this.push(null)}}).call(this,e("buffer").Buffer)},{buffer:24,defined:32,inherits:42,"readable-stream":82}],21:[function(e,t,n){},{}],22:[function(e,t,n){arguments[4][21][0].apply(n,arguments)},{dup:21}],23:[function(e,n,r){(function(t){"use strict";var n=e("buffer"),o=n.Buffer,i=n.SlowBuffer,a=n.kMaxLength||2147483647;r.alloc=function(e,t,n){if("function"==typeof o.alloc)return o.alloc(e,t,n);if("number"==typeof n)throw new TypeError("encoding must not be number");if("number"!=typeof e)throw new TypeError("size must be a number");if(e>a)throw new RangeError("size is too large");var r=n,i=t;void 0===i&&(r=void 0,i=0);var s=new o(e);if("string"==typeof i)for(var u=new o(i,r),c=u.length,l=-1;++l<e;)s[l]=u[l%c];else s.fill(i);return s},r.allocUnsafe=function(e){if("function"==typeof o.allocUnsafe)return o.allocUnsafe(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>a)throw new RangeError("size is too large");return new o(e)},r.from=function(e,n,r){if("function"==typeof o.from&&(!t.Uint8Array||Uint8Array.from!==o.from))return o.from(e,n,r);if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("string"==typeof e)return new o(e,n);if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer){var i=n;if(1===arguments.length)return new o(e);"undefined"==typeof i&&(i=0);var a=r;if("undefined"==typeof a&&(a=e.byteLength-i),i>=e.byteLength)throw new RangeError("'offset' is out of bounds");if(a>e.byteLength-i)throw new RangeError("'length' is out of bounds");return new o(e.slice(i,i+a))}if(o.isBuffer(e)){var s=new o(e.length);
  return e.copy(s,0,0,e.length),s}if(e){if(Array.isArray(e)||"undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return new o(e);if("Buffer"===e.type&&Array.isArray(e.data))return new o(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},r.allocUnsafeSlow=function(e){if("function"==typeof o.allocUnsafeSlow)return o.allocUnsafeSlow(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>=a)throw new RangeError("size is too large");return new i(e)}}).call(this,"undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:24}],24:[function(e,t,n){"use strict";function r(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}function o(e){if(e>X)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=i.prototype,t}function i(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(e)}return a(e,t,n)}function a(e,t,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?d(e,t,n):"string"==typeof e?l(e,t):p(e)}function s(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function u(e,t,n){return s(e),e<=0?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}function c(e){return s(e),o(e<0?0:0|h(e))}function l(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!i.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=0|v(e,t),r=o(n),a=r.write(e,t);return a!==n&&(r=r.slice(0,a)),r}function f(e){for(var t=e.length<0?0:0|h(e.length),n=o(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function d(e,t,n){if(e.byteLength,t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(n||0))throw new RangeError("'length' is out of bounds");var r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),r.__proto__=i.prototype,r}function p(e){if(i.isBuffer(e)){var t=0|h(e.length),n=o(t);return 0===n.length?n:(e.copy(n,0,0,t),n)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||$(e.length)?o(0):f(e);if("Buffer"===e.type&&Array.isArray(e.data))return f(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function h(e){if(e>=X)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+X.toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),i.alloc(+e)}function v(e,t){if(i.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(r)return W(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,n);case"utf8":case"utf-8":return T(this,t,n);case"ascii":return P(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return I(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function _(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=i.from(t,r)),i.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,o){function i(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,u=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}var c;if(o){var l=-1;for(c=n;c<s;c++)if(i(e,c)===i(t,l===-1?0:c-l)){if(l===-1&&(l=c),c-l+1===u)return l*a}else l!==-1&&(c-=c-l),l=-1}else for(n+u>s&&(n=s-u),c=n;c>=0;c--){for(var f=!0,d=0;d<u;d++)if(i(e,c+d)!==i(t,d)){f=!1;break}if(f)return c}return-1}function w(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 TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function E(e,t,n,r){return K(W(t,e.length-n),e,n,r)}function x(e,t,n,r){return K(q(t),e,n,r)}function k(e,t,n,r){return x(e,t,n,r)}function C(e,t,n,r){return K(V(t),e,n,r)}function S(e,t,n,r){return K(z(t,e.length-n),e,n,r)}function I(e,t,n){return 0===t&&n===e.length?Y.fromByteArray(e):Y.fromByteArray(e.slice(t,n))}function T(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i=e[o],a=null,s=i>239?4:i>223?3:i>191?2:1;if(o+s<=n){var u,c,l,f;switch(s){case 1:i<128&&(a=i);break;case 2:u=e[o+1],128===(192&u)&&(f=(31&i)<<6|63&u,f>127&&(a=f));break;case 3:u=e[o+1],c=e[o+2],128===(192&u)&&128===(192&c)&&(f=(15&i)<<12|(63&u)<<6|63&c,f>2047&&(f<55296||f>57343)&&(a=f));break;case 4:u=e[o+1],c=e[o+2],l=e[o+3],128===(192&u)&&128===(192&c)&&128===(192&l)&&(f=(15&i)<<18|(63&u)<<12|(63&c)<<6|63&l,f>65535&&f<1114112&&(a=f))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),o+=s}return A(r)}function A(e){var t=e.length;if(t<=Q)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Q));return n}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function R(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function L(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=H(e[i]);return o}function O(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 M(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function B(e,t,n,r,o,a){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function U(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,r,o){return t=+t,n>>>=0,o||U(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),G.write(e,t,n,r,23,4),n+4}function D(e,t,n,r,o){return t=+t,n>>>=0,o||U(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),G.write(e,t,n,r,52,8),n+8}function j(e){if(e=F(e).replace(Z,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function F(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function W(e,t){t=t||1/0;for(var n,r=e.length,o=null,i=[],a=0;a<r;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(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,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function q(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function z(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}function V(e){return Y.toByteArray(j(e))}function K(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function $(e){return e!==e}var Y=e("base64-js"),G=e("ieee754");n.Buffer=i,n.SlowBuffer=m,n.INSPECT_MAX_BYTES=50;var X=2147483647;n.kMaxLength=X,i.TYPED_ARRAY_SUPPORT=r(),i.TYPED_ARRAY_SUPPORT||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(e,t,n){return a(e,t,n)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(e,t,n){return u(e,t,n)},i.allocUnsafe=function(e){return c(e)},i.allocUnsafeSlow=function(e){return c(e)},i.isBuffer=function(e){return!(null==e||!e._isBuffer)},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,a=Math.min(n,r);o<a;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},i.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return i.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=i.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!i.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},i.byteLength=v,i.prototype._isBuffer=!0,i.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},i.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},i.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},i.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):g.apply(this,arguments)},i.prototype.equals=function(e){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===i.compare(this,e)},i.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},i.prototype.compare=function(e,t,n,r,o){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,o>>>=0,this===e)return 0;for(var a=o-r,s=n-t,u=Math.min(a,s),c=this.slice(r,o),l=e.slice(t,n),f=0;f<u;++f)if(c[f]!==l[f]){a=c[f],s=l[f];break}return a<s?-1:s<a?1:0},i.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},i.prototype.indexOf=function(e,t,n){return _(this,e,t,n,!0)},i.prototype.lastIndexOf=function(e,t,n){return _(this,e,t,n,!1)},i.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return E(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return k(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;i.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return r.__proto__=i.prototype,r},i.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},i.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},i.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||M(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},i.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||M(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},i.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e>>>=0,t||M(e,4,this.length),G.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),G.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),G.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),G.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){var o=Math.pow(2,8*n)-1;B(this,e,t,n,o,0)}var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},i.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){var o=Math.pow(2,8*n)-1;B(this,e,t,n,o,0)}var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},i.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);B(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},i.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);B(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},i.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){return D(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){return D(this,e,t,!1,n)},i.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},i.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!i.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var s=i.isBuffer(e)?e:new i(e,r),u=s.length;for(a=0;a<n-t;++a)this[a+t]=s[a%u]}return this};var Z=/[^+\/0-9A-Za-z-_]/g},{"base64-js":8,ieee754:40}],25:[function(e,t,n){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],26:[function(e,t,n){function r(e,t,n){function i(t){s.destroyed||(e.put(u,t),u+=1)}var s=this;if(!(s instanceof r))return new r(e,t,n);if(a.Writable.call(s,n),n||(n={}),!e||!e.put||!e.get)throw new Error("First argument must be an abstract-chunk-store compliant store");if(t=Number(t),!t)throw new Error("Second argument must be a chunk length");s._blockstream=new o(t,{zeroPadding:!1}),s._blockstream.on("data",i).on("error",function(e){s.destroy(e)});var u=0;s.on("finish",function(){this._blockstream.end()})}t.exports=r;var o=e("block-stream2"),i=e("inherits"),a=e("readable-stream");i(r,a.Writable),r.prototype._write=function(e,t,n){this._blockstream.write(e,t,n)},r.prototype.destroy=function(e){this.destroyed||(this.destroyed=!0,e&&this.emit("error",e),this.emit("close"))}},{"block-stream2":20,inherits:42,"readable-stream":82}],27:[function(e,t,n){function r(e,t,n){for(var r,i,a,s=1/0,u=0,c=t.length-1;u<=c&&(r=u+(c-u>>1),a=t[r]-e,a<0?u=r+1:a>0?c=r-1:void 0,a=o(a),a<s&&(s=a,i=r),t[r]!==e););return n?i:t[i]}var o=Math.abs;t.exports=r},{}],28:[function(e,t,n){(function(e){function t(e){return Array.isArray?Array.isArray(e):"[object Array]"===v(e)}function r(e){return"boolean"==typeof e}function o(e){return null===e}function i(e){return null==e}function a(e){return"number"==typeof e}function s(e){return"string"==typeof e}function u(e){return"symbol"==typeof e}function c(e){return void 0===e}function l(e){return"[object RegExp]"===v(e)}function f(e){return"object"==typeof e&&null!==e}function d(e){return"[object Date]"===v(e)}function p(e){return"[object Error]"===v(e)||e instanceof Error}function h(e){return"function"==typeof e}function m(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function v(e){return Object.prototype.toString.call(e)}n.isArray=t,n.isBoolean=r,n.isNull=o,n.isNullOrUndefined=i,n.isNumber=a,n.isString=s,n.isSymbol=u,n.isUndefined=c,n.isRegExp=l,n.isObject=f,n.isDate=d,n.isError=p,n.isFunction=h,n.isPrimitive=m,n.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":44}],29:[function(e,n,r){(function(t,r,o){function i(e,t,n){return"function"==typeof t?i(e,null,t):(t=t?S(t):{},void s(e,t,function(e,r,o){return e?n(e):(t.singleFileTorrent=o,void p(r,t,n))}))}function a(e,t,n){return"function"==typeof t?a(e,null,t):(t=t?S(t):{},void s(e,t,n))}function s(e,n,r){function i(){M(e.map(function(e){return function(t){var n={};if(m(e))n.getStream=y(e),n.length=e.size;else if(o.isBuffer(e))n.getStream=_(e),n.length=e.length;else{if(!g(e)){if("string"==typeof e){if("function"!=typeof A.stat)throw new Error("filesystem paths do not work in the browser");var r=s>1||c;return void u(e,r,t)}throw new Error("invalid input type")}n.getStream=w(e,n),n.length=0}n.path=e.path,t(null,n)}}),function(e,t){return e?r(e):(t=T(t),void r(null,t,c))})}if(Array.isArray(e)&&0===e.length)throw new Error("invalid input type");v(e)&&(e=Array.prototype.slice.call(e)),Array.isArray(e)||(e=[e]),e=e.map(function(e){return m(e)&&"string"==typeof e.path&&"function"==typeof A.stat?e.path:e}),1!==e.length||"string"==typeof e[0]||e[0].name||(e[0].name=n.name);var a=null;e.forEach(function(t,n){if("string"!=typeof t){var r=t.fullPath||t.name;r||(r="Unknown File "+(n+1),t.unknownName=!0),t.path=r.split("/"),t.path[0]||t.path.shift(),t.path.length<2?a=null:0===n&&e.length>1?a=t.path[0]:t.path[0]!==a&&(a=null)}}),e=e.filter(function(e){if("string"==typeof e)return!0;var t=e.path[e.path.length-1];return f(t)&&R.not(t)}),a&&e.forEach(function(e){var t=(o.isBuffer(e)||g(e))&&!e.path;"string"==typeof e||t||e.path.shift()}),!n.name&&a&&(n.name=a),n.name||e.some(function(e){return"string"==typeof e?(n.name=C.basename(e),!0):e.unknownName?void 0:(n.name=e.path[e.path.length-1],!0)}),n.name||(n.name="Unnamed Torrent "+Date.now());var s=e.reduce(function(e,t){return e+Number("string"==typeof t)},0),c=1===e.length;if(1===e.length&&"string"==typeof e[0]){if("function"!=typeof A.stat)throw new Error("filesystem paths do not work in the browser");P(e[0],function(e,t){return e?r(e):(c=t,void i())})}else t.nextTick(function(){i()})}function u(e,t,n){l(e,c,function(r,o){return r?n(r):(o=Array.isArray(o)?T(o):[o],e=C.normalize(e),t&&(e=e.slice(0,e.lastIndexOf(C.sep)+1)),e[e.length-1]!==C.sep&&(e+=C.sep),o.forEach(function(t){t.getStream=b(t.path),t.path=t.path.replace(e,"").split(C.sep)}),void n(null,o))})}function c(e,t){t=O(t),A.stat(e,function(n,r){if(n)return t(n);var o={length:r.size,path:e};t(null,o)})}function l(e,t,n){A.stat(e,function(r,o){return r?n(r):void(o.isDirectory()?A.readdir(e,function(r,o){return r?n(r):void M(o.filter(f).filter(R.not).map(function(n){return function(r){l(C.join(e,n),t,r)}}),n)}):o.isFile()&&t(e,n))})}function f(e){return"."!==e[0]}function d(e,t,n){function r(e){l+=e.length;var t=p;B(e,function(e){c[t]=e,d-=1,u()}),d+=1,p+=1}function i(){h=!0,u()}function a(e){s(),n(e)}function s(){m.removeListener("error",a),v.removeListener("data",r),v.removeListener("end",i),v.removeListener("error",a)}function u(){h&&0===d&&(s(),n(null,new o(c.join(""),"hex"),l))}n=O(n);var c=[],l=0,f=e.map(function(e){return e.getStream}),d=0,p=0,h=!1,m=new L(f),v=new x(t,{zeroPadding:!1});m.on("error",a),m.pipe(v).on("data",r).on("end",i).on("error",a)}function p(e,t,o){var i=t.announceList;i||("string"==typeof t.announce?i=[[t.announce]]:Array.isArray(t.announce)&&(i=t.announce.map(function(e){return[e]}))),i||(i=[]),r.WEBTORRENT_ANNOUNCE&&("string"==typeof r.WEBTORRENT_ANNOUNCE?i.push([[r.WEBTORRENT_ANNOUNCE]]):Array.isArray(r.WEBTORRENT_ANNOUNCE)&&(i=i.concat(r.WEBTORRENT_ANNOUNCE.map(function(e){return[e]})))),void 0===t.announce&&void 0===t.announceList&&(i=i.concat(n.exports.announceList)),"string"==typeof t.urlList&&(t.urlList=[t.urlList]);var a={info:{name:t.name},"creation date":Math.ceil((Number(t.creationDate)||Date.now())/1e3),encoding:"UTF-8"};0!==i.length&&(a.announce=i[0][0],a["announce-list"]=i),void 0!==t.comment&&(a.comment=t.comment),void 0!==t.createdBy&&(a["created by"]=t.createdBy),void 0!==t.private&&(a.info.private=Number(t.private)),void 0!==t.sslCert&&(a.info["ssl-cert"]=t.sslCert),void 0!==t.urlList&&(a["url-list"]=t.urlList);var s=t.pieceLength||k(e.reduce(h,0));a.info["piece length"]=s,d(e,s,function(n,r,i){return n?o(n):(a.info.pieces=r,e.forEach(function(e){delete e.getStream}),t.singleFileTorrent?a.info.length=i:a.info.files=e,void o(null,E.encode(a)))})}function h(e,t){return e+t.length}function m(e){return"undefined"!=typeof Blob&&e instanceof Blob}function v(e){return"undefined"!=typeof FileList&&e instanceof FileList}function g(e){return"object"==typeof e&&null!=e&&"function"==typeof e.pipe}function y(e){return function(){return new I(e)}}function _(e){return function(){var t=new U.PassThrough;return t.end(e),t}}function b(e){return function(){return A.createReadStream(e)}}function w(e,t){return function(){var n=new U.Transform;return n._transform=function(e,n,r){t.length+=e.length,this.push(e),r()},e.pipe(n),n}}n.exports=i,n.exports.parseInput=a,n.exports.announceList=[["udp://tracker.openbittorrent.com:80"],["udp://tracker.internetwarriors.net:1337"],["udp://tracker.leechers-paradise.org:6969"],["udp://tracker.coppersurfer.tk:6969"],["udp://exodus.desync.com:6969"],["wss://tracker.btorrent.xyz"],["wss://tracker.openwebtorrent.com"],["wss://tracker.fastcast.nz"]];var E=e("bencode"),x=e("block-stream2"),k=e("piece-length"),C=e("path"),S=e("xtend"),I=e("filestream/read"),T=e("flatten"),A=e("fs"),P=e("is-file"),R=e("junk"),L=e("multistream"),O=e("once"),M=e("run-parallel"),B=e("simple-sha1"),U=e("readable-stream")}).call(this,e("_process"),"undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{_process:67,bencode:11,"block-stream2":20,buffer:24,"filestream/read":36,flatten:37,fs:22,"is-file":45,junk:48,multistream:59,once:61,path:64,"piece-length":65,"readable-stream":82,"run-parallel":86,"simple-sha1":92,xtend:119}],30:[function(e,t,n){(function(r){function o(){return!("undefined"==typeof window||!window||"undefined"==typeof window.process||"renderer"!==window.process.type)||"undefined"!=typeof document&&document&&"WebkitAppearance"in document.documentElement.style||"undefined"!=typeof window&&window&&window.console&&(console.firebug||console.exception&&console.table)||"undefined"!=typeof navigator&&navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function i(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+n.humanize(this.diff),t){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))}),e.splice(i,0,r)}}function a(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?n.storage.removeItem("debug"):n.storage.debug=e}catch(e){}}function u(){try{return n.storage.debug}catch(e){}if("undefined"!=typeof r&&"env"in r)return r.env.DEBUG}function c(){try{return window.localStorage}catch(e){}}n=t.exports=e("./debug"),n.log=a,n.formatArgs=i,n.save=s,n.load=u,n.useColors=o,n.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:c(),n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},n.enable(u())}).call(this,e("_process"))},{"./debug":31,_process:67}],31:[function(e,t,n){function r(e){var t,r=0;for(t in e)r=(r<<5)-r+e.charCodeAt(t),r|=0;return n.colors[Math.abs(r)%n.colors.length]}function o(e){function t(){if(t.enabled){var e=t,r=+new Date,o=r-(c||r);e.diff=o,e.prev=c,e.curr=r,c=r;for(var i=new Array(arguments.length),a=0;a<i.length;a++)i[a]=arguments[a];i[0]=n.coerce(i[0]),"string"!=typeof i[0]&&i.unshift("%O");var s=0;i[0]=i[0].replace(/%([a-zA-Z%])/g,function(t,r){if("%%"===t)return t;s++;var o=n.formatters[r];if("function"==typeof o){var a=i[s];t=o.call(e,a),i.splice(s,1),s--}return t}),n.formatArgs.call(e,i);var u=t.log||n.log||console.log.bind(console);u.apply(e,i)}}return t.namespace=e,t.enabled=n.enabled(e),t.useColors=n.useColors(),t.color=r(e),"function"==typeof n.init&&n.init(t),t}function i(e){n.save(e);for(var t=(e||"").split(/[\s,]+/),r=t.length,o=0;o<r;o++)t[o]&&(e=t[o].replace(/\*/g,".*?"),"-"===e[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")))}function a(){n.enable("")}function s(e){var t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return!1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return!0;
  return!1}function u(e){return e instanceof Error?e.stack||e.message:e}n=t.exports=o.debug=o.default=o,n.coerce=u,n.disable=a,n.enable=i,n.enabled=s,n.humanize=e("ms"),n.names=[],n.skips=[],n.formatters={};var c},{ms:58}],32:[function(e,t,n){t.exports=function(){for(var e=0;e<arguments.length;e++)if(void 0!==arguments[e])return arguments[e]}},{}],33:[function(e,t,n){var r=e("once"),o=function(){},i=function(e){return e.setHeader&&"function"==typeof e.abort},a=function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length},s=function(e,t,n){if("function"==typeof t)return s(e,null,t);t||(t={}),n=r(n||o);var u=e._writableState,c=e._readableState,l=t.readable||t.readable!==!1&&e.readable,f=t.writable||t.writable!==!1&&e.writable,d=function(){e.writable||p()},p=function(){f=!1,l||n()},h=function(){l=!1,f||n()},m=function(e){n(e?new Error("exited with error code: "+e):null)},v=function(){return(!l||c&&c.ended)&&(!f||u&&u.ended)?void 0:n(new Error("premature close"))},g=function(){e.req.on("finish",p)};return i(e)?(e.on("complete",p),e.on("abort",v),e.req?g():e.on("request",g)):f&&!u&&(e.on("end",d),e.on("close",d)),a(e)&&e.on("exit",m),e.on("end",h),e.on("finish",p),t.error!==!1&&e.on("error",n),e.on("close",v),function(){e.removeListener("complete",p),e.removeListener("abort",v),e.removeListener("request",g),e.req&&e.req.removeListener("finish",p),e.removeListener("end",d),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("exit",m),e.removeListener("end",h),e.removeListener("error",n),e.removeListener("close",v)}};t.exports=s},{once:34}],34:[function(e,t,n){function r(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}var o=e("wrappy");t.exports=o(r),r.proto=r(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return r(this)},configurable:!0})})},{wrappy:118}],35:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(e){return"function"==typeof e}function i(e){return"number"==typeof e}function a(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,i,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(n=this._events[e],s(n))return!1;if(o(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:i=Array.prototype.slice.call(arguments,1),n.apply(this,i)}else if(a(n))for(i=Array.prototype.slice.call(arguments,1),c=n.slice(),r=c.length,u=0;u<r;u++)c[u].apply(this,i);return!0},r.prototype.addListener=function(e,t){var n;if(!o(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,o(t.listener)?t.listener:t),this._events[e]?a(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,a(this._events[e])&&!this._events[e].warned&&(n=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[e].length>n&&(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},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!o(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},r.prototype.removeListener=function(e,t){var n,r,i,s;if(!o(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],i=n.length,r=-1,n===t||o(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(s=i;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){r=s;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.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],o(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?o(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(o(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},{}],36:[function(e,t,n){function r(e,t){var n=this;return this instanceof r?(t=t||{},o.call(this,t),this._offset=0,this._ready=!1,this._file=e,this._size=e.size,this._chunkSize=t.chunkSize||Math.max(this._size/1e3,204800),this.reader=new FileReader,void this._generateHeaderBlocks(e,t,function(e,t){return e?n.emit("error",e):(Array.isArray(t)&&t.forEach(function(e){n.push(e)}),n._ready=!0,void n.emit("_ready"))})):new r(e,t)}var o=e("readable-stream").Readable,i=e("inherits"),a=e("typedarray-to-buffer");i(r,o),t.exports=r,r.prototype._generateHeaderBlocks=function(e,t,n){n(null,[])},r.prototype._read=function(){if(!this._ready)return void this.once("_ready",this._read.bind(this));var e=this,t=this.reader,n=this._offset,r=this._offset+this._chunkSize;return r>this._size&&(r=this._size),n===this._size?(this.destroy(),void this.push(null)):(t.onload=function(){e._offset=r,e.push(a(t.result))},t.onerror=function(){e.emit("error",t.error)},void t.readAsArrayBuffer(this._file.slice(n,r)))},r.prototype.destroy=function(){if(this._file=null,this.reader){this.reader.onload=null,this.reader.onerror=null;try{this.reader.abort()}catch(e){}}this.reader=null}},{inherits:42,"readable-stream":82,"typedarray-to-buffer":108}],37:[function(e,t,n){t.exports=function(e,t){function n(e,r){return e.reduce(function(e,o){return Array.isArray(o)&&r<t?e.concat(n(o,r+1)):e.concat(o)},[])}return t="number"==typeof t?t:1/0,t?n(e,1):Array.isArray(e)?e.map(function(e){return e}):e}},{}],38:[function(e,t,n){t.exports=function(){if("undefined"==typeof window)return null;var e={RTCPeerConnection:window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection,RTCSessionDescription:window.RTCSessionDescription||window.mozRTCSessionDescription||window.webkitRTCSessionDescription,RTCIceCandidate:window.RTCIceCandidate||window.mozRTCIceCandidate||window.webkitRTCIceCandidate};return e.RTCPeerConnection?e:null}},{}],39:[function(e,t,n){var r=e("http"),o=t.exports;for(var i in r)r.hasOwnProperty(i)&&(o[i]=r[i]);o.request=function(e,t){return e||(e={}),e.scheme="https",e.protocol="https:",r.request.call(this,e,t)}},{http:95}],40:[function(e,t,n){n.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,u=(1<<s)-1,c=u>>1,l=-7,f=n?o-1:0,d=n?-1:1,p=e[t+f];for(f+=d,i=p&(1<<-l)-1,p>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=d,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=d,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:(p?-1:1)*(1/0);a+=Math.pow(2,r),i-=c}return(p?-1:1)*a*Math.pow(2,i-r)},n.write=function(e,t,n,r,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+f>=1?d/u:d*Math.pow(2,1-f),t*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&s,p+=h,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[n+p]=255&a,p+=h,a/=256,c-=8);e[n+p-h]|=128*m}},{}],41:[function(e,t,n){(function(e){function n(e){if(!(this instanceof n))return new n(e);if(this.store=e,this.chunkLength=e.chunkLength,!this.store||!this.store.get||!this.store.put)throw new Error("First argument must be abstract-chunk-store compliant");this.mem=[]}function r(t,n,r){e.nextTick(function(){t&&t(n,r)})}t.exports=n,n.prototype.put=function(e,t,n){var r=this;r.mem[e]=t,r.store.put(e,t,function(t){r.mem[e]=null,n&&n(t)})},n.prototype.get=function(e,t,n){if("function"==typeof t)return this.get(e,null,t);var o=t&&t.offset||0,i=t&&t.length&&o+t.length,a=this.mem[e];return a?r(n,null,t?a.slice(o,i):a):void this.store.get(e,t,n)},n.prototype.close=function(e){this.store.close(e)},n.prototype.destroy=function(e){this.store.destroy(e)}}).call(this,e("_process"))},{_process:67}],42:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],43:[function(e,t,n){var r=127;t.exports=function(e){for(var t=0,n=e.length;t<n;++t)if(e.charCodeAt(t)>r)return!1;return!0}},{}],44:[function(e,t,n){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function o(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}t.exports=function(e){return null!=e&&(r(e)||o(e)||!!e._isBuffer)}},{}],45:[function(e,t,n){"use strict";function r(e){return o.existsSync(e)&&o.statSync(e).isFile()}var o=e("fs");t.exports=function(e,t){return t?void o.stat(e,function(e,n){return e?t(e):t(null,n.isFile())}):r(e)},t.exports.sync=r},{fs:22}],46:[function(e,t,n){function r(e){return o(e)||i(e)}function o(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function i(e){return s[a.call(e)]}t.exports=r,r.strict=o,r.loose=i;var a=Object.prototype.toString,s={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0}},{}],47:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],48:[function(e,t,n){"use strict";n.re=/^npm-debug\.log$|^\..*\.swp$|^\.DS_Store$|^\.AppleDouble$|^\.LSOverride$|^Icon\r$|^\._.*|^\.Spotlight-V100$|\.Trashes|^__MACOSX$|~$|^Thumbs\.db$|^ehthumbs\.db$|^Desktop\.ini$/,n.is=function(e){return n.re.test(e)},n.not=n.isnt=function(e){return!n.is(e)}},{}],49:[function(e,t,n){(function(n){function r(e){var t={},r=e.split("magnet:?")[1],o=r&&r.length>=0?r.split("&"):[];o.forEach(function(e){var n=e.split("=");if(2===n.length){var r=n[0],o=n[1];if("dn"===r&&(o=decodeURIComponent(o).replace(/\+/g," ")),"tr"!==r&&"xs"!==r&&"as"!==r&&"ws"!==r||(o=decodeURIComponent(o)),"kt"===r&&(o=decodeURIComponent(o).split("+")),"ix"===r&&(o=Number(o)),t[r])if(Array.isArray(t[r]))t[r].push(o);else{var i=t[r];t[r]=[i,o]}else t[r]=o}});var a;if(t.xt){var u=Array.isArray(t.xt)?t.xt:[t.xt];u.forEach(function(e){if(a=e.match(/^urn:btih:(.{40})/))t.infoHash=a[1].toLowerCase();else if(a=e.match(/^urn:btih:(.{32})/)){var r=i.decode(a[1]);t.infoHash=new n(r,"binary").toString("hex")}})}return t.infoHash&&(t.infoHashBuffer=new n(t.infoHash,"hex")),t.dn&&(t.name=t.dn),t.kt&&(t.keywords=t.kt),"string"==typeof t.tr?t.announce=[t.tr]:Array.isArray(t.tr)?t.announce=t.tr:t.announce=[],t.urlList=[],("string"==typeof t.as||Array.isArray(t.as))&&(t.urlList=t.urlList.concat(t.as)),("string"==typeof t.ws||Array.isArray(t.ws))&&(t.urlList=t.urlList.concat(t.ws)),s(t.announce),s(t.urlList),t}function o(e){e=a(e),e.infoHashBuffer&&(e.xt="urn:btih:"+e.infoHashBuffer.toString("hex")),e.infoHash&&(e.xt="urn:btih:"+e.infoHash),e.name&&(e.dn=e.name),e.keywords&&(e.kt=e.keywords),e.announce&&(e.tr=e.announce),e.urlList&&(e.ws=e.urlList,delete e.as);var t="magnet:?";return Object.keys(e).filter(function(e){return 2===e.length}).forEach(function(n,r){var o=Array.isArray(e[n])?e[n]:[e[n]];o.forEach(function(e,o){!(r>0||o>0)||"kt"===n&&0!==o||(t+="&"),"dn"===n&&(e=encodeURIComponent(e).replace(/%20/g,"+")),"tr"!==n&&"xs"!==n&&"as"!==n&&"ws"!==n||(e=encodeURIComponent(e)),"kt"===n&&(e=encodeURIComponent(e)),t+="kt"===n&&o>0?"+"+e:n+"="+e})}),t}t.exports=r,t.exports.decode=r,t.exports.encode=o;var i=e("thirty-two"),a=e("xtend"),s=e("uniq")}).call(this,e("buffer").Buffer)},{buffer:24,"thirty-two":103,uniq:110,xtend:119}],50:[function(e,t,n){function r(e,t){var n=this;if(!(n instanceof r))return new r(e,t);if(!u)throw new Error("web browser lacks MediaSource support");t||(t={}),n._bufferDuration=t.bufferDuration||c,n._elem=e,n._mediaSource=new u,n._streams=[],n.detailedError=null,n._errorHandler=function(){n._elem.removeEventListener("error",n._errorHandler);var e=n._streams.slice();e.forEach(function(e){e.destroy(n._elem.error)})},n._elem.addEventListener("error",n._errorHandler),n._elem.src=window.URL.createObjectURL(n._mediaSource)}function o(e,t){var n=this;if(a.Writable.call(n),n._wrapper=e,n._elem=e._elem,n._mediaSource=e._mediaSource,n._allStreams=e._streams,n._allStreams.push(n),n._bufferDuration=e._bufferDuration,n._sourceBuffer=null,n._openHandler=function(){n._onSourceOpen()},n._flowHandler=function(){n._flow()},"string"==typeof t)n._type=t,"open"===n._mediaSource.readyState?n._createSourceBuffer():n._mediaSource.addEventListener("sourceopen",n._openHandler);else if(null===t._sourceBuffer)t.destroy(),n._type=t._type,n._mediaSource.addEventListener("sourceopen",n._openHandler);else{if(!t._sourceBuffer)throw new Error("The argument to MediaElementWrapper.createWriteStream must be a string or a previous stream returned from that function");t.destroy(),n._type=t._type,n._sourceBuffer=t._sourceBuffer,n._sourceBuffer.addEventListener("updateend",n._flowHandler)}n._elem.addEventListener("timeupdate",n._flowHandler),n.on("error",function(e){n._wrapper.error(e)}),n.on("finish",function(){if(!n.destroyed&&(n._finished=!0,n._allStreams.every(function(e){return e._finished})))try{n._mediaSource.endOfStream()}catch(e){}})}t.exports=r;var i=e("inherits"),a=e("readable-stream"),s=e("to-arraybuffer"),u="undefined"!=typeof window&&window.MediaSource,c=60;r.prototype.createWriteStream=function(e){var t=this;return new o(t,e)},r.prototype.error=function(e){var t=this;t.detailedError||(t.detailedError=e);try{t._mediaSource.endOfStream("decode")}catch(e){}},i(o,a.Writable),o.prototype._onSourceOpen=function(){var e=this;e.destroyed||(e._mediaSource.removeEventListener("sourceopen",e._openHandler),e._createSourceBuffer())},o.prototype.destroy=function(e){var t=this;t.destroyed||(t.destroyed=!0,t._allStreams.splice(t._allStreams.indexOf(t),1),t._mediaSource.removeEventListener("sourceopen",t._openHandler),t._elem.removeEventListener("timeupdate",t._flowHandler),t._sourceBuffer&&(t._sourceBuffer.removeEventListener("updateend",t._flowHandler),"open"===t._mediaSource.readyState&&t._sourceBuffer.abort()),e&&t.emit("error",e),t.emit("close"))},o.prototype._createSourceBuffer=function(){var e=this;if(!e.destroyed)if(u.isTypeSupported(e._type)){if(e._sourceBuffer=e._mediaSource.addSourceBuffer(e._type),e._sourceBuffer.addEventListener("updateend",e._flowHandler),e._cb){var t=e._cb;e._cb=null,t()}}else e.destroy(new Error("The provided type is not supported"))},o.prototype._write=function(e,t,n){var r=this;if(!r.destroyed){if(!r._sourceBuffer)return void(r._cb=function(o){return o?n(o):void r._write(e,t,n)});if(r._sourceBuffer.updating)return n(new Error("Cannot append buffer while source buffer updating"));try{r._sourceBuffer.appendBuffer(s(e))}catch(e){return void r.destroy(e)}r._cb=n}},o.prototype._flow=function(){var e=this;if(!e.destroyed&&e._sourceBuffer&&!e._sourceBuffer.updating&&!("open"===e._mediaSource.readyState&&e._getBufferDuration()>e._bufferDuration)&&e._cb){var t=e._cb;e._cb=null,t()}};var l=0;o.prototype._getBufferDuration=function(){for(var e=this,t=e._sourceBuffer.buffered,n=e._elem.currentTime,r=-1,o=0;o<t.length;o++){var i=t.start(o),a=t.end(o)+l;if(i>n)break;(r>=0||n<=a)&&(r=a)}var s=r-n;return s<0&&(s=0),s}},{inherits:42,"readable-stream":82,"to-arraybuffer":105}],51:[function(e,t,n){(function(e){function n(e,t){if(!(this instanceof n))return new n(e,t);if(t||(t={}),this.chunkLength=Number(e),!this.chunkLength)throw new Error("First argument must be a chunk length");this.chunks=[],this.closed=!1,this.length=Number(t.length)||1/0,this.length!==1/0&&(this.lastChunkLength=this.length%this.chunkLength||this.chunkLength,this.lastChunkIndex=Math.ceil(this.length/this.chunkLength)-1)}function r(t,n,r){e.nextTick(function(){t&&t(n,r)})}t.exports=n,n.prototype.put=function(e,t,n){if(this.closed)return r(n,new Error("Storage is closed"));var o=e===this.lastChunkIndex;return o&&t.length!==this.lastChunkLength?r(n,new Error("Last chunk length must be "+this.lastChunkLength)):o||t.length===this.chunkLength?(this.chunks[e]=t,void r(n,null)):r(n,new Error("Chunk length must be "+this.chunkLength))},n.prototype.get=function(e,t,n){if("function"==typeof t)return this.get(e,null,t);if(this.closed)return r(n,new Error("Storage is closed"));var o=this.chunks[e];if(!o)return r(n,new Error("Chunk not found"));if(!t)return r(n,null,o);var i=t.offset||0,a=t.length||o.length-i;r(n,null,o.slice(i,a+i))},n.prototype.close=n.prototype.destroy=function(e){return this.closed?r(e,new Error("Storage is closed")):(this.closed=!0,this.chunks=null,void r(e,null))}}).call(this,e("_process"))},{_process:67}],52:[function(e,t,n){(function(t){function r(e,t,n){for(var r=t;r<n;r++)e[r]=0}function o(e,t,n){t.writeUInt32BE(Math.floor((e.getTime()+v)/1e3),n)}function i(e,t,n){t.writeUInt16BE(Math.floor(e)%65536,n),t.writeUInt16BE(Math.floor(256*e*256)%65536,n+2)}function a(e,t,n){t[n]=Math.floor(e)%256,t[n+1]=Math.floor(256*e)%256}function s(e,t,n){e||(e=[0,0,0,0,0,0,0,0,0]);for(var r=0;r<e.length;r++)i(e[r],t,n+4*r)}function u(e,n,r){var o=new t(e,"utf8");o.copy(n,r),n[r+o.length]=0}function c(e){for(var t=new Array(e.length/4),n=0;n<t.length;n++)t[n]=f(e,4*n);return t}function l(e,t){return new Date(1e3*e.readUInt32BE(t)-v)}function f(e,t){return e.readUInt16BE(t)+e.readUInt16BE(t+2)/65536}function d(e,t){return e[t]+e[t+1]/256}function p(e,t,n){var r;for(r=0;r<n&&0!==e[t+r];r++);return e.toString("utf8",t,t+r)}var h=e("./index"),m=e("./descriptor"),v=20828448e5;n.fullBoxes={};var g=["mvhd","tkhd","mdhd","vmhd","smhd","stsd","esds","stsz","stco","stss","stts","ctts","stsc","dref","elst","hdlr","mehd","trex","mfhd","tfhd","tfdt","trun"];g.forEach(function(e){n.fullBoxes[e]=!0}),n.ftyp={},n.ftyp.encode=function(e,r,o){r=r?r.slice(o):new t(n.ftyp.encodingLength(e));var i=e.compatibleBrands||[];r.write(e.brand,0,4,"ascii"),r.writeUInt32BE(e.brandVersion,4);for(var a=0;a<i.length;a++)r.write(i[a],8+4*a,4,"ascii");return n.ftyp.encode.bytes=8+4*i.length,r},n.ftyp.decode=function(e,t){e=e.slice(t);for(var n=e.toString("ascii",0,4),r=e.readUInt32BE(4),o=[],i=8;i<e.length;i+=4)o.push(e.toString("ascii",i,i+4));return{brand:n,brandVersion:r,compatibleBrands:o}},n.ftyp.encodingLength=function(e){return 8+4*(e.compatibleBrands||[]).length},n.mvhd={},n.mvhd.encode=function(e,u,c){return u=u?u.slice(c):new t(96),o(e.ctime||new Date,u,0),o(e.mtime||new Date,u,4),u.writeUInt32BE(e.timeScale||0,8),u.writeUInt32BE(e.duration||0,12),i(e.preferredRate||0,u,16),a(e.preferredVolume||0,u,20),r(u,22,32),s(e.matrix,u,32),u.writeUInt32BE(e.previewTime||0,68),u.writeUInt32BE(e.previewDuration||0,72),u.writeUInt32BE(e.posterTime||0,76),u.writeUInt32BE(e.selectionTime||0,80),u.writeUInt32BE(e.selectionDuration||0,84),u.writeUInt32BE(e.currentTime||0,88),u.writeUInt32BE(e.nextTrackId||0,92),n.mvhd.encode.bytes=96,u},n.mvhd.decode=function(e,t){return e=e.slice(t),{ctime:l(e,0),mtime:l(e,4),timeScale:e.readUInt32BE(8),duration:e.readUInt32BE(12),preferredRate:f(e,16),preferredVolume:d(e,20),matrix:c(e.slice(32,68)),previewTime:e.readUInt32BE(68),previewDuration:e.readUInt32BE(72),posterTime:e.readUInt32BE(76),selectionTime:e.readUInt32BE(80),selectionDuration:e.readUInt32BE(84),currentTime:e.readUInt32BE(88),nextTrackId:e.readUInt32BE(92)}},n.mvhd.encodingLength=function(e){return 96},n.tkhd={},n.tkhd.encode=function(e,i,a){return i=i?i.slice(a):new t(80),o(e.ctime||new Date,i,0),o(e.mtime||new Date,i,4),i.writeUInt32BE(e.trackId||0,8),r(i,12,16),i.writeUInt32BE(e.duration||0,16),r(i,20,28),i.writeUInt16BE(e.layer||0,28),i.writeUInt16BE(e.alternateGroup||0,30),i.writeUInt16BE(e.volume||0,32),s(e.matrix,i,36),i.writeUInt32BE(e.trackWidth||0,72),i.writeUInt32BE(e.trackHeight||0,76),n.tkhd.encode.bytes=80,i},n.tkhd.decode=function(e,t){return e=e.slice(t),{ctime:l(e,0),mtime:l(e,4),trackId:e.readUInt32BE(8),duration:e.readUInt32BE(16),layer:e.readUInt16BE(28),alternateGroup:e.readUInt16BE(30),volume:e.readUInt16BE(32),matrix:c(e.slice(36,72)),trackWidth:e.readUInt32BE(72),trackHeight:e.readUInt32BE(76)}},n.tkhd.encodingLength=function(e){return 80},n.mdhd={},n.mdhd.encode=function(e,r,i){return r=r?r.slice(i):new t(20),o(e.ctime||new Date,r,0),o(e.mtime||new Date,r,4),r.writeUInt32BE(e.timeScale||0,8),r.writeUInt32BE(e.duration||0,12),r.writeUInt16BE(e.language||0,16),r.writeUInt16BE(e.quality||0,18),n.mdhd.encode.bytes=20,r},n.mdhd.decode=function(e,t){return e=e.slice(t),{ctime:l(e,0),mtime:l(e,4),timeScale:e.readUInt32BE(8),duration:e.readUInt32BE(12),language:e.readUInt16BE(16),quality:e.readUInt16BE(18)}},n.mdhd.encodingLength=function(e){return 20},n.vmhd={},n.vmhd.encode=function(e,r,o){r=r?r.slice(o):new t(8),r.writeUInt16BE(e.graphicsMode||0,0);var i=e.opcolor||[0,0,0];return r.writeUInt16BE(i[0],2),r.writeUInt16BE(i[1],4),r.writeUInt16BE(i[2],6),n.vmhd.encode.bytes=8,r},n.vmhd.decode=function(e,t){return e=e.slice(t),{graphicsMode:e.readUInt16BE(0),opcolor:[e.readUInt16BE(2),e.readUInt16BE(4),e.readUInt16BE(6)]}},n.vmhd.encodingLength=function(e){return 8},n.smhd={},n.smhd.encode=function(e,o,i){return o=o?o.slice(i):new t(4),o.writeUInt16BE(e.balance||0,0),r(o,2,4),n.smhd.encode.bytes=4,o},n.smhd.decode=function(e,t){return e=e.slice(t),{balance:e.readUInt16BE(0)}},n.smhd.encodingLength=function(e){return 4},n.stsd={},n.stsd.encode=function(e,r,o){r=r?r.slice(o):new t(n.stsd.encodingLength(e));var i=e.entries||[];r.writeUInt32BE(i.length,0);for(var a=4,s=0;s<i.length;s++){var u=i[s];h.encode(u,r,a),a+=h.encode.bytes}return n.stsd.encode.bytes=a,r},n.stsd.decode=function(e,t,n){e=e.slice(t);for(var r=e.readUInt32BE(0),o=new Array(r),i=4,a=0;a<r;a++){var s=h.decode(e,i,n);o[a]=s,i+=s.length}return{entries:o}},n.stsd.encodingLength=function(e){var t=4;if(!e.entries)return t;for(var n=0;n<e.entries.length;n++)t+=h.encodingLength(e.entries[n]);return t},n.avc1=n.VisualSampleEntry={},n.VisualSampleEntry.encode=function(e,o,i){o=o?o.slice(i):new t(n.VisualSampleEntry.encodingLength(e)),r(o,0,6),o.writeUInt16BE(e.dataReferenceIndex||0,6),r(o,8,24),o.writeUInt16BE(e.width||0,24),o.writeUInt16BE(e.height||0,26),o.writeUInt32BE(e.hResolution||4718592,28),o.writeUInt32BE(e.vResolution||4718592,32),r(o,36,40),o.writeUInt16BE(e.frameCount||1,40);var a=e.compressorName||"",s=Math.min(a.length,31);o.writeUInt8(s,42),o.write(a,43,s,"utf8"),o.writeUInt16BE(e.depth||24,74),o.writeInt16BE(-1,76);var u=78,c=e.children||[];c.forEach(function(e){h.encode(e,o,u),u+=h.encode.bytes}),n.VisualSampleEntry.encode.bytes=u},n.VisualSampleEntry.decode=function(e,t,n){e=e.slice(t);for(var r=n-t,o=Math.min(e.readUInt8(42),31),i={dataReferenceIndex:e.readUInt16BE(6),width:e.readUInt16BE(24),height:e.readUInt16BE(26),hResolution:e.readUInt32BE(28),vResolution:e.readUInt32BE(32),frameCount:e.readUInt16BE(40),compressorName:e.toString("utf8",43,43+o),depth:e.readUInt16BE(74),children:[]},a=78;r-a>=8;){var s=h.decode(e,a,r);i.children.push(s),i[s.type]=s,a+=s.length}return i},n.VisualSampleEntry.encodingLength=function(e){var t=78,n=e.children||[];return n.forEach(function(e){t+=h.encodingLength(e)}),t},n.avcC={},n.avcC.encode=function(e,r,o){r=r?r.slice(o):t(e.buffer.length),e.buffer.copy(r),n.avcC.encode.bytes=e.buffer.length},n.avcC.decode=function(e,n,r){return e=e.slice(n,r),{mimeCodec:e.toString("hex",1,4),buffer:new t(e)}},n.avcC.encodingLength=function(e){return e.buffer.length},n.mp4a=n.AudioSampleEntry={},n.AudioSampleEntry.encode=function(e,o,i){o=o?o.slice(i):new t(n.AudioSampleEntry.encodingLength(e)),r(o,0,6),o.writeUInt16BE(e.dataReferenceIndex||0,6),r(o,8,16),o.writeUInt16BE(e.channelCount||2,16),o.writeUInt16BE(e.sampleSize||16,18),r(o,20,24),o.writeUInt32BE(e.sampleRate||0,24);var a=28,s=e.children||[];s.forEach(function(e){h.encode(e,o,a),a+=h.encode.bytes}),n.AudioSampleEntry.encode.bytes=a},n.AudioSampleEntry.decode=function(e,t,n){e=e.slice(t,n);for(var r=n-t,o={dataReferenceIndex:e.readUInt16BE(6),channelCount:e.readUInt16BE(16),sampleSize:e.readUInt16BE(18),sampleRate:e.readUInt32BE(24),children:[]},i=28;r-i>=8;){var a=h.decode(e,i,r);o.children.push(a),o[a.type]=a,i+=a.length}return o},n.AudioSampleEntry.encodingLength=function(e){var t=28,n=e.children||[];return n.forEach(function(e){t+=h.encodingLength(e)}),t},n.esds={},n.esds.encode=function(e,r,o){r=r?r.slice(o):t(e.buffer.length),e.buffer.copy(r,0),n.esds.encode.bytes=e.buffer.length},n.esds.decode=function(e,n,r){e=e.slice(n,r);var o=m.Descriptor.decode(e,0,e.length),i="ESDescriptor"===o.tagName?o:{},a=i.DecoderConfigDescriptor||{},s=a.oti||0,u=a.DecoderSpecificInfo,c=u?(248&u.buffer.readUInt8(0))>>3:0,l=null;return s&&(l=s.toString(16),c&&(l+="."+c)),{mimeCodec:l,buffer:new t(e.slice(0))}},n.esds.encodingLength=function(e){return e.buffer.length},n.stsz={},n.stsz.encode=function(e,r,o){var i=e.entries||[];r=r?r.slice(o):t(n.stsz.encodingLength(e)),r.writeUInt32BE(0,0),r.writeUInt32BE(i.length,4);for(var a=0;a<i.length;a++)r.writeUInt32BE(i[a],4*a+8);return n.stsz.encode.bytes=8+4*i.length,r},n.stsz.decode=function(e,t){e=e.slice(t);for(var n=e.readUInt32BE(0),r=e.readUInt32BE(4),o=new Array(r),i=0;i<r;i++)0===n?o[i]=e.readUInt32BE(4*i+8):o[i]=n;return{entries:o}},n.stsz.encodingLength=function(e){return 8+4*e.entries.length},n.stss=n.stco={},n.stco.encode=function(e,r,o){var i=e.entries||[];r=r?r.slice(o):new t(n.stco.encodingLength(e)),r.writeUInt32BE(i.length,0);for(var a=0;a<i.length;a++)r.writeUInt32BE(i[a],4*a+4);return n.stco.encode.bytes=4+4*i.length,r},n.stco.decode=function(e,t){e=e.slice(t);for(var n=e.readUInt32BE(0),r=new Array(n),o=0;o<n;o++)r[o]=e.readUInt32BE(4*o+4);return{entries:r}},n.stco.encodingLength=function(e){return 4+4*e.entries.length},n.stts={},n.stts.encode=function(e,r,o){var i=e.entries||[];r=r?r.slice(o):new t(n.stts.encodingLength(e)),r.writeUInt32BE(i.length,0);for(var a=0;a<i.length;a++){var s=8*a+4;r.writeUInt32BE(i[a].count||0,s),r.writeUInt32BE(i[a].duration||0,s+4)}return n.stts.encode.bytes=4+8*e.entries.length,r},n.stts.decode=function(e,t){e=e.slice(t);for(var n=e.readUInt32BE(0),r=new Array(n),o=0;o<n;o++){var i=8*o+4;r[o]={count:e.readUInt32BE(i),duration:e.readUInt32BE(i+4)}}return{entries:r}},n.stts.encodingLength=function(e){return 4+8*e.entries.length},n.ctts={},n.ctts.encode=function(e,r,o){var i=e.entries||[];r=r?r.slice(o):new t(n.ctts.encodingLength(e)),r.writeUInt32BE(i.length,0);for(var a=0;a<i.length;a++){var s=8*a+4;r.writeUInt32BE(i[a].count||0,s),r.writeUInt32BE(i[a].compositionOffset||0,s+4)}return n.ctts.encode.bytes=4+8*i.length,r},n.ctts.decode=function(e,t){e=e.slice(t);for(var n=e.readUInt32BE(0),r=new Array(n),o=0;o<n;o++){var i=8*o+4;r[o]={count:e.readUInt32BE(i),compositionOffset:e.readInt32BE(i+4)}}return{entries:r}},n.ctts.encodingLength=function(e){return 4+8*e.entries.length},n.stsc={},n.stsc.encode=function(e,r,o){var i=e.entries||[];r=r?r.slice(o):new t(n.stsc.encodingLength(e)),r.writeUInt32BE(i.length,0);for(var a=0;a<i.length;a++){var s=12*a+4;r.writeUInt32BE(i[a].firstChunk||0,s),r.writeUInt32BE(i[a].samplesPerChunk||0,s+4),r.writeUInt32BE(i[a].sampleDescriptionId||0,s+8)}return n.stsc.encode.bytes=4+12*i.length,r},n.stsc.decode=function(e,t){e=e.slice(t);for(var n=e.readUInt32BE(0),r=new Array(n),o=0;o<n;o++){var i=12*o+4;r[o]={firstChunk:e.readUInt32BE(i),samplesPerChunk:e.readUInt32BE(i+4),sampleDescriptionId:e.readUInt32BE(i+8)}}return{entries:r}},n.stsc.encodingLength=function(e){return 4+12*e.entries.length},n.dref={},n.dref.encode=function(e,r,o){r=r?r.slice(o):new t(n.dref.encodingLength(e));var i=e.entries||[];r.writeUInt32BE(i.length,0);for(var a=4,s=0;s<i.length;s++){var u=i[s],c=(u.buf?u.buf.length:0)+4+4;r.writeUInt32BE(c,a),a+=4,r.write(u.type,a,4,"ascii"),a+=4,u.buf&&(u.buf.copy(r,a),a+=u.buf.length)}return n.dref.encode.bytes=a,r},n.dref.decode=function(e,t){e=e.slice(t);for(var n=e.readUInt32BE(0),r=new Array(n),o=4,i=0;i<n;i++){var a=e.readUInt32BE(o),s=e.toString("ascii",o+4,o+8),u=e.slice(o+8,o+a);o+=a,r[i]={type:s,buf:u}}return{entries:r}},n.dref.encodingLength=function(e){var t=4;if(!e.entries)return t;for(var n=0;n<e.entries.length;n++){var r=e.entries[n].buf;t+=(r?r.length:0)+4+4}return t},n.elst={},n.elst.encode=function(e,r,o){var a=e.entries||[];r=r?r.slice(o):new t(n.elst.encodingLength(e)),r.writeUInt32BE(a.length,0);for(var s=0;s<a.length;s++){var u=12*s+4;r.writeUInt32BE(a[s].trackDuration||0,u),r.writeUInt32BE(a[s].mediaTime||0,u+4),i(a[s].mediaRate||0,r,u+8)}return n.elst.encode.bytes=4+12*a.length,r},n.elst.decode=function(e,t){e=e.slice(t);for(var n=e.readUInt32BE(0),r=new Array(n),o=0;o<n;o++){var i=12*o+4;r[o]={trackDuration:e.readUInt32BE(i),mediaTime:e.readInt32BE(i+4),mediaRate:f(e,i+8)}}return{entries:r}},n.elst.encodingLength=function(e){return 4+12*e.entries.length},n.hdlr={},n.hdlr.encode=function(e,r,o){r=r?r.slice(o):new t(n.hdlr.encodingLength(e));var i=21+(e.name||"").length;return r.fill(0,0,i),r.write(e.handlerType||"",4,4,"ascii"),u(e.name||"",r,20),n.hdlr.encode.bytes=i,r},n.hdlr.decode=function(e,t,n){return e=e.slice(t),{handlerType:e.toString("ascii",4,8),name:p(e,20,n)}},n.hdlr.encodingLength=function(e){return 21+(e.name||"").length},n.mehd={},n.mehd.encode=function(e,r,o){return r=r?r.slice(o):new t(4),r.writeUInt32BE(e.fragmentDuration||0,0),n.mehd.encode.bytes=4,r},n.mehd.decode=function(e,t){return e=e.slice(t),{fragmentDuration:e.readUInt32BE(0)}},n.mehd.encodingLength=function(e){return 4},n.trex={},n.trex.encode=function(e,r,o){return r=r?r.slice(o):new t(20),r.writeUInt32BE(e.trackId||0,0),r.writeUInt32BE(e.defaultSampleDescriptionIndex||0,4),r.writeUInt32BE(e.defaultSampleDuration||0,8),r.writeUInt32BE(e.defaultSampleSize||0,12),r.writeUInt32BE(e.defaultSampleFlags||0,16),n.trex.encode.bytes=20,r},n.trex.decode=function(e,t){return e=e.slice(t),{trackId:e.readUInt32BE(0),defaultSampleDescriptionIndex:e.readUInt32BE(4),defaultSampleDuration:e.readUInt32BE(8),defaultSampleSize:e.readUInt32BE(12),defaultSampleFlags:e.readUInt32BE(16)}},n.trex.encodingLength=function(e){return 20},n.mfhd={},n.mfhd.encode=function(e,r,o){return r=r?r.slice(o):new t(4),r.writeUInt32BE(e.sequenceNumber||0,0),n.mfhd.encode.bytes=4,r},n.mfhd.decode=function(e,t){return{sequenceNumber:e.readUint32BE(0)}},n.mfhd.encodingLength=function(e){return 4},n.tfhd={},
  n.tfhd.encode=function(e,r,o){return r=r?r.slice(o):new t(4),r.writeUInt32BE(e.trackId,0),n.tfhd.encode.bytes=4,r},n.tfhd.decode=function(e,t){},n.tfhd.encodingLength=function(e){return 4},n.tfdt={},n.tfdt.encode=function(e,r,o){return r=r?r.slice(o):new t(4),r.writeUInt32BE(e.baseMediaDecodeTime||0,0),n.tfdt.encode.bytes=4,r},n.tfdt.decode=function(e,t){},n.tfdt.encodingLength=function(e){return 4},n.trun={},n.trun.encode=function(e,r,o){r=r?r.slice(o):new t(8+16*e.entries.length),r.writeUInt32BE(e.entries.length,0),r.writeInt32BE(e.dataOffset,4);for(var i=8,a=0;a<e.entries.length;a++){var s=e.entries[a];r.writeUInt32BE(s.sampleDuration,i),i+=4,r.writeUInt32BE(s.sampleSize,i),i+=4,r.writeUInt32BE(s.sampleFlags,i),i+=4,r.writeUInt32BE(s.sampleCompositionTimeOffset,i),i+=4}n.trun.encode.bytes=i},n.trun.decode=function(e,t){},n.trun.encodingLength=function(e){return 8+16*e.entries.length},n.mdat={},n.mdat.encode=function(e,t,r){e.buffer?(e.buffer.copy(t,r),n.mdat.encode.bytes=e.buffer.length):n.mdat.encode.bytes=n.mdat.encodingLength(e)},n.mdat.decode=function(e,n,r){return{buffer:new t(e.slice(n,r))}},n.mdat.encodingLength=function(e){return e.buffer?e.buffer.length:e.contentLength}}).call(this,e("buffer").Buffer)},{"./descriptor":53,"./index":54,buffer:24}],53:[function(e,t,n){(function(e){var t={3:"ESDescriptor",4:"DecoderConfigDescriptor",5:"DecoderSpecificInfo",6:"SLConfigDescriptor"};n.Descriptor={},n.Descriptor.decode=function(r,o,i){var a,s=r.readUInt8(o),u=o+1,c=0;do a=r.readUInt8(u++),c=c<<7|127&a;while(128&a);var l,f=t[s];return l=n[f]?n[f].decode(r,u,i):{buffer:new e(r.slice(u,u+c))},l.tag=s,l.tagName=f,l.length=u-o+c,l.contentsLen=c,l},n.DescriptorArray={},n.DescriptorArray.decode=function(e,r,o){for(var i=r,a={};i+2<=o;){var s=n.Descriptor.decode(e,i,o);i+=s.length;var u=t[s.tag]||"Descriptor"+s.tag;a[u]=s}return a},n.ESDescriptor={},n.ESDescriptor.decode=function(e,t,r){var o=e.readUInt8(t+2),i=t+3;if(128&o&&(i+=2),64&o){var a=e.readUInt8(i);i+=a+1}return 32&o&&(i+=2),n.DescriptorArray.decode(e,i,r)},n.DecoderConfigDescriptor={},n.DecoderConfigDescriptor.decode=function(e,t,r){var o=e.readUInt8(t),i=n.DescriptorArray.decode(e,t+13,r);return i.oti=o,i}}).call(this,e("buffer").Buffer)},{buffer:24}],54:[function(e,t,n){(function(t){var r=e("uint64be"),o=e("./boxes"),i=4294967295,a=n,s=n.containers={moov:["mvhd","meta","traks","mvex"],trak:["tkhd","tref","trgr","edts","meta","mdia","udta"],edts:["elst"],mdia:["mdhd","hdlr","elng","minf"],minf:["vmhd","smhd","hmhd","sthd","nmhd","dinf","stbl"],dinf:["dref"],stbl:["stsd","stts","ctts","cslg","stsc","stsz","stz2","stco","co64","stss","stsh","padb","stdp","sdtp","sbgps","sgpds","subss","saizs","saios"],mvex:["mehd","trexs","leva"],moof:["mfhd","meta","trafs"],traf:["tfhd","trun","sbgps","sgpds","subss","saizs","saios","tfdt","meta"]};a.encode=function(e,n,r){return a.encodingLength(e),r=r||0,n=n||new t(e.length),a._encode(e,n,r)},a._encode=function(e,t,n){var u=e.type,c=e.length;c>i&&(c=1),t.writeUInt32BE(c,n),t.write(e.type,n+4,4,"ascii");var l=n+8;if(1===c&&(r.encode(e.length,t,l),l+=8),o.fullBoxes[u]&&(t.writeUInt32BE(e.flags||0,l),t.writeUInt8(e.version||0,l),l+=4),s[u]){var f=s[u];f.forEach(function(n){if(5===n.length){var r=e[n]||[];n=n.substr(0,4),r.forEach(function(e){a._encode(e,t,l),l+=a.encode.bytes})}else e[n]&&(a._encode(e[n],t,l),l+=a.encode.bytes)}),e.otherBoxes&&e.otherBoxes.forEach(function(e){a._encode(e,t,l),l+=a.encode.bytes})}else if(o[u]){var d=o[u].encode;d(e,t,l),l+=d.bytes}else{if(!e.buffer)throw new Error("Either `type` must be set to a known type (not'"+u+"') or `buffer` must be set");var p=e.buffer;p.copy(t,l),l+=e.buffer.length}return a.encode.bytes=l-n,t},a.readHeaders=function(e,t,n){if(t=t||0,n=n||e.length,n-t<8)return 8;var i=e.readUInt32BE(t),a=e.toString("ascii",t+4,t+8),s=t+8;if(1===i){if(n-t<16)return 16;i=r.decode(e,s),s+=8}var u,c;return o.fullBoxes[a]&&(u=e.readUInt8(s),c=16777215&e.readUInt32BE(s),s+=4),{length:i,headersLen:s-t,contentLen:i-(s-t),type:a,version:u,flags:c}},a.decode=function(e,t,n){t=t||0,n=n||e.length;var r=a.readHeaders(e,t,n);if(!r||r.length>n-t)throw new Error("Data too short");return a.decodeWithoutHeaders(r,e,t+r.headersLen,t+r.length)},a.decodeWithoutHeaders=function(e,n,r,i){r=r||0,i=i||n.length;var u=e.type,c={};if(s[u]){c.otherBoxes=[];for(var l=s[u],f=r;i-f>=8;){var d=a.decode(n,f,i);if(f+=d.length,l.indexOf(d.type)>=0)c[d.type]=d;else if(l.indexOf(d.type+"s")>=0){var p=d.type+"s",h=c[p]=c[p]||[];h.push(d)}else c.otherBoxes.push(d)}}else if(o[u]){var m=o[u].decode;c=m(n,r,i)}else c.buffer=new t(n.slice(r,i));return c.length=e.length,c.contentLen=e.contentLen,c.type=e.type,c.version=e.version,c.flags=e.flags,c},a.encodingLength=function(e){var t=e.type,n=8;if(o.fullBoxes[t]&&(n+=4),s[t]){var r=s[t];r.forEach(function(t){if(5===t.length){var r=e[t]||[];t=t.substr(0,4),r.forEach(function(e){e.type=t,n+=a.encodingLength(e)})}else if(e[t]){var o=e[t];o.type=t,n+=a.encodingLength(o)}}),e.otherBoxes&&e.otherBoxes.forEach(function(e){n+=a.encodingLength(e)})}else if(o[t])n+=o[t].encodingLength(e);else{if(!e.buffer)throw new Error("Either `type` must be set to a known type (not'"+t+"') or `buffer` must be set");n+=e.buffer.length}return n>i&&(n+=8),e.length=n,n}}).call(this,e("buffer").Buffer)},{"./boxes":52,buffer:24,uint64be:109}],55:[function(e,t,n){(function(n){function r(){return this instanceof r?(i.Writable.call(this),this.destroyed=!1,this._pending=0,this._missing=0,this._buf=null,this._str=null,this._cb=null,this._ondrain=null,this._writeBuffer=null,this._writeCb=null,this._ondrain=null,void this._kick()):new r}function o(e){this._parent=e,this.destroyed=!1,i.PassThrough.call(this)}var i=e("readable-stream"),a=e("inherits"),s=e("next-event"),u=e("mp4-box-encoding"),c=new n(0);t.exports=r,a(r,i.Writable),r.prototype.destroy=function(e){this.destroyed||(this.destroyed=!0,e&&this.emit("error",e),this.emit("close"))},r.prototype._write=function(e,t,n){if(!this.destroyed){for(var r=!this._str||!this._str._writableState.needDrain;e.length&&!this.destroyed;){if(!this._missing)return this._writeBuffer=e,void(this._writeCb=n);var o=e.length<this._missing?e.length:this._missing;if(this._buf?e.copy(this._buf,this._buf.length-this._missing):this._str&&(r=this._str.write(o===e.length?e:e.slice(0,o))),this._missing-=o,!this._missing){var i=this._buf,a=this._cb,s=this._str;this._buf=this._cb=this._str=this._ondrain=null,r=!0,s&&s.end(),a&&a(i)}e=o===e.length?c:e.slice(o)}return this._pending&&!this._missing?(this._writeBuffer=e,void(this._writeCb=n)):void(r?n():this._ondrain(n))}},r.prototype._buffer=function(e,t){this._missing=e,this._buf=new n(e),this._cb=t},r.prototype._stream=function(e,t){var n=this;return this._missing=e,this._str=new o(this),this._ondrain=s(this._str,"drain"),this._pending++,this._str.on("end",function(){n._pending--,n._kick()}),this._cb=t,this._str},r.prototype._readBox=function(){function e(r,o){t._buffer(r,function(r){o=o?n.concat([o,r]):r;var i=u.readHeaders(o);"number"==typeof i?e(i-o.length,o):(t._pending++,t._headers=i,t.emit("box",i))})}var t=this;e(8)},r.prototype.stream=function(){var e=this;if(!e._headers)throw new Error("this function can only be called once after 'box' is emitted");var t=e._headers;return e._headers=null,e._stream(t.contentLen,null)},r.prototype.decode=function(e){var t=this;if(!t._headers)throw new Error("this function can only be called once after 'box' is emitted");var n=t._headers;t._headers=null,t._buffer(n.contentLen,function(r){var o=u.decodeWithoutHeaders(n,r);e(o),t._pending--,t._kick()})},r.prototype.ignore=function(){var e=this;if(!e._headers)throw new Error("this function can only be called once after 'box' is emitted");var t=e._headers;e._headers=null,this._missing=t.contentLen,this._cb=function(){e._pending--,e._kick()}},r.prototype._kick=function(){if(!this._pending&&(this._buf||this._str||this._readBox(),this._writeBuffer)){var e=this._writeCb,t=this._writeBuffer;this._writeBuffer=null,this._writeCb=null,this._write(t,null,e)}},a(o,i.PassThrough),o.prototype.destroy=function(e){this.destroyed||(this.destroyed=!0,this._parent.destroy(e),e&&this.emit("error",e),this.emit("close"))}}).call(this,e("buffer").Buffer)},{buffer:24,inherits:42,"mp4-box-encoding":54,"next-event":60,"readable-stream":82}],56:[function(e,t,n){(function(n,r){function o(){}function i(){function e(){n._want&&(n._want=!1,n._read())}function t(){n._stream=null}if(!(this instanceof i))return new i;s.Readable.call(this),this.destroyed=!1,this._reading=!1,this._stream=null,this._drain=null,this._want=!1,this._onreadable=e,this._onend=t;var n=this}function a(e){this._parent=e,this.destroyed=!1,s.PassThrough.call(this)}var s=e("readable-stream"),u=e("inherits"),c=e("mp4-box-encoding");t.exports=i,u(i,s.Readable),i.prototype.mediaData=i.prototype.mdat=function(e,t){var n=new a(this);return this.box({type:"mdat",contentLength:e,encodeBufferLen:8,stream:n},t),n},i.prototype.box=function(e,t){if(t||(t=o),this.destroyed)return t(new Error("Encoder is destroyed"));var i;if(e.encodeBufferLen&&(i=new r(e.encodeBufferLen)),e.stream)e.buffer=null,i=c.encode(e,i),this.push(i),this._stream=e.stream,this._stream.on("readable",this._onreadable),this._stream.on("end",this._onend),this._stream.on("end",t),this._forward();else{i=c.encode(e,i);var a=this.push(i);if(a)return n.nextTick(t);this._drain=t}},i.prototype.destroy=function(e){if(!this.destroyed){if(this.destroyed=!0,this._stream&&this._stream.destroy&&this._stream.destroy(),this._stream=null,this._drain){var t=this._drain;this._drain=null,t(e)}e&&this.emit("error",e),this.emit("close")}},i.prototype.finalize=function(){this.push(null)},i.prototype._forward=function(){if(this._stream)for(;!this.destroyed;){var e=this._stream.read();if(!e)return void(this._want=!!this._stream);if(!this.push(e))return}},i.prototype._read=function(){if(!this._reading&&!this.destroyed){if(this._reading=!0,this._stream&&this._forward(),this._drain){var e=this._drain;this._drain=null,e()}this._reading=!1}},u(a,s.PassThrough),a.prototype.destroy=function(e){this.destroyed||(this.destroyed=!0,this._parent.destroy(e),e&&this.emit("error",e),this.emit("close"))}}).call(this,e("_process"),e("buffer").Buffer)},{_process:67,buffer:24,inherits:42,"mp4-box-encoding":54,"readable-stream":82}],57:[function(e,t,n){n.decode=e("./decode"),n.encode=e("./encode")},{"./decode":55,"./encode":56}],58:[function(e,t,n){function r(e){if(e=String(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*l;case"hours":case"hour":case"hrs":case"hr":case"h":return n*c;case"minutes":case"minute":case"mins":case"min":case"m":return n*u;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function o(e){return e>=l?Math.round(e/l)+"d":e>=c?Math.round(e/c)+"h":e>=u?Math.round(e/u)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}function i(e){return a(e,l,"day")||a(e,c,"hour")||a(e,u,"minute")||a(e,s,"second")||e+" ms"}function a(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var s=1e3,u=60*s,c=60*u,l=24*c,f=365.25*l;t.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return r(e);if("number"===n&&isNaN(e)===!1)return t.long?i(e):o(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],59:[function(e,t,n){function r(e,t){var n=this;return n instanceof r?(a.Readable.call(n,t),n.destroyed=!1,n._drained=!1,n._forwarding=!1,n._current=null,"function"==typeof e?n._queue=e:(n._queue=e.map(o),n._queue.forEach(function(e){"function"!=typeof e&&n._attachErrorListener(e)})),void n._next()):new r(e,t)}function o(e){if(!e||"function"==typeof e||e._readableState)return e;var t=(new a.Readable).wrap(e);return e.destroy&&(t.destroy=e.destroy.bind(e)),t}t.exports=r;var i=e("inherits"),a=e("readable-stream");i(r,a.Readable),r.obj=function(e){return new r(e,{objectMode:!0,highWaterMark:16})},r.prototype._read=function(){this._drained=!0,this._forward()},r.prototype._forward=function(){if(!this._forwarding&&this._drained&&this._current){this._forwarding=!0;for(var e;null!==(e=this._current.read());)this._drained=this.push(e);this._forwarding=!1}},r.prototype.destroy=function(e){this.destroyed||(this.destroyed=!0,this._current&&this._current.destroy&&this._current.destroy(),"function"!=typeof this._queue&&this._queue.forEach(function(e){e.destroy&&e.destroy()}),e&&this.emit("error",e),this.emit("close"))},r.prototype._next=function(){var e=this;if(e._current=null,"function"==typeof e._queue)e._queue(function(t,n){return t?e.destroy(t):(n=o(n),e._attachErrorListener(n),void e._gotNextStream(n))});else{var t=e._queue.shift();"function"==typeof t&&(t=o(t()),e._attachErrorListener(t)),e._gotNextStream(t)}},r.prototype._gotNextStream=function(e){function t(){o._forward()}function n(){e._readableState.ended||o.destroy()}function r(){o._current=null,e.removeListener("readable",t),e.removeListener("end",r),e.removeListener("close",n),o._next()}var o=this;return e?(o._current=e,o._forward(),e.on("readable",t),e.once("end",r),void e.once("close",n)):(o.push(null),void o.destroy())},r.prototype._attachErrorListener=function(e){function t(r){e.removeListener("error",t),n.destroy(r)}var n=this;e&&e.once("error",t)}},{inherits:42,"readable-stream":82}],60:[function(e,t,n){function r(e,t){var n=null;return e.on(t,function(e){if(n){var t=n;n=null,t(e)}}),function(e){n=e}}t.exports=r},{}],61:[function(e,t,n){function r(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}var i=e("wrappy");t.exports=i(r),t.exports.strict=i(o),r.proto=r(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return r(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})})},{wrappy:118}],62:[function(e,t,n){(function(n){function r(e){n.isBuffer(e)&&(e=u.decode(e)),s(e.info,"info"),s(e.info["name.utf-8"]||e.info.name,"info.name"),s(e.info["piece length"],"info['piece length']"),s(e.info.pieces,"info.pieces"),e.info.files?e.info.files.forEach(function(e){s("number"==typeof e.length,"info.files[0].length"),s(e["path.utf-8"]||e.path,"info.files[0].path")}):s("number"==typeof e.info.length,"info.length");var t={};t.info=e.info,t.infoBuffer=u.encode(e.info),t.infoHash=l.sync(t.infoBuffer),t.infoHashBuffer=new n(t.infoHash,"hex"),t.name=(e.info["name.utf-8"]||e.info.name).toString(),void 0!==e.info.private&&(t.private=!!e.info.private),e["creation date"]&&(t.created=new Date(1e3*e["creation date"])),e["created by"]&&(t.createdBy=e["created by"].toString()),n.isBuffer(e.comment)&&(t.comment=e.comment.toString()),t.announce=[],e["announce-list"]&&e["announce-list"].length?e["announce-list"].forEach(function(e){e.forEach(function(e){t.announce.push(e.toString())})}):e.announce&&t.announce.push(e.announce.toString()),n.isBuffer(e["url-list"])&&(e["url-list"]=e["url-list"].length>0?[e["url-list"]]:[]),t.urlList=(e["url-list"]||[]).map(function(e){return e.toString()}),f(t.announce),f(t.urlList);var r=e.info.files||[e.info];t.files=r.map(function(e,n){var o=[].concat(t.name,e["path.utf-8"]||e.path||[]).map(function(e){return e.toString()});return{path:c.join.apply(null,[c.sep].concat(o)).slice(1),name:o[o.length-1],length:e.length,offset:r.slice(0,n).reduce(i,0)}}),t.length=r.reduce(i,0);var o=t.files[t.files.length-1];return t.pieceLength=e.info["piece length"],t.lastPieceLength=(o.offset+o.length)%t.pieceLength||t.pieceLength,t.pieces=a(e.info.pieces),t}function o(e){var t={info:e.info};return t["announce-list"]=(e.announce||[]).map(function(e){return t.announce||(t.announce=e),e=new n(e,"utf8"),[e]}),t["url-list"]=e.urlList||[],e.created&&(t["creation date"]=e.created.getTime()/1e3|0),e.createdBy&&(t["created by"]=e.createdBy),e.comment&&(t.comment=e.comment),u.encode(t)}function i(e,t){return e+t.length}function a(e){for(var t=[],n=0;n<e.length;n+=20)t.push(e.slice(n,n+20).toString("hex"));return t}function s(e,t){if(!e)throw new Error("Torrent is missing required field: "+t)}t.exports=r,t.exports.decode=r,t.exports.encode=o;var u=e("bencode"),c=e("path"),l=e("simple-sha1"),f=e("uniq")}).call(this,e("buffer").Buffer)},{bencode:11,buffer:24,path:64,"simple-sha1":92,uniq:110}],63:[function(e,t,n){(function(n,r){function o(e){if("string"==typeof e&&/^(stream-)?magnet:/.test(e))return l(e);if("string"==typeof e&&(/^[a-f0-9]{40}$/i.test(e)||/^[a-z2-7]{32}$/i.test(e)))return l("magnet:?xt=urn:btih:"+e);if(r.isBuffer(e)&&20===e.length)return l("magnet:?xt=urn:btih:"+e.toString("hex"));if(r.isBuffer(e))return f(e);if(e&&e.infoHash)return e.announce||(e.announce=[]),"string"==typeof e.announce&&(e.announce=[e.announce]),e.urlList||(e.urlList=[]),e;throw new Error("Invalid torrent identifier")}function i(e,t){function r(e){try{i=o(e)}catch(e){return t(e)}i&&i.infoHash?t(null,i):t(new Error("Invalid torrent identifier"))}var i;if("function"!=typeof t)throw new Error("second argument must be a Function");try{i=o(e)}catch(e){}i&&i.infoHash?n.nextTick(function(){t(null,i)}):a(e)?s(e,function(e,n){return e?t(new Error("Error converting Blob: "+e.message)):void r(n)}):"function"==typeof c&&/^https?:/.test(e)?c.concat({url:e,headers:{"user-agent":"WebTorrent (http://webtorrent.io)"}},function(e,n,o){return e?t(new Error("Error downloading torrent: "+e.message)):void r(o)}):"function"==typeof u.readFile&&"string"==typeof e?u.readFile(e,function(e,n){return e?t(new Error("Invalid torrent identifier")):void r(n)}):n.nextTick(function(){t(new Error("Invalid torrent identifier"))})}function a(e){return"undefined"!=typeof Blob&&e instanceof Blob}t.exports=o,t.exports.remote=i;var s=e("blob-to-buffer"),u=e("fs"),c=e("simple-get"),l=e("magnet-uri"),f=e("parse-torrent-file");t.exports.toMagnetURI=l.encode,t.exports.toTorrentFile=f.encode,function(){r(0)}()}).call(this,e("_process"),e("buffer").Buffer)},{_process:67,"blob-to-buffer":19,buffer:24,fs:22,"magnet-uri":49,"parse-torrent-file":62,"simple-get":90}],64:[function(e,t,n){(function(e){function t(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)};n.resolve=function(){for(var n="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a=i>=0?arguments[i]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(n=a+"/"+n,o="/"===a.charAt(0))}return n=t(r(n.split("/"),function(e){return!!e}),!o).join("/"),(o?"/":"")+n||"."},n.normalize=function(e){var o=n.isAbsolute(e),i="/"===a(e,-1);return e=t(r(e.split("/"),function(e){return!!e}),!o).join("/"),e||o||(e="."),e&&i&&(e+="/"),(o?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},n.relative=function(e,t){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=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var o=r(e.split("/")),i=r(t.split("/")),a=Math.min(o.length,i.length),s=a,u=0;u<a;u++)if(o[u]!==i[u]){s=u;break}for(var c=[],u=s;u<o.length;u++)c.push("..");return c=c.concat(i.slice(s)),c.join("/")},n.sep="/",n.delimiter=":",n.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):"."},n.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},n.extname=function(e){return i(e)[3]};var a="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,e("_process"))},{_process:67}],65:[function(e,t,n){for(var r=e("closest-to"),o=Math.pow(2,10),i=13,a=[];i++<22;)a.push(Math.pow(2,i));t.exports=function(e){return r(e/o,a)}},{"closest-to":27}],66:[function(e,t,n){(function(e){"use strict";function n(t,n,r,o){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var i,a,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,n)});case 3:return e.nextTick(function(){t.call(null,n,r)});case 4:return e.nextTick(function(){t.call(null,n,r,o)});default:for(i=new Array(s-1),a=0;a<i.length;)i[a++]=arguments[a];return e.nextTick(function(){t.apply(null,i)})}}!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports=n:t.exports=e.nextTick}).call(this,e("_process"))},{_process:67}],67:[function(e,t,n){function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(e){if(f===setTimeout)return setTimeout(e,0);if((f===r||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function a(e){if(d===clearTimeout)return clearTimeout(e);if((d===o||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}function s(){v&&h&&(v=!1,h.length?m=h.concat(m):g=-1,m.length&&u())}function u(){if(!v){var e=i(s);v=!0;for(var t=m.length;t;){for(h=m,m=[];++g<t;)h&&h[g].run();g=-1,t=m.length}h=null,v=!1,a(e)}}function c(e,t){this.fun=e,this.array=t}function l(){}var f,d,p=t.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:r}catch(e){f=r}try{d="function"==typeof clearTimeout?clearTimeout:o}catch(e){d=o}}();var h,m=[],v=!1,g=-1;p.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];m.push(new c(e,t)),1!==m.length||v||i(u)},c.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=l,p.addListener=l,p.once=l,p.off=l,p.removeListener=l,p.removeAllListeners=l,p.emit=l,p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},{}],68:[function(e,t,n){var r=e("once"),o=e("end-of-stream"),i=e("fs"),a=function(){},s=function(e){return"function"==typeof e},u=function(e){return!!i&&(e instanceof(i.ReadStream||a)||e instanceof(i.WriteStream||a))&&s(e.close)},c=function(e){return e.setHeader&&s(e.abort)},l=function(e,t,n,i){i=r(i);var a=!1;e.on("close",function(){a=!0}),o(e,{readable:t,writable:n},function(e){return e?i(e):(a=!0,void i())});var l=!1;return function(t){if(!a&&!l)return l=!0,u(e)?e.close():c(e)?e.abort():s(e.destroy)?e.destroy():void i(t||new Error("stream was destroyed"))}},f=function(e){e()},d=function(e,t){return e.pipe(t)},p=function(){var e=Array.prototype.slice.call(arguments),t=s(e[e.length-1]||a)&&e.pop()||a;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var n,r=e.map(function(o,i){var a=i<e.length-1,s=i>0;return l(o,a,s,function(e){n||(n=e),e&&r.forEach(f),a||(r.forEach(f),t(n))})});return e.reduce(d)};t.exports=p},{"end-of-stream":33,fs:21,once:61}],69:[function(n,r,o){(function(t){!function(n){function i(e){throw new RangeError(M[e])}function a(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function s(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(O,".");var o=e.split("."),i=a(o,t).join(".");return r+i}function u(e){for(var t,n,r=[],o=0,i=e.length;o<i;)t=e.charCodeAt(o++),t>=55296&&t<=56319&&o<i?(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){return a(e,function(e){var t="";return e>65535&&(e-=65536,t+=N(e>>>10&1023|55296),e=56320|1023&e),t+=N(e)}).join("")}function l(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:x}function f(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function d(e,t,n){var r=0;for(e=n?U(e/I):e>>1,e+=U(e/t);e>B*C>>1;r+=x)e=U(e/B);return U(r+(B+1)*e/(e+S))}function p(e){var t,n,r,o,a,s,u,f,p,h,m=[],v=e.length,g=0,y=A,_=T;for(n=e.lastIndexOf(P),n<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&i("not-basic"),m.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<v;){for(a=g,s=1,u=x;o>=v&&i("invalid-input"),f=l(e.charCodeAt(o++)),(f>=x||f>U((E-g)/s))&&i("overflow"),g+=f*s,p=u<=_?k:u>=_+C?C:u-_,!(f<p);u+=x)h=x-p,s>U(E/h)&&i("overflow"),s*=h;t=m.length+1,_=d(g-a,t,0==a),U(g/t)>E-y&&i("overflow"),y+=U(g/t),g%=t,m.splice(g++,0,y)}return c(m)}function h(e){var t,n,r,o,a,s,c,l,p,h,m,v,g,y,_,b=[];for(e=u(e),v=e.length,t=A,n=0,a=T,s=0;s<v;++s)m=e[s],m<128&&b.push(N(m));for(r=o=b.length,o&&b.push(P);r<v;){for(c=E,s=0;s<v;++s)m=e[s],m>=t&&m<c&&(c=m);for(g=r+1,c-t>U((E-n)/g)&&i("overflow"),n+=(c-t)*g,t=c,s=0;s<v;++s)if(m=e[s],m<t&&++n>E&&i("overflow"),m==t){for(l=n,p=x;h=p<=a?k:p>=a+C?C:p-a,!(l<h);p+=x)_=l-h,y=x-h,b.push(N(f(h+_%y,0))),l=U(_/y);b.push(N(f(l,0))),a=d(n,g,r==o),n=0,++r}++n,++t}return b.join("")}function m(e){return s(e,function(e){return R.test(e)?p(e.slice(4).toLowerCase()):e})}function v(e){return s(e,function(e){return L.test(e)?"xn--"+h(e):e})}var g="object"==typeof o&&o&&!o.nodeType&&o,y="object"==typeof r&&r&&!r.nodeType&&r,_="object"==typeof t&&t;_.global!==_&&_.window!==_&&_.self!==_||(n=_);var b,w,E=2147483647,x=36,k=1,C=26,S=38,I=700,T=72,A=128,P="-",R=/^xn--/,L=/[^\x20-\x7E]/,O=/[\x2E\u3002\uFF0E\uFF61]/g,M={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},B=x-k,U=Math.floor,N=String.fromCharCode;if(b={version:"1.4.1",ucs2:{decode:u,encode:c},decode:p,encode:h,toASCII:v,toUnicode:m},"function"==typeof e&&"object"==typeof e.amd&&e.amd)e("punycode",function(){return b});else if(g&&y)if(r.exports==g)y.exports=b;else for(w in b)b.hasOwnProperty(w)&&(g[w]=b[w]);else n.punycode=b}(this)}).call(this,"undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],70:[function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,n,i){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;l<c;++l){var f,d,p,h,m=e[l].replace(s,"%20"),v=m.indexOf(n);v>=0?(f=m.substr(0,v),d=m.substr(v+1)):(f=m,d=""),p=decodeURIComponent(f),h=decodeURIComponent(d),r(a,p)?o(a[p])?a[p].push(h):a[p]=[a[p],h]:a[p]=h}return a};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],71:[function(e,t,n){"use strict";function r(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var o=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?r(a(e),function(a){var s=encodeURIComponent(o(a))+n;return i(e[a])?r(e[a],function(e){return s+encodeURIComponent(o(e))}).join(t):s+encodeURIComponent(o(e[a]))}).join(t):s?encodeURIComponent(o(s))+n+encodeURIComponent(o(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},a=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},{}],72:[function(e,t,n){"use strict";n.decode=n.parse=e("./decode"),n.encode=n.stringify=e("./encode")},{"./decode":70,"./encode":71}],73:[function(e,t,n){var r=function(e){var t=0;return function(){if(t===e.length)return null;var n=e.length-t,r=Math.random()*n|0,o=e[t+r],i=e[t];return e[t]=o,e[t+r]=i,t++,o}};t.exports=r},{}],74:[function(e,n,r){(function(e,t,r){"use strict";function o(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}function i(n,o){if(n>65536)throw new Error("requested too many random bytes");var i=new t.Uint8Array(n);n>0&&a.getRandomValues(i);var s=new r(i.buffer);return"function"==typeof o?e.nextTick(function(){o(null,s)}):s}var a=t.crypto||t.msCrypto;a&&a.getRandomValues?n.exports=i:n.exports=o}).call(this,e("_process"),"undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{_process:67,buffer:24}],75:[function(e,t,n){function r(e,t){var n=this;return n instanceof r?(i.Writable.call(n,t),n.destroyed=!1,n._queue=[],n._position=e||0,n._cb=null,n._buffer=null,void(n._out=null)):new r(e)}var o=e("inherits"),i=e("readable-stream");t.exports=r,o(r,i.Writable),r.prototype._write=function(e,t,n){for(var r=this,o=!0;;){if(r.destroyed)return;if(0===r._queue.length)return r._buffer=e,void(r._cb=n);r._buffer=null;var i=r._queue[0],a=Math.max(i.start-r._position,0),s=i.end-r._position;if(a>=e.length)return r._position+=e.length,n(null);var u;if(s>e.length){r._position+=e.length,u=0===a?e:e.slice(a),o=i.stream.write(u)&&o;break}r._position+=s,u=0===a&&s===e.length?e:e.slice(a,s),o=i.stream.write(u)&&o,i.last&&i.stream.end(),e=e.slice(s),r._queue.shift()}o?n(null):i.stream.once("drain",n.bind(null,null))},r.prototype.slice=function(e){var t=this;if(t.destroyed)return null;e instanceof Array||(e=[e]);var n=new i.PassThrough;return e.forEach(function(r,o){t._queue.push({start:r.start,end:r.end,stream:n,last:o===e.length-1})}),t._buffer&&t._write(t._buffer,null,t._cb),n},r.prototype.destroy=function(e){var t=this;t.destroyed||(t.destroyed=!0,e&&t.emit("error",e))}},{inherits:42,"readable-stream":82}],76:[function(e,t,n){"use strict";function r(e){return this instanceof r?(c.call(this,e),l.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",o)):new r(e)}function o(){this.allowHalfOpen||this._writableState.ended||s(i,this)}function i(e){e.end()}var a=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=r;var s=e("process-nextick-args"),u=e("core-util-is");u.inherits=e("inherits");var c=e("./_stream_readable"),l=e("./_stream_writable");u.inherits(r,c);for(var f=a(l.prototype),d=0;d<f.length;d++){var p=f[d];r.prototype[p]||(r.prototype[p]=l.prototype[p])}},{"./_stream_readable":78,"./_stream_writable":80,"core-util-is":28,inherits:42,"process-nextick-args":66}],77:[function(e,t,n){"use strict";function r(e){return this instanceof r?void o.call(this,e):new r(e)}t.exports=r;var o=e("./_stream_transform"),i=e("core-util-is");i.inherits=e("inherits"),i.inherits(r,o),r.prototype._transform=function(e,t,n){n(null,e)}},{"./_stream_transform":79,"core-util-is":28,inherits:42}],78:[function(e,t,n){(function(n){"use strict";function r(e,t,n){return"function"==typeof e.prependListener?e.prependListener(t,n):void(e._events&&e._events[t]?R(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n))}function o(t,n){A=A||e("./_stream_duplex"),t=t||{},
  this.objectMode=!!t.objectMode,n instanceof A&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var r=t.highWaterMark,o=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:o,this.highWaterMark=~~this.highWaterMark,this.buffer=new F,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(j||(j=e("string_decoder/").StringDecoder),this.decoder=new j(t.encoding),this.encoding=t.encoding)}function i(t){return A=A||e("./_stream_duplex"),this instanceof i?(this._readableState=new o(t,this),this.readable=!0,t&&"function"==typeof t.read&&(this._read=t.read),void L.call(this)):new i(t)}function a(e,t,n,r,o){var i=l(t,n);if(i)e.emit("error",i);else if(null===n)t.reading=!1,f(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!o){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&o){var u=new Error("stream.unshift() after end event");e.emit("error",u)}else{var c;!t.decoder||o||r||(n=t.decoder.write(n),c=!t.objectMode&&0===n.length),o||(t.reading=!1),c||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,o?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&d(e))),h(e,t)}else o||(t.reading=!1);return s(t)}function s(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function u(e){return e>=H?e=H:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function c(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=u(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function l(e,t){var n=null;return M.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function f(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,d(e)}}function d(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(D("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?P(p,e):p(e))}function p(e){D("emit readable"),e.emit("readable"),b(e)}function h(e,t){t.readingMore||(t.readingMore=!0,P(m,e,t))}function m(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(D("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function v(e){return function(){var t=e._readableState;D("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&O(e,"data")&&(t.flowing=!0,b(e))}}function g(e){D("readable nexttick read 0"),e.read(0)}function y(e,t){t.resumeScheduled||(t.resumeScheduled=!0,P(_,e,t))}function _(e,t){t.reading||(D("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),b(e),t.flowing&&!t.reading&&e.read(0)}function b(e){var t=e._readableState;for(D("flow",t.flowing);t.flowing&&null!==e.read(););}function w(e,t){if(0===t.length)return null;var n;return t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=E(e,t.buffer,t.decoder),n}function E(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?x(e,t):k(e,t),r}function x(e,t){var n=t.head,r=1,o=n.data;for(e-=o.length;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(o+=a===i.length?i:i.slice(0,e),e-=a,0===e){a===i.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(a));break}++r}return t.length-=r,o}function k(e,t){var n=B.allocUnsafe(e),r=t.head,o=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(n,n.length-e,0,a),e-=a,0===e){a===i.length?(++o,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(a));break}++o}return t.length-=o,n}function C(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,P(S,t,e))}function S(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function I(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function T(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}t.exports=i;var A,P=e("process-nextick-args"),R=e("isarray");i.ReadableState=o;var L,O=(e("events").EventEmitter,function(e,t){return e.listeners(t).length});!function(){try{L=e("stream")}catch(e){}finally{L||(L=e("events").EventEmitter)}}();var M=e("buffer").Buffer,B=e("buffer-shims"),U=e("core-util-is");U.inherits=e("inherits");var N=e("util"),D=void 0;D=N&&N.debuglog?N.debuglog("stream"):function(){};var j,F=e("./internal/streams/BufferList");U.inherits(i,L),i.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||"string"!=typeof e||(t=t||n.defaultEncoding,t!==n.encoding&&(e=B.from(e,t),t="")),a(this,n,e,t,!1)},i.prototype.unshift=function(e){var t=this._readableState;return a(this,t,e,"",!0)},i.prototype.isPaused=function(){return this._readableState.flowing===!1},i.prototype.setEncoding=function(t){return j||(j=e("string_decoder/").StringDecoder),this._readableState.decoder=new j(t),this._readableState.encoding=t,this};var H=8388608;i.prototype.read=function(e){D("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return D("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?C(this):d(this),null;if(e=c(e,t),0===e&&t.ended)return 0===t.length&&C(this),null;var r=t.needReadable;D("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,D("length less than watermark",r)),t.ended||t.reading?(r=!1,D("reading or ended",r)):r&&(D("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=c(n,t)));var o;return o=e>0?w(e,t):null,null===o?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&C(this)),null!==o&&this.emit("data",o),o},i.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},i.prototype.pipe=function(e,t){function o(e){D("onunpipe"),e===d&&a()}function i(){D("onend"),e.end()}function a(){D("cleanup"),e.removeListener("close",c),e.removeListener("finish",l),e.removeListener("drain",g),e.removeListener("error",u),e.removeListener("unpipe",o),d.removeListener("end",i),d.removeListener("end",a),d.removeListener("data",s),y=!0,!p.awaitDrain||e._writableState&&!e._writableState.needDrain||g()}function s(t){D("ondata"),_=!1;var n=e.write(t);!1!==n||_||((1===p.pipesCount&&p.pipes===e||p.pipesCount>1&&T(p.pipes,e)!==-1)&&!y&&(D("false write response, pause",d._readableState.awaitDrain),d._readableState.awaitDrain++,_=!0),d.pause())}function u(t){D("onerror",t),f(),e.removeListener("error",u),0===O(e,"error")&&e.emit("error",t)}function c(){e.removeListener("finish",l),f()}function l(){D("onfinish"),e.removeListener("close",c),f()}function f(){D("unpipe"),d.unpipe(e)}var d=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=e;break;case 1:p.pipes=[p.pipes,e];break;default:p.pipes.push(e)}p.pipesCount+=1,D("pipe count=%d opts=%j",p.pipesCount,t);var h=(!t||t.end!==!1)&&e!==n.stdout&&e!==n.stderr,m=h?i:a;p.endEmitted?P(m):d.once("end",m),e.on("unpipe",o);var g=v(d);e.on("drain",g);var y=!1,_=!1;return d.on("data",s),r(e,"error",u),e.once("close",c),e.once("finish",l),e.emit("pipe",d),p.flowing||(D("pipe resume"),d.resume()),e},i.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<r;o++)n[o].emit("unpipe",this);return this}var i=T(t.pipes,e);return i===-1?this:(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},i.prototype.on=function(e,t){var n=L.prototype.on.call(this,e,t);if("data"===e)this._readableState.flowing!==!1&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&d(this,r):P(g,this))}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var e=this._readableState;return e.flowing||(D("resume"),e.flowing=!0,y(this,e)),this},i.prototype.pause=function(){return D("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(D("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;e.on("end",function(){if(D("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),e.on("data",function(o){if(D("wrapped data"),t.decoder&&(o=t.decoder.write(o)),(!t.objectMode||null!==o&&void 0!==o)&&(t.objectMode||o&&o.length)){var i=r.push(o);i||(n=!0,e.pause())}});for(var o in e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));var i=["error","close","destroy","pause","resume"];return I(i,function(t){e.on(t,r.emit.bind(r,t))}),r._read=function(t){D("wrapped _read",t),n&&(n=!1,e.resume())},r},i._fromList=w}).call(this,e("_process"))},{"./_stream_duplex":76,"./internal/streams/BufferList":81,_process:67,buffer:24,"buffer-shims":23,"core-util-is":28,events:35,inherits:42,isarray:47,"process-nextick-args":66,"string_decoder/":102,util:21}],79:[function(e,t,n){"use strict";function r(e){this.afterTransform=function(t,n){return o(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function o(e,t,n){var r=e._transformState;r.transforming=!1;var o=r.writecb;if(!o)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!==n&&void 0!==n&&e.push(n),o(t);var i=e._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&e._read(i.highWaterMark)}function i(e){if(!(this instanceof i))return new i(e);s.call(this,e),this._transformState=new r(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(e,n){a(t,e,n)}):a(t)})}function a(e,t,n){if(t)return e.emit("error",t);null!==n&&void 0!==n&&e.push(n);var r=e._writableState,o=e._transformState;if(r.length)throw new Error("Calling transform done when ws.length != 0");if(o.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}t.exports=i;var s=e("./_stream_duplex"),u=e("core-util-is");u.inherits=e("inherits"),u.inherits(i,s),i.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},i.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},i.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var o=this._readableState;(r.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},i.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0}},{"./_stream_duplex":76,"core-util-is":28,inherits:42}],80:[function(e,t,r){(function(r){"use strict";function o(){}function i(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function a(t,n){k=k||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,n instanceof k&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var r=t.highWaterMark,o=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:o,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){m(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new x(this)}function s(t){return k=k||e("./_stream_duplex"),L.call(s,this)||this instanceof k?(this._writableState=new a(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev)),void T.call(this)):new s(t)}function u(e,t){var n=new Error("write after end");e.emit("error",n),C(t,n)}function c(e,t,n,r){var o=!0,i=!1;return null===n?i=new TypeError("May not write null values to stream"):P.isBuffer(n)||"string"==typeof n||void 0===n||t.objectMode||(i=new TypeError("Invalid non-string/buffer chunk")),i&&(e.emit("error",i),C(r,i),o=!1),o}function l(e,t,n){return e.objectMode||e.decodeStrings===!1||"string"!=typeof t||(t=R.from(t,n)),t}function f(e,t,n,r,o){n=l(t,n,r),P.isBuffer(n)&&(r="buffer");var a=t.objectMode?1:n.length;t.length+=a;var s=t.length<t.highWaterMark;if(s||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest=new i(n,r,o),u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else d(e,t,!1,a,n,r,o);return s}function d(e,t,n,r,o,i,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function p(e,t,n,r,o){--t.pendingcb,n?C(o,r):o(r),e._writableState.errorEmitted=!0,e.emit("error",r)}function h(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function m(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if(h(n),t)p(e,n,r,t,o);else{var i=_(n);i||n.corked||n.bufferProcessing||!n.bufferedRequest||y(e,n),r?S(v,e,n,i,o):v(e,n,i,o)}}function v(e,t,n,r){n||g(e,t),t.pendingcb--,r(),w(e,t)}function g(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function y(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),i=t.corkedRequestsFree;i.entry=n;for(var a=0;n;)o[a]=n,n=n.next,a+=1;d(e,t,!0,t.length,o,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new x(t)}else{for(;n;){var s=n.chunk,u=n.encoding,c=n.callback,l=t.objectMode?1:s.length;if(d(e,t,!1,l,s,u,c),n=n.next,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function _(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function b(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function w(e,t){var n=_(t);return n&&(0===t.pendingcb?(b(e,t),t.finished=!0,e.emit("finish")):b(e,t)),n}function E(e,t,n){t.ending=!0,w(e,t),n&&(t.finished?C(n):e.once("finish",n)),t.ended=!0,e.writable=!1}function x(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var r=t.entry;for(t.entry=null;r;){var o=r.callback;e.pendingcb--,o(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}t.exports=s;var k,C=e("process-nextick-args"),S=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?n:C;s.WritableState=a;var I=e("core-util-is");I.inherits=e("inherits");var T,A={deprecate:e("util-deprecate")};!function(){try{T=e("stream")}catch(e){}finally{T||(T=e("events").EventEmitter)}}();var P=e("buffer").Buffer,R=e("buffer-shims");I.inherits(s,T),a.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(a.prototype,"buffer",{get:A.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var L;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(L=Function.prototype[Symbol.hasInstance],Object.defineProperty(s,Symbol.hasInstance,{value:function(e){return!!L.call(this,e)||e&&e._writableState instanceof a}})):L=function(e){return e instanceof this},s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},s.prototype.write=function(e,t,n){var r=this._writableState,i=!1;return"function"==typeof t&&(n=t,t=null),P.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=o),r.ended?u(this,n):c(this,r,e,n)&&(r.pendingcb++,i=f(this,r,e,t,n)),i},s.prototype.cork=function(){var e=this._writableState;e.corked++},s.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||y(this,e))},s.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},s.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},s.prototype._writev=null,s.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||E(this,r,n)}}).call(this,e("_process"))},{"./_stream_duplex":76,_process:67,buffer:24,"buffer-shims":23,"core-util-is":28,events:35,inherits:42,"process-nextick-args":66,"util-deprecate":115}],81:[function(e,t,n){"use strict";function r(){this.head=null,this.tail=null,this.length=0}var o=(e("buffer").Buffer,e("buffer-shims"));t.exports=r,r.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},r.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},r.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},r.prototype.clear=function(){this.head=this.tail=null,this.length=0},r.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},r.prototype.concat=function(e){if(0===this.length)return o.alloc(0);if(1===this.length)return this.head.data;for(var t=o.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t}},{buffer:24,"buffer-shims":23}],82:[function(e,t,n){(function(r){var o=function(){try{return e("stream")}catch(e){}}();n=t.exports=e("./lib/_stream_readable.js"),n.Stream=o||n,n.Readable=n,n.Writable=e("./lib/_stream_writable.js"),n.Duplex=e("./lib/_stream_duplex.js"),n.Transform=e("./lib/_stream_transform.js"),n.PassThrough=e("./lib/_stream_passthrough.js"),!r.browser&&"disable"===r.env.READABLE_STREAM&&o&&(t.exports=o)}).call(this,e("_process"))},{"./lib/_stream_duplex.js":76,"./lib/_stream_passthrough.js":77,"./lib/_stream_readable.js":78,"./lib/_stream_transform.js":79,"./lib/_stream_writable.js":80,_process:67}],83:[function(e,t,n){function r(e,t,n,r){"function"==typeof n&&(r=n,n={}),n||(n={}),r||(r=function(){}),s(e),c(n),"string"==typeof t&&(t=document.querySelector(t)),i(e,function(n){if(t.nodeName!==n.toUpperCase()){var r=p.extname(e.name).toLowerCase();throw new Error('Cannot render "'+r+'" inside a "'+t.nodeName.toLowerCase()+'" element, expected "'+n+'"')}return t},n,r)}function o(e,t,n,r){function o(e){return"video"===e||"audio"===e?a(e):u(e)}function a(e){var r=u(e);return n.controls&&(r.controls=!0),n.autoplay&&(r.autoplay=!0),t.appendChild(r),r}function u(e){var n=document.createElement(e);return t.appendChild(n),n}function l(e,t){e&&t&&t.remove(),r(e,t)}if("function"==typeof n&&(r=n,n={}),n||(n={}),r||(r=function(){}),s(e),c(n),"string"==typeof t&&(t=document.querySelector(t)),t&&("VIDEO"===t.nodeName||"AUDIO"===t.nodeName))throw new Error("Invalid video/audio node argument. Argument must be root element that video/audio tag will be appended to.");i(e,o,n,l)}function i(e,t,n,r){function o(){function r(){l("Use `videostream` package for "+e.name),h(),S.addEventListener("error",f),S.addEventListener("loadstart",s),S.addEventListener("canplay",c),m(e,S)}function o(){l("Use MediaSource API for "+e.name),h(),S.addEventListener("error",p),S.addEventListener("loadstart",s),S.addEventListener("canplay",c);var t=new d(S),n=t.createWriteStream(u(e.name));e.createReadStream().pipe(n),T&&(S.currentTime=T)}function i(){l("Use Blob URL for "+e.name),h(),S.addEventListener("error",C),S.addEventListener("loadstart",s),S.addEventListener("canplay",c),a(e,function(e,t){return e?C(e):(S.src=t,void(T&&(S.currentTime=T)))})}function f(e){l("videostream error: fallback to MediaSource API: %o",e.message||e),S.removeEventListener("error",f),S.removeEventListener("canplay",c),o()}function p(t){return l("MediaSource API error: fallback to Blob URL: %o",t.message||t),"number"==typeof e.length&&e.length>n.maxBlobLength?(l("File length too large for Blob URL approach: %d (max: %d)",e.length,n.maxBlobLength),C(new Error("File length too large for Blob URL approach: "+e.length+" (max: "+n.maxBlobLength+")"))):(S.removeEventListener("error",p),S.removeEventListener("canplay",c),void i())}function h(){S||(S=t(y),S.addEventListener("progress",function(){T=S.currentTime}))}var y=g.indexOf(I)>=0?"video":"audio";k?v.indexOf(I)>=0?r():o():i()}function i(){S=t("audio"),a(e,function(e,t){return e?C(e):(S.addEventListener("error",C),S.addEventListener("loadstart",s),S.addEventListener("canplay",c),void(S.src=t))})}function s(){S.removeEventListener("loadstart",s),n.autoplay&&S.play()}function c(){S.removeEventListener("canplay",c),r(null,S)}function h(){S=t("img"),a(e,function(t,n){return t?C(t):(S.src=n,S.alt=e.name,void r(null,S))})}function y(){S=t("iframe"),a(e,function(e,t){return e?C(e):(S.src=t,".pdf"!==I&&(S.sandbox="allow-forms allow-scripts"),void r(null,S))})}function x(){function t(){f(n)?(l('File extension "%s" appears ascii, so will render.',I),y()):(l('File extension "%s" appears non-ascii, will not render.',I),r(new Error('Unsupported file type "'+I+'": Cannot append to DOM')))}l('Unknown file extension "%s" - will attempt to render into iframe',I);var n="";e.createReadStream({start:0,end:1e3}).setEncoding("utf8").on("data",function(e){n+=e}).on("end",t).on("error",r)}function C(t){t.message='Error rendering file "'+e.name+'": '+t.message,l(t.message),r(t)}var S,I=p.extname(e.name).toLowerCase(),T=0;_.indexOf(I)>=0?o():b.indexOf(I)>=0?i():w.indexOf(I)>=0?h():E.indexOf(I)>=0?y():x()}function a(e,t){var r=p.extname(e.name).toLowerCase();h(e.createReadStream(),n.mime[r],t)}function s(e){if(null==e)throw new Error("file cannot be null or undefined");if("string"!=typeof e.name)throw new Error("missing or invalid file.name property");if("function"!=typeof e.createReadStream)throw new Error("missing or invalid file.createReadStream property")}function u(e){var t=p.extname(e).toLowerCase();return{".m4a":'audio/mp4; codecs="mp4a.40.5"',".m4v":'video/mp4; codecs="avc1.640029, mp4a.40.5"',".mkv":'video/webm; codecs="avc1.640029, mp4a.40.5"',".mp3":"audio/mpeg",".mp4":'video/mp4; codecs="avc1.640029, mp4a.40.5"',".webm":'video/webm; codecs="vorbis, vp8"'}[t]}function c(e){null==e.autoplay&&(e.autoplay=!0),null==e.controls&&(e.controls=!0),null==e.maxBlobLength&&(e.maxBlobLength=x)}n.render=r,n.append=o,n.mime=e("./lib/mime.json");var l=e("debug")("render-media"),f=e("is-ascii"),d=e("mediasource"),p=e("path"),h=e("stream-to-blob-url"),m=e("videostream"),v=[".m4a",".m4v",".mp4"],g=[".m4v",".mkv",".mp4",".webm"],y=[".m4a",".mp3"],_=[].concat(g,y),b=[".aac",".oga",".ogg",".wav"],w=[".bmp",".gif",".jpeg",".jpg",".png"],E=[".css",".html",".js",".md",".pdf",".txt"],x=2e8,k="undefined"!=typeof window&&window.MediaSource},{"./lib/mime.json":84,debug:30,"is-ascii":43,mediasource:50,path:64,"stream-to-blob-url":99,videostream:117}],84:[function(e,t,n){t.exports={".3gp":"video/3gpp",".aac":"audio/aac",".aif":"audio/x-aiff",".aiff":"audio/x-aiff",".atom":"application/atom+xml",".avi":"video/x-msvideo",".bmp":"image/bmp",".bz2":"application/x-bzip2",".conf":"text/plain",".css":"text/css",".csv":"text/plain",".diff":"text/x-diff",".doc":"application/msword",".flv":"video/x-flv",".gif":"image/gif",".gz":"application/x-gzip",".htm":"text/html",".html":"text/html",".ico":"image/vnd.microsoft.icon",".ics":"text/calendar",".iso":"application/octet-stream",".jar":"application/java-archive",".jpeg":"image/jpeg",".jpg":"image/jpeg",".js":"application/javascript",".json":"application/json",".less":"text/css",".log":"text/plain",".m3u":"audio/x-mpegurl",".m4a":"audio/mp4",".m4v":"video/mp4",".manifest":"text/cache-manifest",".markdown":"text/x-markdown",".mathml":"application/mathml+xml",".md":"text/x-markdown",".mid":"audio/midi",".midi":"audio/midi",".mov":"video/quicktime",".mp3":"audio/mpeg",".mp4":"video/mp4",".mp4v":"video/mp4",".mpeg":"video/mpeg",".mpg":"video/mpeg",".odp":"application/vnd.oasis.opendocument.presentation",".ods":"application/vnd.oasis.opendocument.spreadsheet",".odt":"application/vnd.oasis.opendocument.text",".oga":"audio/ogg",".ogg":"application/ogg",".pdf":"application/pdf",".png":"image/png",".pps":"application/vnd.ms-powerpoint",".ppt":"application/vnd.ms-powerpoint",".ps":"application/postscript",".psd":"image/vnd.adobe.photoshop",".qt":"video/quicktime",".rar":"application/x-rar-compressed",".rdf":"application/rdf+xml",".rss":"application/rss+xml",".rtf":"application/rtf",".svg":"image/svg+xml",".svgz":"image/svg+xml",".swf":"application/x-shockwave-flash",".tar":"application/x-tar",".tbz":"application/x-bzip-compressed-tar",".text":"text/plain",".tif":"image/tiff",".tiff":"image/tiff",".torrent":"application/x-bittorrent",".ttf":"application/x-font-ttf",".txt":"text/plain",".wav":"audio/wav",".webm":"video/webm",".wma":"audio/x-ms-wma",".wmv":"video/x-ms-wmv",".xls":"application/vnd.ms-excel",".xml":"application/xml",".yaml":"text/yaml",".yml":"text/yaml",".zip":"application/zip"}},{}],85:[function(e,t,n){(function(e){t.exports=function(t,n,r){function o(t){function n(){r&&r(t,a),r=null}f?e.nextTick(n):n()}function i(e,n,r){if(a[e]=r,n&&(l=!0),0===--u||n)o(n);else if(!l&&d<s){var f;c?(f=c[d],d+=1,t[f](function(e,t){i(f,e,t)})):(f=d,d+=1,t[f](function(e,t){i(f,e,t)}))}}if("number"!=typeof n)throw new Error("second argument must be a Number");var a,s,u,c,l,f=!0;Array.isArray(t)?(a=[],u=s=t.length):(c=Object.keys(t),a={},u=s=c.length);var d=n;u?c?c.some(function(e,r){if(t[e](function(t,n){i(e,t,n)}),r===n-1)return!0}):t.some(function(e,t){if(e(function(e,n){i(t,e,n)}),t===n-1)return!0}):o(null),f=!1}}).call(this,e("_process"))},{_process:67}],86:[function(e,t,n){(function(e){t.exports=function(t,n){function r(t){function r(){n&&n(t,i),n=null}u?e.nextTick(r):r()}function o(e,t,n){i[e]=n,(0===--a||t)&&r(t)}var i,a,s,u=!0;Array.isArray(t)?(i=[],a=t.length):(s=Object.keys(t),i={},a=s.length),a?s?s.forEach(function(e){t[e](function(t,n){o(e,t,n)})}):t.forEach(function(e,t){e(function(e,n){o(t,e,n)})}):r(null),u=!1}}).call(this,e("_process"))},{_process:67}],87:[function(e,n,r){(function(e){!function(){function t(e){"use strict";for(var n={fill:0},i=function(e){for(e+=9;e%64>0;e+=1);return e},a=function(e,t){var n=new Uint8Array(e.buffer),r=t%4,o=t-r;switch(r){case 0:n[o+3]=0;case 1:n[o+2]=0;case 2:n[o+1]=0;case 3:n[o+0]=0}for(var i=(t>>2)+1;i<e.length;i++)e[i]=0},s=function(e,t,n){e[t>>2]|=128<<24-(t%4<<3),e[((t>>2)+2&-16)+14]=n/(1<<29)|0,e[((t>>2)+2&-16)+15]=n<<3},u=function(e,t,n,r,o){var i,a=this,s=o%4,u=(r+s)%4,c=r-u;switch(s){case 0:e[o]=a.charCodeAt(n+3);case 1:e[o+1-(s<<1)|0]=a.charCodeAt(n+2);case 2:e[o+2-(s<<1)|0]=a.charCodeAt(n+1);case 3:e[o+3-(s<<1)|0]=a.charCodeAt(n)}if(!(r<u+s)){for(i=4-s;i<c;i=i+4|0)t[o+i>>2]=a.charCodeAt(n+i)<<24|a.charCodeAt(n+i+1)<<16|a.charCodeAt(n+i+2)<<8|a.charCodeAt(n+i+3);switch(u){case 3:e[o+c+1|0]=a.charCodeAt(n+c+2);case 2:e[o+c+2|0]=a.charCodeAt(n+c+1);case 1:e[o+c+3|0]=a.charCodeAt(n+c)}}},c=function(e,t,n,r,o){var i,a=this,s=o%4,u=(r+s)%4,c=r-u;switch(s){case 0:e[o]=a[n+3];case 1:e[o+1-(s<<1)|0]=a[n+2];case 2:e[o+2-(s<<1)|0]=a[n+1];case 3:e[o+3-(s<<1)|0]=a[n]}if(!(r<u+s)){for(i=4-s;i<c;i=i+4|0)t[o+i>>2|0]=a[n+i]<<24|a[n+i+1]<<16|a[n+i+2]<<8|a[n+i+3];switch(u){case 3:e[o+c+1|0]=a[n+c+2];case 2:e[o+c+2|0]=a[n+c+1];case 1:e[o+c+3|0]=a[n+c]}}},l=function(e,t,n,r,i){var a,s=this,u=i%4,c=(r+u)%4,l=r-c,f=new Uint8Array(o.readAsArrayBuffer(s.slice(n,n+r)));switch(u){case 0:e[i]=f[3];case 1:e[i+1-(u<<1)|0]=f[2];case 2:e[i+2-(u<<1)|0]=f[1];case 3:e[i+3-(u<<1)|0]=f[0]}if(!(r<c+u)){for(a=4-u;a<l;a=a+4|0)t[i+a>>2|0]=f[a]<<24|f[a+1]<<16|f[a+2]<<8|f[a+3];switch(c){case 3:e[i+l+1|0]=f[l+2];case 2:e[i+l+2|0]=f[l+1];case 1:e[i+l+3|0]=f[l]}}},f=function(e){switch(r.getDataType(e)){case"string":return u.bind(e);case"array":return c.bind(e);case"buffer":return c.bind(e);case"arraybuffer":return c.bind(new Uint8Array(e));case"view":return c.bind(new Uint8Array(e.buffer,e.byteOffset,e.byteLength));case"blob":return l.bind(e)}},d=new Array(256),p=0;p<256;p++)d[p]=(p<16?"0":"")+p.toString(16);var h=function(e){for(var t=new Uint8Array(e),n=new Array(e.byteLength),r=0;r<n.length;r++)n[r]=d[t[r]];return n.join("")},m=function(e){var t;if(e<=65536)return 65536;if(e<16777216)for(t=1;t<e;t<<=1);else for(t=16777216;t<e;t+=16777216);return t},v=function(e){if(e%64>0)throw new Error("Chunk size must be a multiple of 128 bit");n.offset=0,n.maxChunkLen=e,n.padMaxChunkLen=i(e),n.heap=new ArrayBuffer(m(n.padMaxChunkLen+320+20)),n.h32=new Int32Array(n.heap),n.h8=new Int8Array(n.heap),n.core=new t._core({Int32Array:Int32Array,DataView:DataView},{},n.heap),n.buffer=null};v(e||65536);var g=function(e,t){n.offset=0;var r=new Int32Array(e,t+320,5);r[0]=1732584193,r[1]=-271733879,r[2]=-1732584194,r[3]=271733878,r[4]=-1009589776},y=function(e,t){var r=i(e),o=new Int32Array(n.heap,0,r>>2);return a(o,e),s(o,e,t),r},_=function(e,t,r,o){f(e)(n.h8,n.h32,t,r,o||0)},b=function(e,t,r,o,i){var a=r;_(e,t,r),i&&(a=y(r,o)),n.core.hash(a,n.padMaxChunkLen)},w=function(e,t){var n=new Int32Array(e,t+320,5),r=new Int32Array(5),o=new DataView(r.buffer);return o.setInt32(0,n[0],!1),o.setInt32(4,n[1],!1),o.setInt32(8,n[2],!1),o.setInt32(12,n[3],!1),o.setInt32(16,n[4],!1),r},E=this.rawDigest=function(e){var t=e.byteLength||e.length||e.size||0;g(n.heap,n.padMaxChunkLen);var r=0,o=n.maxChunkLen;for(r=0;t>r+o;r+=o)b(e,r,o,t,!1);return b(e,r,t-r,t,!0),w(n.heap,n.padMaxChunkLen)};this.digest=this.digestFromString=this.digestFromBuffer=this.digestFromArrayBuffer=function(e){return h(E(e).buffer)},this.resetState=function(){return g(n.heap,n.padMaxChunkLen),this},this.append=function(e){var t,r=0,o=e.byteLength||e.length||e.size||0,i=n.offset%n.maxChunkLen;for(n.offset+=o;r<o;)t=Math.min(o-r,n.maxChunkLen-i),_(e,r,t,i),i+=t,r+=t,i===n.maxChunkLen&&(n.core.hash(n.maxChunkLen,n.padMaxChunkLen),i=0);return this},this.getState=function(){var e,t=n.offset%n.maxChunkLen;if(t)e=n.heap.slice(0);else{var r=new Int32Array(n.heap,n.padMaxChunkLen+320,5);e=r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength)}return{offset:n.offset,heap:e}},this.setState=function(e){if(n.offset=e.offset,20===e.heap.byteLength){var t=new Int32Array(n.heap,n.padMaxChunkLen+320,5);t.set(new Int32Array(e.heap))}else n.h32.set(new Int32Array(e.heap));
  return this};var x=this.rawEnd=function(){var e=n.offset,t=e%n.maxChunkLen,r=y(t,e);n.core.hash(r,n.padMaxChunkLen);var o=w(n.heap,n.padMaxChunkLen);return g(n.heap,n.padMaxChunkLen),o};this.end=function(){return h(x().buffer)}}var r={getDataType:function(t){if("string"==typeof t)return"string";if(t instanceof Array)return"array";if("undefined"!=typeof e&&e.Buffer&&e.Buffer.isBuffer(t))return"buffer";if(t instanceof ArrayBuffer)return"arraybuffer";if(t.buffer instanceof ArrayBuffer)return"view";if(t instanceof Blob)return"blob";throw new Error("Unsupported data type.")}};if(t._core=function e(t,n,r){"use asm";var o=new t.Int32Array(r);function i(e,t){e=e|0;t=t|0;var n=0,r=0,i=0,a=0,s=0,u=0,c=0,l=0,f=0,d=0,p=0,h=0,m=0,v=0;i=o[t+320>>2]|0;s=o[t+324>>2]|0;c=o[t+328>>2]|0;f=o[t+332>>2]|0;p=o[t+336>>2]|0;for(n=0;(n|0)<(e|0);n=n+64|0){a=i;u=s;l=c;d=f;h=p;for(r=0;(r|0)<64;r=r+4|0){v=o[n+r>>2]|0;m=((i<<5|i>>>27)+(s&c|~s&f)|0)+((v+p|0)+1518500249|0)|0;p=f;f=c;c=s<<30|s>>>2;s=i;i=m;o[e+r>>2]=v}for(r=e+64|0;(r|0)<(e+80|0);r=r+4|0){v=(o[r-12>>2]^o[r-32>>2]^o[r-56>>2]^o[r-64>>2])<<1|(o[r-12>>2]^o[r-32>>2]^o[r-56>>2]^o[r-64>>2])>>>31;m=((i<<5|i>>>27)+(s&c|~s&f)|0)+((v+p|0)+1518500249|0)|0;p=f;f=c;c=s<<30|s>>>2;s=i;i=m;o[r>>2]=v}for(r=e+80|0;(r|0)<(e+160|0);r=r+4|0){v=(o[r-12>>2]^o[r-32>>2]^o[r-56>>2]^o[r-64>>2])<<1|(o[r-12>>2]^o[r-32>>2]^o[r-56>>2]^o[r-64>>2])>>>31;m=((i<<5|i>>>27)+(s^c^f)|0)+((v+p|0)+1859775393|0)|0;p=f;f=c;c=s<<30|s>>>2;s=i;i=m;o[r>>2]=v}for(r=e+160|0;(r|0)<(e+240|0);r=r+4|0){v=(o[r-12>>2]^o[r-32>>2]^o[r-56>>2]^o[r-64>>2])<<1|(o[r-12>>2]^o[r-32>>2]^o[r-56>>2]^o[r-64>>2])>>>31;m=((i<<5|i>>>27)+(s&c|s&f|c&f)|0)+((v+p|0)-1894007588|0)|0;p=f;f=c;c=s<<30|s>>>2;s=i;i=m;o[r>>2]=v}for(r=e+240|0;(r|0)<(e+320|0);r=r+4|0){v=(o[r-12>>2]^o[r-32>>2]^o[r-56>>2]^o[r-64>>2])<<1|(o[r-12>>2]^o[r-32>>2]^o[r-56>>2]^o[r-64>>2])>>>31;m=((i<<5|i>>>27)+(s^c^f)|0)+((v+p|0)-899497514|0)|0;p=f;f=c;c=s<<30|s>>>2;s=i;i=m;o[r>>2]=v}i=i+a|0;s=s+u|0;c=c+l|0;f=f+d|0;p=p+h|0}o[t+320>>2]=i;o[t+324>>2]=s;o[t+328>>2]=c;o[t+332>>2]=f;o[t+336>>2]=p}return{hash:i}},"undefined"!=typeof n?n.exports=t:"undefined"!=typeof window&&(window.Rusha=t),"undefined"!=typeof FileReaderSync){var o=new FileReaderSync,i=new t(4194304);self.onmessage=function(e){var t,n=e.data.data;try{t=i.digest(n),self.postMessage({id:e.data.id,hash:t})}catch(t){self.postMessage({id:e.data.id,error:t.name})}}}}()}).call(this,"undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],88:[function(e,t,n){t.exports=e("buffer")},{buffer:24}],89:[function(e,t,n){(function(e){t.exports=function(t,n){var r=[];t.on("data",function(e){r.push(e)}),t.once("end",function(){n&&n(null,e.concat(r)),n=null}),t.once("error",function(e){n&&n(e),n=null})}}).call(this,e("buffer").Buffer)},{buffer:24}],90:[function(e,t,n){(function(n){function r(e,t){e="string"==typeof e?{url:e}:Object.assign({},e),t=u(t),e.url&&o(e),null==e.headers&&(e.headers={}),null==e.maxRedirects&&(e.maxRedirects=10);var i;e.form&&(i="string"==typeof e.form?e.form:c.stringify(e.form)),e.body&&(i=e.json?JSON.stringify(e.body):e.body),e.json&&(e.headers.accept="application/json"),e.json&&i&&(e.headers["content-type"]="application/json"),e.form&&(e.headers["content-type"]="application/x-www-form-urlencoded"),i&&(e.headers["content-length"]=n.byteLength(i)),delete e.body,delete e.form,i&&!e.method&&(e.method="POST"),e.method&&(e.method=e.method.toUpperCase());var f=Object.keys(e.headers).some(function(e){return"accept-encoding"===e.toLowerCase()});f||(e.headers["accept-encoding"]="gzip, deflate");var d="https:"===e.protocol?s:a,p=d.request(e,function(n){if(n.statusCode>=300&&n.statusCode<400&&"location"in n.headers)return e.url=n.headers.location,o(e),n.resume(),e.maxRedirects-=1,void(e.maxRedirects>0?r(e,t):t(new Error("too many redirects")));var i="function"==typeof l&&"HEAD"!==e.method;t(null,i?l(n):n)});return p.on("timeout",function(){p.abort(),t(new Error("Request timed out"))}),p.on("error",t),p.end(i),p}function o(e){var t=f.parse(e.url);t.hostname&&(e.hostname=t.hostname),t.port&&(e.port=t.port),t.protocol&&(e.protocol=t.protocol),t.auth&&(e.auth=t.auth),e.path=t.path,delete e.url}t.exports=r;var i=e("simple-concat"),a=e("http"),s=e("https"),u=e("once"),c=e("querystring"),l=e("unzip-response"),f=e("url");r.concat=function(e,t){return r(e,function(n,r){return n?t(n):void i(r,function(n,o){if(n)return t(n);if(e.json)try{o=JSON.parse(o.toString())}catch(e){return t(e,r,o)}t(null,r,o)})})},["get","post","put","patch","head","delete"].forEach(function(e){r[e]=function(t,n){return"string"==typeof t&&(t={url:t}),t.method=e.toUpperCase(),r(t,n)}})}).call(this,e("buffer").Buffer)},{buffer:24,http:95,https:39,once:61,querystring:72,"simple-concat":89,"unzip-response":21,url:112}],91:[function(e,t,n){(function(n){function r(e){var t=this;if(!(t instanceof r))return new r(e);if(t._id=u(4).toString("hex").slice(0,7),t._debug("new peer %o",e),e=Object.assign({},{allowHalfOpen:!1,highWaterMark:1048576},e),c.Duplex.call(t,e),t.channelName=e.initiator?e.channelName||u(20).toString("hex"):null,t.initiator=e.initiator||!1,t.channelConfig=e.channelConfig||r.channelConfig,t.config=e.config||r.config,t.constraints=e.constraints||r.constraints,t.offerConstraints=e.offerConstraints||{},t.answerConstraints=e.answerConstraints||{},t.reconnectTimer=e.reconnectTimer||!1,t.sdpTransform=e.sdpTransform||function(e){return e},t.stream=e.stream||!1,t.trickle=void 0===e.trickle||e.trickle,t.destroyed=!1,t.connected=!1,t.remoteAddress=void 0,t.remoteFamily=void 0,t.remotePort=void 0,t.localAddress=void 0,t.localPort=void 0,t._wrtc=e.wrtc&&"object"==typeof e.wrtc?e.wrtc:a(),!t._wrtc)throw"undefined"==typeof window?new Error("No WebRTC support: Specify `opts.wrtc` option in this environment"):new Error("No WebRTC support: Not a supported browser");if(t._maxBufferedAmount=e.highWaterMark,t._pcReady=!1,t._channelReady=!1,t._iceComplete=!1,t._channel=null,t._pendingCandidates=[],t._chunk=null,t._cb=null,t._interval=null,t._reconnectTimeout=null,t._pc=new t._wrtc.RTCPeerConnection(t.config,t.constraints),t._isWrtc=Array.isArray(t._pc.RTCIceConnectionStates),t._isReactNativeWebrtc="number"==typeof t._pc._peerConnectionId,t._pc.oniceconnectionstatechange=function(){t._onIceConnectionStateChange()},t._pc.onsignalingstatechange=function(){t._onSignalingStateChange()},t._pc.onicecandidate=function(e){t._onIceCandidate(e)},t.stream&&t._pc.addStream(t.stream),"ontrack"in t._pc?t._pc.ontrack=function(e){t._onTrack(e)}:t._pc.onaddstream=function(e){t._onAddStream(e)},t.initiator){var n=!1;t._pc.onnegotiationneeded=function(){n||t._createOffer(),n=!0},t._setupData({channel:t._pc.createDataChannel(t.channelName,t.channelConfig)}),t._isWrtc&&t._pc.onnegotiationneeded()}else t._pc.ondatachannel=function(e){t._setupData(e)};t.on("finish",function(){t.connected?setTimeout(function(){t._destroy()},100):t.once("connect",function(){setTimeout(function(){t._destroy()},100)})})}function o(){}t.exports=r;var i=e("debug")("simple-peer"),a=e("get-browser-rtc"),s=e("inherits"),u=e("randombytes"),c=e("readable-stream");s(r,c.Duplex),r.WEBRTC_SUPPORT=!!a(),r.config={iceServers:[{urls:"stun:stun.l.google.com:19302"}]},r.constraints={},r.channelConfig={},Object.defineProperty(r.prototype,"bufferSize",{get:function(){var e=this;return e._channel&&e._channel.bufferedAmount||0}}),r.prototype.address=function(){var e=this;return{port:e.localPort,family:"IPv4",address:e.localAddress}},r.prototype.signal=function(e){function t(e){try{n._pc.addIceCandidate(new n._wrtc.RTCIceCandidate(e),o,function(e){n._onError(e)})}catch(e){n._destroy(new Error("error adding candidate: "+e.message))}}var n=this;if(n.destroyed)throw new Error("cannot signal after peer is destroyed");if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e={}}n._debug("signal()"),e.sdp&&n._pc.setRemoteDescription(new n._wrtc.RTCSessionDescription(e),function(){n.destroyed||("offer"===n._pc.remoteDescription.type&&n._createAnswer(),n._pendingCandidates.forEach(t),n._pendingCandidates=[])},function(e){n._onError(e)}),e.candidate&&(n._pc.remoteDescription?t(e.candidate):n._pendingCandidates.push(e.candidate)),e.sdp||e.candidate||n._destroy(new Error("signal() called with invalid signal data"))},r.prototype.send=function(e){var t=this;t._isWrtc&&n.isBuffer(e)&&(e=new Uint8Array(e));var r=e.length||e.byteLength||e.size;t._channel.send(e),t._debug("write: %d bytes",r)},r.prototype.destroy=function(e){var t=this;t._destroy(null,e)},r.prototype._destroy=function(e,t){var n=this;if(!n.destroyed){if(t&&n.once("close",t),n._debug("destroy (error: %s)",e&&e.message),n.readable=n.writable=!1,n._readableState.ended||n.push(null),n._writableState.finished||n.end(),n.destroyed=!0,n.connected=!1,n._pcReady=!1,n._channelReady=!1,n._chunk=null,n._cb=null,clearInterval(n._interval),clearTimeout(n._reconnectTimeout),n._pc){try{n._pc.close()}catch(e){}n._pc.oniceconnectionstatechange=null,n._pc.onsignalingstatechange=null,n._pc.onicecandidate=null,"ontrack"in n._pc?n._pc.ontrack=null:n._pc.onaddstream=null,n._pc.onnegotiationneeded=null,n._pc.ondatachannel=null}if(n._channel){try{n._channel.close()}catch(e){}n._channel.onmessage=null,n._channel.onopen=null,n._channel.onclose=null}n._pc=null,n._channel=null,e&&n.emit("error",e),n.emit("close")}},r.prototype._setupData=function(e){var t=this;t._channel=e.channel,t.channelName=t._channel.label,t._channel.binaryType="arraybuffer",t._channel.onmessage=function(e){t._onChannelMessage(e)},t._channel.onopen=function(){t._onChannelOpen()},t._channel.onclose=function(){t._onChannelClose()}},r.prototype._read=function(){},r.prototype._write=function(e,t,n){var r=this;if(r.destroyed)return n(new Error("cannot write after peer is destroyed"));if(r.connected){try{r.send(e)}catch(e){return r._onError(e)}r._channel.bufferedAmount>r._maxBufferedAmount?(r._debug("start backpressure: bufferedAmount %d",r._channel.bufferedAmount),r._cb=n):n(null)}else r._debug("write before connect"),r._chunk=e,r._cb=n},r.prototype._createOffer=function(){var e=this;e.destroyed||e._pc.createOffer(function(t){if(!e.destroyed){t.sdp=e.sdpTransform(t.sdp),e._pc.setLocalDescription(t,o,function(t){e._onError(t)});var n=function(){var n=e._pc.localDescription||t;e._debug("signal"),e.emit("signal",{type:n.type,sdp:n.sdp})};e.trickle||e._iceComplete?n():e.once("_iceComplete",n)}},function(t){e._onError(t)},e.offerConstraints)},r.prototype._createAnswer=function(){var e=this;e.destroyed||e._pc.createAnswer(function(t){if(!e.destroyed){t.sdp=e.sdpTransform(t.sdp),e._pc.setLocalDescription(t,o,function(t){e._onError(t)});var n=function(){var n=e._pc.localDescription||t;e._debug("signal"),e.emit("signal",{type:n.type,sdp:n.sdp})};e.trickle||e._iceComplete?n():e.once("_iceComplete",n)}},function(t){e._onError(t)},e.answerConstraints)},r.prototype._onIceConnectionStateChange=function(){var e=this;if(!e.destroyed){var t=e._pc.iceGatheringState,n=e._pc.iceConnectionState;e._debug("iceConnectionStateChange %s %s",t,n),e.emit("iceConnectionStateChange",t,n),"connected"!==n&&"completed"!==n||(clearTimeout(e._reconnectTimeout),e._pcReady=!0,e._maybeReady()),"disconnected"===n&&(e.reconnectTimer?(clearTimeout(e._reconnectTimeout),e._reconnectTimeout=setTimeout(function(){e._destroy()},e.reconnectTimer)):e._destroy()),"failed"===n&&e._destroy(new Error("Ice connection failed.")),"closed"===n&&e._destroy()}},r.prototype.getStats=function(e){var t=this;0===t._pc.getStats.length?t._pc.getStats().then(function(t){var n=[];t.forEach(function(e){n.push(e)}),e(n)},function(e){t._onError(e)}):t._isReactNativeWebrtc?t._pc.getStats(null,function(t){var n=[];t.forEach(function(e){n.push(e)}),e(n)},function(e){t._onError(e)}):t._pc.getStats.length>0?t._pc.getStats(function(t){var n=[];t.result().forEach(function(e){var t={};e.names().forEach(function(n){t[n]=e.stat(n)}),t.id=e.id,t.type=e.type,t.timestamp=e.timestamp,n.push(t)}),e(n)},function(e){t._onError(e)}):e([])},r.prototype._maybeReady=function(){var e=this;e._debug("maybeReady pc %s channel %s",e._pcReady,e._channelReady),!e.connected&&!e._connecting&&e._pcReady&&e._channelReady&&(e._connecting=!0,e.getStats(function(t){function n(t){var n=o[t.localCandidateId];n&&n.ip?(e.localAddress=n.ip,e.localPort=Number(n.port)):n&&n.ipAddress?(e.localAddress=n.ipAddress,e.localPort=Number(n.portNumber)):"string"==typeof t.googLocalAddress&&(n=t.googLocalAddress.split(":"),e.localAddress=n[0],e.localPort=Number(n[1]));var i=r[t.remoteCandidateId];i&&i.ip?(e.remoteAddress=i.ip,e.remotePort=Number(i.port)):i&&i.ipAddress?(e.remoteAddress=i.ipAddress,e.remotePort=Number(i.portNumber)):"string"==typeof t.googRemoteAddress&&(i=t.googRemoteAddress.split(":"),e.remoteAddress=i[0],e.remotePort=Number(i[1])),e.remoteFamily="IPv4",e._debug("connect local: %s:%s remote: %s:%s",e.localAddress,e.localPort,e.remoteAddress,e.remotePort)}e._connecting=!1,e.connected=!0;var r={},o={},i={};if(t.forEach(function(e){"remotecandidate"!==e.type&&"remote-candidate"!==e.type||(r[e.id]=e),"localcandidate"!==e.type&&"local-candidate"!==e.type||(o[e.id]=e),"candidatepair"!==e.type&&"candidate-pair"!==e.type||(i[e.id]=e)}),t.forEach(function(e){"transport"===e.type&&n(i[e.selectedCandidatePairId]),("googCandidatePair"===e.type&&"true"===e.googActiveConnection||("candidatepair"===e.type||"candidate-pair"===e.type)&&e.selected)&&n(e)}),e._chunk){try{e.send(e._chunk)}catch(t){return e._onError(t)}e._chunk=null,e._debug('sent chunk from "write before connect"');var a=e._cb;e._cb=null,a(null)}e._interval=setInterval(function(){if(e._cb&&e._channel&&!(e._channel.bufferedAmount>e._maxBufferedAmount)){e._debug("ending backpressure: bufferedAmount %d",e._channel.bufferedAmount);var t=e._cb;e._cb=null,t(null)}},150),e._interval.unref&&e._interval.unref(),e._debug("connect"),e.emit("connect")}))},r.prototype._onSignalingStateChange=function(){var e=this;e.destroyed||(e._debug("signalingStateChange %s",e._pc.signalingState),e.emit("signalingStateChange",e._pc.signalingState))},r.prototype._onIceCandidate=function(e){var t=this;t.destroyed||(e.candidate&&t.trickle?t.emit("signal",{candidate:{candidate:e.candidate.candidate,sdpMLineIndex:e.candidate.sdpMLineIndex,sdpMid:e.candidate.sdpMid}}):e.candidate||(t._iceComplete=!0,t.emit("_iceComplete")))},r.prototype._onChannelMessage=function(e){var t=this;if(!t.destroyed){var r=e.data;t._debug("read: %d bytes",r.byteLength||r.length),r instanceof ArrayBuffer&&(r=new n(r)),t.push(r)}},r.prototype._onChannelOpen=function(){var e=this;e.connected||e.destroyed||(e._debug("on channel open"),e._channelReady=!0,e._maybeReady())},r.prototype._onChannelClose=function(){var e=this;e.destroyed||(e._debug("on channel close"),e._destroy())},r.prototype._onAddStream=function(e){var t=this;t.destroyed||(t._debug("on add stream"),t.emit("stream",e.stream))},r.prototype._onTrack=function(e){var t=this;t.destroyed||(t._debug("on track"),t.emit("stream",e.streams[0]))},r.prototype._onError=function(e){var t=this;t.destroyed||(t._debug("error %s",e.message||e),t._destroy(e))},r.prototype._debug=function(){var e=this,t=[].slice.call(arguments);t[0]="["+e._id+"] "+t[0],i.apply(null,t)}}).call(this,e("buffer").Buffer)},{buffer:24,debug:30,"get-browser-rtc":38,inherits:42,randombytes:74,"readable-stream":82}],92:[function(e,t,n){function r(e){return u.digest(e)}function o(e,t){return f?("string"==typeof e&&(e=i(e)),void f.digest({name:"sha-1"},e).then(function(e){t(a(new Uint8Array(e)))},function(n){t(r(e))})):void setTimeout(t,0,r(e))}function i(e){for(var t=e.length,n=new Uint8Array(t),r=0;r<t;r++)n[r]=e.charCodeAt(r);return n}function a(e){for(var t=e.length,n=[],r=0;r<t;r++){var o=e[r];n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")}var s=e("rusha"),u=new s,c="undefined"!=typeof window?window:self,l=c.crypto||c.msCrypto||{},f=l.subtle||l.webkitSubtle;try{f.digest({name:"sha-1"},new Uint8Array).catch(function(){f=!1})}catch(e){f=!1}t.exports=o,t.exports.sync=r},{rusha:87}],93:[function(e,t,n){(function(n,r){function o(e,t){var r=this;if(!(r instanceof o))return new o(e,t);t||(t={}),i("new websocket: %s %o",e,t),t.allowHalfOpen=!1,null==t.highWaterMark&&(t.highWaterMark=1048576),s.Duplex.call(r,t),r.url=e,r.connected=!1,r.destroyed=!1,r._maxBufferedAmount=t.highWaterMark,r._chunk=null,r._cb=null,r._interval=null;try{"function"==typeof u?r._ws=new c(r.url,t):r._ws=new c(r.url)}catch(e){return void n.nextTick(function(){r._onError(e)})}r._ws.binaryType="arraybuffer",r._ws.onopen=function(){r._onOpen()},r._ws.onmessage=function(e){r._onMessage(e)},r._ws.onclose=function(){r._onClose()},r._ws.onerror=function(){r._onError(new Error("connection error to "+r.url))},r.on("finish",function(){r.connected?setTimeout(function(){r._destroy()},100):r.once("connect",function(){setTimeout(function(){r._destroy()},100)})})}t.exports=o;var i=e("debug")("simple-websocket"),a=e("inherits"),s=e("readable-stream"),u=e("ws"),c="function"!=typeof u?WebSocket:u;a(o,s.Duplex),o.WEBSOCKET_SUPPORT=!!c,o.prototype.send=function(e){var t=this,n=e.length||e.byteLength||e.size;t._ws.send(e),i("write: %d bytes",n)},o.prototype.destroy=function(e){var t=this;t._destroy(null,e)},o.prototype._destroy=function(e,t){var n=this;if(!n.destroyed){if(t&&n.once("close",t),i("destroy (error: %s)",e&&e.message),this.readable=this.writable=!1,n._readableState.ended||n.push(null),n._writableState.finished||n.end(),n.connected=!1,n.destroyed=!0,clearInterval(n._interval),n._interval=null,n._chunk=null,n._cb=null,n._ws){var r=n._ws,o=function(){r.onclose=null};if(r.readyState===c.CLOSED)o();else try{r.onclose=o,r.close()}catch(e){o()}r.onopen=null,r.onmessage=null,r.onerror=null}n._ws=null,e&&n.emit("error",e),n.emit("close")}},o.prototype._read=function(){},o.prototype._write=function(e,t,n){var r=this;if(r.destroyed)return n(new Error("cannot write after socket is destroyed"));if(r.connected){try{r.send(e)}catch(e){return r._onError(e)}"function"!=typeof u&&r._ws.bufferedAmount>r._maxBufferedAmount?(i("start backpressure: bufferedAmount %d",r._ws.bufferedAmount),r._cb=n):n(null)}else i("write before connect"),r._chunk=e,r._cb=n},o.prototype._onMessage=function(e){var t=this;if(!t.destroyed){var n=e.data;i("read: %d bytes",n.byteLength||n.length),n instanceof ArrayBuffer&&(n=new r(n)),t.push(n)}},o.prototype._onOpen=function(){var e=this;if(!e.connected&&!e.destroyed){if(e.connected=!0,e._chunk){try{e.send(e._chunk)}catch(t){return e._onError(t)}e._chunk=null,i('sent chunk from "write before connect"');var t=e._cb;e._cb=null,t(null)}"function"!=typeof u&&(e._interval=setInterval(function(){if(e._cb&&e._ws&&!(e._ws.bufferedAmount>e._maxBufferedAmount)){i("ending backpressure: bufferedAmount %d",e._ws.bufferedAmount);var t=e._cb;e._cb=null,t(null)}},150),e._interval.unref&&e._interval.unref()),i("connect"),e.emit("connect")}},o.prototype._onClose=function(){var e=this;e.destroyed||(i("on close"),e._destroy())},o.prototype._onError=function(e){var t=this;t.destroyed||(i("error: %s",e.message||e),t._destroy(e))}}).call(this,e("_process"),e("buffer").Buffer)},{_process:67,buffer:24,debug:30,inherits:42,"readable-stream":82,ws:21}],94:[function(e,t,n){var r=1,o=65535,i=4,a=function(){r=r+1&o},s=setInterval(a,1e3/i|0);s.unref&&s.unref(),t.exports=function(e){var t=i*(e||5),n=[0],a=1,s=r-1&o;return function(e){var u=r-s&o;for(u>t&&(u=t),s=r;u--;)a===t&&(a=0),n[a]=n[0===a?t-1:a-1],a++;e&&(n[a-1]+=e);var c=n[a-1],l=n.length<t?0:n[a===t?0:a];return n.length<i?c:(c-l)*i/n.length}}},{}],95:[function(e,n,r){(function(t){var n=e("./lib/request"),o=e("xtend"),i=e("builtin-status-codes"),a=e("url"),s=r;s.request=function(e,r){e="string"==typeof e?a.parse(e):o(e);var i=t.location.protocol.search(/^https?:$/)===-1?"http:":"",s=e.protocol||i,u=e.hostname||e.host,c=e.port,l=e.path||"/";u&&u.indexOf(":")!==-1&&(u="["+u+"]"),e.url=(u?s+"//"+u:"")+(c?":"+c:"")+l,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var f=new n(e);return r&&f.on("response",r),f},s.get=function(e,t){var n=s.request(e,t);return n.end(),n},s.Agent=function(){},s.Agent.defaultMaxSockets=4,s.STATUS_CODES=i,s.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,"undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":97,"builtin-status-codes":25,url:112,xtend:119}],96:[function(e,n,r){(function(e){function t(){if(void 0!==i)return i;if(e.XMLHttpRequest){i=new e.XMLHttpRequest;try{i.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){i=null}}else i=null;return i}function n(e){var n=t();if(!n)return!1;try{return n.responseType=e,n.responseType===e}catch(e){}return!1}function o(e){return"function"==typeof e}r.fetch=o(e.fetch)&&o(e.ReadableStream),r.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),r.blobConstructor=!0}catch(e){}var i,a="undefined"!=typeof e.ArrayBuffer,s=a&&o(e.ArrayBuffer.prototype.slice);r.arraybuffer=r.fetch||a&&n("arraybuffer"),r.msstream=!r.fetch&&s&&n("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&a&&n("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!t()&&o(t().overrideMimeType),r.vbArray=o(e.VBArray),i=null}).call(this,"undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],97:[function(e,n,r){(function(t,r,o){function i(e,t){return s.fetch&&t?"fetch":s.mozchunkedarraybuffer?"moz-chunked-arraybuffer":s.msstream?"ms-stream":s.arraybuffer&&e?"arraybuffer":s.vbArray&&e?"text:vbarray":"text"}function a(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}var s=e("./capability"),u=e("inherits"),c=e("./response"),l=e("readable-stream"),f=e("to-arraybuffer"),d=c.IncomingMessage,p=c.readyStates,h=n.exports=function(e){var t=this;l.Writable.call(t),t._opts=e,t._body=[],t._headers={},e.auth&&t.setHeader("Authorization","Basic "+new o(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(n){t.setHeader(n,e.headers[n])});var n,r=!0;if("disable-fetch"===e.mode||"timeout"in e)r=!1,n=!0;else if("prefer-streaming"===e.mode)n=!1;else if("allow-wrong-content-type"===e.mode)n=!s.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");n=!0}t._mode=i(n,r),t.on("finish",function(){t._onFinish()})};u(h,l.Writable),h.prototype.setHeader=function(e,t){var n=this,r=e.toLowerCase();m.indexOf(r)===-1&&(n._headers[r]={name:e,value:t})},h.prototype.getHeader=function(e){var t=this;return t._headers[e.toLowerCase()].value},h.prototype.removeHeader=function(e){var t=this;delete t._headers[e.toLowerCase()]},h.prototype._onFinish=function(){var e=this;if(!e._destroyed){var n=e._opts,i=e._headers,a=null;if("POST"!==n.method&&"PUT"!==n.method&&"PATCH"!==n.method&&"MERGE"!==n.method||(a=s.blobConstructor?new r.Blob(e._body.map(function(e){return f(e)}),{type:(i["content-type"]||{}).value||""}):o.concat(e._body).toString()),"fetch"===e._mode){var u=Object.keys(i).map(function(e){return[i[e].name,i[e].value]});r.fetch(e._opts.url,{method:e._opts.method,headers:u,body:a||void 0,mode:"cors",credentials:n.withCredentials?"include":"same-origin"}).then(function(t){e._fetchResponse=t,e._connect()},function(t){e.emit("error",t)})}else{var c=e._xhr=new r.XMLHttpRequest;try{c.open(e._opts.method,e._opts.url,!0)}catch(n){return void t.nextTick(function(){e.emit("error",n)})}"responseType"in c&&(c.responseType=e._mode.split(":")[0]),"withCredentials"in c&&(c.withCredentials=!!n.withCredentials),"text"===e._mode&&"overrideMimeType"in c&&c.overrideMimeType("text/plain; charset=x-user-defined"),"timeout"in n&&(c.timeout=n.timeout,c.ontimeout=function(){e.emit("timeout")}),Object.keys(i).forEach(function(e){c.setRequestHeader(i[e].name,i[e].value)}),e._response=null,c.onreadystatechange=function(){switch(c.readyState){case p.LOADING:case p.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(c.onprogress=function(){e._onXHRProgress()}),c.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{c.send(a)}catch(n){return void t.nextTick(function(){e.emit("error",n)})}}}},h.prototype._onXHRProgress=function(){var e=this;a(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress())},h.prototype._connect=function(){var e=this;e._destroyed||(e._response=new d(e._xhr,e._fetchResponse,e._mode),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))},h.prototype._write=function(e,t,n){var r=this;r._body.push(e),n()},h.prototype.abort=h.prototype.destroy=function(){var e=this;e._destroyed=!0,e._response&&(e._response._destroyed=!0),e._xhr&&e._xhr.abort()},h.prototype.end=function(e,t,n){var r=this;"function"==typeof e&&(n=e,e=void 0),l.Writable.prototype.end.call(r,e,t,n)},h.prototype.flushHeaders=function(){},h.prototype.setTimeout=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var m=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,e("_process"),"undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":96,"./response":98,_process:67,buffer:24,inherits:42,"readable-stream":82,"to-arraybuffer":105}],98:[function(e,n,r){(function(t,n,o){var i=e("./capability"),a=e("inherits"),s=e("readable-stream"),u=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=r.IncomingMessage=function(e,n,r){function a(){c.read().then(function(e){if(!u._destroyed){if(e.done)return void u.push(null);u.push(new o(e.value)),a()}}).catch(function(e){u.emit("error",e)})}var u=this;if(s.Readable.call(u),u._mode=r,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",function(){t.nextTick(function(){u.emit("close")})}),"fetch"===r){u._fetchResponse=n,u.url=n.url,u.statusCode=n.status,u.statusMessage=n.statusText,n.headers.forEach(function(e,t){u.headers[t.toLowerCase()]=e,u.rawHeaders.push(t,e)});var c=n.body.getReader();a()}else{u._xhr=e,u._pos=0,u.url=e.responseURL,u.statusCode=e.status,u.statusMessage=e.statusText;var l=e.getAllResponseHeaders().split(/\r?\n/);if(l.forEach(function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===u.headers[n]&&(u.headers[n]=[]),u.headers[n].push(t[2])):void 0!==u.headers[n]?u.headers[n]+=", "+t[2]:u.headers[n]=t[2],u.rawHeaders.push(t[1],t[2])}}),u._charset="x-user-defined",!i.overrideMimeType){var f=u.rawHeaders["mime-type"];if(f){var d=f.match(/;\s*charset=([^;])(;|$)/);d&&(u._charset=d[1].toLowerCase())}u._charset||(u._charset="utf-8")}}};a(c,s.Readable),c.prototype._read=function(){},c.prototype._onXHRProgress=function(){var e=this,t=e._xhr,r=null;switch(e._mode){case"text:vbarray":if(t.readyState!==u.DONE)break;try{r=new n.VBArray(t.responseBody).toArray()}catch(e){}if(null!==r){e.push(new o(r));break}case"text":try{r=t.responseText}catch(t){e._mode="text:vbarray";break}if(r.length>e._pos){var i=r.substr(e._pos);if("x-user-defined"===e._charset){for(var a=new o(i.length),s=0;s<i.length;s++)a[s]=255&i.charCodeAt(s);e.push(a)}else e.push(i,e._charset);e._pos=r.length}break;case"arraybuffer":if(t.readyState!==u.DONE||!t.response)break;r=t.response,e.push(new o(new Uint8Array(r)));break;case"moz-chunked-arraybuffer":if(r=t.response,t.readyState!==u.LOADING||!r)break;e.push(new o(new Uint8Array(r)));break;case"ms-stream":if(r=t.response,t.readyState!==u.LOADING)break;var c=new n.MSStreamReader;c.onprogress=function(){c.result.byteLength>e._pos&&(e.push(new o(new Uint8Array(c.result.slice(e._pos)))),e._pos=c.result.byteLength)},c.onload=function(){e.push(null)},c.readAsArrayBuffer(r)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,e("_process"),"undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":96,_process:67,buffer:24,inherits:42,"readable-stream":82}],99:[function(e,t,n){var r=e("stream-to-blob");t.exports=function e(t,n,o){return"function"==typeof n?e(t,null,n):void r(t,n,function(e,t){if(e)return o(e);var n=URL.createObjectURL(t);o(null,n)})}},{"stream-to-blob":100}],100:[function(e,t,n){var r=e("once");t.exports=function e(t,n,o){if("function"==typeof n)return e(t,null,n);o=r(o);var i=[];t.on("data",function(e){i.push(e)}).on("end",function(){var e=n?new Blob(i,{type:n}):new Blob(i);o(null,e)}).on("error",o)}},{once:61}],101:[function(e,t,n){(function(n){var r=e("once");t.exports=function(e,t,o){o=r(o);var i=new n(t),a=0;e.on("data",function(e){e.copy(i,a),a+=e.length}).on("end",function(){o(null,i)}).on("error",o)}}).call(this,e("buffer").Buffer)},{buffer:24,once:61}],102:[function(e,t,n){function r(e){if(e&&!u(e))throw new Error("Unknown encoding: "+e)}function o(e){return e.toString(this.encoding)}function i(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function a(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var s=e("buffer").Buffer,u=s.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},c=n.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),r(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=i;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=a;break;default:return void(this.write=o)}this.charBuffer=new s(6),this.charReceived=0,this.charLength=0};c.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";e=e.slice(n,e.length),t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var r=t.charCodeAt(t.length-1);if(!(r>=55296&&r<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var o=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,o),o-=this.charReceived),t+=e.toString(this.encoding,0,o);var o=t.length-1,r=t.charCodeAt(o);if(r>=55296&&r<=56319){var i=this.surrogateSize;return this.charLength+=i,this.charReceived+=i,this.charBuffer.copy(this.charBuffer,i,0,i),e.copy(this.charBuffer,0,0,i),t.substring(0,o)}return t},c.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},c.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,o=this.encoding;t+=r.slice(0,n).toString(o)}return t}},{buffer:24}],103:[function(e,t,n){var r=e("./thirty-two");n.encode=r.encode,n.decode=r.decode},{"./thirty-two":104}],104:[function(e,t,n){(function(e){"use strict";function t(e){var t=Math.floor(e.length/5);return e.length%5===0?t:t+1}var r="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",o=[255,255,26,27,28,29,30,31,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,255,255,255,255,255];n.encode=function(n){e.isBuffer(n)||(n=new e(n));for(var o=0,i=0,a=0,s=0,u=new e(8*t(n));o<n.length;){var c=n[o];
  a>3?(s=c&255>>a,a=(a+5)%8,s=s<<a|(o+1<n.length?n[o+1]:0)>>8-a,o++):(s=c>>8-(a+5)&31,a=(a+5)%8,0===a&&o++),u[i]=r.charCodeAt(s),i++}for(o=i;o<u.length;o++)u[o]=61;return u},n.decode=function(t){var n,r=0,i=0,a=0;e.isBuffer(t)||(t=new e(t));for(var s=new e(Math.ceil(5*t.length/8)),u=0;u<t.length&&61!==t[u];u++){var c=t[u]-48;if(!(c<o.length))throw new Error("Invalid input - it is not base32 encoded string");i=o[c],r<=3?(r=(r+5)%8,0===r?(n|=i,s[a]=n,a++,n=0):n|=255&i<<8-r):(r=(r+5)%8,n|=255&i>>>r,s[a]=n,a++,n=255&i<<8-r)}return s.slice(0,a)}}).call(this,e("buffer").Buffer)},{buffer:24}],105:[function(e,t,n){var r=e("buffer").Buffer;t.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(r.isBuffer(e)){for(var t=new Uint8Array(e.length),n=e.length,o=0;o<n;o++)t[o]=e[o];return t.buffer}throw new Error("Argument must be a Buffer")}},{buffer:24}],106:[function(e,t,n){(function(n){function r(e){function t(e,t){var n=new i(t);return n.on("warning",o._onWarning),n.on("error",o._onError),n.listen(e),o._internalDHT=!0,n}var o=this;if(!(o instanceof r))return new r(e);if(a.call(o),!e.peerId)throw new Error("Option `peerId` is required");if(!e.infoHash)throw new Error("Option `infoHash` is required");if(!n.browser&&!e.port)throw new Error("Option `port` is required");o.peerId="string"==typeof e.peerId?e.peerId:e.peerId.toString("hex"),o.infoHash="string"==typeof e.infoHash?e.infoHash:e.infoHash.toString("hex"),o._port=e.port,o._userAgent=e.userAgent,o.destroyed=!1,o._announce=e.announce||[],o._intervalMs=e.intervalMs||9e5,o._trackerOpts=null,o._dhtAnnouncing=!1,o._dhtTimeout=!1,o._internalDHT=!1,o._onWarning=function(e){o.emit("warning",e)},o._onError=function(e){o.emit("error",e)},o._onDHTPeer=function(e,t){t.toString("hex")===o.infoHash&&o.emit("peer",e.host+":"+e.port,"dht")},o._onTrackerPeer=function(e){o.emit("peer",e,"tracker")},o._onTrackerAnnounce=function(){o.emit("trackerAnnounce")},e.tracker===!1?o.tracker=null:e.tracker&&"object"==typeof e.tracker?(o._trackerOpts=s(e.tracker),o.tracker=o._createTracker()):o.tracker=o._createTracker(),e.dht===!1||"function"!=typeof i?o.dht=null:e.dht&&"function"==typeof e.dht.addNode?o.dht=e.dht:e.dht&&"object"==typeof e.dht?o.dht=t(e.dhtPort,e.dht):o.dht=t(e.dhtPort),o.dht&&(o.dht.on("peer",o._onDHTPeer),o._dhtAnnounce())}t.exports=r;var o=e("debug")("torrent-discovery"),i=e("bittorrent-dht/client"),a=e("events").EventEmitter,s=e("xtend"),u=e("inherits"),c=e("run-parallel"),l=e("bittorrent-tracker/client");u(r,a),r.prototype.updatePort=function(e){var t=this;e!==t._port&&(t._port=e,t.dht&&t._dhtAnnounce(),t.tracker&&(t.tracker.stop(),t.tracker.destroy(function(){t.tracker=t._createTracker()})))},r.prototype.complete=function(e){this.tracker&&this.tracker.complete(e)},r.prototype.destroy=function(e){var t=this;if(!t.destroyed){t.destroyed=!0,clearTimeout(t._dhtTimeout);var n=[];t.tracker&&(t.tracker.stop(),t.tracker.removeListener("warning",t._onWarning),t.tracker.removeListener("error",t._onError),t.tracker.removeListener("peer",t._onTrackerPeer),t.tracker.removeListener("update",t._onTrackerAnnounce),n.push(function(e){t.tracker.destroy(e)})),t.dht&&t.dht.removeListener("peer",t._onDHTPeer),t._internalDHT&&(t.dht.removeListener("warning",t._onWarning),t.dht.removeListener("error",t._onError),n.push(function(e){t.dht.destroy(e)})),c(n,e),t.dht=null,t.tracker=null,t._announce=null}},r.prototype._createTracker=function(){var e=s(this._trackerOpts,{infoHash:this.infoHash,announce:this._announce,peerId:this.peerId,port:this._port,userAgent:this._userAgent}),t=new l(e);return t.on("warning",this._onWarning),t.on("error",this._onError),t.on("peer",this._onTrackerPeer),t.on("update",this._onTrackerAnnounce),t.setInterval(this._intervalMs),t.start(),t},r.prototype._dhtAnnounce=function(){function e(){return t._intervalMs+Math.floor(Math.random()*t._intervalMs/5)}var t=this;t._dhtAnnouncing||(o("dht announce"),t._dhtAnnouncing=!0,clearTimeout(t._dhtTimeout),t.dht.announce(t.infoHash,t._port,function(n){t._dhtAnnouncing=!1,o("dht announce complete"),n&&t.emit("warning",n),t.emit("dhtAnnounce"),t.destroyed||(t._dhtTimeout=setTimeout(function(){t._dhtAnnounce()},e()),t._dhtTimeout.unref&&t._dhtTimeout.unref())}))}}).call(this,e("_process"))},{_process:67,"bittorrent-dht/client":21,"bittorrent-tracker/client":15,debug:30,events:35,inherits:42,"run-parallel":86,xtend:119}],107:[function(e,t,n){(function(e){function n(e){return this instanceof n?(this.length=e,this.missing=e,this.sources=null,this._chunks=Math.ceil(e/r),this._remainder=e%r||r,this._buffered=0,this._buffer=null,this._cancellations=null,this._reservations=0,void(this._flushed=!1)):new n(e)}t.exports=n;var r=16384;n.BLOCK_LENGTH=r,n.prototype.chunkLength=function(e){return e===this._chunks-1?this._remainder:r},n.prototype.chunkLengthRemaining=function(e){return this.length-e*r},n.prototype.chunkOffset=function(e){return e*r},n.prototype.reserve=function(){return this.init()?this._cancellations.length?this._cancellations.pop():this._reservations<this._chunks?this._reservations++:-1:-1},n.prototype.reserveRemaining=function(){if(!this.init())return-1;if(this._reservations<this._chunks){var e=this._reservations;return this._reservations=this._chunks,e}return-1},n.prototype.cancel=function(e){this.init()&&this._cancellations.push(e)},n.prototype.cancelRemaining=function(e){this.init()&&(this._reservations=e)},n.prototype.get=function(e){return this.init()?this._buffer[e]:null},n.prototype.set=function(e,t,n){if(!this.init())return!1;for(var o=t.length,i=Math.ceil(o/r),a=0;a<i;a++)if(!this._buffer[e+a]){var s=a*r,u=t.slice(s,s+r);this._buffered++,this._buffer[e+a]=u,this.missing-=u.length,this.sources.indexOf(n)===-1&&this.sources.push(n)}return this._buffered===this._chunks},n.prototype.flush=function(){if(!this._buffer||this._chunks!==this._buffered)return null;var t=e.concat(this._buffer,this.length);return this._buffer=null,this._cancellations=null,this.sources=null,this._flushed=!0,t},n.prototype.init=function(){return!(this._flushed||!this._buffer&&(this._buffer=new Array(this._chunks),this._cancellations=[],this.sources=[],0))}}).call(this,e("buffer").Buffer)},{buffer:24}],108:[function(e,t,n){(function(n){var r=e("is-typedarray").strict;t.exports=function(e){if(r(e)){var t=new n(e.buffer);return e.byteLength!==e.buffer.byteLength&&(t=t.slice(e.byteOffset,e.byteOffset+e.byteLength)),t}return new n(e)}}).call(this,e("buffer").Buffer)},{buffer:24,"is-typedarray":46}],109:[function(e,t,n){(function(e){var t=4294967295;n.encodingLength=function(){return 8},n.encode=function(n,r,o){r||(r=new e(8)),o||(o=0);var i=Math.floor(n/t),a=n-i*t;return r.writeUInt32BE(i,o),r.writeUInt32BE(a,o+4),r},n.decode=function(n,r){r||(r=0),n||(n=new e(4)),r||(r=0);var o=n.readUInt32BE(r),i=n.readUInt32BE(r+4);return o*t+i},n.encode.bytes=8,n.decode.bytes=8}).call(this,e("buffer").Buffer)},{buffer:24}],110:[function(e,t,n){"use strict";function r(e,t){for(var n=1,r=e.length,o=e[0],i=e[0],a=1;a<r;++a)if(i=o,o=e[a],t(o,i)){if(a===n){n++;continue}e[n++]=o}return e.length=n,e}function o(e){for(var t=1,n=e.length,r=e[0],o=e[0],i=1;i<n;++i,o=r)if(o=r,r=e[i],r!==o){if(i===t){t++;continue}e[t++]=r}return e.length=t,e}function i(e,t,n){return 0===e.length?e:t?(n||e.sort(t),r(e,t)):(n||e.sort(),o(e))}t.exports=i},{}],111:[function(e,t,n){function r(e,t){if(!(t>=e.length||t<0)){var n=e.pop();if(t<e.length){var r=e[t];return e[t]=n,r}return n}}t.exports=r},{}],112:[function(e,t,n){"use strict";function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function o(e,t,n){if(e&&c.isObject(e)&&e instanceof r)return e;var o=new r;return o.parse(e,t,n),o}function i(e){return c.isString(e)&&(e=o(e)),e instanceof r?e.format():r.prototype.format.call(e)}function a(e,t){return o(e,!1,!0).resolve(t)}function s(e,t){return e?o(e,!1,!0).resolveObject(t):t}var u=e("punycode"),c=e("./util");n.parse=o,n.resolve=a,n.resolveObject=s,n.format=i,n.Url=r;var l=/^([a-z0-9.+-]+:)/i,f=/:[0-9]*$/,d=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,p=["<",">",'"',"`"," ","\r","\n","\t"],h=["{","}","|","\\","^","`"].concat(p),m=["'"].concat(h),v=["%","/","?",";","#"].concat(m),g=["/","?","#"],y=255,_=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,w={javascript:!0,"javascript:":!0},E={javascript:!0,"javascript:":!0},x={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},k=e("querystring");r.prototype.parse=function(e,t,n){if(!c.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),o=r!==-1&&r<e.indexOf("#")?"?":"#",i=e.split(o),a=/\\/g;i[0]=i[0].replace(a,"/"),e=i.join(o);var s=e;if(s=s.trim(),!n&&1===e.split("#").length){var f=d.exec(s);if(f)return this.path=s,this.href=s,this.pathname=f[1],f[2]?(this.search=f[2],t?this.query=k.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var p=l.exec(s);if(p){p=p[0];var h=p.toLowerCase();this.protocol=h,s=s.substr(p.length)}if(n||p||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var C="//"===s.substr(0,2);!C||p&&E[p]||(s=s.substr(2),this.slashes=!0)}if(!E[p]&&(C||p&&!x[p])){for(var S=-1,I=0;I<g.length;I++){var T=s.indexOf(g[I]);T!==-1&&(S===-1||T<S)&&(S=T)}var A,P;P=S===-1?s.lastIndexOf("@"):s.lastIndexOf("@",S),P!==-1&&(A=s.slice(0,P),s=s.slice(P+1),this.auth=decodeURIComponent(A)),S=-1;for(var I=0;I<v.length;I++){var T=s.indexOf(v[I]);T!==-1&&(S===-1||T<S)&&(S=T)}S===-1&&(S=s.length),this.host=s.slice(0,S),s=s.slice(S),this.parseHost(),this.hostname=this.hostname||"";var R="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!R)for(var L=this.hostname.split(/\./),I=0,O=L.length;I<O;I++){var M=L[I];if(M&&!M.match(_)){for(var B="",U=0,N=M.length;U<N;U++)B+=M.charCodeAt(U)>127?"x":M[U];if(!B.match(_)){var D=L.slice(0,I),j=L.slice(I+1),F=M.match(b);F&&(D.push(F[1]),j.unshift(F[2])),j.length&&(s="/"+j.join(".")+s),this.hostname=D.join(".");break}}}this.hostname.length>y?this.hostname="":this.hostname=this.hostname.toLowerCase(),R||(this.hostname=u.toASCII(this.hostname));var H=this.port?":"+this.port:"",W=this.hostname||"";this.host=W+H,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!w[h])for(var I=0,O=m.length;I<O;I++){var q=m[I];if(s.indexOf(q)!==-1){var z=encodeURIComponent(q);z===q&&(z=escape(q)),s=s.split(q).join(z)}}var V=s.indexOf("#");V!==-1&&(this.hash=s.substr(V),s=s.slice(0,V));var K=s.indexOf("?");if(K!==-1?(this.search=s.substr(K),this.query=s.substr(K+1),t&&(this.query=k.parse(this.query)),s=s.slice(0,K)):t&&(this.search="",this.query={}),s&&(this.pathname=s),x[h]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var H=this.pathname||"",$=this.search||"";this.path=H+$}return this.href=this.format(),this},r.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,i="";this.host?o=e+this.host:this.hostname&&(o=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&c.isObject(this.query)&&Object.keys(this.query).length&&(i=k.stringify(this.query));var a=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||x[t])&&o!==!1?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),a=a.replace("#","%23"),t+o+n+a+r},r.prototype.resolve=function(e){return this.resolveObject(o(e,!1,!0)).format()},r.prototype.resolveObject=function(e){if(c.isString(e)){var t=new r;t.parse(e,!1,!0),e=t}for(var n=new r,o=Object.keys(this),i=0;i<o.length;i++){var a=o[i];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),u=0;u<s.length;u++){var l=s[u];"protocol"!==l&&(n[l]=e[l])}return x[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!x[e.protocol]){for(var f=Object.keys(e),d=0;d<f.length;d++){var p=f[d];n[p]=e[p]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||E[e.protocol])n.pathname=e.pathname;else{for(var h=(e.pathname||"").split("/");h.length&&!(e.host=h.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),n.pathname=h.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var m=n.pathname||"",v=n.search||"";n.path=m+v}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var g=n.pathname&&"/"===n.pathname.charAt(0),y=e.host||e.pathname&&"/"===e.pathname.charAt(0),_=y||g||n.host&&e.pathname,b=_,w=n.pathname&&n.pathname.split("/")||[],h=e.pathname&&e.pathname.split("/")||[],k=n.protocol&&!x[n.protocol];if(k&&(n.hostname="",n.port=null,n.host&&(""===w[0]?w[0]=n.host:w.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),_=_&&(""===h[0]||""===w[0])),y)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,w=h;else if(h.length)w||(w=[]),w.pop(),w=w.concat(h),n.search=e.search,n.query=e.query;else if(!c.isNullOrUndefined(e.search)){if(k){n.hostname=n.host=w.shift();var C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");C&&(n.auth=C.shift(),n.host=n.hostname=C.shift())}return n.search=e.search,n.query=e.query,c.isNull(n.pathname)&&c.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var S=w.slice(-1)[0],I=(n.host||e.host||w.length>1)&&("."===S||".."===S)||""===S,T=0,A=w.length;A>=0;A--)S=w[A],"."===S?w.splice(A,1):".."===S?(w.splice(A,1),T++):T&&(w.splice(A,1),T--);if(!_&&!b)for(;T--;T)w.unshift("..");!_||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),I&&"/"!==w.join("/").substr(-1)&&w.push("");var P=""===w[0]||w[0]&&"/"===w[0].charAt(0);if(k){n.hostname=n.host=P?"":w.length?w.shift():"";var C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");C&&(n.auth=C.shift(),n.host=n.hostname=C.shift())}return _=_||n.host&&w.length,_&&!P&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),c.isNull(n.pathname)&&c.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=f.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":113,punycode:69,querystring:72}],113:[function(e,t,n){"use strict";t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],114:[function(e,t,n){var r=e("bencode"),o=e("bitfield"),i=e("safe-buffer").Buffer,a=e("debug")("ut_metadata"),s=e("events").EventEmitter,u=e("inherits"),c=e("simple-sha1"),l=1e7,f=1e3,d=16384;t.exports=function(e){function t(t){s.call(this),this._wire=t,this._metadataComplete=!1,this._metadataSize=null,this._remainingRejects=null,this._fetching=!1,this._bitfield=new o(0,{grow:f}),i.isBuffer(e)&&this.setMetadata(e)}return u(t,s),t.prototype.name="ut_metadata",t.prototype.onHandshake=function(e,t,n){this._infoHash=e},t.prototype.onExtendedHandshake=function(e){return e.m&&e.m.ut_metadata?e.metadata_size?"number"!=typeof e.metadata_size||l<e.metadata_size||e.metadata_size<=0?this.emit("warning",new Error("Peer gave invalid metadata size")):(this._metadataSize=e.metadata_size,this._numPieces=Math.ceil(this._metadataSize/d),this._remainingRejects=2*this._numPieces,void(this._fetching&&this._requestPieces())):this.emit("warning",new Error("Peer does not have metadata")):this.emit("warning",new Error("Peer does not support ut_metadata"))},t.prototype.onMessage=function(e){var t,n;try{var o=e.toString(),i=o.indexOf("ee")+2;t=r.decode(o.substring(0,i)),n=e.slice(i)}catch(e){return}switch(t.msg_type){case 0:this._onRequest(t.piece);break;case 1:this._onData(t.piece,n,t.total_size);break;case 2:this._onReject(t.piece)}},t.prototype.fetch=function(){this._metadataComplete||(this._fetching=!0,this._metadataSize&&this._requestPieces())},t.prototype.cancel=function(){this._fetching=!1},t.prototype.setMetadata=function(e){if(this._metadataComplete)return!0;a("set metadata");try{var t=r.decode(e).info;t&&(e=r.encode(t))}catch(e){}return!(this._infoHash&&this._infoHash!==c.sync(e)||(this.cancel(),this.metadata=e,this._metadataComplete=!0,this._metadataSize=this.metadata.length,this._wire.extendedHandshake.metadata_size=this._metadataSize,this.emit("metadata",r.encode({info:r.decode(this.metadata)})),0))},t.prototype._send=function(e,t){var n=r.encode(e);i.isBuffer(t)&&(n=i.concat([n,t])),this._wire.extended("ut_metadata",n)},t.prototype._request=function(e){this._send({msg_type:0,piece:e})},t.prototype._data=function(e,t,n){var r={msg_type:1,piece:e};"number"==typeof n&&(r.total_size=n),this._send(r,t)},t.prototype._reject=function(e){this._send({msg_type:2,piece:e})},t.prototype._onRequest=function(e){if(!this._metadataComplete)return void this._reject(e);var t=e*d,n=t+d;n>this._metadataSize&&(n=this._metadataSize);var r=this.metadata.slice(t,n);this._data(e,r,this._metadataSize)},t.prototype._onData=function(e,t,n){t.length>d||(t.copy(this.metadata,e*d),this._bitfield.set(e),this._checkDone())},t.prototype._onReject=function(e){this._remainingRejects>0&&this._fetching?(this._request(e),this._remainingRejects-=1):this.emit("warning",new Error('Peer sent "reject" too much'))},t.prototype._requestPieces=function(){this.metadata=i.alloc(this._metadataSize);for(var e=0;e<this._numPieces;e++)this._request(e)},t.prototype._checkDone=function(){for(var e=!0,t=0;t<this._numPieces;t++)if(!this._bitfield.get(t)){e=!1;break}if(e){var n=this.setMetadata(this.metadata);n||this._failedMetadata()}},t.prototype._failedMetadata=function(){this._bitfield=new o(0,{grow:f}),this._remainingRejects-=this._numPieces,this._remainingRejects>0?this._requestPieces():this.emit("warning",new Error("Peer sent invalid metadata"))},t}},{bencode:11,bitfield:13,debug:30,events:35,inherits:42,"safe-buffer":88,"simple-sha1":92}],115:[function(e,n,r){(function(e){function t(e,t){function n(){if(!o){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),o=!0}return e.apply(this,arguments)}if(r("noDeprecation"))return e;var o=!1;return n}function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}n.exports=t}).call(this,"undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],116:[function(e,t,n){(function(n){function r(e){var t=this;s.call(t),t._tracks=[],t._fragmentSequence=1,t._file=e,t._decoder=null,t._findMoov(0)}function o(e,t){var n=this;n._entries=e,n._countName=t||"count",n._index=0,n._offset=0,n.value=n._entries[0]}function i(){return{version:0,flags:0,entries:[]}}var a=e("binary-search"),s=e("events").EventEmitter,u=e("inherits"),c=e("mp4-stream"),l=e("mp4-box-encoding"),f=e("range-slice-stream");t.exports=r,u(r,s),r.prototype._findMoov=function(e){var t=this;t._decoder&&t._decoder.destroy(),t._decoder=c.decode();var n=t._file.createReadStream({start:e});n.pipe(t._decoder),t._decoder.once("box",function(r){"moov"===r.type?t._decoder.decode(function(e){n.destroy();try{t._processMoov(e)}catch(e){e.message="Cannot parse mp4 file: "+e.message,t.emit("error",e)}}):(n.destroy(),t._findMoov(e+r.length))})},o.prototype.inc=function(){var e=this;e._offset++,e._offset>=e._entries[e._index][e._countName]&&(e._index++,e._offset=0),e.value=e._entries[e._index]},r.prototype._processMoov=function(e){var t=this,r=e.traks;t._tracks=[],t._hasVideo=!1,t._hasAudio=!1;for(var a=0;a<r.length;a++){var s,u,c=r[a],f=c.mdia.minf.stbl,d=f.stsd.entries[0],p=c.mdia.hdlr.handlerType;if("vide"===p&&"avc1"===d.type){if(t._hasVideo)continue;t._hasVideo=!0,s="avc1",d.avcC&&(s+="."+d.avcC.mimeCodec),u='video/mp4; codecs="'+s+'"'}else{if("soun"!==p||"mp4a"!==d.type)continue;if(t._hasAudio)continue;t._hasAudio=!0,s="mp4a",d.esds&&d.esds.mimeCodec&&(s+="."+d.esds.mimeCodec),u='audio/mp4; codecs="'+s+'"'}var h=[],m=0,v=0,g=0,y=0,_=0,b=0,w=new o(f.stts.entries),E=null;f.ctts&&(E=new o(f.ctts.entries));for(var x=0;;){var k=f.stsc.entries[_],C=f.stsz.entries[m],S=w.value.duration,I=E?E.value.compositionOffset:0,T=!0;if(f.stss&&(T=f.stss.entries[x]===m+1),h.push({size:C,duration:S,dts:b,presentationOffset:I,sync:T,offset:y+f.stco.entries[g]}),m++,m>=f.stsz.entries.length)break;if(v++,y+=C,v>=k.samplesPerChunk){v=0,y=0,g++;var A=f.stsc.entries[_+1];A&&g+1>=A.firstChunk&&_++}b+=S,w.inc(),E&&E.inc(),T&&x++}c.mdia.mdhd.duration=0,c.tkhd.duration=0;var P=k.sampleDescriptionId,R={type:"moov",mvhd:e.mvhd,traks:[{tkhd:c.tkhd,mdia:{mdhd:c.mdia.mdhd,hdlr:c.mdia.hdlr,elng:c.mdia.elng,minf:{vmhd:c.mdia.minf.vmhd,smhd:c.mdia.minf.smhd,dinf:c.mdia.minf.dinf,stbl:{stsd:f.stsd,stts:i(),ctts:i(),stsc:i(),stsz:i(),stco:i(),stss:i()}}}}],mvex:{mehd:{fragmentDuration:e.mvhd.duration},trexs:[{trackId:c.tkhd.trackId,defaultSampleDescriptionIndex:P,defaultSampleDuration:0,defaultSampleSize:0,defaultSampleFlags:0}]}};t._tracks.push({trackId:c.tkhd.trackId,timeScale:c.mdia.mdhd.timeScale,samples:h,currSample:null,currTime:null,moov:R,mime:u})}if(0===t._tracks.length)return void t.emit("error",new Error("no playable tracks"));e.mvhd.duration=0,t._ftyp={type:"ftyp",brand:"iso5",brandVersion:0,compatibleBrands:["iso5"]};var L=l.encode(t._ftyp),O=t._tracks.map(function(e){var t=l.encode(e.moov);return{mime:e.mime,init:n.concat([L,t])}});t.emit("ready",O)},r.prototype.seek=function(e){var t=this;if(!t._tracks)throw new Error("Not ready yet; wait for 'ready' event");t._fileStream&&(t._fileStream.destroy(),t._fileStream=null);var n=-1;if(t._tracks.map(function(r,o){function i(e){a.destroyed||a.box(e.moof,function(n){if(n)return t.emit("error",n);if(!a.destroyed){var s=r.inStream.slice(e.ranges);s.pipe(a.mediaData(e.length,function(e){if(e)return t.emit("error",e);if(!a.destroyed){var n=t._generateFragment(o);return n?void i(n):a.finalize()}}))}})}r.outStream&&r.outStream.destroy(),r.inStream&&(r.inStream.destroy(),r.inStream=null);var a=r.outStream=c.encode(),s=t._generateFragment(o,e);return s?((n===-1||s.ranges[0].start<n)&&(n=s.ranges[0].start),void i(s)):a.finalize()}),n>=0){var r=t._fileStream=t._file.createReadStream({start:n});t._tracks.forEach(function(e){e.inStream=new f(n,{highWaterMark:1e7}),r.pipe(e.inStream)})}return t._tracks.map(function(e){return e.outStream})},r.prototype._findSampleBefore=function(e,t){var n=this,r=n._tracks[e],o=Math.floor(r.timeScale*t),i=a(r.samples,o,function(e,t){var n=e.dts+e.presentationOffset;return n-t});for(i===-1?i=0:i<0&&(i=-i-2);!r.samples[i].sync;)i--;return i};var d=1;r.prototype._generateFragment=function(e,t){var n,r=this,o=r._tracks[e];if(n=void 0!==t?r._findSampleBefore(e,t):o.currSample,n>=o.samples.length)return null;for(var i=o.samples[n].dts,a=0,s=[],u=n;u<o.samples.length;u++){var c=o.samples[u];if(c.sync&&c.dts-i>=o.timeScale*d)break;a+=c.size;var l=s.length-1;l<0||s[l].end!==c.offset?s.push({start:c.offset,end:c.offset+c.size}):s[l].end+=c.size}return o.currSample=u,{moof:r._generateMoof(e,n,u),ranges:s,length:a}},r.prototype._generateMoof=function(e,t,n){for(var r=this,o=r._tracks[e],i=[],a=t;a<n;a++){var s=o.samples[a];i.push({sampleDuration:s.duration,sampleSize:s.size,sampleFlags:s.sync?33554432:16842752,sampleCompositionTimeOffset:s.presentationOffset})}var u={type:"moof",mfhd:{sequenceNumber:r._fragmentSequence++},trafs:[{tfhd:{flags:131072,trackId:o.trackId},tfdt:{baseMediaDecodeTime:o.samples[t].dts},trun:{flags:3841,dataOffset:8,entries:i}}]};return u.trafs[0].trun.dataOffset+=l.encodingLength(u),u}}).call(this,e("buffer").Buffer)},{"binary-search":12,buffer:24,events:35,inherits:42,"mp4-box-encoding":54,"mp4-stream":57,"range-slice-stream":75}],117:[function(e,t,n){function r(e,t,n){var i=this;return this instanceof r?(n=n||{},i.detailedError=null,i._elem=t,i._elemWrapper=new o(t),i._waitingFired=!1,i._trackMeta=null,i._file=e,i._tracks=null,"none"!==i._elem.preload&&i._createMuxer(),i._onError=function(e){i.detailedError=i._elemWrapper.detailedError,i.destroy()},i._onWaiting=function(){i._waitingFired=!0,i._muxer?i._tracks&&i._pump():i._createMuxer()},i._elem.addEventListener("waiting",i._onWaiting),void i._elem.addEventListener("error",i._onError)):new r(e,t,n)}var o=e("mediasource"),i=e("pump"),a=e("./mp4-remuxer");t.exports=r,r.prototype._createMuxer=function(){var e=this;e._muxer=new a(e._file),e._muxer.on("ready",function(t){e._tracks=t.map(function(t){var n=e._elemWrapper.createWriteStream(t.mime);n.on("error",function(t){e._elemWrapper.error(t)});var r={muxed:null,mediaSource:n,initFlushed:!1,onInitFlushed:null};return n.write(t.init,function(e){r.initFlushed=!0,r.onInitFlushed&&r.onInitFlushed(e)}),r}),(e._waitingFired||"auto"===e._elem.preload)&&e._pump()}),e._muxer.on("error",function(t){e._elemWrapper.error(t)})},r.prototype._pump=function(){var e=this,t=e._muxer.seek(e._elem.currentTime,!e._tracks);e._tracks.forEach(function(n,r){var o=function(){n.muxed&&(n.muxed.destroy(),n.mediaSource=e._elemWrapper.createWriteStream(n.mediaSource),n.mediaSource.on("error",function(t){e._elemWrapper.error(t)})),n.muxed=t[r],i(n.muxed,n.mediaSource)};n.initFlushed?o():n.onInitFlushed=function(t){return t?void e._elemWrapper.error(t):void o()}})},r.prototype.destroy=function(){var e=this;e.destroyed||(e.destroyed=!0,e._elem.removeEventListener("waiting",e._onWaiting),e._elem.removeEventListener("error",e._onError),e._tracks&&e._tracks.forEach(function(e){e.muxed.destroy()}),e._elem.src="")}},{"./mp4-remuxer":116,mediasource:50,pump:68}],118:[function(e,t,n){function r(e,t){function n(){for(var t=new Array(arguments.length),n=0;n<t.length;n++)t[n]=arguments[n];var r=e.apply(this,t),o=t[t.length-1];return"function"==typeof r&&r!==o&&Object.keys(o).forEach(function(e){r[e]=o[e]}),r}if(e&&t)return r(e)(t);if("function"!=typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(t){n[t]=e[t]}),n}t.exports=r},{}],119:[function(e,t,n){function r(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)o.call(n,r)&&(e[r]=n[r])}return e}t.exports=r;var o=Object.prototype.hasOwnProperty},{}],120:[function(e,t,n){function r(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)o.call(n,r)&&(e[r]=n[r])}return e}t.exports=r;var o=Object.prototype.hasOwnProperty},{}],121:[function(e,t,n){t.exports=function e(t,n,r){return void 0===n?function(n,r){return e(t,n,r)}:(void 0===r&&(r="0"),t-=n.toString().length,t>0?new Array(t+(/\./.test(n)?2:1)).join(r)+n:n+"")}},{}],122:[function(e,t,n){t.exports={version:"0.98.5"}},{}],123:[function(e,n,r){(function(t,r){function o(e){function n(){i.destroyed||(i.ready=!0,i.emit("ready"))}var i=this;return i instanceof o?(d.call(i),e||(e={}),"string"==typeof e.peerId?i.peerId=e.peerId:s.isBuffer(e.peerId)?i.peerId=e.peerId.toString("hex"):i.peerId=s.from(I+b(9).toString("base64")).toString("hex"),i.peerIdBuffer=s.from(i.peerId,"hex"),"string"==typeof e.nodeId?i.nodeId=e.nodeId:s.isBuffer(e.nodeId)?i.nodeId=e.nodeId.toString("hex"):i.nodeId=b(20).toString("hex"),i.nodeIdBuffer=s.from(i.nodeId,"hex"),i._debugId=i.peerId.toString("hex").substring(0,7),i.destroyed=!1,i.listening=!1,i.torrentPort=e.torrentPort||0,i.dhtPort=e.dhtPort||0,i.tracker=void 0!==e.tracker?e.tracker:{},i.torrents=[],i.maxConns=Number(e.maxConns)||55,i._debug("new webtorrent (peerId %s, nodeId %s, port %s)",i.peerId,i.nodeId,i.torrentPort),i.tracker&&("object"!=typeof i.tracker&&(i.tracker={}),e.rtcConfig&&(console.warn("WebTorrent: opts.rtcConfig is deprecated. Use opts.tracker.rtcConfig instead"),i.tracker.rtcConfig=e.rtcConfig),e.wrtc&&(console.warn("WebTorrent: opts.wrtc is deprecated. Use opts.tracker.wrtc instead"),i.tracker.wrtc=e.wrtc),r.WRTC&&!i.tracker.wrtc&&(i.tracker.wrtc=r.WRTC)),"function"==typeof x?i._tcpPool=new x(i):t.nextTick(function(){i._onListening()}),i._downloadSpeed=w(),i._uploadSpeed=w(),e.dht!==!1&&"function"==typeof f?(i.dht=new f(p({nodeId:i.nodeId},e.dht)),i.dht.once("error",function(e){i._destroy(e)}),i.dht.once("listening",function(){var e=i.dht.address();e&&(i.dhtPort=e.port)}),i.dht.setMaxListeners(0),i.dht.listen(i.dhtPort)):i.dht=!1,i.enableWebSeeds=e.webSeeds!==!1,void("function"==typeof m&&null!=e.blocklist?m(e.blocklist,{headers:{"user-agent":"WebTorrent/"+C+" (https://webtorrent.io)"}},function(e,t){return e?i.error("Failed to load blocklist: "+e.message):(i.blocked=t,void n())}):t.nextTick(n))):new o(e)}function i(e){return"object"==typeof e&&null!=e&&"function"==typeof e.pipe}function a(e){return"undefined"!=typeof FileList&&e instanceof FileList}n.exports=o;var s=e("safe-buffer").Buffer,u=e("simple-concat"),c=e("create-torrent"),l=e("debug")("webtorrent"),f=e("bittorrent-dht/client"),d=e("events").EventEmitter,p=e("xtend"),h=e("inherits"),m=e("load-ip-set"),v=e("run-parallel"),g=e("parse-torrent"),y=e("path"),_=e("simple-peer"),b=e("randombytes"),w=e("speedometer"),E=e("zero-fill"),x=e("./lib/tcp-pool"),k=e("./lib/torrent"),C=e("./package.json").version,S=C.match(/([0-9]+)/g).slice(0,2).map(function(e){return E(2,e)}).join(""),I="-WW"+S+"-";h(o,d),o.WEBRTC_SUPPORT=_.WEBRTC_SUPPORT,Object.defineProperty(o.prototype,"downloadSpeed",{get:function(){return this._downloadSpeed()}}),Object.defineProperty(o.prototype,"uploadSpeed",{get:function(){return this._uploadSpeed()}}),Object.defineProperty(o.prototype,"progress",{get:function(){var e=this.torrents.filter(function(e){return 1!==e.progress}),t=e.reduce(function(e,t){return e+t.downloaded},0),n=e.reduce(function(e,t){return e+(t.length||0)},0)||1;return t/n}}),Object.defineProperty(o.prototype,"ratio",{get:function(){var e=this.torrents.reduce(function(e,t){return e+t.uploaded},0),t=this.torrents.reduce(function(e,t){return e+t.received},0)||1;return e/t}}),o.prototype.get=function(e){var t,n,r=this,o=r.torrents.length;if(e instanceof k){for(t=0;t<o;t++)if(n=r.torrents[t],n===e)return n}else{var i;try{i=g(e)}catch(e){}if(!i)return null;if(!i.infoHash)throw new Error("Invalid torrent identifier");for(t=0;t<o;t++)if(n=r.torrents[t],n.infoHash===i.infoHash)return n}return null},o.prototype.download=function(e,t,n){return console.warn("WebTorrent: client.download() is deprecated. Use client.add() instead"),this.add(e,t,n)},o.prototype.add=function(e,t,n){function r(){if(!a.destroyed)for(var e=0,t=a.torrents.length;e<t;e++){var n=a.torrents[e];if(n.infoHash===s.infoHash&&n!==s)return void s._destroy(new Error("Cannot add duplicate torrent "+s.infoHash))}}function o(){a.destroyed||("function"==typeof n&&n(s),a.emit("torrent",s))}function i(){s.removeListener("_infoHash",r),s.removeListener("ready",o),s.removeListener("close",i)}var a=this;if(a.destroyed)throw new Error("client is destroyed");if("function"==typeof t)return a.add(e,null,t);a._debug("add"),t=t?p(t):{};var s=new k(e,a,t);return a.torrents.push(s),s.once("_infoHash",r),s.once("ready",o),s.once("close",i),s},o.prototype.seed=function(e,t,n){function r(e){var t=[function(t){e.load(l,t)}];s.dht&&t.push(function(t){e.once("dhtAnnounce",t);
  }),v(t,function(t){if(!s.destroyed)return t?e._destroy(t):void o(e)})}function o(e){s._debug("on seed"),"function"==typeof n&&n(e),e.emit("seed"),s.emit("seed",e)}var s=this;if(s.destroyed)throw new Error("client is destroyed");if("function"==typeof t)return s.seed(e,null,t);s._debug("seed"),t=t?p(t):{},"string"==typeof e&&(t.path=y.dirname(e)),t.createdBy||(t.createdBy="WebTorrent/"+S);var l,f=s.add(null,t,r);return a(e)&&(e=Array.prototype.slice.call(e)),Array.isArray(e)||(e=[e]),v(e.map(function(e){return function(t){i(e)?u(e,t):t(null,e)}}),function(e,n){if(!s.destroyed)return e?f._destroy(e):void c.parseInput(n,t,function(e,r){if(!s.destroyed){if(e)return f._destroy(e);l=r.map(function(e){return e.getStream}),c(n,t,function(e,t){if(!s.destroyed){if(e)return f._destroy(e);var n=s.get(t);n?f._destroy(new Error("Cannot add duplicate torrent "+n.infoHash)):f._onTorrentId(t)}})}})}),f},o.prototype.remove=function(e,t){this._debug("remove");var n=this.get(e);if(!n)throw new Error("No torrent with id "+e);this._remove(e,t)},o.prototype._remove=function(e,t){var n=this.get(e);n&&(this.torrents.splice(this.torrents.indexOf(n),1),n.destroy(t))},o.prototype.address=function(){return this.listening?this._tcpPool?this._tcpPool.server.address():{address:"0.0.0.0",family:"IPv4",port:0}:null},o.prototype.destroy=function(e){if(this.destroyed)throw new Error("client already destroyed");this._destroy(null,e)},o.prototype._destroy=function(e,t){var n=this;n._debug("client destroy"),n.destroyed=!0;var r=n.torrents.map(function(e){return function(t){e.destroy(t)}});n._tcpPool&&r.push(function(e){n._tcpPool.destroy(e)}),n.dht&&r.push(function(e){n.dht.destroy(e)}),v(r,t),e&&n.emit("error",e),n.torrents=[],n._tcpPool=null,n.dht=null},o.prototype._onListening=function(){if(this._debug("listening"),this.listening=!0,this._tcpPool){var e=this._tcpPool.server.address();e&&(this.torrentPort=e.port)}this.emit("listening")},o.prototype._debug=function(){var e=[].slice.call(arguments);e[0]="["+this._debugId+"] "+e[0],l.apply(null,e)}}).call(this,e("_process"),"undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/tcp-pool":21,"./lib/torrent":5,"./package.json":122,_process:67,"bittorrent-dht/client":21,"create-torrent":29,debug:30,events:35,inherits:42,"load-ip-set":21,"parse-torrent":63,path:64,randombytes:74,"run-parallel":86,"safe-buffer":88,"simple-concat":89,"simple-peer":91,speedometer:94,xtend:119,"zero-fill":121}]},{},[123])(123)})}).call(t,n(51),n(180).setImmediate)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(23),i=r(o),a=n(83),s=r(a),u=n(81),c=r(u);n(82),$(function(){var e=i.default.createElement(c.default,null);s.default.render(e,document.getElementById("app"))})}]);