Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mobx

Package Overview
Dependencies
Maintainers
4
Versions
251
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobx - npm Package Compare versions

Comparing version 5.9.0 to 5.9.4-special

2

lib/api/action.d.ts

@@ -21,3 +21,3 @@ import { IAction } from "../internal";

}
export declare var action: IActionFactory;
export declare const action: IActionFactory;
export declare function runInAction<T>(block: () => T): T;

@@ -24,0 +24,0 @@ export declare function runInAction<T>(name: string, block: () => T): T;

@@ -14,2 +14,2 @@ import { IComputedValue, IComputedValueOptions } from "../internal";

*/
export declare var computed: IComputed;
export declare const computed: IComputed;

@@ -18,2 +18,3 @@ import { IObservableArray, ObservableMap, ObservableSet } from "../internal";

export declare function set<K, V>(obj: ObservableMap<K, V>, key: K, value: V): any;
export declare function set<T>(obj: ObservableSet<T>, value: T): any;
export declare function set<T>(obj: IObservableArray<T>, index: number, value: T): any;

@@ -20,0 +21,0 @@ export declare function set<T extends Object>(obj: T, values: {

export interface IAction {
isMobxAction: boolean;
}
export declare function createAction(actionName: string, fn: Function): Function & IAction;
export declare function createAction(actionName: string, fn: Function, ref?: Object): Function & IAction;
export declare function executeAction(actionName: string, fn: Function, scope?: any, args?: IArguments): any;

@@ -6,0 +6,0 @@ export declare function allowStateChanges<T>(allowStateChanges: boolean, func: () => T): T;

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};var t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};function r(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function n(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}var o="An invariant failed, however the error is obfuscated because this is an production build.",i=[];Object.freeze(i);var a={};function s(){return++me.mobxGuid}function u(e){throw c(!1,e),"X"}function c(e,t){if(!e)throw new Error("[mobx] "+(t||o))}Object.freeze(a);function l(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var f=function(){};function p(e){return null!==e&&"object"==typeof e}function h(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function v(e,t,r){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:r})}function d(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!r||!1!==r.configurable&&!1!==r.writable}function y(e,t){var r="isMobX"+e;return t.prototype[r]=!0,function(e){return p(e)&&!0===e[r]}}function b(e){return e instanceof Map}function g(e){return e instanceof Set}function m(e){return null===e?null:"object"==typeof e?""+e:e}var x=Symbol("mobx administration"),O=function(){function e(e){void 0===e&&(e="Atom@"+s()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=exports.IDerivationState.NOT_TRACKING}return e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},e.prototype.reportObserved=function(){return Ee(this)},e.prototype.reportChanged=function(){Ae(),function(e){if(e.lowestObserverState===exports.IDerivationState.STALE)return;e.lowestObserverState=exports.IDerivationState.STALE,e.observers.forEach(function(t){t.dependenciesState===exports.IDerivationState.UP_TO_DATE&&(t.isTracing!==ee.NONE&&De(t,e),t.onBecomeStale()),t.dependenciesState=exports.IDerivationState.STALE})}(this),_e()},e.prototype.toString=function(){return this.name},e}(),w=y("Atom",O);function S(e,t,r){void 0===t&&(t=f),void 0===r&&(r=f);var n=new O(e);return t!==f&&qe(n,t),r!==f&&Je(n,r),n}var A={identity:function(e,t){return e===t},structural:function(e,t){return Jt(e,t)},default:function(e,t){return Object.is(e,t)}},_=Symbol("mobx did run lazy initializers"),E=Symbol("mobx pending decorators"),D={},j={};function C(e){if(!0!==e[_]){var t=e[E];if(t)for(var r in v(e,_,!0),t){var n=t[r];n.propertyCreator(e,n.prop,n.descriptor,n.decoratorTarget,n.decoratorArguments)}}}function T(e,r){return function(){var n,o=function(o,i,a,s){if(!0===s)return r(o,i,a,o,n),null;if(!Object.prototype.hasOwnProperty.call(o,E)){var u=o[E];v(o,E,t({},u))}return o[E][i]={prop:i,propertyCreator:r,descriptor:a,decoratorTarget:o,decoratorArguments:n},function(e,t){var r=t?D:j;return r[e]||(r[e]={configurable:!0,enumerable:t,get:function(){return C(this),this[e]},set:function(t){C(this),this[e]=t}})}(i,e)};return I(arguments)?(n=i,o.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),o)}}function I(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]||4===e.length&&!0===e[3]}function N(e,t,r){return at(e)?e:Array.isArray(e)?z.array(e,{name:r}):h(e)?z.object(e,void 0,{name:r}):b(e)?z.map(e,{name:r}):g(e)?z.set(e,{name:r}):e}function V(e){return e}function P(e){c(e);var t=T(!0,function(t,r,n,o,i){var a=n?n.initializer?n.initializer.call(t):n.value:void 0;Bt(t).addObservableProp(r,a,e)}),r=("undefined"!=typeof process&&process.env,t);return r.enhancer=e,r}var k={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function R(e){return null===e||void 0===e?k:"string"==typeof e?{name:e,deep:!0,proxy:!0}:e}Object.freeze(k);var B=P(N),L=P(function(e,t,r){return void 0===e||null===e?e:Kt(e)||jt(e)||Nt(e)||kt(e)?e:Array.isArray(e)?z.array(e,{name:r,deep:!1}):h(e)?z.object(e,void 0,{name:r,deep:!1}):b(e)?z.map(e,{name:r,deep:!1}):g(e)?z.set(e,{name:r,deep:!1}):u(!1)}),M=P(V),U=P(function(e,t,r){return Jt(e,t)?t:e});function G(e){return e.defaultDecorator?e.defaultDecorator.enhancer:!1===e.deep?V:N}var K={box:function(e,t){arguments.length>2&&H("box");var r=R(t);return new te(e,G(r),r.name,!0,r.equals)},array:function(e,t){arguments.length>2&&H("array");var r=R(t);return function(e,t,r,n){void 0===r&&(r="ObservableArray@"+s());void 0===n&&(n=!1);var o=new At(r,t,n);i=o.values,a=x,u=o,Object.defineProperty(i,a,{enumerable:!1,writable:!1,configurable:!0,value:u});var i,a,u;var c=new Proxy(o.values,St);if(o.proxy=c,e&&e.length){var l=$(!0);o.spliceWithArray(0,0,e),Q(l)}return c}(e,G(r),r.name)},map:function(e,t){arguments.length>2&&H("map");var r=R(t);return new It(e,G(r),r.name)},set:function(e,t){arguments.length>2&&H("set");var r=R(t);return new Pt(e,G(r),r.name)},object:function(e,t,r){"string"==typeof arguments[1]&&H("object");var n=R(r);if(!1===n.proxy)return Ye({},e,t,n);var o=Fe(n),i=function(e){var t=new Proxy(e,yt);return e[x].proxy=t,t}(Ye({},void 0,void 0,n));return $e(i,e,t,o),i},ref:M,shallow:L,deep:B,struct:U},z=function(e,t,r){if("string"==typeof arguments[1])return B.apply(null,arguments);if(at(e))return e;var n=h(e)?z.object(e,t,r):Array.isArray(e)?z.array(e,t):b(e)?z.map(e,t):g(e)?z.set(e,t):e;if(n!==e)return n;u(!1)};function H(e){u("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}Object.keys(K).forEach(function(e){return z[e]=K[e]});var W=T(!1,function(e,r,n,o,i){var a=n.get,s=n.set,u=i[0]||{};Bt(e).addComputedProp(e,r,t({get:a,set:s,context:e},u))}),q=W({equals:A.structural}),J=function(e,t,r){if("string"==typeof t)return W.apply(null,arguments);if(null!==e&&"object"==typeof e&&1===arguments.length)return W.apply(null,arguments);var n="object"==typeof t?t:{};return n.get=e,n.set="function"==typeof t?t:n.set,n.name=n.name||e.name||"",new ne(n)};function X(e,t){var r=function(){return Y(e,t,this,arguments)};return r.isMobxAction=!0,r}function Y(e,t,r,n){var o=function(e,t,r,n){var o=ke()&&!!e,i=0;var a=pe();Ae();var s=$(!0);return{prevDerivation:a,prevAllowStateChanges:s,notifySpy:o,startTime:i}}(e),i=!0;try{var a=t.apply(r,n);return i=!1,a}finally{i?(me.suppressReactionErrors=i,F(o),me.suppressReactionErrors=!1):F(o)}}function F(e){Q(e.prevAllowStateChanges),_e(),he(e.prevDerivation),e.notifySpy}function $(e){var t=me.allowStateChanges;return me.allowStateChanges=e,t}function Q(e){me.allowStateChanges=e}J.struct=q;var Z,ee,te=function(t){function r(e,r,n,o,i){void 0===n&&(n="ObservableValue@"+s()),void 0===o&&(o=!0),void 0===i&&(i=A.default);var a=t.call(this,n)||this;return a.enhancer=r,a.name=n,a.equals=i,a.hasUnreportedChange=!1,a.value=r(e,void 0,n),o&&ke(),a}return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}(r,t),r.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},r.prototype.set=function(e){this.value;if((e=this.prepareNewValue(e))!==me.UNCHANGED){ke();0,this.setNewValue(e)}},r.prototype.prepareNewValue=function(e){if(ue(this),bt(this)){var t=mt(this,{object:this,type:"update",newValue:e});if(!t)return me.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.equals(this.value,e)?me.UNCHANGED:e},r.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),xt(this)&&wt(this,{type:"update",object:this,newValue:e,oldValue:t})},r.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},r.prototype.intercept=function(e){return gt(this,e)},r.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),Ot(this,e)},r.prototype.toJSON=function(){return this.get()},r.prototype.toString=function(){return this.name+"["+this.value+"]"},r.prototype.valueOf=function(){return m(this.get())},r.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},r}(O),re=y("ObservableValue",te),ne=function(){function e(e){this.dependenciesState=exports.IDerivationState.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=exports.IDerivationState.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+s(),this.value=new ie(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=ee.NONE,this.derivation=e.get,this.name=e.name||"ComputedValue@"+s(),e.set&&(this.setter=X(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?A.structural:A.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return e.prototype.onBecomeStale=function(){!function(e){if(e.lowestObserverState!==exports.IDerivationState.UP_TO_DATE)return;e.lowestObserverState=exports.IDerivationState.POSSIBLY_STALE,e.observers.forEach(function(t){t.dependenciesState===exports.IDerivationState.UP_TO_DATE&&(t.dependenciesState=exports.IDerivationState.POSSIBLY_STALE,t.isTracing!==ee.NONE&&De(t,e),t.onBecomeStale())})}(this)},e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},e.prototype.get=function(){this.isComputing&&u("Cycle detected in computation "+this.name+": "+this.derivation),0!==me.inBatch||0!==this.observers.size||this.keepAlive?(Ee(this),se(this)&&this.trackAndCompute()&&function(e){if(e.lowestObserverState===exports.IDerivationState.STALE)return;e.lowestObserverState=exports.IDerivationState.STALE,e.observers.forEach(function(t){t.dependenciesState===exports.IDerivationState.POSSIBLY_STALE?t.dependenciesState=exports.IDerivationState.STALE:t.dependenciesState===exports.IDerivationState.UP_TO_DATE&&(e.lowestObserverState=exports.IDerivationState.UP_TO_DATE)})}(this)):se(this)&&(this.warnAboutUntrackedRead(),Ae(),this.value=this.computeValue(!1),_e());var e=this.value;if(ae(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(ae(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){c(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else c(!1,!1)},e.prototype.trackAndCompute=function(){ke();var e=this.value,t=this.dependenciesState===exports.IDerivationState.NOT_TRACKING,r=this.computeValue(!0),n=t||ae(e)||ae(r)||!this.equals(e,r);return n&&(this.value=r),n},e.prototype.computeValue=function(e){var t;if(this.isComputing=!0,me.computationDepth++,e)t=ce(this,this.derivation,this.scope);else if(!0===me.disableErrorBoundaries)t=this.derivation.call(this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new ie(e)}return me.computationDepth--,this.isComputing=!1,t},e.prototype.suspend=function(){this.keepAlive||(le(this),this.value=void 0)},e.prototype.observe=function(e,t){var r=this,n=!0,o=void 0;return ze(function(){var i=r.get();if(!n||t){var a=pe();e({type:"update",object:r,newValue:i,oldValue:o}),he(a)}n=!1,o=i})},e.prototype.warnAboutUntrackedRead=function(){},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return m(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(),oe=y("ComputedValue",ne);(Z=exports.IDerivationState||(exports.IDerivationState={}))[Z.NOT_TRACKING=-1]="NOT_TRACKING",Z[Z.UP_TO_DATE=0]="UP_TO_DATE",Z[Z.POSSIBLY_STALE=1]="POSSIBLY_STALE",Z[Z.STALE=2]="STALE",function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(ee||(ee={}));var ie=function(){return function(e){this.cause=e}}();function ae(e){return e instanceof ie}function se(e){switch(e.dependenciesState){case exports.IDerivationState.UP_TO_DATE:return!1;case exports.IDerivationState.NOT_TRACKING:case exports.IDerivationState.STALE:return!0;case exports.IDerivationState.POSSIBLY_STALE:for(var t=pe(),r=e.observing,n=r.length,o=0;o<n;o++){var i=r[o];if(oe(i)){if(me.disableErrorBoundaries)i.get();else try{i.get()}catch(e){return he(t),!0}if(e.dependenciesState===exports.IDerivationState.STALE)return he(t),!0}}return ve(e),he(t),!1}}function ue(e){var t=e.observers.size>0;me.computationDepth>0&&t&&u(!1),me.allowStateChanges||!t&&"strict"!==me.enforceActions||u(!1)}function ce(e,t,r){ve(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++me.runId;var n,o=me.trackingDerivation;if(me.trackingDerivation=e,!0===me.disableErrorBoundaries)n=t.call(r);else try{n=t.call(r)}catch(e){n=new ie(e)}return me.trackingDerivation=o,function(e){for(var t=e.observing,r=e.observing=e.newObserving,n=exports.IDerivationState.UP_TO_DATE,o=0,i=e.unboundDepsCount,a=0;a<i;a++){var s=r[a];0===s.diffValue&&(s.diffValue=1,o!==a&&(r[o]=s),o++),s.dependenciesState>n&&(n=s.dependenciesState)}r.length=o,e.newObserving=null,i=t.length;for(;i--;){var s=t[i];0===s.diffValue&&we(s,e),s.diffValue=0}for(;o--;){var s=r[o];1===s.diffValue&&(s.diffValue=0,Oe(s,e))}n!==exports.IDerivationState.UP_TO_DATE&&(e.dependenciesState=n,e.onBecomeStale())}(e),n}function le(e){var t=e.observing;e.observing=[];for(var r=t.length;r--;)we(t[r],e);e.dependenciesState=exports.IDerivationState.NOT_TRACKING}function fe(e){var t=pe();try{return e()}finally{he(t)}}function pe(){var e=me.trackingDerivation;return me.trackingDerivation=null,e}function he(e){me.trackingDerivation=e}function ve(e){if(e.dependenciesState!==exports.IDerivationState.UP_TO_DATE){e.dependenciesState=exports.IDerivationState.UP_TO_DATE;for(var t=e.observing,r=t.length;r--;)t[r].lowestObserverState=exports.IDerivationState.UP_TO_DATE}}var de=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","disableErrorBoundaries","runId","UNCHANGED"],ye=function(){return function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}}(),be=!0,ge=!1,me=function(){var e=xe();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(be=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new ye).version&&(be=!1),be?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new ye):(setTimeout(function(){ge||u("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new ye)}();function xe(){return"undefined"!=typeof window?window:global}function Oe(e,t){e.observers.add(t),e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function we(e,t){e.observers.delete(t),0===e.observers.size&&Se(e)}function Se(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,me.pendingUnobservations.push(e))}function Ae(){me.inBatch++}function _e(){if(0==--me.inBatch){Ie();for(var e=me.pendingUnobservations,t=0;t<e.length;t++){var r=e[t];r.isPendingUnobservation=!1,0===r.observers.size&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBecomeUnobserved()),r instanceof ne&&r.suspend())}me.pendingUnobservations=[]}}function Ee(e){var t=me.trackingDerivation;return null!==t?(t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e,e.isBeingObserved||(e.isBeingObserved=!0,e.onBecomeObserved())),!0):(0===e.observers.size&&me.inBatch>0&&Se(e),!1)}function De(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===ee.BREAK){var r=[];!function e(t,r,n){if(r.length>=1e3)return void r.push("(and many more)");r.push(""+new Array(n).join("\t")+t.name);t.dependencies&&t.dependencies.forEach(function(t){return e(t,r,n+1)})}(Qe(e),r,1),new Function("debugger;\n/*\nTracing '"+e.name+"'\n\nYou are entering this break point because derivation '"+e.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof ne?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+r.join("\n")+"\n*/\n ")()}}var je=function(){function e(e,t,r){void 0===e&&(e="Reaction@"+s()),this.name=e,this.onInvalidate=t,this.errorHandler=r,this.observing=[],this.newObserving=[],this.dependenciesState=exports.IDerivationState.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+s(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=ee.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,me.pendingReactions.push(this),Ie())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){if(!this.isDisposed){if(Ae(),this._isScheduled=!1,se(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&ke()}catch(e){this.reportExceptionInDerivation(e)}}_e()}},e.prototype.track=function(e){Ae();ke();this._isRunning=!0;var t=ce(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&le(this),ae(t)&&this.reportExceptionInDerivation(t.cause),_e()},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{if(me.disableErrorBoundaries)throw e;var r="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";me.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(r,e),ke()&&Re({type:"error",name:this.name,message:r,error:""+e}),me.globalReactionErrorHandlers.forEach(function(r){return r(e,t)})}},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Ae(),le(this),_e()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e[x]=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.trace=function(e){void 0===e&&(e=!1),pt(this,e)},e}();var Ce=100,Te=function(e){return e()};function Ie(){me.inBatch>0||me.isRunningReactions||Te(Ne)}function Ne(){me.isRunningReactions=!0;for(var e=me.pendingReactions,t=0;e.length>0;){++t===Ce&&(console.error("Reaction doesn't converge to a stable state after "+Ce+" iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var r=e.splice(0),n=0,o=r.length;n<o;n++)r[n].runReaction()}me.isRunningReactions=!1}var Ve=y("Reaction",je);function Pe(e){var t=Te;Te=function(r){return e(function(){return t(r)})}}function ke(){return!1}function Re(e){}function Be(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function Le(){u(!1)}function Me(e){return function(t,r,n){if(n){if(n.value)return{value:X(e,n.value),enumerable:!1,configurable:!0,writable:!0};var o=n.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return X(e,o.call(this))}}}return function(e){return function(t,r,n){Object.defineProperty(t,r,{configurable:!0,enumerable:!1,get:function(){},set:function(t){v(this,r,Ue(e,t))}})}}(e).apply(this,arguments)}}var Ue=function(e,t,r,n){return 1===arguments.length&&"function"==typeof e?X(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?X(e,t):1===arguments.length&&"string"==typeof e?Me(e):!0!==n?Me(t).apply(null,arguments):void v(e,t,X(e.name||t,r.value))};function Ge(e){return"function"==typeof e&&!0===e.isMobxAction}function Ke(e,t,r){v(e,t,X(t,r.bind(e)))}function ze(e,t){void 0===t&&(t=a);var r,n=t&&t.name||e.name||"Autorun@"+s();if(!t.scheduler&&!t.delay)r=new je(n,function(){this.track(u)},t.onError);else{var o=We(t),i=!1;r=new je(n,function(){i||(i=!0,o(function(){i=!1,r.isDisposed||r.track(u)}))},t.onError)}function u(){e(r)}return r.schedule(),r.getDisposer()}Ue.bound=function(e,t,r,n){return!0===n?(Ke(e,t,r.value),null):r?{configurable:!0,enumerable:!1,get:function(){return Ke(this,t,r.value||r.initializer.call(this)),this[t]},set:Le}:{enumerable:!1,configurable:!0,set:function(e){Ke(this,t,e)},get:function(){}}};var He=function(e){return e()};function We(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:He}function qe(e,t,r){return Xe("onBecomeObserved",e,t,r)}function Je(e,t,r){return Xe("onBecomeUnobserved",e,t,r)}function Xe(e,t,r,n){var o="string"==typeof r?zt(t,r):zt(t),i="string"==typeof r?n:r,a=e+"Listeners";return o[a]?o[a].add(i):o[a]=new Set([i]),"function"!=typeof o[e]?u(!1):function(){var e=o[a];e&&(e.delete(i),0===e.size&&delete o[a])}}function Ye(e,t,r,n){var o=Fe(n=R(n));return C(e),Bt(e,n.name,o.enhancer),t&&$e(e,t,r,o),e}function Fe(e){return e.defaultDecorator||(!1===e.deep?M:B)}function $e(e,t,r,n){Ae();try{for(var o in t){var i=Object.getOwnPropertyDescriptor(t,o);0;var a=r&&o in r?r[o]:i.get?W:n;0;var s=a(e,o,i,!0);s&&Object.defineProperty(e,o,s)}}finally{_e()}}function Qe(e,t){return Ze(zt(e,t))}function Ze(e){var t,r,n={name:e.name};return e.observing&&e.observing.length>0&&(n.dependencies=(t=e.observing,r=[],t.forEach(function(e){-1===r.indexOf(e)&&r.push(e)}),r).map(Ze)),n}function et(e){var t,r={name:e.name};return(t=e).observers&&t.observers.size>0&&(r.observers=Array.from(function(e){return e.observers}(e)).map(et)),r}var tt=0;function rt(e){"function"==typeof e.cancel&&e.cancel()}function nt(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(!1===Kt(e))return!1;if(!e[x].values.has(t))return!1;var r=zt(e,t);return oe(r)}return oe(e)}function ot(e){return arguments.length>1?u(!1):nt(e)}function it(e,t){return null!==e&&void 0!==e&&(void 0!==t?!!Kt(e)&&e[x].values.has(t):Kt(e)||!!e[x]||w(e)||Ve(e)||oe(e))}function at(e){return 1!==arguments.length&&u(!1),it(e)}function st(e){return Kt(e)?e[x].getKeys():Nt(e)?Array.from(e.keys()):kt(e)?Array.from(e.keys()):jt(e)?e.map(function(e,t){return t}):u(!1)}function ut(e,t,r){if(2!==arguments.length)if(Kt(e)){var n=e[x];n.values.get(t)?n.write(t,r):n.addObservableProp(t,r,n.defaultEnhancer)}else if(Nt(e))e.set(t,r);else{if(!jt(e))return u(!1);"number"!=typeof t&&(t=parseInt(t,10)),c(t>=0,"Not a valid index: '"+t+"'"),Ae(),t>=e.length&&(e.length=t+1),e[t]=r,_e()}else{Ae();var o=t;try{for(var i in o)ut(e,i,o[i])}finally{_e()}}}function ct(e,t){return Kt(e)?Ht(e).has(t):Nt(e)?e.has(t):kt(e)?e.has(t):jt(e)?t>=0&&t<e.length:u(!1)}var lt={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function ft(e,t,r,n){return n.detectCycles&&e.set(t,r),r}function pt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=!1;"boolean"==typeof e[e.length-1]&&(r=e.pop());var n=function(e){switch(e.length){case 0:return me.trackingDerivation;case 1:return zt(e[0]);case 2:return zt(e[0],e[1])}}(e);if(!n)return u(!1);n.isTracing===ee.NONE&&console.log("[mobx.trace] '"+n.name+"' tracing enabled"),n.isTracing=r?ee.BREAK:ee.LOG}function ht(e,t){void 0===t&&(t=void 0),Ae();try{return e.apply(t)}finally{_e()}}function vt(e,t,r){var n;"number"==typeof r.timeout&&(n=setTimeout(function(){if(!i[x].isDisposed){i();var e=new Error("WHEN_TIMEOUT");if(!r.onError)throw e;r.onError(e)}},r.timeout)),r.name=r.name||"When@"+s();var o=X(r.name+"-effect",t),i=ze(function(t){e()&&(t.dispose(),n&&clearTimeout(n),o())},r);return i}function dt(e){return e[x]}var yt={has:function(e,t){if(t===x||"constructor"===t||t===_)return!0;var r=dt(e);return"string"==typeof t?r.has(t):t in e},get:function(e,t){if(t===x||"constructor"===t||t===_)return e[t];var r=dt(e),n=r.values.get(t);if(n instanceof O){var o=n.get();return void 0===o&&r.has(t),o}return"string"==typeof t&&r.has(t),e[t]},set:function(e,t,r){return"string"==typeof t&&(ut(e,t,r),!0)},deleteProperty:function(e,t){return"string"==typeof t&&(dt(e).remove(t),!0)},ownKeys:function(e){return dt(e).keysAtom.reportObserved(),Reflect.ownKeys(e)},preventExtensions:function(e){return u("Dynamic observable objects cannot be frozen"),!1}};function bt(e){return void 0!==e.interceptors&&e.interceptors.length>0}function gt(e,t){var r=e.interceptors||(e.interceptors=[]);return r.push(t),l(function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)})}function mt(e,t){var r=pe();try{var n=e.interceptors;if(n)for(var o=0,i=n.length;o<i&&(c(!(t=n[o](t))||t.type,"Intercept handlers should return nothing or a change object"),t);o++);return t}finally{he(r)}}function xt(e){return void 0!==e.changeListeners&&e.changeListeners.length>0}function Ot(e,t){var r=e.changeListeners||(e.changeListeners=[]);return r.push(t),l(function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)})}function wt(e,t){var r=pe(),n=e.changeListeners;if(n){for(var o=0,i=(n=n.slice()).length;o<i;o++)n[o](t);he(r)}}var St={get:function(e,t){return t===x?e[x]:"length"===t?e[x].getArrayLength():"number"==typeof t?_t.get.call(e,t):"string"!=typeof t||isNaN(t)?_t.hasOwnProperty(t)?_t[t]:e[t]:_t.get.call(e,parseInt(t))},set:function(e,t,r){return"length"===t?(e[x].setArrayLength(r),!0):"number"==typeof t?(_t.set.call(e,t,r),!0):!isNaN(t)&&(_t.set.call(e,parseInt(t),r),!0)},preventExtensions:function(e){return u("Observable arrays cannot be frozen"),!1}};var At=function(){function e(e,t,r){this.owned=r,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new O(e||"ObservableArray@"+s()),this.enhancer=function(r,n){return t(r,n,e+"[..]")}}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.dehanceValues=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},e.prototype.intercept=function(e){return gt(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Ot(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var r=new Array(e-t),n=0;n<e-t;n++)r[n]=void 0;this.spliceWithArray(t,0,r)}else this.spliceWithArray(e,t-e)},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=t},e.prototype.spliceWithArray=function(e,t,r){var n=this;ue(this.atom);var o=this.values.length;if(void 0===e?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),t=1===arguments.length?o-e:void 0===t||null===t?0:Math.max(0,Math.min(t,o-e)),void 0===r&&(r=i),bt(this)){var a=mt(this,{object:this.proxy,type:"splice",index:e,removedCount:t,added:r});if(!a)return i;t=a.removedCount,r=a.added}r=0===r.length?r:r.map(function(e){return n.enhancer(e,void 0)});var s=this.spliceItemsIntoValues(e,t,r);return 0===t&&0===r.length||this.notifyArraySplice(e,r,s),this.dehanceValues(s)},e.prototype.spliceItemsIntoValues=function(e,t,r){var o;if(r.length<1e4)return(o=this.values).splice.apply(o,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e}([e,t],r));var i=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(r,this.values.slice(e+t)),i},e.prototype.notifyArrayChildUpdate=function(e,t,r){var n=!this.owned&&!1,o=xt(this),i=o||n?{object:this.proxy,type:"update",index:e,newValue:t,oldValue:r}:null;this.atom.reportChanged(),o&&wt(this,i)},e.prototype.notifyArraySplice=function(e,t,r){var n=!this.owned&&!1,o=xt(this),i=o||n?{object:this.proxy,type:"splice",index:e,removed:r,added:t,removedCount:r.length,addedCount:t.length}:null;this.atom.reportChanged(),o&&wt(this,i)},e}(),_t={intercept:function(e){return this[x].intercept(e)},observe:function(e,t){return void 0===t&&(t=!1),this[x].observe(e,t)},clear:function(){return this.splice(0)},replace:function(e){var t=this[x];return t.spliceWithArray(0,t.values.length,e)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=this[x];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray(e);case 2:return o.spliceWithArray(e,t)}return o.spliceWithArray(e,t,r)},spliceWithArray:function(e,t,r){return this[x].spliceWithArray(e,t,r)},push:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this[x];return r.spliceWithArray(r.values.length,0,e),r.values.length},pop:function(){return this.splice(Math.max(this[x].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this[x];return r.spliceWithArray(0,0,e),r.values.length},reverse:function(){var e=this.slice();return e.reverse.apply(e,arguments)},sort:function(e){var t=this.slice();return t.sort.apply(t,arguments)},remove:function(e){var t=this[x],r=t.dehanceValues(t.values).indexOf(e);return r>-1&&(this.splice(r,1),!0)},get:function(e){var t=this[x];if(t){if(e<t.values.length)return t.atom.reportObserved(),t.dehanceValue(t.values[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},set:function(e,t){var r=this[x],n=r.values;if(e<n.length){ue(r.atom);var o=n[e];if(bt(r)){var i=mt(r,{type:"update",object:this,index:e,newValue:t});if(!i)return;t=i.newValue}(t=r.enhancer(t,o))!==o&&(n[e]=t,r.notifyArrayChildUpdate(e,t,o))}else{if(e!==n.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+n.length);r.spliceWithArray(e,0,[t])}}};["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach(function(e){_t[e]=function(){var t=this[x];t.atom.reportObserved();var r=t.dehanceValues(t.values);return r[e].apply(r,arguments)}});var Et,Dt=y("ObservableArrayAdministration",At);function jt(e){return p(e)&&Dt(e[x])}var Ct,Tt={},It=function(){function e(e,t,r){if(void 0===t&&(t=N),void 0===r&&(r="ObservableMap@"+s()),this.enhancer=t,this.name=r,this[Et]=Tt,this._keysAtom=S(this.name+".keys()"),this[Symbol.toStringTag]="Map","function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(e)}return e.prototype._has=function(e){return this._data.has(e)},e.prototype.has=function(e){return this._hasMap.has(e)?this._hasMap.get(e).get():this._updateHasMapEntry(e,!1).get()},e.prototype.set=function(e,t){var r=this._has(e);if(bt(this)){var n=mt(this,{type:r?"update":"add",object:this,newValue:t,name:e});if(!n)return this;t=n.newValue}return r?this._updateValue(e,t):this._addValue(e,t),this},e.prototype.delete=function(e){var t=this;if(bt(this)&&!(n=mt(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var r=xt(this),n=r?{type:"delete",object:this,oldValue:this._data.get(e).value,name:e}:null;return ht(function(){t._keysAtom.reportChanged(),t._updateHasMapEntry(e,!1),t._data.get(e).setNewValue(void 0),t._data.delete(e)}),r&&wt(this,n),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var r=this._hasMap.get(e);return r?r.setNewValue(t):(r=new te(t,V,this.name+"."+e+"?",!1),this._hasMap.set(e,r)),r},e.prototype._updateValue=function(e,t){var r=this._data.get(e);if((t=r.prepareNewValue(t))!==me.UNCHANGED){var n=xt(this),o=n?{type:"update",object:this,oldValue:r.value,name:e,newValue:t}:null;0,r.setNewValue(t),n&&wt(this,o)}},e.prototype._addValue=function(e,t){var r=this;ue(this._keysAtom),ht(function(){var n=new te(t,r.enhancer,r.name+"."+e,!1);r._data.set(e,n),t=n.value,r._updateHasMapEntry(e,!0),r._keysAtom.reportChanged()});var n=xt(this),o=n?{type:"add",object:this,name:e,newValue:t}:null;n&&wt(this,o)},e.prototype.get=function(e){return this.has(e)?this.dehanceValue(this._data.get(e).get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},e.prototype.values=function(){var e=this,t=0,r=Array.from(this.keys());return $t({next:function(){return t<r.length?{value:e.get(r[t++]),done:!1}:{done:!0}}})},e.prototype.entries=function(){var e=this,t=0,r=Array.from(this.keys());return $t({next:function(){if(t<r.length){var n=r[t++];return{value:[n,e.get(n)],done:!1}}return{done:!0}}})},e.prototype[(Et=x,Symbol.iterator)]=function(){return this.entries()},e.prototype.forEach=function(e,t){var o,i;try{for(var a=r(this),s=a.next();!s.done;s=a.next()){var u=n(s.value,2),c=u[0],l=u[1];e.call(t,l,c,this)}}catch(e){o={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}},e.prototype.merge=function(e){var t=this;return Nt(e)&&(e=e.toJS()),ht(function(){if(h(e))Object.keys(e).forEach(function(r){return t.set(r,e[r])});else if(Array.isArray(e))e.forEach(function(e){var r=n(e,2),o=r[0],i=r[1];return t.set(o,i)});else if(b(e)){if(e.constructor!==Map)return u("Cannot initialize from classes that inherit from Map: "+e.constructor.name);e.forEach(function(e,r){return t.set(r,e)})}else null!==e&&void 0!==e&&u("Cannot initialize map from "+e)}),this},e.prototype.clear=function(){var e=this;ht(function(){fe(function(){var t,n;try{for(var o=r(e.keys()),i=o.next();!i.done;i=o.next()){var a=i.value;e.delete(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}})})},e.prototype.replace=function(e){var t=this;return ht(function(){var r,o=h(r=e)?Object.keys(r):Array.isArray(r)?r.map(function(e){return n(e,1)[0]}):b(r)||Nt(r)?Array.from(r.keys()):u("Cannot get keys from '"+r+"'");Array.from(t.keys()).filter(function(e){return-1===o.indexOf(e)}).forEach(function(e){return t.delete(e)}),t.merge(e)}),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.toPOJO=function(){var e,t,o={};try{for(var i=r(this),a=i.next();!a.done;a=i.next()){var s=n(a.value,2),u=s[0],c=s[1];o[""+u]=c}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return o},e.prototype.toJS=function(){return new Map(this)},e.prototype.toJSON=function(){return this.toPOJO()},e.prototype.toString=function(){var e=this;return this.name+"[{ "+Array.from(this.keys()).map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return Ot(this,e)},e.prototype.intercept=function(e){return gt(this,e)},e}(),Nt=y("ObservableMap",It),Vt={},Pt=function(){function e(e,t,r){if(void 0===t&&(t=N),void 0===r&&(r="ObservableSet@"+s()),this.name=r,this[Ct]=Vt,this._data=new Set,this._atom=S(this.name),this[Symbol.toStringTag]="Set","function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(e,n){return t(e,n,r)},e&&this.replace(e)}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.clear=function(){var e=this;ht(function(){fe(function(){var t,n;try{for(var o=r(e._data.values()),i=o.next();!i.done;i=o.next()){var a=i.value;e.delete(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}})})},e.prototype.forEach=function(e,t){var n,o;try{for(var i=r(this),a=i.next();!a.done;a=i.next()){var s=a.value;e.call(t,s,s,this)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this;if((ue(this._atom),bt(this))&&!(n=mt(this,{type:"add",object:this,newValue:e})))return this;if(!this.has(e)){ht(function(){t._data.add(t.enhancer(e,void 0)),t._atom.reportChanged()});var r=xt(this),n=r?{type:"add",object:this,newValue:e}:null;0,r&&wt(this,n)}return this},e.prototype.delete=function(e){var t=this;if(bt(this)&&!(n=mt(this,{type:"delete",object:this,oldValue:e})))return!1;if(this.has(e)){var r=xt(this),n=r?{type:"delete",object:this,oldValue:e}:null;return ht(function(){t._atom.reportChanged(),t._data.delete(e)}),r&&wt(this,n),!0}return!1},e.prototype.has=function(e){return this._atom.reportObserved(),this._data.has(this.dehanceValue(e))},e.prototype.entries=function(){var e=0,t=Array.from(this.keys()),r=Array.from(this.values());return $t({next:function(){var n=e;return e+=1,n<r.length?{value:[t[n],r[n]],done:!1}:{done:!0}}})},e.prototype.keys=function(){return this.values()},e.prototype.values=function(){this._atom.reportObserved();var e=this,t=0,r=Array.from(this._data.values());return $t({next:function(){return t<r.length?{value:e.dehanceValue(r[t++]),done:!1}:{done:!0}}})},e.prototype.replace=function(e){var t=this;return kt(e)&&(e=e.toJS()),ht(function(){Array.isArray(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):g(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!==e&&void 0!==e&&u("Cannot initialize set from "+e)}),this},e.prototype.observe=function(e,t){return Ot(this,e)},e.prototype.intercept=function(e){return gt(this,e)},e.prototype.toJS=function(){return new Set(this)},e.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},e.prototype[(Ct=x,Symbol.iterator)]=function(){return this.values()},e}(),kt=y("ObservableSet",Pt),Rt=function(){function e(e,t,r,n){void 0===t&&(t=new Map),this.target=e,this.values=t,this.name=r,this.defaultEnhancer=n,this.keysAtom=new O(r+".keys")}return e.prototype.read=function(e){return this.values.get(e).get()},e.prototype.write=function(e,t){var r=this.target,n=this.values.get(e);if(n instanceof ne)n.set(t);else{if(bt(this)){if(!(i=mt(this,{type:"update",object:this.proxy||r,name:e,newValue:t})))return;t=i.newValue}if((t=n.prepareNewValue(t))!==me.UNCHANGED){var o=xt(this),i=o?{type:"update",object:this.proxy||r,oldValue:n.value,name:e,newValue:t}:null;0,n.setNewValue(t),o&&wt(this,i)}}},e.prototype.has=function(e){var t=this.pendingKeys||(this.pendingKeys=new Map),r=t.get(e);if(r)return r.get();var n=!!this.values.get(e);return r=new te(n,V,this.name+"."+e.toString()+"?",!1),t.set(e,r),r.get()},e.prototype.addObservableProp=function(e,t,r){void 0===r&&(r=this.defaultEnhancer);var n=this.target;if(bt(this)){var o=mt(this,{object:this.proxy||n,name:e,type:"add",newValue:t});if(!o)return;t=o.newValue}var i=new te(t,r,this.name+"."+e,!1);this.values.set(e,i),t=i.value,Object.defineProperty(n,e,function(e){return Lt[e]||(Lt[e]={configurable:!0,enumerable:!0,get:function(){return this[x].read(e)},set:function(t){this[x].write(e,t)}})}(e)),this.notifyPropertyAddition(e,t)},e.prototype.addComputedProp=function(e,t,r){var n=this.target;r.name=r.name||this.name+"."+t,this.values.set(t,new ne(r)),(e===n||d(e,t))&&Object.defineProperty(e,t,function(e){return Mt[e]||(Mt[e]={configurable:!1,enumerable:!1,get:function(){return Ut(this).read(e)},set:function(t){Ut(this).write(e,t)}})}(t))},e.prototype.remove=function(e){if(this.values.has(e)){var t=this.target;if(bt(this))if(!(a=mt(this,{object:this.proxy||t,name:e,type:"remove"})))return;try{Ae();var r=xt(this),n=this.values.get(e),o=n&&n.get();if(n&&n.set(void 0),this.keysAtom.reportChanged(),this.values.delete(e),this.pendingKeys){var i=this.pendingKeys.get(e);i&&i.set(!1)}delete this.target[e];var a=r?{type:"remove",object:this.proxy||t,oldValue:o,name:e}:null;0,r&&wt(this,a)}finally{_e()}}},e.prototype.illegalAccess=function(e,t){console.warn("Property '"+t+"' of '"+e+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},e.prototype.observe=function(e,t){return Ot(this,e)},e.prototype.intercept=function(e){return gt(this,e)},e.prototype.notifyPropertyAddition=function(e,t){var r=xt(this),n=r?{type:"add",object:this.proxy||this.target,name:e,newValue:t}:null;if(r&&wt(this,n),this.pendingKeys){var o=this.pendingKeys.get(e);o&&o.set(!0)}this.keysAtom.reportChanged()},e.prototype.getKeys=function(){var e,t;this.keysAtom.reportObserved();var o=[];try{for(var i=r(this.values),a=i.next();!a.done;a=i.next()){var s=n(a.value,2),u=s[0];s[1]instanceof te&&o.push(u)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return o},e}();function Bt(e,t,r){if(void 0===t&&(t=""),void 0===r&&(r=N),Object.prototype.hasOwnProperty.call(e,x))return e[x];h(e)||(t=(e.constructor.name||"ObservableObject")+"@"+s()),t||(t="ObservableObject@"+s());var n=new Rt(e,new Map,t,r);return v(e,x,n),n}var Lt=Object.create(null),Mt=Object.create(null);function Ut(e){var t=e[x];return t||(C(e),e[x])}var Gt=y("ObservableObjectAdministration",Rt);function Kt(e){return!!p(e)&&(C(e),Gt(e[x]))}function zt(e,t){if("object"==typeof e&&null!==e){if(jt(e))return void 0!==t&&u(!1),e[x].atom;if(kt(e))return e[x];if(Nt(e)){var r=e;return void 0===t?r._keysAtom:((n=r._data.get(t)||r._hasMap.get(t))||u(!1),n)}var n;if(C(e),t&&!e[x]&&e[t],Kt(e))return t?((n=e[x].values.get(t))||u(!1),n):u(!1);if(w(e)||oe(e)||Ve(e))return e}else if("function"==typeof e&&Ve(e[x]))return e[x];return u(!1)}function Ht(e,t){return e||u("Expecting some object"),void 0!==t?Ht(zt(e,t)):w(e)||oe(e)||Ve(e)?e:Nt(e)||kt(e)?e:(C(e),e[x]?e[x]:void u(!1))}function Wt(e,t){return(void 0!==t?zt(e,t):Kt(e)||Nt(e)||kt(e)?Ht(e):zt(e)).name}var qt=Object.prototype.toString;function Jt(e,t){return Xt(e,t)}function Xt(e,t,r,n){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var o=typeof e;return("function"===o||"object"===o||"object"==typeof t)&&function(e,t,r,n){e=Yt(e),t=Yt(t);var o=qt.call(e);if(o!==qt.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t)}var i="[object Array]"===o;if(!i){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!("function"==typeof a&&a instanceof a&&"function"==typeof s&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}r=r||[],n=n||[];var u=r.length;for(;u--;)if(r[u]===e)return n[u]===t;if(r.push(e),n.push(t),i){if((u=e.length)!==t.length)return!1;for(;u--;)if(!Xt(e[u],t[u],r,n))return!1}else{var c,l=Object.keys(e);if(u=l.length,Object.keys(t).length!==u)return!1;for(;u--;)if(c=l[u],!Ft(t,c)||!Xt(e[c],t[c],r,n))return!1}return r.pop(),n.pop(),!0}(e,t,r,n)}function Yt(e){return jt(e)?e.slice():b(e)||Nt(e)?Array.from(e.entries()):g(e)||kt(e)?Array.from(e.entries()):e}function Ft(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function $t(e){return e[Symbol.iterator]=Qt,e}function Qt(){return this}if("undefined"==typeof Proxy||"undefined"==typeof Symbol)throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Be,extras:{getDebugName:Wt},$mobx:x}),exports.Reaction=je,exports.untracked=fe,exports.createAtom=S,exports.spy=Be,exports.comparer=A,exports.isObservableObject=Kt,exports.isBoxedObservable=re,exports.isObservableArray=jt,exports.ObservableMap=It,exports.isObservableMap=Nt,exports.ObservableSet=Pt,exports.isObservableSet=kt,exports.transaction=ht,exports.observable=z,exports.computed=J,exports.isObservable=at,exports.isObservableProp=function(e,t){return"string"!=typeof t?u(!1):it(e,t)},exports.isComputed=ot,exports.isComputedProp=function(e,t){return"string"!=typeof t?u(!1):nt(e,t)},exports.extendObservable=Ye,exports.observe=function(e,t,r,n){return"function"==typeof r?function(e,t,r,n){return Ht(e,t).observe(r,n)}(e,t,r,n):function(e,t,r){return Ht(e).observe(t,r)}(e,t,r)},exports.intercept=function(e,t,r){return"function"==typeof r?function(e,t,r){return Ht(e,t).intercept(r)}(e,t,r):function(e,t){return Ht(e).intercept(t)}(e,t)},exports.autorun=ze,exports.reaction=function(e,t,r){void 0===r&&(r=a);var n,o,i,u=r.name||"Reaction@"+s(),c=Ue(u,r.onError?(n=r.onError,o=t,function(){try{return o.apply(this,arguments)}catch(e){n.call(this,e)}}):t),l=!r.scheduler&&!r.delay,f=We(r),p=!0,h=!1,v=r.compareStructural?A.structural:r.equals||A.default,d=new je(u,function(){p||l?y():h||(h=!0,f(y))},r.onError);function y(){if(h=!1,!d.isDisposed){var t=!1;d.track(function(){var r=e(d);t=p||!v(i,r),i=r}),p&&r.fireImmediately&&c(i,d),p||!0!==t||c(i,d),p&&(p=!1)}}return d.schedule(),d.getDisposer()},exports.when=function(e,r,n){return 1===arguments.length||r&&"object"==typeof r?function(e,r){var n,o=new Promise(function(o,i){var a=vt(e,o,t({},r,{onError:i}));n=function(){a(),i("WHEN_CANCELLED")}});return o.cancel=n,o}(e,r):vt(e,r,n||{})},exports.action=Ue,exports.isAction=Ge,exports.runInAction=function(e,t){var r="string"==typeof e?e:e.name||"<unnamed action>",n="function"==typeof e?e:t;return Y(r,n,this,void 0)},exports.keys=st,exports.values=function(e){return Kt(e)?st(e).map(function(t){return e[t]}):Nt(e)?st(e).map(function(t){return e.get(t)}):kt(e)?Array.from(e.values()):jt(e)?e.slice():u(!1)},exports.entries=function(e){return Kt(e)?st(e).map(function(t){return[t,e[t]]}):Nt(e)?st(e).map(function(t){return[t,e.get(t)]}):kt(e)?Array.from(e.entries()):jt(e)?e.map(function(e,t){return[t,e]}):u(!1)},exports.set=ut,exports.remove=function(e,t){if(Kt(e))e[x].remove(t);else if(Nt(e))e.delete(t);else if(kt(e))e.delete(t);else{if(!jt(e))return u(!1);"number"!=typeof t&&(t=parseInt(t,10)),c(t>=0,"Not a valid index: '"+t+"'"),e.splice(t,1)}},exports.has=ct,exports.get=function(e,t){if(ct(e,t))return Kt(e)?e[t]:Nt(e)?e.get(t):jt(e)?e[t]:u(!1)},exports.decorate=function(e,t){var r="function"==typeof e?e.prototype:e,n=function(e){var n=t[e];Array.isArray(n)||(n=[n]);var o=Object.getOwnPropertyDescriptor(r,e),i=n.reduce(function(t,n){return n(r,e,t)},o);i&&Object.defineProperty(r,e,i)};for(var o in t)n(o);return e},exports.configure=function(e){var t=e.enforceActions,r=e.computedRequiresReaction,n=e.disableErrorBoundaries,o=e.reactionScheduler;if(!0===e.isolateGlobalState&&((me.pendingReactions.length||me.inBatch||me.isRunningReactions)&&u("isolateGlobalState should be called before MobX is running any reactions"),ge=!0,be&&(0==--xe().__mobxInstanceCount&&(xe().__mobxGlobals=void 0),me=new ye)),void 0!==t){var i=void 0;switch(t){case!0:case"observed":i=!0;break;case!1:case"never":i=!1;break;case"strict":case"always":i="strict";break;default:u("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}me.enforceActions=i,me.allowStateChanges=!0!==i&&"strict"!==i}void 0!==r&&(me.computedRequiresReaction=!!r),void 0!==n&&(!0===n&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),me.disableErrorBoundaries=!!n),o&&Pe(o)},exports.onBecomeObserved=qe,exports.onBecomeUnobserved=Je,exports.flow=function(e){1!==arguments.length&&u("Flow expects one 1 argument and cannot be used as decorator");var t=e.name||"<unnamed flow>";return function(){var r,n=arguments,o=++tt,i=Ue(t+" - runid: "+o+" - init",e).apply(this,n),a=void 0,s=new Promise(function(e,n){var s=0;function u(e){var r;a=void 0;try{r=Ue(t+" - runid: "+o+" - yield "+s++,i.next).call(i,e)}catch(e){return n(e)}l(r)}function c(e){var r;a=void 0;try{r=Ue(t+" - runid: "+o+" - yield "+s++,i.throw).call(i,e)}catch(e){return n(e)}l(r)}function l(t){if(!t||"function"!=typeof t.then)return t.done?e(t.value):(a=Promise.resolve(t.value)).then(u,c);t.then(l,n)}r=n,u(void 0)});return s.cancel=Ue(t+" - runid: "+o+" - cancel",function(){try{a&&rt(a);var e=i.return(),t=Promise.resolve(e.value);t.then(f,f),rt(t),r(new Error("FLOW_CANCELLED"))}catch(e){r(e)}}),s}},exports.toJS=function(e,t){var r;return"boolean"==typeof t&&(t={detectCycles:t}),t||(t=lt),t.detectCycles=void 0===t.detectCycles?!0===t.recurseEverything:!0===t.detectCycles,t.detectCycles&&(r=new Map),function e(t,r,n){if(!r.recurseEverything&&!at(t))return t;if("object"!=typeof t)return t;if(null===t)return null;if(t instanceof Date)return t;if(re(t))return e(t.get(),r,n);if(at(t)&&st(t),!0===r.detectCycles&&null!==t&&n.has(t))return n.get(t);if(jt(t)||Array.isArray(t)){var o=ft(n,t,[],r),i=t.map(function(t){return e(t,r,n)});o.length=i.length;for(var a=0,s=i.length;a<s;a++)o[a]=i[a];return o}if(kt(t)||Object.getPrototypeOf(t)===Set.prototype){if(!1===r.exportMapsAsObjects){var u=ft(n,t,new Set,r);return t.forEach(function(t){u.add(e(t,r,n))}),u}var c=ft(n,t,[],r);return t.forEach(function(t){c.push(e(t,r,n))}),c}if(Nt(t)||Object.getPrototypeOf(t)===Map.prototype){if(!1===r.exportMapsAsObjects){var l=ft(n,t,new Map,r);return t.forEach(function(t,o){l.set(o,e(t,r,n))}),l}var f=ft(n,t,{},r);return t.forEach(function(t,o){f[o]=e(t,r,n)}),f}var p=ft(n,t,{},r);for(var h in t)p[h]=e(t[h],r,n);return p}(e,t,r)},exports.trace=pt,exports.getDependencyTree=Qe,exports.getObserverTree=function(e,t){return et(zt(e,t))},exports._resetGlobalState=function(){var e=new ye;for(var t in e)-1===de.indexOf(t)&&(me[t]=e[t]);me.allowStateChanges=!me.enforceActions},exports._getGlobalState=function(){return me},exports.getDebugName=Wt,exports.getAtom=zt,exports._getAdministration=Ht,exports._allowStateChanges=function(e,t){var r,n=$(e);try{r=t()}finally{Q(n)}return r},exports._allowStateChangesInsideComputed=function(e){var t,r=me.computationDepth;me.computationDepth=0;try{t=e()}finally{me.computationDepth=r}return t},exports.isArrayLike=function(e){return Array.isArray(e)||jt(e)},exports.$mobx=x,exports._isComputingDerivation=function(){return null!==me.trackingDerivation},exports.onReactionError=function(e){return me.globalReactionErrorHandlers.push(e),function(){var t=me.globalReactionErrorHandlers.indexOf(e);t>=0&&me.globalReactionErrorHandlers.splice(t,1)}},exports._interceptReads=function(e,t,r){var n;if(Nt(e)||jt(e)||re(e))n=Ht(e);else{if(!Kt(e))return u(!1);if("string"!=typeof t)return u(!1);n=Ht(e,t)}return void 0!==n.dehancer?u(!1):(n.dehancer="function"==typeof t?t:r,function(){n.dehancer=void 0})};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};var t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};function r(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function n(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}var o="An invariant failed, however the error is obfuscated because this is an production build.",i=[];Object.freeze(i);var a={};function s(){return++me.mobxGuid}function u(e){throw c(!1,e),"X"}function c(e,t){if(!e)throw new Error("[mobx] "+(t||o))}Object.freeze(a);function l(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var f=function(){};function p(e){return null!==e&&"object"==typeof e}function h(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function v(e,t,r){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:r})}function d(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!r||!1!==r.configurable&&!1!==r.writable}function y(e,t){var r="isMobX"+e;return t.prototype[r]=!0,function(e){return p(e)&&!0===e[r]}}function b(e){return e instanceof Map}function g(e){return e instanceof Set}function m(e){return null===e?null:"object"==typeof e?""+e:e}var x=Symbol("mobx administration"),O=function(){function e(e){void 0===e&&(e="Atom@"+s()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=exports.IDerivationState.NOT_TRACKING}return e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},e.prototype.reportObserved=function(){return Ee(this)},e.prototype.reportChanged=function(){Ae(),function(e){if(e.lowestObserverState===exports.IDerivationState.STALE)return;e.lowestObserverState=exports.IDerivationState.STALE,e.observers.forEach(function(t){t.dependenciesState===exports.IDerivationState.UP_TO_DATE&&(t.isTracing!==ee.NONE&&De(t,e),t.onBecomeStale()),t.dependenciesState=exports.IDerivationState.STALE})}(this),_e()},e.prototype.toString=function(){return this.name},e}(),w=y("Atom",O);function S(e,t,r){void 0===t&&(t=f),void 0===r&&(r=f);var n=new O(e);return t!==f&&qe(n,t),r!==f&&Je(n,r),n}var A={identity:function(e,t){return e===t},structural:function(e,t){return Xt(e,t)},default:function(e,t){return Object.is(e,t)}},_=Symbol("mobx did run lazy initializers"),E=Symbol("mobx pending decorators"),D={},j={};function C(e){if(!0!==e[_]){var t=e[E];if(t)for(var r in v(e,_,!0),t){var n=t[r];n.propertyCreator(e,n.prop,n.descriptor,n.decoratorTarget,n.decoratorArguments)}}}function T(e,r){return function(){var n,o=function(o,i,a,s){if(!0===s)return r(o,i,a,o,n),null;if(!Object.prototype.hasOwnProperty.call(o,E)){var u=o[E];v(o,E,t({},u))}return o[E][i]={prop:i,propertyCreator:r,descriptor:a,decoratorTarget:o,decoratorArguments:n},function(e,t){var r=t?D:j;return r[e]||(r[e]={configurable:!0,enumerable:t,get:function(){return C(this),this[e]},set:function(t){C(this),this[e]=t}})}(i,e)};return I(arguments)?(n=i,o.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),o)}}function I(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]||4===e.length&&!0===e[3]}function N(e,t,r){return at(e)?e:Array.isArray(e)?z.array(e,{name:r}):h(e)?z.object(e,void 0,{name:r}):b(e)?z.map(e,{name:r}):g(e)?z.set(e,{name:r}):e}function V(e){return e}function P(e){c(e);var t=T(!0,function(t,r,n,o,i){var a=n?n.initializer?n.initializer.call(t):n.value:void 0;Lt(t).addObservableProp(r,a,e)}),r=("undefined"!=typeof process&&process.env,t);return r.enhancer=e,r}var k={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function R(e){return null===e||void 0===e?k:"string"==typeof e?{name:e,deep:!0,proxy:!0}:e}Object.freeze(k);var B=P(N),L=P(function(e,t,r){return void 0===e||null===e?e:zt(e)||jt(e)||Vt(e)||Rt(e)?e:Array.isArray(e)?z.array(e,{name:r,deep:!1}):h(e)?z.object(e,void 0,{name:r,deep:!1}):b(e)?z.map(e,{name:r,deep:!1}):g(e)?z.set(e,{name:r,deep:!1}):u(!1)}),M=P(V),U=P(function(e,t,r){return Xt(e,t)?t:e});function G(e){return e.defaultDecorator?e.defaultDecorator.enhancer:!1===e.deep?V:N}var K={box:function(e,t){arguments.length>2&&H("box");var r=R(t);return new te(e,G(r),r.name,!0,r.equals)},array:function(e,t){arguments.length>2&&H("array");var r=R(t);return function(e,t,r,n){void 0===r&&(r="ObservableArray@"+s());void 0===n&&(n=!1);var o=new At(r,t,n);i=o.values,a=x,u=o,Object.defineProperty(i,a,{enumerable:!1,writable:!1,configurable:!0,value:u});var i,a,u;var c=new Proxy(o.values,St);if(o.proxy=c,e&&e.length){var l=$(!0);o.spliceWithArray(0,0,e),Q(l)}return c}(e,G(r),r.name)},map:function(e,t){arguments.length>2&&H("map");var r=R(t);return new Tt(e,G(r),r.name)},set:function(e,t){arguments.length>2&&H("set");var r=R(t);return new kt(e,G(r),r.name)},object:function(e,t,r){"string"==typeof arguments[1]&&H("object");var n=R(r);if(!1===n.proxy)return Ye({},e,t,n);var o=Fe(n),i=function(e){var t=new Proxy(e,yt);return e[x].proxy=t,t}(Ye({},void 0,void 0,n));return $e(i,e,t,o),i},ref:M,shallow:L,deep:B,struct:U},z=function(e,t,r){if("string"==typeof arguments[1])return B.apply(null,arguments);if(at(e))return e;var n=h(e)?z.object(e,t,r):Array.isArray(e)?z.array(e,t):b(e)?z.map(e,t):g(e)?z.set(e,t):e;if(n!==e)return n;u(!1)};function H(e){u("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}Object.keys(K).forEach(function(e){return z[e]=K[e]});var W=T(!1,function(e,r,n,o,i){var a=n.get,s=n.set,u=i[0]||{};Lt(e).addComputedProp(e,r,t({get:a,set:s,context:e},u))}),q=W({equals:A.structural}),J=function(e,t,r){if("string"==typeof t)return W.apply(null,arguments);if(null!==e&&"object"==typeof e&&1===arguments.length)return W.apply(null,arguments);var n="object"==typeof t?t:{};return n.get=e,n.set="function"==typeof t?t:n.set,n.name=n.name||e.name||"",new ne(n)};function X(e,t,r){var n=function(){return Y(e,t,r||this,arguments)};return n.isMobxAction=!0,n}function Y(e,t,r,n){var o=function(e,t,r,n){var o=ke()&&!!e,i=0;var a=pe();Ae();var s=$(!0);return{prevDerivation:a,prevAllowStateChanges:s,notifySpy:o,startTime:i}}(e),i=!0;try{var a=t.apply(r,n);return i=!1,a}finally{i?(me.suppressReactionErrors=i,F(o),me.suppressReactionErrors=!1):F(o)}}function F(e){Q(e.prevAllowStateChanges),_e(),he(e.prevDerivation),e.notifySpy}function $(e){var t=me.allowStateChanges;return me.allowStateChanges=e,t}function Q(e){me.allowStateChanges=e}J.struct=q;var Z,ee,te=function(t){function r(e,r,n,o,i){void 0===n&&(n="ObservableValue@"+s()),void 0===o&&(o=!0),void 0===i&&(i=A.default);var a=t.call(this,n)||this;return a.enhancer=r,a.name=n,a.equals=i,a.hasUnreportedChange=!1,a.value=r(e,void 0,n),o&&ke(),a}return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}(r,t),r.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},r.prototype.set=function(e){this.value;if((e=this.prepareNewValue(e))!==me.UNCHANGED){ke();0,this.setNewValue(e)}},r.prototype.prepareNewValue=function(e){if(ue(this),bt(this)){var t=mt(this,{object:this,type:"update",newValue:e});if(!t)return me.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.equals(this.value,e)?me.UNCHANGED:e},r.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),xt(this)&&wt(this,{type:"update",object:this,newValue:e,oldValue:t})},r.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},r.prototype.intercept=function(e){return gt(this,e)},r.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),Ot(this,e)},r.prototype.toJSON=function(){return this.get()},r.prototype.toString=function(){return this.name+"["+this.value+"]"},r.prototype.valueOf=function(){return m(this.get())},r.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},r}(O),re=y("ObservableValue",te),ne=function(){function e(e){this.dependenciesState=exports.IDerivationState.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=exports.IDerivationState.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+s(),this.value=new ie(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=ee.NONE,this.derivation=e.get,this.name=e.name||"ComputedValue@"+s(),e.set&&(this.setter=X(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?A.structural:A.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return e.prototype.onBecomeStale=function(){!function(e){if(e.lowestObserverState!==exports.IDerivationState.UP_TO_DATE)return;e.lowestObserverState=exports.IDerivationState.POSSIBLY_STALE,e.observers.forEach(function(t){t.dependenciesState===exports.IDerivationState.UP_TO_DATE&&(t.dependenciesState=exports.IDerivationState.POSSIBLY_STALE,t.isTracing!==ee.NONE&&De(t,e),t.onBecomeStale())})}(this)},e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},e.prototype.get=function(){this.isComputing&&u("Cycle detected in computation "+this.name+": "+this.derivation),0!==me.inBatch||0!==this.observers.size||this.keepAlive?(Ee(this),se(this)&&this.trackAndCompute()&&function(e){if(e.lowestObserverState===exports.IDerivationState.STALE)return;e.lowestObserverState=exports.IDerivationState.STALE,e.observers.forEach(function(t){t.dependenciesState===exports.IDerivationState.POSSIBLY_STALE?t.dependenciesState=exports.IDerivationState.STALE:t.dependenciesState===exports.IDerivationState.UP_TO_DATE&&(e.lowestObserverState=exports.IDerivationState.UP_TO_DATE)})}(this)):se(this)&&(this.warnAboutUntrackedRead(),Ae(),this.value=this.computeValue(!1),_e());var e=this.value;if(ae(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(ae(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){c(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else c(!1,!1)},e.prototype.trackAndCompute=function(){ke();var e=this.value,t=this.dependenciesState===exports.IDerivationState.NOT_TRACKING,r=this.computeValue(!0),n=t||ae(e)||ae(r)||!this.equals(e,r);return n&&(this.value=r),n},e.prototype.computeValue=function(e){var t;if(this.isComputing=!0,me.computationDepth++,e)t=ce(this,this.derivation,this.scope);else if(!0===me.disableErrorBoundaries)t=this.derivation.call(this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new ie(e)}return me.computationDepth--,this.isComputing=!1,t},e.prototype.suspend=function(){this.keepAlive||(le(this),this.value=void 0)},e.prototype.observe=function(e,t){var r=this,n=!0,o=void 0;return ze(function(){var i=r.get();if(!n||t){var a=pe();e({type:"update",object:r,newValue:i,oldValue:o}),he(a)}n=!1,o=i})},e.prototype.warnAboutUntrackedRead=function(){},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return m(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(),oe=y("ComputedValue",ne);(Z=exports.IDerivationState||(exports.IDerivationState={}))[Z.NOT_TRACKING=-1]="NOT_TRACKING",Z[Z.UP_TO_DATE=0]="UP_TO_DATE",Z[Z.POSSIBLY_STALE=1]="POSSIBLY_STALE",Z[Z.STALE=2]="STALE",function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(ee||(ee={}));var ie=function(){return function(e){this.cause=e}}();function ae(e){return e instanceof ie}function se(e){switch(e.dependenciesState){case exports.IDerivationState.UP_TO_DATE:return!1;case exports.IDerivationState.NOT_TRACKING:case exports.IDerivationState.STALE:return!0;case exports.IDerivationState.POSSIBLY_STALE:for(var t=pe(),r=e.observing,n=r.length,o=0;o<n;o++){var i=r[o];if(oe(i)){if(me.disableErrorBoundaries)i.get();else try{i.get()}catch(e){return he(t),!0}if(e.dependenciesState===exports.IDerivationState.STALE)return he(t),!0}}return ve(e),he(t),!1}}function ue(e){var t=e.observers.size>0;me.computationDepth>0&&t&&u(!1),me.allowStateChanges||!t&&"strict"!==me.enforceActions||u(!1)}function ce(e,t,r){ve(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++me.runId;var n,o=me.trackingDerivation;if(me.trackingDerivation=e,!0===me.disableErrorBoundaries)n=t.call(r);else try{n=t.call(r)}catch(e){n=new ie(e)}return me.trackingDerivation=o,function(e){for(var t=e.observing,r=e.observing=e.newObserving,n=exports.IDerivationState.UP_TO_DATE,o=0,i=e.unboundDepsCount,a=0;a<i;a++){var s=r[a];0===s.diffValue&&(s.diffValue=1,o!==a&&(r[o]=s),o++),s.dependenciesState>n&&(n=s.dependenciesState)}r.length=o,e.newObserving=null,i=t.length;for(;i--;){var s=t[i];0===s.diffValue&&we(s,e),s.diffValue=0}for(;o--;){var s=r[o];1===s.diffValue&&(s.diffValue=0,Oe(s,e))}n!==exports.IDerivationState.UP_TO_DATE&&(e.dependenciesState=n,e.onBecomeStale())}(e),n}function le(e){var t=e.observing;e.observing=[];for(var r=t.length;r--;)we(t[r],e);e.dependenciesState=exports.IDerivationState.NOT_TRACKING}function fe(e){var t=pe();try{return e()}finally{he(t)}}function pe(){var e=me.trackingDerivation;return me.trackingDerivation=null,e}function he(e){me.trackingDerivation=e}function ve(e){if(e.dependenciesState!==exports.IDerivationState.UP_TO_DATE){e.dependenciesState=exports.IDerivationState.UP_TO_DATE;for(var t=e.observing,r=t.length;r--;)t[r].lowestObserverState=exports.IDerivationState.UP_TO_DATE}}var de=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","disableErrorBoundaries","runId","UNCHANGED"],ye=function(){return function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}}(),be=!0,ge=!1,me=function(){var e=xe();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(be=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new ye).version&&(be=!1),be?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new ye):(setTimeout(function(){ge||u("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new ye)}();function xe(){return"undefined"!=typeof window?window:global}function Oe(e,t){e.observers.add(t),e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function we(e,t){e.observers.delete(t),0===e.observers.size&&Se(e)}function Se(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,me.pendingUnobservations.push(e))}function Ae(){me.inBatch++}function _e(){if(0==--me.inBatch){Ie();for(var e=me.pendingUnobservations,t=0;t<e.length;t++){var r=e[t];r.isPendingUnobservation=!1,0===r.observers.size&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBecomeUnobserved()),r instanceof ne&&r.suspend())}me.pendingUnobservations=[]}}function Ee(e){var t=me.trackingDerivation;return null!==t?(t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e,e.isBeingObserved||(e.isBeingObserved=!0,e.onBecomeObserved())),!0):(0===e.observers.size&&me.inBatch>0&&Se(e),!1)}function De(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===ee.BREAK){var r=[];!function e(t,r,n){if(r.length>=1e3)return void r.push("(and many more)");r.push(""+new Array(n).join("\t")+t.name);t.dependencies&&t.dependencies.forEach(function(t){return e(t,r,n+1)})}(Qe(e),r,1),new Function("debugger;\n/*\nTracing '"+e.name+"'\n\nYou are entering this break point because derivation '"+e.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof ne?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+r.join("\n")+"\n*/\n ")()}}var je=function(){function e(e,t,r){void 0===e&&(e="Reaction@"+s()),this.name=e,this.onInvalidate=t,this.errorHandler=r,this.observing=[],this.newObserving=[],this.dependenciesState=exports.IDerivationState.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+s(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=ee.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,me.pendingReactions.push(this),Ie())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){if(!this.isDisposed){if(Ae(),this._isScheduled=!1,se(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&ke()}catch(e){this.reportExceptionInDerivation(e)}}_e()}},e.prototype.track=function(e){this.isDisposed&&console.warn("Reaction already disposed"),Ae();ke();this._isRunning=!0;var t=ce(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&le(this),ae(t)&&this.reportExceptionInDerivation(t.cause),_e()},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{if(me.disableErrorBoundaries)throw e;var r="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";me.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(r,e),ke()&&Re({type:"error",name:this.name,message:r,error:""+e}),me.globalReactionErrorHandlers.forEach(function(r){return r(e,t)})}},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Ae(),le(this),_e()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e[x]=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.trace=function(e){void 0===e&&(e=!1),pt(this,e)},e}();var Ce=100,Te=function(e){return e()};function Ie(){me.inBatch>0||me.isRunningReactions||Te(Ne)}function Ne(){me.isRunningReactions=!0;for(var e=me.pendingReactions,t=0;e.length>0;){++t===Ce&&(console.error("Reaction doesn't converge to a stable state after "+Ce+" iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var r=e.splice(0),n=0,o=r.length;n<o;n++)r[n].runReaction()}me.isRunningReactions=!1}var Ve=y("Reaction",je);function Pe(e){var t=Te;Te=function(r){return e(function(){return t(r)})}}function ke(){return!1}function Re(e){}function Be(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function Le(){u(!1)}function Me(e){return function(t,r,n){if(n){if(n.value)return{value:X(e,n.value),enumerable:!1,configurable:!0,writable:!0};var o=n.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return X(e,o.call(this))}}}return function(e){return function(t,r,n){Object.defineProperty(t,r,{configurable:!0,enumerable:!1,get:function(){},set:function(t){v(this,r,Ue(e,t))}})}}(e).apply(this,arguments)}}var Ue=function(e,t,r,n){return 1===arguments.length&&"function"==typeof e?X(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?X(e,t):1===arguments.length&&"string"==typeof e?Me(e):!0!==n?Me(t).apply(null,arguments):void v(e,t,X(e.name||t,r.value,this))};function Ge(e){return"function"==typeof e&&!0===e.isMobxAction}function Ke(e,t,r){v(e,t,X(t,r.bind(e)))}function ze(e,t){void 0===t&&(t=a);var r,n=t&&t.name||e.name||"Autorun@"+s();if(!t.scheduler&&!t.delay)r=new je(n,function(){this.track(u)},t.onError);else{var o=We(t),i=!1;r=new je(n,function(){i||(i=!0,o(function(){i=!1,r.isDisposed||r.track(u)}))},t.onError)}function u(){e(r)}return r.schedule(),r.getDisposer()}Ue.bound=function(e,t,r,n){return!0===n?(Ke(e,t,r.value),null):r?{configurable:!0,enumerable:!1,get:function(){return Ke(this,t,r.value||r.initializer.call(this)),this[t]},set:Le}:{enumerable:!1,configurable:!0,set:function(e){Ke(this,t,e)},get:function(){}}};var He=function(e){return e()};function We(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:He}function qe(e,t,r){return Xe("onBecomeObserved",e,t,r)}function Je(e,t,r){return Xe("onBecomeUnobserved",e,t,r)}function Xe(e,t,r,n){var o="string"==typeof r?Ht(t,r):Ht(t),i="string"==typeof r?n:r,a=e+"Listeners";return o[a]?o[a].add(i):o[a]=new Set([i]),"function"!=typeof o[e]?u(!1):function(){var e=o[a];e&&(e.delete(i),0===e.size&&delete o[a])}}function Ye(e,t,r,n){var o=Fe(n=R(n));return C(e),Lt(e,n.name,o.enhancer),t&&$e(e,t,r,o),e}function Fe(e){return e.defaultDecorator||(!1===e.deep?M:B)}function $e(e,t,r,n){Ae();try{for(var o in t){var i=Object.getOwnPropertyDescriptor(t,o);0;var a=r&&o in r?r[o]:i.get?W:n;0;var s=a(e,o,i,!0);s&&Object.defineProperty(e,o,s)}}finally{_e()}}function Qe(e,t){return Ze(Ht(e,t))}function Ze(e){var t,r,n={name:e.name};return e.observing&&e.observing.length>0&&(n.dependencies=(t=e.observing,r=[],t.forEach(function(e){-1===r.indexOf(e)&&r.push(e)}),r).map(Ze)),n}function et(e){var t,r={name:e.name};return(t=e).observers&&t.observers.size>0&&(r.observers=Array.from(function(e){return e.observers}(e)).map(et)),r}var tt=0;function rt(e){"function"==typeof e.cancel&&e.cancel()}function nt(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(!1===zt(e))return!1;if(!e[x].values.has(t))return!1;var r=Ht(e,t);return oe(r)}return oe(e)}function ot(e){return arguments.length>1?u(!1):nt(e)}function it(e,t){return null!==e&&void 0!==e&&(void 0!==t?!!zt(e)&&e[x].values.has(t):zt(e)||!!e[x]||w(e)||Ve(e)||oe(e))}function at(e){return 1!==arguments.length&&u(!1),it(e)}function st(e){return zt(e)?e[x].getKeys():Vt(e)?Array.from(e.keys()):Rt(e)?Array.from(e.keys()):jt(e)?e.map(function(e,t){return t}):u(!1)}function ut(e,t,r){if(2!==arguments.length||Rt(e))if(zt(e)){var n=e[x];n.values.get(t)?n.write(t,r):n.addObservableProp(t,r,n.defaultEnhancer)}else if(Vt(e))e.set(t,r);else if(Rt(e))e.add(t);else{if(!jt(e))return u(!1);"number"!=typeof t&&(t=parseInt(t,10)),c(t>=0,"Not a valid index: '"+t+"'"),Ae(),t>=e.length&&(e.length=t+1),e[t]=r,_e()}else{Ae();var o=t;try{for(var i in o)ut(e,i,o[i])}finally{_e()}}}function ct(e,t){return zt(e)?Wt(e).has(t):Vt(e)?e.has(t):Rt(e)?e.has(t):jt(e)?t>=0&&t<e.length:u(!1)}var lt={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function ft(e,t,r,n){return n.detectCycles&&e.set(t,r),r}function pt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=!1;"boolean"==typeof e[e.length-1]&&(r=e.pop());var n=function(e){switch(e.length){case 0:return me.trackingDerivation;case 1:return Ht(e[0]);case 2:return Ht(e[0],e[1])}}(e);if(!n)return u(!1);n.isTracing===ee.NONE&&console.log("[mobx.trace] '"+n.name+"' tracing enabled"),n.isTracing=r?ee.BREAK:ee.LOG}function ht(e,t){void 0===t&&(t=void 0),Ae();try{return e.apply(t)}finally{_e()}}function vt(e,t,r){var n;"number"==typeof r.timeout&&(n=setTimeout(function(){if(!i[x].isDisposed){i();var e=new Error("WHEN_TIMEOUT");if(!r.onError)throw e;r.onError(e)}},r.timeout)),r.name=r.name||"When@"+s();var o=X(r.name+"-effect",t),i=ze(function(t){e()&&(t.dispose(),n&&clearTimeout(n),o())},r);return i}function dt(e){return e[x]}var yt={has:function(e,t){if(t===x||"constructor"===t||t===_)return!0;var r=dt(e);return"string"==typeof t?r.has(t):t in e},get:function(e,t){if(t===x||"constructor"===t||t===_)return e[t];var r=dt(e),n=r.values.get(t);if(n instanceof O){var o=n.get();return void 0===o&&r.has(t),o}return"string"==typeof t&&r.has(t),e[t]},set:function(e,t,r){return"string"==typeof t&&(ut(e,t,r),!0)},deleteProperty:function(e,t){return"string"==typeof t&&(dt(e).remove(t),!0)},ownKeys:function(e){return dt(e).keysAtom.reportObserved(),Reflect.ownKeys(e)},preventExtensions:function(e){return u("Dynamic observable objects cannot be frozen"),!1}};function bt(e){return void 0!==e.interceptors&&e.interceptors.length>0}function gt(e,t){var r=e.interceptors||(e.interceptors=[]);return r.push(t),l(function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)})}function mt(e,t){var r=pe();try{var n=e.interceptors;if(n)for(var o=0,i=n.length;o<i&&(c(!(t=n[o](t))||t.type,"Intercept handlers should return nothing or a change object"),t);o++);return t}finally{he(r)}}function xt(e){return void 0!==e.changeListeners&&e.changeListeners.length>0}function Ot(e,t){var r=e.changeListeners||(e.changeListeners=[]);return r.push(t),l(function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)})}function wt(e,t){var r=pe(),n=e.changeListeners;if(n){for(var o=0,i=(n=n.slice()).length;o<i;o++)n[o](t);he(r)}}var St={get:function(e,t){return t===x?e[x]:"length"===t?e[x].getArrayLength():"number"==typeof t?_t.get.call(e,t):"string"!=typeof t||isNaN(t)?_t.hasOwnProperty(t)?_t[t]:e[t]:_t.get.call(e,parseInt(t))},set:function(e,t,r){return"length"===t?(e[x].setArrayLength(r),!0):"number"==typeof t?(_t.set.call(e,t,r),!0):!isNaN(t)&&(_t.set.call(e,parseInt(t),r),!0)},preventExtensions:function(e){return u("Observable arrays cannot be frozen"),!1}};var At=function(){function e(e,t,r){this.owned=r,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new O(e||"ObservableArray@"+s()),this.enhancer=function(r,n){return t(r,n,e+"[..]")}}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.dehanceValues=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},e.prototype.intercept=function(e){return gt(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Ot(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var r=new Array(e-t),n=0;n<e-t;n++)r[n]=void 0;this.spliceWithArray(t,0,r)}else this.spliceWithArray(e,t-e)},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=t},e.prototype.spliceWithArray=function(e,t,r){var n=this;ue(this.atom);var o=this.values.length;if(void 0===e?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),t=1===arguments.length?o-e:void 0===t||null===t?0:Math.max(0,Math.min(t,o-e)),void 0===r&&(r=i),bt(this)){var a=mt(this,{object:this.proxy,type:"splice",index:e,removedCount:t,added:r});if(!a)return i;t=a.removedCount,r=a.added}r=0===r.length?r:r.map(function(e){return n.enhancer(e,void 0)});var s=this.spliceItemsIntoValues(e,t,r);return 0===t&&0===r.length||this.notifyArraySplice(e,r,s),this.dehanceValues(s)},e.prototype.spliceItemsIntoValues=function(e,t,r){var o;if(r.length<1e4)return(o=this.values).splice.apply(o,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e}([e,t],r));var i=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(r,this.values.slice(e+t)),i},e.prototype.notifyArrayChildUpdate=function(e,t,r){var n=!this.owned&&!1,o=xt(this),i=o||n?{object:this.proxy,type:"update",index:e,newValue:t,oldValue:r}:null;this.atom.reportChanged(),o&&wt(this,i)},e.prototype.notifyArraySplice=function(e,t,r){var n=!this.owned&&!1,o=xt(this),i=o||n?{object:this.proxy,type:"splice",index:e,removed:r,added:t,removedCount:r.length,addedCount:t.length}:null;this.atom.reportChanged(),o&&wt(this,i)},e}(),_t={intercept:function(e){return this[x].intercept(e)},observe:function(e,t){return void 0===t&&(t=!1),this[x].observe(e,t)},clear:function(){return this.splice(0)},replace:function(e){var t=this[x];return t.spliceWithArray(0,t.values.length,e)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=this[x];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray(e);case 2:return o.spliceWithArray(e,t)}return o.spliceWithArray(e,t,r)},spliceWithArray:function(e,t,r){return this[x].spliceWithArray(e,t,r)},push:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this[x];return r.spliceWithArray(r.values.length,0,e),r.values.length},pop:function(){return this.splice(Math.max(this[x].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this[x];return r.spliceWithArray(0,0,e),r.values.length},reverse:function(){var e=this.slice();return e.reverse.apply(e,arguments)},sort:function(e){var t=this.slice();return t.sort.apply(t,arguments)},remove:function(e){var t=this[x],r=t.dehanceValues(t.values).indexOf(e);return r>-1&&(this.splice(r,1),!0)},get:function(e){var t=this[x];if(t){if(e<t.values.length)return t.atom.reportObserved(),t.dehanceValue(t.values[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},set:function(e,t){var r=this[x],n=r.values;if(e<n.length){ue(r.atom);var o=n[e];if(bt(r)){var i=mt(r,{type:"update",object:this,index:e,newValue:t});if(!i)return;t=i.newValue}(t=r.enhancer(t,o))!==o&&(n[e]=t,r.notifyArrayChildUpdate(e,t,o))}else{if(e!==n.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+n.length);r.spliceWithArray(e,0,[t])}}};["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach(function(e){_t[e]=function(){var t=this[x];t.atom.reportObserved();var r=t.dehanceValues(t.values);return r[e].apply(r,arguments)}});var Et,Dt=y("ObservableArrayAdministration",At);function jt(e){return p(e)&&Dt(e[x])}var Ct={},Tt=function(){function e(e,t,r){if(void 0===t&&(t=N),void 0===r&&(r="ObservableMap@"+s()),this.enhancer=t,this.name=r,this[Et]=Ct,this._keysAtom=S(this.name+".keys()"),this[Symbol.toStringTag]="Map","function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(e)}return e.prototype._has=function(e){return this._data.has(e)},e.prototype.has=function(e){return this._hasMap.has(e)?this._hasMap.get(e).get():this._updateHasMapEntry(e,!1).get()},e.prototype.set=function(e,t){var r=this._has(e);if(bt(this)){var n=mt(this,{type:r?"update":"add",object:this,newValue:t,name:e});if(!n)return this;t=n.newValue}return r?this._updateValue(e,t):this._addValue(e,t),this},e.prototype.delete=function(e){var t=this;if(bt(this)&&!(n=mt(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var r=xt(this),n=r?{type:"delete",object:this,oldValue:this._data.get(e).value,name:e}:null;return ht(function(){t._keysAtom.reportChanged(),t._updateHasMapEntry(e,!1),t._data.get(e).setNewValue(void 0),t._data.delete(e)}),r&&wt(this,n),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var r=this._hasMap.get(e);return r?r.setNewValue(t):(r=new te(t,V,this.name+"."+It(e)+"?",!1),this._hasMap.set(e,r)),r},e.prototype._updateValue=function(e,t){var r=this._data.get(e);if((t=r.prepareNewValue(t))!==me.UNCHANGED){var n=xt(this),o=n?{type:"update",object:this,oldValue:r.value,name:e,newValue:t}:null;0,r.setNewValue(t),n&&wt(this,o)}},e.prototype._addValue=function(e,t){var r=this;ue(this._keysAtom),ht(function(){var n=new te(t,r.enhancer,r.name+"."+It(e),!1);r._data.set(e,n),t=n.value,r._updateHasMapEntry(e,!0),r._keysAtom.reportChanged()});var n=xt(this),o=n?{type:"add",object:this,name:e,newValue:t}:null;n&&wt(this,o)},e.prototype.get=function(e){return this.has(e)?this.dehanceValue(this._data.get(e).get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},e.prototype.values=function(){var e=this,t=0,r=Array.from(this.keys());return Qt({next:function(){return t<r.length?{value:e.get(r[t++]),done:!1}:{done:!0}}})},e.prototype.entries=function(){var e=this,t=0,r=Array.from(this.keys());return Qt({next:function(){if(t<r.length){var n=r[t++];return{value:[n,e.get(n)],done:!1}}return{done:!0}}})},e.prototype[(Et=x,Symbol.iterator)]=function(){return this.entries()},e.prototype.forEach=function(e,t){var o,i;try{for(var a=r(this),s=a.next();!s.done;s=a.next()){var u=n(s.value,2),c=u[0],l=u[1];e.call(t,l,c,this)}}catch(e){o={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}},e.prototype.merge=function(e){var t=this;return Vt(e)&&(e=e.toJS()),ht(function(){h(e)?Object.keys(e).forEach(function(r){return t.set(r,e[r])}):Array.isArray(e)?e.forEach(function(e){var r=n(e,2),o=r[0],i=r[1];return t.set(o,i)}):b(e)?(e.constructor!==Map&&u("Cannot initialize from classes that inherit from Map: "+e.constructor.name),e.forEach(function(e,r){return t.set(r,e)})):null!==e&&void 0!==e&&u("Cannot initialize map from "+e)}),this},e.prototype.clear=function(){var e=this;ht(function(){fe(function(){var t,n;try{for(var o=r(e.keys()),i=o.next();!i.done;i=o.next()){var a=i.value;e.delete(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}})})},e.prototype.replace=function(e){var t=this;return ht(function(){var r,o=h(r=e)?Object.keys(r):Array.isArray(r)?r.map(function(e){return n(e,1)[0]}):b(r)||Vt(r)?Array.from(r.keys()):u("Cannot get keys from '"+r+"'");Array.from(t.keys()).filter(function(e){return-1===o.indexOf(e)}).forEach(function(e){return t.delete(e)}),t.merge(e)}),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.toPOJO=function(){var e,t,o={};try{for(var i=r(this),a=i.next();!a.done;a=i.next()){var s=n(a.value,2),u=s[0],c=s[1];o["symbol"==typeof u?u:It(u)]=c}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return o},e.prototype.toJS=function(){return new Map(this)},e.prototype.toJSON=function(){return this.toPOJO()},e.prototype.toString=function(){var e=this;return this.name+"[{ "+Array.from(this.keys()).map(function(t){return It(t)+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return Ot(this,e)},e.prototype.intercept=function(e){return gt(this,e)},e}();function It(e){return e&&e.toString?e.toString():new String(e).toString()}var Nt,Vt=y("ObservableMap",Tt),Pt={},kt=function(){function e(e,t,r){if(void 0===t&&(t=N),void 0===r&&(r="ObservableSet@"+s()),this.name=r,this[Nt]=Pt,this._data=new Set,this._atom=S(this.name),this[Symbol.toStringTag]="Set","function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(e,n){return t(e,n,r)},e&&this.replace(e)}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.clear=function(){var e=this;ht(function(){fe(function(){var t,n;try{for(var o=r(e._data.values()),i=o.next();!i.done;i=o.next()){var a=i.value;e.delete(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}})})},e.prototype.forEach=function(e,t){var n,o;try{for(var i=r(this),a=i.next();!a.done;a=i.next()){var s=a.value;e.call(t,s,s,this)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this;if((ue(this._atom),bt(this))&&!(n=mt(this,{type:"add",object:this,newValue:e})))return this;if(!this.has(e)){ht(function(){t._data.add(t.enhancer(e,void 0)),t._atom.reportChanged()});var r=xt(this),n=r?{type:"add",object:this,newValue:e}:null;0,r&&wt(this,n)}return this},e.prototype.delete=function(e){var t=this;if(bt(this)&&!(n=mt(this,{type:"delete",object:this,oldValue:e})))return!1;if(this.has(e)){var r=xt(this),n=r?{type:"delete",object:this,oldValue:e}:null;return ht(function(){t._atom.reportChanged(),t._data.delete(e)}),r&&wt(this,n),!0}return!1},e.prototype.has=function(e){return this._atom.reportObserved(),this._data.has(this.dehanceValue(e))},e.prototype.entries=function(){var e=0,t=Array.from(this.keys()),r=Array.from(this.values());return Qt({next:function(){var n=e;return e+=1,n<r.length?{value:[t[n],r[n]],done:!1}:{done:!0}}})},e.prototype.keys=function(){return this.values()},e.prototype.values=function(){this._atom.reportObserved();var e=this,t=0,r=Array.from(this._data.values());return Qt({next:function(){return t<r.length?{value:e.dehanceValue(r[t++]),done:!1}:{done:!0}}})},e.prototype.replace=function(e){var t=this;return Rt(e)&&(e=e.toJS()),ht(function(){Array.isArray(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):g(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!==e&&void 0!==e&&u("Cannot initialize set from "+e)}),this},e.prototype.observe=function(e,t){return Ot(this,e)},e.prototype.intercept=function(e){return gt(this,e)},e.prototype.toJS=function(){return new Set(this)},e.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},e.prototype[(Nt=x,Symbol.iterator)]=function(){return this.values()},e}(),Rt=y("ObservableSet",kt),Bt=function(){function e(e,t,r,n){void 0===t&&(t=new Map),this.target=e,this.values=t,this.name=r,this.defaultEnhancer=n,this.keysAtom=new O(r+".keys")}return e.prototype.read=function(e){return this.values.get(e).get()},e.prototype.write=function(e,t){var r=this.target,n=this.values.get(e);if(n instanceof ne)n.set(t);else{if(bt(this)){if(!(i=mt(this,{type:"update",object:this.proxy||r,name:e,newValue:t})))return;t=i.newValue}if((t=n.prepareNewValue(t))!==me.UNCHANGED){var o=xt(this),i=o?{type:"update",object:this.proxy||r,oldValue:n.value,name:e,newValue:t}:null;0,n.setNewValue(t),o&&wt(this,i)}}},e.prototype.has=function(e){var t=this.pendingKeys||(this.pendingKeys=new Map),r=t.get(e);if(r)return r.get();var n=!!this.values.get(e);return r=new te(n,V,this.name+"."+e.toString()+"?",!1),t.set(e,r),r.get()},e.prototype.addObservableProp=function(e,t,r){void 0===r&&(r=this.defaultEnhancer);var n=this.target;if(bt(this)){var o=mt(this,{object:this.proxy||n,name:e,type:"add",newValue:t});if(!o)return;t=o.newValue}var i=new te(t,r,this.name+"."+e,!1);this.values.set(e,i),t=i.value,Object.defineProperty(n,e,function(e){return Mt[e]||(Mt[e]={configurable:!0,enumerable:!0,get:function(){return this[x].read(e)},set:function(t){this[x].write(e,t)}})}(e)),this.notifyPropertyAddition(e,t)},e.prototype.addComputedProp=function(e,t,r){var n=this.target;r.name=r.name||this.name+"."+t,this.values.set(t,new ne(r)),(e===n||d(e,t))&&Object.defineProperty(e,t,function(e){return Ut[e]||(Ut[e]={configurable:!1,enumerable:!1,get:function(){return Gt(this).read(e)},set:function(t){Gt(this).write(e,t)}})}(t))},e.prototype.remove=function(e){if(this.values.has(e)){var t=this.target;if(bt(this))if(!(a=mt(this,{object:this.proxy||t,name:e,type:"remove"})))return;try{Ae();var r=xt(this),n=this.values.get(e),o=n&&n.get();if(n&&n.set(void 0),this.keysAtom.reportChanged(),this.values.delete(e),this.pendingKeys){var i=this.pendingKeys.get(e);i&&i.set(!1)}delete this.target[e];var a=r?{type:"remove",object:this.proxy||t,oldValue:o,name:e}:null;0,r&&wt(this,a)}finally{_e()}}},e.prototype.illegalAccess=function(e,t){console.warn("Property '"+t+"' of '"+e+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},e.prototype.observe=function(e,t){return Ot(this,e)},e.prototype.intercept=function(e){return gt(this,e)},e.prototype.notifyPropertyAddition=function(e,t){var r=xt(this),n=r?{type:"add",object:this.proxy||this.target,name:e,newValue:t}:null;if(r&&wt(this,n),this.pendingKeys){var o=this.pendingKeys.get(e);o&&o.set(!0)}this.keysAtom.reportChanged()},e.prototype.getKeys=function(){var e,t;this.keysAtom.reportObserved();var o=[];try{for(var i=r(this.values),a=i.next();!a.done;a=i.next()){var s=n(a.value,2),u=s[0];s[1]instanceof te&&o.push(u)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return o},e}();function Lt(e,t,r){if(void 0===t&&(t=""),void 0===r&&(r=N),Object.prototype.hasOwnProperty.call(e,x))return e[x];h(e)||(t=(e.constructor.name||"ObservableObject")+"@"+s()),t||(t="ObservableObject@"+s());var n=new Bt(e,new Map,t,r);return v(e,x,n),n}var Mt=Object.create(null),Ut=Object.create(null);function Gt(e){var t=e[x];return t||(C(e),e[x])}var Kt=y("ObservableObjectAdministration",Bt);function zt(e){return!!p(e)&&(C(e),Kt(e[x]))}function Ht(e,t){if("object"==typeof e&&null!==e){if(jt(e))return void 0!==t&&u(!1),e[x].atom;if(Rt(e))return e[x];if(Vt(e)){var r=e;return void 0===t?r._keysAtom:((n=r._data.get(t)||r._hasMap.get(t))||u(!1),n)}var n;if(C(e),t&&!e[x]&&e[t],zt(e))return t?((n=e[x].values.get(t))||u(!1),n):u(!1);if(w(e)||oe(e)||Ve(e))return e}else if("function"==typeof e&&Ve(e[x]))return e[x];return u(!1)}function Wt(e,t){return e||u("Expecting some object"),void 0!==t?Wt(Ht(e,t)):w(e)||oe(e)||Ve(e)?e:Vt(e)||Rt(e)?e:(C(e),e[x]?e[x]:void u(!1))}function qt(e,t){return(void 0!==t?Ht(e,t):zt(e)||Vt(e)||Rt(e)?Wt(e):Ht(e)).name}var Jt=Object.prototype.toString;function Xt(e,t){return Yt(e,t)}function Yt(e,t,r,n){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var o=typeof e;return("function"===o||"object"===o||"object"==typeof t)&&function(e,t,r,n){e=Ft(e),t=Ft(t);var o=Jt.call(e);if(o!==Jt.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t)}var i="[object Array]"===o;if(!i){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!("function"==typeof a&&a instanceof a&&"function"==typeof s&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}r=r||[],n=n||[];var u=r.length;for(;u--;)if(r[u]===e)return n[u]===t;if(r.push(e),n.push(t),i){if((u=e.length)!==t.length)return!1;for(;u--;)if(!Yt(e[u],t[u],r,n))return!1}else{var c=Object.keys(e),l=void 0;if(u=c.length,Object.keys(t).length!==u)return!1;for(;u--;)if(l=c[u],!$t(t,l)||!Yt(e[l],t[l],r,n))return!1}return r.pop(),n.pop(),!0}(e,t,r,n)}function Ft(e){return jt(e)?e.slice():b(e)||Vt(e)?Array.from(e.entries()):g(e)||Rt(e)?Array.from(e.entries()):e}function $t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Qt(e){return e[Symbol.iterator]=Zt,e}function Zt(){return this}if("undefined"==typeof Proxy||"undefined"==typeof Symbol)throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Be,extras:{getDebugName:qt},$mobx:x}),exports.Reaction=je,exports.untracked=fe,exports.createAtom=S,exports.spy=Be,exports.comparer=A,exports.isObservableObject=zt,exports.isBoxedObservable=re,exports.isObservableArray=jt,exports.ObservableMap=Tt,exports.isObservableMap=Vt,exports.ObservableSet=kt,exports.isObservableSet=Rt,exports.transaction=ht,exports.observable=z,exports.computed=J,exports.isObservable=at,exports.isObservableProp=function(e,t){return"string"!=typeof t?u(!1):it(e,t)},exports.isComputed=ot,exports.isComputedProp=function(e,t){return"string"!=typeof t?u(!1):nt(e,t)},exports.extendObservable=Ye,exports.observe=function(e,t,r,n){return"function"==typeof r?function(e,t,r,n){return Wt(e,t).observe(r,n)}(e,t,r,n):function(e,t,r){return Wt(e).observe(t,r)}(e,t,r)},exports.intercept=function(e,t,r){return"function"==typeof r?function(e,t,r){return Wt(e,t).intercept(r)}(e,t,r):function(e,t){return Wt(e).intercept(t)}(e,t)},exports.autorun=ze,exports.reaction=function(e,t,r){void 0===r&&(r=a);var n,o,i,u=r.name||"Reaction@"+s(),c=Ue(u,r.onError?(n=r.onError,o=t,function(){try{return o.apply(this,arguments)}catch(e){n.call(this,e)}}):t),l=!r.scheduler&&!r.delay,f=We(r),p=!0,h=!1,v=r.compareStructural?A.structural:r.equals||A.default,d=new je(u,function(){p||l?y():h||(h=!0,f(y))},r.onError);function y(){if(h=!1,!d.isDisposed){var t=!1;d.track(function(){var r=e(d);t=p||!v(i,r),i=r}),p&&r.fireImmediately&&c(i,d),p||!0!==t||c(i,d),p&&(p=!1)}}return d.schedule(),d.getDisposer()},exports.when=function(e,r,n){return 1===arguments.length||r&&"object"==typeof r?function(e,r){var n,o=new Promise(function(o,i){var a=vt(e,o,t({},r,{onError:i}));n=function(){a(),i("WHEN_CANCELLED")}});return o.cancel=n,o}(e,r):vt(e,r,n||{})},exports.action=Ue,exports.isAction=Ge,exports.runInAction=function(e,t){var r="string"==typeof e?e:e.name||"<unnamed action>",n="function"==typeof e?e:t;return Y(r,n,this,void 0)},exports.keys=st,exports.values=function(e){return zt(e)?st(e).map(function(t){return e[t]}):Vt(e)?st(e).map(function(t){return e.get(t)}):Rt(e)?Array.from(e.values()):jt(e)?e.slice():u(!1)},exports.entries=function(e){return zt(e)?st(e).map(function(t){return[t,e[t]]}):Vt(e)?st(e).map(function(t){return[t,e.get(t)]}):Rt(e)?Array.from(e.entries()):jt(e)?e.map(function(e,t){return[t,e]}):u(!1)},exports.set=ut,exports.remove=function(e,t){if(zt(e))e[x].remove(t);else if(Vt(e))e.delete(t);else if(Rt(e))e.delete(t);else{if(!jt(e))return u(!1);"number"!=typeof t&&(t=parseInt(t,10)),c(t>=0,"Not a valid index: '"+t+"'"),e.splice(t,1)}},exports.has=ct,exports.get=function(e,t){if(ct(e,t))return zt(e)?e[t]:Vt(e)?e.get(t):jt(e)?e[t]:u(!1)},exports.decorate=function(e,t){var r="function"==typeof e?e.prototype:e,n=function(e){var n=t[e];Array.isArray(n)||(n=[n]);var o=Object.getOwnPropertyDescriptor(r,e),i=n.reduce(function(t,n){return n(r,e,t)},o);i&&Object.defineProperty(r,e,i)};for(var o in t)n(o);return e},exports.configure=function(e){var t=e.enforceActions,r=e.computedRequiresReaction,n=e.disableErrorBoundaries,o=e.reactionScheduler;if(!0===e.isolateGlobalState&&((me.pendingReactions.length||me.inBatch||me.isRunningReactions)&&u("isolateGlobalState should be called before MobX is running any reactions"),ge=!0,be&&(0==--xe().__mobxInstanceCount&&(xe().__mobxGlobals=void 0),me=new ye)),void 0!==t){var i=void 0;switch(t){case!0:case"observed":i=!0;break;case!1:case"never":i=!1;break;case"strict":case"always":i="strict";break;default:u("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}me.enforceActions=i,me.allowStateChanges=!0!==i&&"strict"!==i}void 0!==r&&(me.computedRequiresReaction=!!r),void 0!==n&&(!0===n&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),me.disableErrorBoundaries=!!n),o&&Pe(o)},exports.onBecomeObserved=qe,exports.onBecomeUnobserved=Je,exports.flow=function(e){1!==arguments.length&&u("Flow expects one 1 argument and cannot be used as decorator");var t=e.name||"<unnamed flow>";return function(){var r,n=arguments,o=++tt,i=Ue(t+" - runid: "+o+" - init",e).apply(this,n),a=void 0,s=new Promise(function(e,n){var s=0;function u(e){var r;a=void 0;try{r=Ue(t+" - runid: "+o+" - yield "+s++,i.next).call(i,e)}catch(e){return n(e)}l(r)}function c(e){var r;a=void 0;try{r=Ue(t+" - runid: "+o+" - yield "+s++,i.throw).call(i,e)}catch(e){return n(e)}l(r)}function l(t){if(!t||"function"!=typeof t.then)return t.done?e(t.value):(a=Promise.resolve(t.value)).then(u,c);t.then(l,n)}r=n,u(void 0)});return s.cancel=Ue(t+" - runid: "+o+" - cancel",function(){try{a&&rt(a);var e=i.return(),t=Promise.resolve(e.value);t.then(f,f),rt(t),r(new Error("FLOW_CANCELLED"))}catch(e){r(e)}}),s}},exports.toJS=function(e,t){var r;return"boolean"==typeof t&&(t={detectCycles:t}),t||(t=lt),t.detectCycles=void 0===t.detectCycles?!0===t.recurseEverything:!0===t.detectCycles,t.detectCycles&&(r=new Map),function e(t,r,n){if(!r.recurseEverything&&!at(t))return t;if("object"!=typeof t)return t;if(null===t)return null;if(t instanceof Date)return t;if(re(t))return e(t.get(),r,n);if(at(t)&&st(t),!0===r.detectCycles&&null!==t&&n.has(t))return n.get(t);if(jt(t)||Array.isArray(t)){var o=ft(n,t,[],r),i=t.map(function(t){return e(t,r,n)});o.length=i.length;for(var a=0,s=i.length;a<s;a++)o[a]=i[a];return o}if(Rt(t)||Object.getPrototypeOf(t)===Set.prototype){if(!1===r.exportMapsAsObjects){var u=ft(n,t,new Set,r);return t.forEach(function(t){u.add(e(t,r,n))}),u}var c=ft(n,t,[],r);return t.forEach(function(t){c.push(e(t,r,n))}),c}if(Vt(t)||Object.getPrototypeOf(t)===Map.prototype){if(!1===r.exportMapsAsObjects){var l=ft(n,t,new Map,r);return t.forEach(function(t,o){l.set(o,e(t,r,n))}),l}var f=ft(n,t,{},r);return t.forEach(function(t,o){f[o]=e(t,r,n)}),f}var p=ft(n,t,{},r);for(var h in t)p[h]=e(t[h],r,n);return p}(e,t,r)},exports.trace=pt,exports.getDependencyTree=Qe,exports.getObserverTree=function(e,t){return et(Ht(e,t))},exports._resetGlobalState=function(){var e=new ye;for(var t in e)-1===de.indexOf(t)&&(me[t]=e[t]);me.allowStateChanges=!me.enforceActions},exports._getGlobalState=function(){return me},exports.getDebugName=qt,exports.getAtom=Ht,exports._getAdministration=Wt,exports._allowStateChanges=function(e,t){var r,n=$(e);try{r=t()}finally{Q(n)}return r},exports._allowStateChangesInsideComputed=function(e){var t,r=me.computationDepth;me.computationDepth=0;try{t=e()}finally{me.computationDepth=r}return t},exports.isArrayLike=function(e){return Array.isArray(e)||jt(e)},exports.$mobx=x,exports._isComputingDerivation=function(){return null!==me.trackingDerivation},exports.onReactionError=function(e){return me.globalReactionErrorHandlers.push(e),function(){var t=me.globalReactionErrorHandlers.indexOf(e);t>=0&&me.globalReactionErrorHandlers.splice(t,1)}},exports._interceptReads=function(e,t,r){var n;if(Vt(e)||jt(e)||re(e))n=Wt(e);else{if(!zt(e))return u(!1);if("string"!=typeof t)return u(!1);n=Wt(e,t)}return void 0!==n.dehancer?u(!1):(n.dehancer="function"==typeof t?t:r,function(){n.dehancer=void 0})};

@@ -1,1 +0,1 @@

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).mobx=e()}}(function(){return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return i(n||e)},l,l.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){(function(e,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};var i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};function o(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function a(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}var s="An invariant failed, however the error is obfuscated because this is an production build.",u=[];Object.freeze(u);var c={};function l(){return++Se.mobxGuid}function f(e){throw h(!1,e),"X"}function h(e,t){if(!e)throw new Error("[mobx] "+(t||s))}Object.freeze(c);function p(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var d=function(){};function v(e){return null!==e&&"object"==typeof e}function y(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function b(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function g(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return!n||!1!==n.configurable&&!1!==n.writable}function m(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return v(e)&&!0===e[n]}}function w(e){return e instanceof Map}function O(e){return e instanceof Set}function S(e){return null===e?null:"object"==typeof e?""+e:e}var A=Symbol("mobx administration"),_=function(){function e(e){void 0===e&&(e="Atom@"+l()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=n.IDerivationState.NOT_TRACKING}return e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},e.prototype.reportObserved=function(){return je(this)},e.prototype.reportChanged=function(){De(),function(e){if(e.lowestObserverState===n.IDerivationState.STALE)return;e.lowestObserverState=n.IDerivationState.STALE,e.observers.forEach(function(t){t.dependenciesState===n.IDerivationState.UP_TO_DATE&&(t.isTracing!==re.NONE&&Ce(t,e),t.onBecomeStale()),t.dependenciesState=n.IDerivationState.STALE})}(this),Te()},e.prototype.toString=function(){return this.name},e}(),E=m("Atom",_);function x(e,t,n){void 0===t&&(t=d),void 0===n&&(n=d);var r=new _(e);return t!==d&&Ye(r,t),n!==d&&Fe(r,n),r}var D={identity:function(e,t){return e===t},structural:function(e,t){return Ft(e,t)},default:function(e,t){return Object.is(e,t)}},T=Symbol("mobx did run lazy initializers"),j=Symbol("mobx pending decorators"),C={},I={};function N(e){if(!0!==e[T]){var t=e[j];if(t)for(var n in b(e,T,!0),t){var r=t[n];r.propertyCreator(e,r.prop,r.descriptor,r.decoratorTarget,r.decoratorArguments)}}}function V(e,t){return function(){var n,r=function(r,o,a,s){if(!0===s)return t(r,o,a,r,n),null;if(!Object.prototype.hasOwnProperty.call(r,j)){var u=r[j];b(r,j,i({},u))}return r[j][o]={prop:o,propertyCreator:t,descriptor:a,decoratorTarget:r,decoratorArguments:n},function(e,t){var n=t?C:I;return n[e]||(n[e]={configurable:!0,enumerable:t,get:function(){return N(this),this[e]},set:function(t){N(this),this[e]=t}})}(o,e)};return P(arguments)?(n=u,r.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),r)}}function P(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]||4===e.length&&!0===e[3]}function k(e,t,n){return ct(e)?e:Array.isArray(e)?W.array(e,{name:n}):y(e)?W.object(e,void 0,{name:n}):w(e)?W.map(e,{name:n}):O(e)?W.set(e,{name:n}):e}function R(e){return e}function L(t){h(t);var n=V(!0,function(e,n,r,i,o){var a=r?r.initializer?r.initializer.call(e):r.value:void 0;Ut(e).addObservableProp(n,a,t)}),r=(void 0!==e&&e.env,n);return r.enhancer=t,r}var B={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function M(e){return null===e||void 0===e?B:"string"==typeof e?{name:e,deep:!0,proxy:!0}:e}Object.freeze(B);var U=L(k),G=L(function(e,t,n){return void 0===e||null===e?e:qt(e)||It(e)||kt(e)||Bt(e)?e:Array.isArray(e)?W.array(e,{name:n,deep:!1}):y(e)?W.object(e,void 0,{name:n,deep:!1}):w(e)?W.map(e,{name:n,deep:!1}):O(e)?W.set(e,{name:n,deep:!1}):f(!1)}),K=L(R),z=L(function(e,t,n){return Ft(e,t)?t:e});function H(e){return e.defaultDecorator?e.defaultDecorator.enhancer:!1===e.deep?R:k}var q={box:function(e,t){arguments.length>2&&J("box");var n=M(t);return new ie(e,H(n),n.name,!0,n.equals)},array:function(e,t){arguments.length>2&&J("array");var n=M(t);return function(e,t,n,r){void 0===n&&(n="ObservableArray@"+l());void 0===r&&(r=!1);var i=new Dt(n,t,r);o=i.values,a=A,s=i,Object.defineProperty(o,a,{enumerable:!1,writable:!1,configurable:!0,value:s});var o,a,s;var u=new Proxy(i.values,xt);if(i.proxy=u,e&&e.length){var c=ee(!0);i.spliceWithArray(0,0,e),te(c)}return u}(e,H(n),n.name)},map:function(e,t){arguments.length>2&&J("map");var n=M(t);return new Pt(e,H(n),n.name)},set:function(e,t){arguments.length>2&&J("set");var n=M(t);return new Lt(e,H(n),n.name)},object:function(e,t,n){"string"==typeof arguments[1]&&J("object");var r=M(n);if(!1===r.proxy)return Qe({},e,t,r);var i=Ze(r),o=function(e){var t=new Proxy(e,mt);return e[A].proxy=t,t}(Qe({},void 0,void 0,r));return et(o,e,t,i),o},ref:K,shallow:G,deep:U,struct:z},W=function(e,t,n){if("string"==typeof arguments[1])return U.apply(null,arguments);if(ct(e))return e;var r=y(e)?W.object(e,t,n):Array.isArray(e)?W.array(e,t):w(e)?W.map(e,t):O(e)?W.set(e,t):e;if(r!==e)return r;f(!1)};function J(e){f("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}Object.keys(q).forEach(function(e){return W[e]=q[e]});var X=V(!1,function(e,t,n,r,o){var a=n.get,s=n.set,u=o[0]||{};Ut(e).addComputedProp(e,t,i({get:a,set:s,context:e},u))}),Y=X({equals:D.structural}),F=function(e,t,n){if("string"==typeof t)return X.apply(null,arguments);if(null!==e&&"object"==typeof e&&1===arguments.length)return X.apply(null,arguments);var r="object"==typeof t?t:{};return r.get=e,r.set="function"==typeof t?t:r.set,r.name=r.name||e.name||"",new ae(r)};function $(e,t){var n=function(){return Q(e,t,this,arguments)};return n.isMobxAction=!0,n}function Q(e,t,n,r){var i=function(e,t,n,r){var i=Be()&&!!e,o=0;var a=ve();De();var s=ee(!0);return{prevDerivation:a,prevAllowStateChanges:s,notifySpy:i,startTime:o}}(e),o=!0;try{var a=t.apply(n,r);return o=!1,a}finally{o?(Se.suppressReactionErrors=o,Z(i),Se.suppressReactionErrors=!1):Z(i)}}function Z(e){te(e.prevAllowStateChanges),Te(),ye(e.prevDerivation),e.notifySpy}function ee(e){var t=Se.allowStateChanges;return Se.allowStateChanges=e,t}function te(e){Se.allowStateChanges=e}F.struct=Y;var ne,re,ie=function(e){function t(t,n,r,i,o){void 0===r&&(r="ObservableValue@"+l()),void 0===i&&(i=!0),void 0===o&&(o=D.default);var a=e.call(this,r)||this;return a.enhancer=n,a.name=r,a.equals=o,a.hasUnreportedChange=!1,a.value=n(t,void 0,r),i&&Be(),a}return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.prototype.set=function(e){this.value;if((e=this.prepareNewValue(e))!==Se.UNCHANGED){Be();0,this.setNewValue(e)}},t.prototype.prepareNewValue=function(e){if(fe(this),wt(this)){var t=St(this,{object:this,type:"update",newValue:e});if(!t)return Se.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.equals(this.value,e)?Se.UNCHANGED:e},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),At(this)&&Et(this,{type:"update",object:this,newValue:e,oldValue:t})},t.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},t.prototype.intercept=function(e){return Ot(this,e)},t.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),_t(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t.prototype.valueOf=function(){return S(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(_),oe=m("ObservableValue",ie),ae=function(){function e(e){this.dependenciesState=n.IDerivationState.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=n.IDerivationState.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+l(),this.value=new ue(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=re.NONE,this.derivation=e.get,this.name=e.name||"ComputedValue@"+l(),e.set&&(this.setter=$(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?D.structural:D.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return e.prototype.onBecomeStale=function(){!function(e){if(e.lowestObserverState!==n.IDerivationState.UP_TO_DATE)return;e.lowestObserverState=n.IDerivationState.POSSIBLY_STALE,e.observers.forEach(function(t){t.dependenciesState===n.IDerivationState.UP_TO_DATE&&(t.dependenciesState=n.IDerivationState.POSSIBLY_STALE,t.isTracing!==re.NONE&&Ce(t,e),t.onBecomeStale())})}(this)},e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},e.prototype.get=function(){this.isComputing&&f("Cycle detected in computation "+this.name+": "+this.derivation),0!==Se.inBatch||0!==this.observers.size||this.keepAlive?(je(this),le(this)&&this.trackAndCompute()&&function(e){if(e.lowestObserverState===n.IDerivationState.STALE)return;e.lowestObserverState=n.IDerivationState.STALE,e.observers.forEach(function(t){t.dependenciesState===n.IDerivationState.POSSIBLY_STALE?t.dependenciesState=n.IDerivationState.STALE:t.dependenciesState===n.IDerivationState.UP_TO_DATE&&(e.lowestObserverState=n.IDerivationState.UP_TO_DATE)})}(this)):le(this)&&(this.warnAboutUntrackedRead(),De(),this.value=this.computeValue(!1),Te());var e=this.value;if(ce(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(ce(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){h(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else h(!1,!1)},e.prototype.trackAndCompute=function(){Be();var e=this.value,t=this.dependenciesState===n.IDerivationState.NOT_TRACKING,r=this.computeValue(!0),i=t||ce(e)||ce(r)||!this.equals(e,r);return i&&(this.value=r),i},e.prototype.computeValue=function(e){var t;if(this.isComputing=!0,Se.computationDepth++,e)t=he(this,this.derivation,this.scope);else if(!0===Se.disableErrorBoundaries)t=this.derivation.call(this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new ue(e)}return Se.computationDepth--,this.isComputing=!1,t},e.prototype.suspend=function(){this.keepAlive||(pe(this),this.value=void 0)},e.prototype.observe=function(e,t){var n=this,r=!0,i=void 0;return We(function(){var o=n.get();if(!r||t){var a=ve();e({type:"update",object:n,newValue:o,oldValue:i}),ye(a)}r=!1,i=o})},e.prototype.warnAboutUntrackedRead=function(){},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return S(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(),se=m("ComputedValue",ae);(ne=n.IDerivationState||(n.IDerivationState={}))[ne.NOT_TRACKING=-1]="NOT_TRACKING",ne[ne.UP_TO_DATE=0]="UP_TO_DATE",ne[ne.POSSIBLY_STALE=1]="POSSIBLY_STALE",ne[ne.STALE=2]="STALE",function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(re||(re={}));var ue=function(){return function(e){this.cause=e}}();function ce(e){return e instanceof ue}function le(e){switch(e.dependenciesState){case n.IDerivationState.UP_TO_DATE:return!1;case n.IDerivationState.NOT_TRACKING:case n.IDerivationState.STALE:return!0;case n.IDerivationState.POSSIBLY_STALE:for(var t=ve(),r=e.observing,i=r.length,o=0;o<i;o++){var a=r[o];if(se(a)){if(Se.disableErrorBoundaries)a.get();else try{a.get()}catch(e){return ye(t),!0}if(e.dependenciesState===n.IDerivationState.STALE)return ye(t),!0}}return be(e),ye(t),!1}}function fe(e){var t=e.observers.size>0;Se.computationDepth>0&&t&&f(!1),Se.allowStateChanges||!t&&"strict"!==Se.enforceActions||f(!1)}function he(e,t,r){be(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++Se.runId;var i,o=Se.trackingDerivation;if(Se.trackingDerivation=e,!0===Se.disableErrorBoundaries)i=t.call(r);else try{i=t.call(r)}catch(e){i=new ue(e)}return Se.trackingDerivation=o,function(e){for(var t=e.observing,r=e.observing=e.newObserving,i=n.IDerivationState.UP_TO_DATE,o=0,a=e.unboundDepsCount,s=0;s<a;s++){var u=r[s];0===u.diffValue&&(u.diffValue=1,o!==s&&(r[o]=u),o++),u.dependenciesState>i&&(i=u.dependenciesState)}r.length=o,e.newObserving=null,a=t.length;for(;a--;){var u=t[a];0===u.diffValue&&Ee(u,e),u.diffValue=0}for(;o--;){var u=r[o];1===u.diffValue&&(u.diffValue=0,_e(u,e))}i!==n.IDerivationState.UP_TO_DATE&&(e.dependenciesState=i,e.onBecomeStale())}(e),i}function pe(e){var t=e.observing;e.observing=[];for(var r=t.length;r--;)Ee(t[r],e);e.dependenciesState=n.IDerivationState.NOT_TRACKING}function de(e){var t=ve();try{return e()}finally{ye(t)}}function ve(){var e=Se.trackingDerivation;return Se.trackingDerivation=null,e}function ye(e){Se.trackingDerivation=e}function be(e){if(e.dependenciesState!==n.IDerivationState.UP_TO_DATE){e.dependenciesState=n.IDerivationState.UP_TO_DATE;for(var t=e.observing,r=t.length;r--;)t[r].lowestObserverState=n.IDerivationState.UP_TO_DATE}}var ge=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","disableErrorBoundaries","runId","UNCHANGED"],me=function(){return function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}}(),we=!0,Oe=!1,Se=function(){var e=Ae();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(we=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new me).version&&(we=!1),we?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new me):(setTimeout(function(){Oe||f("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new me)}();function Ae(){return"undefined"!=typeof window?window:t}function _e(e,t){e.observers.add(t),e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function Ee(e,t){e.observers.delete(t),0===e.observers.size&&xe(e)}function xe(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,Se.pendingUnobservations.push(e))}function De(){Se.inBatch++}function Te(){if(0==--Se.inBatch){Pe();for(var e=Se.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers.size&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof ae&&n.suspend())}Se.pendingUnobservations=[]}}function je(e){var t=Se.trackingDerivation;return null!==t?(t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e,e.isBeingObserved||(e.isBeingObserved=!0,e.onBecomeObserved())),!0):(0===e.observers.size&&Se.inBatch>0&&xe(e),!1)}function Ce(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===re.BREAK){var n=[];!function e(t,n,r){if(n.length>=1e3)return void n.push("(and many more)");n.push(""+new Array(r).join("\t")+t.name);t.dependencies&&t.dependencies.forEach(function(t){return e(t,n,r+1)})}(tt(e),n,1),new Function("debugger;\n/*\nTracing '"+e.name+"'\n\nYou are entering this break point because derivation '"+e.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof ae?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}var Ie=function(){function e(e,t,r){void 0===e&&(e="Reaction@"+l()),this.name=e,this.onInvalidate=t,this.errorHandler=r,this.observing=[],this.newObserving=[],this.dependenciesState=n.IDerivationState.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+l(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=re.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Se.pendingReactions.push(this),Pe())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){if(!this.isDisposed){if(De(),this._isScheduled=!1,le(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&Be()}catch(e){this.reportExceptionInDerivation(e)}}Te()}},e.prototype.track=function(e){De();Be();this._isRunning=!0;var t=he(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&pe(this),ce(t)&&this.reportExceptionInDerivation(t.cause),Te()},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{if(Se.disableErrorBoundaries)throw e;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";Se.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,e),Be()&&Me({type:"error",name:this.name,message:n,error:""+e}),Se.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(De(),pe(this),Te()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e[A]=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.trace=function(e){void 0===e&&(e=!1),vt(this,e)},e}();var Ne=100,Ve=function(e){return e()};function Pe(){Se.inBatch>0||Se.isRunningReactions||Ve(ke)}function ke(){Se.isRunningReactions=!0;for(var e=Se.pendingReactions,t=0;e.length>0;){++t===Ne&&(console.error("Reaction doesn't converge to a stable state after "+Ne+" iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction()}Se.isRunningReactions=!1}var Re=m("Reaction",Ie);function Le(e){var t=Ve;Ve=function(n){return e(function(){return t(n)})}}function Be(){return!1}function Me(e){}function Ue(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function Ge(){f(!1)}function Ke(e){return function(t,n,r){if(r){if(r.value)return{value:$(e,r.value),enumerable:!1,configurable:!0,writable:!0};var i=r.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return $(e,i.call(this))}}}return function(e){return function(t,n,r){Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:function(){},set:function(t){b(this,n,ze(e,t))}})}}(e).apply(this,arguments)}}var ze=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?$(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?$(e,t):1===arguments.length&&"string"==typeof e?Ke(e):!0!==r?Ke(t).apply(null,arguments):void b(e,t,$(e.name||t,n.value))};function He(e){return"function"==typeof e&&!0===e.isMobxAction}function qe(e,t,n){b(e,t,$(t,n.bind(e)))}function We(e,t){void 0===t&&(t=c);var n,r=t&&t.name||e.name||"Autorun@"+l();if(!t.scheduler&&!t.delay)n=new Ie(r,function(){this.track(a)},t.onError);else{var i=Xe(t),o=!1;n=new Ie(r,function(){o||(o=!0,i(function(){o=!1,n.isDisposed||n.track(a)}))},t.onError)}function a(){e(n)}return n.schedule(),n.getDisposer()}ze.bound=function(e,t,n,r){return!0===r?(qe(e,t,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return qe(this,t,n.value||n.initializer.call(this)),this[t]},set:Ge}:{enumerable:!1,configurable:!0,set:function(e){qe(this,t,e)},get:function(){}}};var Je=function(e){return e()};function Xe(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Je}function Ye(e,t,n){return $e("onBecomeObserved",e,t,n)}function Fe(e,t,n){return $e("onBecomeUnobserved",e,t,n)}function $e(e,t,n,r){var i="string"==typeof n?Wt(t,n):Wt(t),o="string"==typeof n?r:n,a=e+"Listeners";return i[a]?i[a].add(o):i[a]=new Set([o]),"function"!=typeof i[e]?f(!1):function(){var e=i[a];e&&(e.delete(o),0===e.size&&delete i[a])}}function Qe(e,t,n,r){var i=Ze(r=M(r));return N(e),Ut(e,r.name,i.enhancer),t&&et(e,t,n,i),e}function Ze(e){return e.defaultDecorator||(!1===e.deep?K:U)}function et(e,t,n,r){De();try{for(var i in t){var o=Object.getOwnPropertyDescriptor(t,i);0;var a=n&&i in n?n[i]:o.get?X:r;0;var s=a(e,i,o,!0);s&&Object.defineProperty(e,i,s)}}finally{Te()}}function tt(e,t){return nt(Wt(e,t))}function nt(e){var t,n,r={name:e.name};return e.observing&&e.observing.length>0&&(r.dependencies=(t=e.observing,n=[],t.forEach(function(e){-1===n.indexOf(e)&&n.push(e)}),n).map(nt)),r}function rt(e){var t,n={name:e.name};return(t=e).observers&&t.observers.size>0&&(n.observers=Array.from(function(e){return e.observers}(e)).map(rt)),n}var it=0;function ot(e){"function"==typeof e.cancel&&e.cancel()}function at(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(!1===qt(e))return!1;if(!e[A].values.has(t))return!1;var n=Wt(e,t);return se(n)}return se(e)}function st(e){return arguments.length>1?f(!1):at(e)}function ut(e,t){return null!==e&&void 0!==e&&(void 0!==t?!!qt(e)&&e[A].values.has(t):qt(e)||!!e[A]||E(e)||Re(e)||se(e))}function ct(e){return 1!==arguments.length&&f(!1),ut(e)}function lt(e){return qt(e)?e[A].getKeys():kt(e)?Array.from(e.keys()):Bt(e)?Array.from(e.keys()):It(e)?e.map(function(e,t){return t}):f(!1)}function ft(e,t,n){if(2!==arguments.length)if(qt(e)){var r=e[A];r.values.get(t)?r.write(t,n):r.addObservableProp(t,n,r.defaultEnhancer)}else if(kt(e))e.set(t,n);else{if(!It(e))return f(!1);"number"!=typeof t&&(t=parseInt(t,10)),h(t>=0,"Not a valid index: '"+t+"'"),De(),t>=e.length&&(e.length=t+1),e[t]=n,Te()}else{De();var i=t;try{for(var o in i)ft(e,o,i[o])}finally{Te()}}}function ht(e,t){return qt(e)?Jt(e).has(t):kt(e)?e.has(t):Bt(e)?e.has(t):It(e)?t>=0&&t<e.length:f(!1)}var pt={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function dt(e,t,n,r){return r.detectCycles&&e.set(t,n),n}function vt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!1;"boolean"==typeof e[e.length-1]&&(n=e.pop());var r=function(e){switch(e.length){case 0:return Se.trackingDerivation;case 1:return Wt(e[0]);case 2:return Wt(e[0],e[1])}}(e);if(!r)return f(!1);r.isTracing===re.NONE&&console.log("[mobx.trace] '"+r.name+"' tracing enabled"),r.isTracing=n?re.BREAK:re.LOG}function yt(e,t){void 0===t&&(t=void 0),De();try{return e.apply(t)}finally{Te()}}function bt(e,t,n){var r;"number"==typeof n.timeout&&(r=setTimeout(function(){if(!o[A].isDisposed){o();var e=new Error("WHEN_TIMEOUT");if(!n.onError)throw e;n.onError(e)}},n.timeout)),n.name=n.name||"When@"+l();var i=$(n.name+"-effect",t),o=We(function(t){e()&&(t.dispose(),r&&clearTimeout(r),i())},n);return o}function gt(e){return e[A]}var mt={has:function(e,t){if(t===A||"constructor"===t||t===T)return!0;var n=gt(e);return"string"==typeof t?n.has(t):t in e},get:function(e,t){if(t===A||"constructor"===t||t===T)return e[t];var n=gt(e),r=n.values.get(t);if(r instanceof _){var i=r.get();return void 0===i&&n.has(t),i}return"string"==typeof t&&n.has(t),e[t]},set:function(e,t,n){return"string"==typeof t&&(ft(e,t,n),!0)},deleteProperty:function(e,t){return"string"==typeof t&&(gt(e).remove(t),!0)},ownKeys:function(e){return gt(e).keysAtom.reportObserved(),Reflect.ownKeys(e)},preventExtensions:function(e){return f("Dynamic observable objects cannot be frozen"),!1}};function wt(e){return void 0!==e.interceptors&&e.interceptors.length>0}function Ot(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),p(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function St(e,t){var n=ve();try{var r=e.interceptors;if(r)for(var i=0,o=r.length;i<o&&(h(!(t=r[i](t))||t.type,"Intercept handlers should return nothing or a change object"),t);i++);return t}finally{ye(n)}}function At(e){return void 0!==e.changeListeners&&e.changeListeners.length>0}function _t(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),p(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Et(e,t){var n=ve(),r=e.changeListeners;if(r){for(var i=0,o=(r=r.slice()).length;i<o;i++)r[i](t);ye(n)}}var xt={get:function(e,t){return t===A?e[A]:"length"===t?e[A].getArrayLength():"number"==typeof t?Tt.get.call(e,t):"string"!=typeof t||isNaN(t)?Tt.hasOwnProperty(t)?Tt[t]:e[t]:Tt.get.call(e,parseInt(t))},set:function(e,t,n){return"length"===t?(e[A].setArrayLength(n),!0):"number"==typeof t?(Tt.set.call(e,t,n),!0):!isNaN(t)&&(Tt.set.call(e,parseInt(t),n),!0)},preventExtensions:function(e){return f("Observable arrays cannot be frozen"),!1}};var Dt=function(){function e(e,t,n){this.owned=n,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new _(e||"ObservableArray@"+l()),this.enhancer=function(n,r){return t(n,r,e+"[..]")}}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.dehanceValues=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},e.prototype.intercept=function(e){return Ot(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),_t(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray(t,0,n)}else this.spliceWithArray(e,t-e)},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=t},e.prototype.spliceWithArray=function(e,t,n){var r=this;fe(this.atom);var i=this.values.length;if(void 0===e?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:void 0===t||null===t?0:Math.max(0,Math.min(t,i-e)),void 0===n&&(n=u),wt(this)){var o=St(this,{object:this.proxy,type:"splice",index:e,removedCount:t,added:n});if(!o)return u;t=o.removedCount,n=o.added}n=0===n.length?n:n.map(function(e){return r.enhancer(e,void 0)});var a=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,a),this.dehanceValues(a)},e.prototype.spliceItemsIntoValues=function(e,t,n){var r;if(n.length<1e4)return(r=this.values).splice.apply(r,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e}([e,t],n));var i=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(n,this.values.slice(e+t)),i},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&!1,i=At(this),o=i||r?{object:this.proxy,type:"update",index:e,newValue:t,oldValue:n}:null;this.atom.reportChanged(),i&&Et(this,o)},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&!1,i=At(this),o=i||r?{object:this.proxy,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;this.atom.reportChanged(),i&&Et(this,o)},e}(),Tt={intercept:function(e){return this[A].intercept(e)},observe:function(e,t){return void 0===t&&(t=!1),this[A].observe(e,t)},clear:function(){return this.splice(0)},replace:function(e){var t=this[A];return t.spliceWithArray(0,t.values.length,e)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=this[A];switch(arguments.length){case 0:return[];case 1:return i.spliceWithArray(e);case 2:return i.spliceWithArray(e,t)}return i.spliceWithArray(e,t,n)},spliceWithArray:function(e,t,n){return this[A].spliceWithArray(e,t,n)},push:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this[A];return n.spliceWithArray(n.values.length,0,e),n.values.length},pop:function(){return this.splice(Math.max(this[A].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this[A];return n.spliceWithArray(0,0,e),n.values.length},reverse:function(){var e=this.slice();return e.reverse.apply(e,arguments)},sort:function(e){var t=this.slice();return t.sort.apply(t,arguments)},remove:function(e){var t=this[A],n=t.dehanceValues(t.values).indexOf(e);return n>-1&&(this.splice(n,1),!0)},get:function(e){var t=this[A];if(t){if(e<t.values.length)return t.atom.reportObserved(),t.dehanceValue(t.values[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},set:function(e,t){var n=this[A],r=n.values;if(e<r.length){fe(n.atom);var i=r[e];if(wt(n)){var o=St(n,{type:"update",object:this,index:e,newValue:t});if(!o)return;t=o.newValue}(t=n.enhancer(t,i))!==i&&(r[e]=t,n.notifyArrayChildUpdate(e,t,i))}else{if(e!==r.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+r.length);n.spliceWithArray(e,0,[t])}}};["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach(function(e){Tt[e]=function(){var t=this[A];t.atom.reportObserved();var n=t.dehanceValues(t.values);return n[e].apply(n,arguments)}});var jt,Ct=m("ObservableArrayAdministration",Dt);function It(e){return v(e)&&Ct(e[A])}var Nt,Vt={},Pt=function(){function e(e,t,n){if(void 0===t&&(t=k),void 0===n&&(n="ObservableMap@"+l()),this.enhancer=t,this.name=n,this[jt]=Vt,this._keysAtom=x(this.name+".keys()"),this[Symbol.toStringTag]="Map","function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(e)}return e.prototype._has=function(e){return this._data.has(e)},e.prototype.has=function(e){return this._hasMap.has(e)?this._hasMap.get(e).get():this._updateHasMapEntry(e,!1).get()},e.prototype.set=function(e,t){var n=this._has(e);if(wt(this)){var r=St(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this._updateValue(e,t):this._addValue(e,t),this},e.prototype.delete=function(e){var t=this;if(wt(this)&&!(r=St(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var n=At(this),r=n?{type:"delete",object:this,oldValue:this._data.get(e).value,name:e}:null;return yt(function(){t._keysAtom.reportChanged(),t._updateHasMapEntry(e,!1),t._data.get(e).setNewValue(void 0),t._data.delete(e)}),n&&Et(this,r),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap.get(e);return n?n.setNewValue(t):(n=new ie(t,R,this.name+"."+e+"?",!1),this._hasMap.set(e,n)),n},e.prototype._updateValue=function(e,t){var n=this._data.get(e);if((t=n.prepareNewValue(t))!==Se.UNCHANGED){var r=At(this),i=r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;0,n.setNewValue(t),r&&Et(this,i)}},e.prototype._addValue=function(e,t){var n=this;fe(this._keysAtom),yt(function(){var r=new ie(t,n.enhancer,n.name+"."+e,!1);n._data.set(e,r),t=r.value,n._updateHasMapEntry(e,!0),n._keysAtom.reportChanged()});var r=At(this),i=r?{type:"add",object:this,name:e,newValue:t}:null;r&&Et(this,i)},e.prototype.get=function(e){return this.has(e)?this.dehanceValue(this._data.get(e).get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},e.prototype.values=function(){var e=this,t=0,n=Array.from(this.keys());return en({next:function(){return t<n.length?{value:e.get(n[t++]),done:!1}:{done:!0}}})},e.prototype.entries=function(){var e=this,t=0,n=Array.from(this.keys());return en({next:function(){if(t<n.length){var r=n[t++];return{value:[r,e.get(r)],done:!1}}return{done:!0}}})},e.prototype[(jt=A,Symbol.iterator)]=function(){return this.entries()},e.prototype.forEach=function(e,t){var n,r;try{for(var i=o(this),s=i.next();!s.done;s=i.next()){var u=a(s.value,2),c=u[0],l=u[1];e.call(t,l,c,this)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype.merge=function(e){var t=this;return kt(e)&&(e=e.toJS()),yt(function(){if(y(e))Object.keys(e).forEach(function(n){return t.set(n,e[n])});else if(Array.isArray(e))e.forEach(function(e){var n=a(e,2),r=n[0],i=n[1];return t.set(r,i)});else if(w(e)){if(e.constructor!==Map)return f("Cannot initialize from classes that inherit from Map: "+e.constructor.name);e.forEach(function(e,n){return t.set(n,e)})}else null!==e&&void 0!==e&&f("Cannot initialize map from "+e)}),this},e.prototype.clear=function(){var e=this;yt(function(){de(function(){var t,n;try{for(var r=o(e.keys()),i=r.next();!i.done;i=r.next()){var a=i.value;e.delete(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}})})},e.prototype.replace=function(e){var t=this;return yt(function(){var n,r=y(n=e)?Object.keys(n):Array.isArray(n)?n.map(function(e){return a(e,1)[0]}):w(n)||kt(n)?Array.from(n.keys()):f("Cannot get keys from '"+n+"'");Array.from(t.keys()).filter(function(e){return-1===r.indexOf(e)}).forEach(function(e){return t.delete(e)}),t.merge(e)}),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.toPOJO=function(){var e,t,n={};try{for(var r=o(this),i=r.next();!i.done;i=r.next()){var s=a(i.value,2),u=s[0],c=s[1];n[""+u]=c}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n},e.prototype.toJS=function(){return new Map(this)},e.prototype.toJSON=function(){return this.toPOJO()},e.prototype.toString=function(){var e=this;return this.name+"[{ "+Array.from(this.keys()).map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return _t(this,e)},e.prototype.intercept=function(e){return Ot(this,e)},e}(),kt=m("ObservableMap",Pt),Rt={},Lt=function(){function e(e,t,n){if(void 0===t&&(t=k),void 0===n&&(n="ObservableSet@"+l()),this.name=n,this[Nt]=Rt,this._data=new Set,this._atom=x(this.name),this[Symbol.toStringTag]="Set","function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(e,r){return t(e,r,n)},e&&this.replace(e)}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.clear=function(){var e=this;yt(function(){de(function(){var t,n;try{for(var r=o(e._data.values()),i=r.next();!i.done;i=r.next()){var a=i.value;e.delete(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}})})},e.prototype.forEach=function(e,t){var n,r;try{for(var i=o(this),a=i.next();!a.done;a=i.next()){var s=a.value;e.call(t,s,s,this)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this;if((fe(this._atom),wt(this))&&!(r=St(this,{type:"add",object:this,newValue:e})))return this;if(!this.has(e)){yt(function(){t._data.add(t.enhancer(e,void 0)),t._atom.reportChanged()});var n=At(this),r=n?{type:"add",object:this,newValue:e}:null;0,n&&Et(this,r)}return this},e.prototype.delete=function(e){var t=this;if(wt(this)&&!(r=St(this,{type:"delete",object:this,oldValue:e})))return!1;if(this.has(e)){var n=At(this),r=n?{type:"delete",object:this,oldValue:e}:null;return yt(function(){t._atom.reportChanged(),t._data.delete(e)}),n&&Et(this,r),!0}return!1},e.prototype.has=function(e){return this._atom.reportObserved(),this._data.has(this.dehanceValue(e))},e.prototype.entries=function(){var e=0,t=Array.from(this.keys()),n=Array.from(this.values());return en({next:function(){var r=e;return e+=1,r<n.length?{value:[t[r],n[r]],done:!1}:{done:!0}}})},e.prototype.keys=function(){return this.values()},e.prototype.values=function(){this._atom.reportObserved();var e=this,t=0,n=Array.from(this._data.values());return en({next:function(){return t<n.length?{value:e.dehanceValue(n[t++]),done:!1}:{done:!0}}})},e.prototype.replace=function(e){var t=this;return Bt(e)&&(e=e.toJS()),yt(function(){Array.isArray(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):O(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!==e&&void 0!==e&&f("Cannot initialize set from "+e)}),this},e.prototype.observe=function(e,t){return _t(this,e)},e.prototype.intercept=function(e){return Ot(this,e)},e.prototype.toJS=function(){return new Set(this)},e.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},e.prototype[(Nt=A,Symbol.iterator)]=function(){return this.values()},e}(),Bt=m("ObservableSet",Lt),Mt=function(){function e(e,t,n,r){void 0===t&&(t=new Map),this.target=e,this.values=t,this.name=n,this.defaultEnhancer=r,this.keysAtom=new _(n+".keys")}return e.prototype.read=function(e){return this.values.get(e).get()},e.prototype.write=function(e,t){var n=this.target,r=this.values.get(e);if(r instanceof ae)r.set(t);else{if(wt(this)){if(!(o=St(this,{type:"update",object:this.proxy||n,name:e,newValue:t})))return;t=o.newValue}if((t=r.prepareNewValue(t))!==Se.UNCHANGED){var i=At(this),o=i?{type:"update",object:this.proxy||n,oldValue:r.value,name:e,newValue:t}:null;0,r.setNewValue(t),i&&Et(this,o)}}},e.prototype.has=function(e){var t=this.pendingKeys||(this.pendingKeys=new Map),n=t.get(e);if(n)return n.get();var r=!!this.values.get(e);return n=new ie(r,R,this.name+"."+e.toString()+"?",!1),t.set(e,n),n.get()},e.prototype.addObservableProp=function(e,t,n){void 0===n&&(n=this.defaultEnhancer);var r=this.target;if(wt(this)){var i=St(this,{object:this.proxy||r,name:e,type:"add",newValue:t});if(!i)return;t=i.newValue}var o=new ie(t,n,this.name+"."+e,!1);this.values.set(e,o),t=o.value,Object.defineProperty(r,e,function(e){return Gt[e]||(Gt[e]={configurable:!0,enumerable:!0,get:function(){return this[A].read(e)},set:function(t){this[A].write(e,t)}})}(e)),this.notifyPropertyAddition(e,t)},e.prototype.addComputedProp=function(e,t,n){var r=this.target;n.name=n.name||this.name+"."+t,this.values.set(t,new ae(n)),(e===r||g(e,t))&&Object.defineProperty(e,t,function(e){return Kt[e]||(Kt[e]={configurable:!1,enumerable:!1,get:function(){return zt(this).read(e)},set:function(t){zt(this).write(e,t)}})}(t))},e.prototype.remove=function(e){if(this.values.has(e)){var t=this.target;if(wt(this))if(!(a=St(this,{object:this.proxy||t,name:e,type:"remove"})))return;try{De();var n=At(this),r=this.values.get(e),i=r&&r.get();if(r&&r.set(void 0),this.keysAtom.reportChanged(),this.values.delete(e),this.pendingKeys){var o=this.pendingKeys.get(e);o&&o.set(!1)}delete this.target[e];var a=n?{type:"remove",object:this.proxy||t,oldValue:i,name:e}:null;0,n&&Et(this,a)}finally{Te()}}},e.prototype.illegalAccess=function(e,t){console.warn("Property '"+t+"' of '"+e+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},e.prototype.observe=function(e,t){return _t(this,e)},e.prototype.intercept=function(e){return Ot(this,e)},e.prototype.notifyPropertyAddition=function(e,t){var n=At(this),r=n?{type:"add",object:this.proxy||this.target,name:e,newValue:t}:null;if(n&&Et(this,r),this.pendingKeys){var i=this.pendingKeys.get(e);i&&i.set(!0)}this.keysAtom.reportChanged()},e.prototype.getKeys=function(){var e,t;this.keysAtom.reportObserved();var n=[];try{for(var r=o(this.values),i=r.next();!i.done;i=r.next()){var s=a(i.value,2),u=s[0];s[1]instanceof ie&&n.push(u)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n},e}();function Ut(e,t,n){if(void 0===t&&(t=""),void 0===n&&(n=k),Object.prototype.hasOwnProperty.call(e,A))return e[A];y(e)||(t=(e.constructor.name||"ObservableObject")+"@"+l()),t||(t="ObservableObject@"+l());var r=new Mt(e,new Map,t,n);return b(e,A,r),r}var Gt=Object.create(null),Kt=Object.create(null);function zt(e){var t=e[A];return t||(N(e),e[A])}var Ht=m("ObservableObjectAdministration",Mt);function qt(e){return!!v(e)&&(N(e),Ht(e[A]))}function Wt(e,t){if("object"==typeof e&&null!==e){if(It(e))return void 0!==t&&f(!1),e[A].atom;if(Bt(e))return e[A];if(kt(e)){var n=e;return void 0===t?n._keysAtom:((r=n._data.get(t)||n._hasMap.get(t))||f(!1),r)}var r;if(N(e),t&&!e[A]&&e[t],qt(e))return t?((r=e[A].values.get(t))||f(!1),r):f(!1);if(E(e)||se(e)||Re(e))return e}else if("function"==typeof e&&Re(e[A]))return e[A];return f(!1)}function Jt(e,t){return e||f("Expecting some object"),void 0!==t?Jt(Wt(e,t)):E(e)||se(e)||Re(e)?e:kt(e)||Bt(e)?e:(N(e),e[A]?e[A]:void f(!1))}function Xt(e,t){return(void 0!==t?Wt(e,t):qt(e)||kt(e)||Bt(e)?Jt(e):Wt(e)).name}var Yt=Object.prototype.toString;function Ft(e,t){return $t(e,t)}function $t(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&function(e,t,n,r){e=Qt(e),t=Qt(t);var i=Yt.call(e);if(i!==Yt.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t)}var o="[object Array]"===i;if(!o){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!("function"==typeof a&&a instanceof a&&"function"==typeof s&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],r=r||[];var u=n.length;for(;u--;)if(n[u]===e)return r[u]===t;if(n.push(e),r.push(t),o){if((u=e.length)!==t.length)return!1;for(;u--;)if(!$t(e[u],t[u],n,r))return!1}else{var c,l=Object.keys(e);if(u=l.length,Object.keys(t).length!==u)return!1;for(;u--;)if(c=l[u],!Zt(t,c)||!$t(e[c],t[c],n,r))return!1}return n.pop(),r.pop(),!0}(e,t,n,r)}function Qt(e){return It(e)?e.slice():w(e)||kt(e)?Array.from(e.entries()):O(e)||Bt(e)?Array.from(e.entries()):e}function Zt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function en(e){return e[Symbol.iterator]=tn,e}function tn(){return this}if("undefined"==typeof Proxy||"undefined"==typeof Symbol)throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Ue,extras:{getDebugName:Xt},$mobx:A}),n.Reaction=Ie,n.untracked=de,n.createAtom=x,n.spy=Ue,n.comparer=D,n.isObservableObject=qt,n.isBoxedObservable=oe,n.isObservableArray=It,n.ObservableMap=Pt,n.isObservableMap=kt,n.ObservableSet=Lt,n.isObservableSet=Bt,n.transaction=yt,n.observable=W,n.computed=F,n.isObservable=ct,n.isObservableProp=function(e,t){return"string"!=typeof t?f(!1):ut(e,t)},n.isComputed=st,n.isComputedProp=function(e,t){return"string"!=typeof t?f(!1):at(e,t)},n.extendObservable=Qe,n.observe=function(e,t,n,r){return"function"==typeof n?function(e,t,n,r){return Jt(e,t).observe(n,r)}(e,t,n,r):function(e,t,n){return Jt(e).observe(t,n)}(e,t,n)},n.intercept=function(e,t,n){return"function"==typeof n?function(e,t,n){return Jt(e,t).intercept(n)}(e,t,n):function(e,t){return Jt(e).intercept(t)}(e,t)},n.autorun=We,n.reaction=function(e,t,n){void 0===n&&(n=c);var r,i,o,a=n.name||"Reaction@"+l(),s=ze(a,n.onError?(r=n.onError,i=t,function(){try{return i.apply(this,arguments)}catch(e){r.call(this,e)}}):t),u=!n.scheduler&&!n.delay,f=Xe(n),h=!0,p=!1,d=n.compareStructural?D.structural:n.equals||D.default,v=new Ie(a,function(){h||u?y():p||(p=!0,f(y))},n.onError);function y(){if(p=!1,!v.isDisposed){var t=!1;v.track(function(){var n=e(v);t=h||!d(o,n),o=n}),h&&n.fireImmediately&&s(o,v),h||!0!==t||s(o,v),h&&(h=!1)}}return v.schedule(),v.getDisposer()},n.when=function(e,t,n){return 1===arguments.length||t&&"object"==typeof t?function(e,t){var n,r=new Promise(function(r,o){var a=bt(e,r,i({},t,{onError:o}));n=function(){a(),o("WHEN_CANCELLED")}});return r.cancel=n,r}(e,t):bt(e,t,n||{})},n.action=ze,n.isAction=He,n.runInAction=function(e,t){var n="string"==typeof e?e:e.name||"<unnamed action>",r="function"==typeof e?e:t;return Q(n,r,this,void 0)},n.keys=lt,n.values=function(e){return qt(e)?lt(e).map(function(t){return e[t]}):kt(e)?lt(e).map(function(t){return e.get(t)}):Bt(e)?Array.from(e.values()):It(e)?e.slice():f(!1)},n.entries=function(e){return qt(e)?lt(e).map(function(t){return[t,e[t]]}):kt(e)?lt(e).map(function(t){return[t,e.get(t)]}):Bt(e)?Array.from(e.entries()):It(e)?e.map(function(e,t){return[t,e]}):f(!1)},n.set=ft,n.remove=function(e,t){if(qt(e))e[A].remove(t);else if(kt(e))e.delete(t);else if(Bt(e))e.delete(t);else{if(!It(e))return f(!1);"number"!=typeof t&&(t=parseInt(t,10)),h(t>=0,"Not a valid index: '"+t+"'"),e.splice(t,1)}},n.has=ht,n.get=function(e,t){if(ht(e,t))return qt(e)?e[t]:kt(e)?e.get(t):It(e)?e[t]:f(!1)},n.decorate=function(e,t){var n="function"==typeof e?e.prototype:e,r=function(e){var r=t[e];Array.isArray(r)||(r=[r]);var i=Object.getOwnPropertyDescriptor(n,e),o=r.reduce(function(t,r){return r(n,e,t)},i);o&&Object.defineProperty(n,e,o)};for(var i in t)r(i);return e},n.configure=function(e){var t=e.enforceActions,n=e.computedRequiresReaction,r=e.disableErrorBoundaries,i=e.reactionScheduler;if(!0===e.isolateGlobalState&&((Se.pendingReactions.length||Se.inBatch||Se.isRunningReactions)&&f("isolateGlobalState should be called before MobX is running any reactions"),Oe=!0,we&&(0==--Ae().__mobxInstanceCount&&(Ae().__mobxGlobals=void 0),Se=new me)),void 0!==t){var o=void 0;switch(t){case!0:case"observed":o=!0;break;case!1:case"never":o=!1;break;case"strict":case"always":o="strict";break;default:f("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}Se.enforceActions=o,Se.allowStateChanges=!0!==o&&"strict"!==o}void 0!==n&&(Se.computedRequiresReaction=!!n),void 0!==r&&(!0===r&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),Se.disableErrorBoundaries=!!r),i&&Le(i)},n.onBecomeObserved=Ye,n.onBecomeUnobserved=Fe,n.flow=function(e){1!==arguments.length&&f("Flow expects one 1 argument and cannot be used as decorator");var t=e.name||"<unnamed flow>";return function(){var n,r=arguments,i=++it,o=ze(t+" - runid: "+i+" - init",e).apply(this,r),a=void 0,s=new Promise(function(e,r){var s=0;function u(e){var n;a=void 0;try{n=ze(t+" - runid: "+i+" - yield "+s++,o.next).call(o,e)}catch(e){return r(e)}l(n)}function c(e){var n;a=void 0;try{n=ze(t+" - runid: "+i+" - yield "+s++,o.throw).call(o,e)}catch(e){return r(e)}l(n)}function l(t){if(!t||"function"!=typeof t.then)return t.done?e(t.value):(a=Promise.resolve(t.value)).then(u,c);t.then(l,r)}n=r,u(void 0)});return s.cancel=ze(t+" - runid: "+i+" - cancel",function(){try{a&&ot(a);var e=o.return(),t=Promise.resolve(e.value);t.then(d,d),ot(t),n(new Error("FLOW_CANCELLED"))}catch(e){n(e)}}),s}},n.toJS=function(e,t){var n;return"boolean"==typeof t&&(t={detectCycles:t}),t||(t=pt),t.detectCycles=void 0===t.detectCycles?!0===t.recurseEverything:!0===t.detectCycles,t.detectCycles&&(n=new Map),function e(t,n,r){if(!n.recurseEverything&&!ct(t))return t;if("object"!=typeof t)return t;if(null===t)return null;if(t instanceof Date)return t;if(oe(t))return e(t.get(),n,r);if(ct(t)&&lt(t),!0===n.detectCycles&&null!==t&&r.has(t))return r.get(t);if(It(t)||Array.isArray(t)){var i=dt(r,t,[],n),o=t.map(function(t){return e(t,n,r)});i.length=o.length;for(var a=0,s=o.length;a<s;a++)i[a]=o[a];return i}if(Bt(t)||Object.getPrototypeOf(t)===Set.prototype){if(!1===n.exportMapsAsObjects){var u=dt(r,t,new Set,n);return t.forEach(function(t){u.add(e(t,n,r))}),u}var c=dt(r,t,[],n);return t.forEach(function(t){c.push(e(t,n,r))}),c}if(kt(t)||Object.getPrototypeOf(t)===Map.prototype){if(!1===n.exportMapsAsObjects){var l=dt(r,t,new Map,n);return t.forEach(function(t,i){l.set(i,e(t,n,r))}),l}var f=dt(r,t,{},n);return t.forEach(function(t,i){f[i]=e(t,n,r)}),f}var h=dt(r,t,{},n);for(var p in t)h[p]=e(t[p],n,r);return h}(e,t,n)},n.trace=vt,n.getDependencyTree=tt,n.getObserverTree=function(e,t){return rt(Wt(e,t))},n._resetGlobalState=function(){var e=new me;for(var t in e)-1===ge.indexOf(t)&&(Se[t]=e[t]);Se.allowStateChanges=!Se.enforceActions},n._getGlobalState=function(){return Se},n.getDebugName=Xt,n.getAtom=Wt,n._getAdministration=Jt,n._allowStateChanges=function(e,t){var n,r=ee(e);try{n=t()}finally{te(r)}return n},n._allowStateChangesInsideComputed=function(e){var t,n=Se.computationDepth;Se.computationDepth=0;try{t=e()}finally{Se.computationDepth=n}return t},n.isArrayLike=function(e){return Array.isArray(e)||It(e)},n.$mobx=A,n._isComputingDerivation=function(){return null!==Se.trackingDerivation},n.onReactionError=function(e){return Se.globalReactionErrorHandlers.push(e),function(){var t=Se.globalReactionErrorHandlers.indexOf(e);t>=0&&Se.globalReactionErrorHandlers.splice(t,1)}},n._interceptReads=function(e,t,n){var r;if(kt(e)||It(e)||oe(e))r=Jt(e);else{if(!qt(e))return f(!1);if("string"!=typeof t)return f(!1);r=Jt(e,t)}return void 0!==r.dehancer?f(!1):(r.dehancer="function"==typeof t?t:n,function(){r.dehancer=void 0})}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:2}],2:[function(e,t,n){var r,i,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,l=[],f=!1,h=-1;function p(){f&&c&&(f=!1,c.length?l=c.concat(l):h=-1,l.length&&d())}function d(){if(!f){var e=u(p);f=!0;for(var t=l.length;t;){for(c=l,l=[];++h<t;)c&&c[h].run();h=-1,t=l.length}c=null,f=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function v(e,t){this.fun=e,this.array=t}function y(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new v(e,t)),1!==l.length||f||u(d)},v.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}]},{},[1])(1)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).mobx=e()}}(function(){return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return i(n||e)},l,l.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){(function(e,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};var i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};function o(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function a(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}var s="An invariant failed, however the error is obfuscated because this is an production build.",u=[];Object.freeze(u);var c={};function l(){return++Se.mobxGuid}function f(e){throw h(!1,e),"X"}function h(e,t){if(!e)throw new Error("[mobx] "+(t||s))}Object.freeze(c);function p(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var d=function(){};function v(e){return null!==e&&"object"==typeof e}function y(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function b(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function g(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return!n||!1!==n.configurable&&!1!==n.writable}function m(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return v(e)&&!0===e[n]}}function w(e){return e instanceof Map}function O(e){return e instanceof Set}function S(e){return null===e?null:"object"==typeof e?""+e:e}var A=Symbol("mobx administration"),_=function(){function e(e){void 0===e&&(e="Atom@"+l()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=n.IDerivationState.NOT_TRACKING}return e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},e.prototype.reportObserved=function(){return je(this)},e.prototype.reportChanged=function(){De(),function(e){if(e.lowestObserverState===n.IDerivationState.STALE)return;e.lowestObserverState=n.IDerivationState.STALE,e.observers.forEach(function(t){t.dependenciesState===n.IDerivationState.UP_TO_DATE&&(t.isTracing!==re.NONE&&Ce(t,e),t.onBecomeStale()),t.dependenciesState=n.IDerivationState.STALE})}(this),Te()},e.prototype.toString=function(){return this.name},e}(),E=m("Atom",_);function x(e,t,n){void 0===t&&(t=d),void 0===n&&(n=d);var r=new _(e);return t!==d&&Ye(r,t),n!==d&&Fe(r,n),r}var D={identity:function(e,t){return e===t},structural:function(e,t){return $t(e,t)},default:function(e,t){return Object.is(e,t)}},T=Symbol("mobx did run lazy initializers"),j=Symbol("mobx pending decorators"),C={},I={};function N(e){if(!0!==e[T]){var t=e[j];if(t)for(var n in b(e,T,!0),t){var r=t[n];r.propertyCreator(e,r.prop,r.descriptor,r.decoratorTarget,r.decoratorArguments)}}}function V(e,t){return function(){var n,r=function(r,o,a,s){if(!0===s)return t(r,o,a,r,n),null;if(!Object.prototype.hasOwnProperty.call(r,j)){var u=r[j];b(r,j,i({},u))}return r[j][o]={prop:o,propertyCreator:t,descriptor:a,decoratorTarget:r,decoratorArguments:n},function(e,t){var n=t?C:I;return n[e]||(n[e]={configurable:!0,enumerable:t,get:function(){return N(this),this[e]},set:function(t){N(this),this[e]=t}})}(o,e)};return P(arguments)?(n=u,r.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),r)}}function P(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]||4===e.length&&!0===e[3]}function k(e,t,n){return ct(e)?e:Array.isArray(e)?W.array(e,{name:n}):y(e)?W.object(e,void 0,{name:n}):w(e)?W.map(e,{name:n}):O(e)?W.set(e,{name:n}):e}function R(e){return e}function L(t){h(t);var n=V(!0,function(e,n,r,i,o){var a=r?r.initializer?r.initializer.call(e):r.value:void 0;Gt(e).addObservableProp(n,a,t)}),r=(void 0!==e&&e.env,n);return r.enhancer=t,r}var B={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function M(e){return null===e||void 0===e?B:"string"==typeof e?{name:e,deep:!0,proxy:!0}:e}Object.freeze(B);var U=L(k),G=L(function(e,t,n){return void 0===e||null===e?e:Wt(e)||It(e)||Rt(e)||Mt(e)?e:Array.isArray(e)?W.array(e,{name:n,deep:!1}):y(e)?W.object(e,void 0,{name:n,deep:!1}):w(e)?W.map(e,{name:n,deep:!1}):O(e)?W.set(e,{name:n,deep:!1}):f(!1)}),K=L(R),z=L(function(e,t,n){return $t(e,t)?t:e});function H(e){return e.defaultDecorator?e.defaultDecorator.enhancer:!1===e.deep?R:k}var q={box:function(e,t){arguments.length>2&&J("box");var n=M(t);return new ie(e,H(n),n.name,!0,n.equals)},array:function(e,t){arguments.length>2&&J("array");var n=M(t);return function(e,t,n,r){void 0===n&&(n="ObservableArray@"+l());void 0===r&&(r=!1);var i=new Dt(n,t,r);o=i.values,a=A,s=i,Object.defineProperty(o,a,{enumerable:!1,writable:!1,configurable:!0,value:s});var o,a,s;var u=new Proxy(i.values,xt);if(i.proxy=u,e&&e.length){var c=ee(!0);i.spliceWithArray(0,0,e),te(c)}return u}(e,H(n),n.name)},map:function(e,t){arguments.length>2&&J("map");var n=M(t);return new Vt(e,H(n),n.name)},set:function(e,t){arguments.length>2&&J("set");var n=M(t);return new Bt(e,H(n),n.name)},object:function(e,t,n){"string"==typeof arguments[1]&&J("object");var r=M(n);if(!1===r.proxy)return Qe({},e,t,r);var i=Ze(r),o=function(e){var t=new Proxy(e,mt);return e[A].proxy=t,t}(Qe({},void 0,void 0,r));return et(o,e,t,i),o},ref:K,shallow:G,deep:U,struct:z},W=function(e,t,n){if("string"==typeof arguments[1])return U.apply(null,arguments);if(ct(e))return e;var r=y(e)?W.object(e,t,n):Array.isArray(e)?W.array(e,t):w(e)?W.map(e,t):O(e)?W.set(e,t):e;if(r!==e)return r;f(!1)};function J(e){f("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}Object.keys(q).forEach(function(e){return W[e]=q[e]});var X=V(!1,function(e,t,n,r,o){var a=n.get,s=n.set,u=o[0]||{};Gt(e).addComputedProp(e,t,i({get:a,set:s,context:e},u))}),Y=X({equals:D.structural}),F=function(e,t,n){if("string"==typeof t)return X.apply(null,arguments);if(null!==e&&"object"==typeof e&&1===arguments.length)return X.apply(null,arguments);var r="object"==typeof t?t:{};return r.get=e,r.set="function"==typeof t?t:r.set,r.name=r.name||e.name||"",new ae(r)};function $(e,t,n){var r=function(){return Q(e,t,n||this,arguments)};return r.isMobxAction=!0,r}function Q(e,t,n,r){var i=function(e,t,n,r){var i=Be()&&!!e,o=0;var a=ve();De();var s=ee(!0);return{prevDerivation:a,prevAllowStateChanges:s,notifySpy:i,startTime:o}}(e),o=!0;try{var a=t.apply(n,r);return o=!1,a}finally{o?(Se.suppressReactionErrors=o,Z(i),Se.suppressReactionErrors=!1):Z(i)}}function Z(e){te(e.prevAllowStateChanges),Te(),ye(e.prevDerivation),e.notifySpy}function ee(e){var t=Se.allowStateChanges;return Se.allowStateChanges=e,t}function te(e){Se.allowStateChanges=e}F.struct=Y;var ne,re,ie=function(e){function t(t,n,r,i,o){void 0===r&&(r="ObservableValue@"+l()),void 0===i&&(i=!0),void 0===o&&(o=D.default);var a=e.call(this,r)||this;return a.enhancer=n,a.name=r,a.equals=o,a.hasUnreportedChange=!1,a.value=n(t,void 0,r),i&&Be(),a}return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.prototype.set=function(e){this.value;if((e=this.prepareNewValue(e))!==Se.UNCHANGED){Be();0,this.setNewValue(e)}},t.prototype.prepareNewValue=function(e){if(fe(this),wt(this)){var t=St(this,{object:this,type:"update",newValue:e});if(!t)return Se.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.equals(this.value,e)?Se.UNCHANGED:e},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),At(this)&&Et(this,{type:"update",object:this,newValue:e,oldValue:t})},t.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},t.prototype.intercept=function(e){return Ot(this,e)},t.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),_t(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t.prototype.valueOf=function(){return S(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(_),oe=m("ObservableValue",ie),ae=function(){function e(e){this.dependenciesState=n.IDerivationState.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=n.IDerivationState.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+l(),this.value=new ue(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=re.NONE,this.derivation=e.get,this.name=e.name||"ComputedValue@"+l(),e.set&&(this.setter=$(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?D.structural:D.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return e.prototype.onBecomeStale=function(){!function(e){if(e.lowestObserverState!==n.IDerivationState.UP_TO_DATE)return;e.lowestObserverState=n.IDerivationState.POSSIBLY_STALE,e.observers.forEach(function(t){t.dependenciesState===n.IDerivationState.UP_TO_DATE&&(t.dependenciesState=n.IDerivationState.POSSIBLY_STALE,t.isTracing!==re.NONE&&Ce(t,e),t.onBecomeStale())})}(this)},e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},e.prototype.get=function(){this.isComputing&&f("Cycle detected in computation "+this.name+": "+this.derivation),0!==Se.inBatch||0!==this.observers.size||this.keepAlive?(je(this),le(this)&&this.trackAndCompute()&&function(e){if(e.lowestObserverState===n.IDerivationState.STALE)return;e.lowestObserverState=n.IDerivationState.STALE,e.observers.forEach(function(t){t.dependenciesState===n.IDerivationState.POSSIBLY_STALE?t.dependenciesState=n.IDerivationState.STALE:t.dependenciesState===n.IDerivationState.UP_TO_DATE&&(e.lowestObserverState=n.IDerivationState.UP_TO_DATE)})}(this)):le(this)&&(this.warnAboutUntrackedRead(),De(),this.value=this.computeValue(!1),Te());var e=this.value;if(ce(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(ce(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){h(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else h(!1,!1)},e.prototype.trackAndCompute=function(){Be();var e=this.value,t=this.dependenciesState===n.IDerivationState.NOT_TRACKING,r=this.computeValue(!0),i=t||ce(e)||ce(r)||!this.equals(e,r);return i&&(this.value=r),i},e.prototype.computeValue=function(e){var t;if(this.isComputing=!0,Se.computationDepth++,e)t=he(this,this.derivation,this.scope);else if(!0===Se.disableErrorBoundaries)t=this.derivation.call(this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new ue(e)}return Se.computationDepth--,this.isComputing=!1,t},e.prototype.suspend=function(){this.keepAlive||(pe(this),this.value=void 0)},e.prototype.observe=function(e,t){var n=this,r=!0,i=void 0;return We(function(){var o=n.get();if(!r||t){var a=ve();e({type:"update",object:n,newValue:o,oldValue:i}),ye(a)}r=!1,i=o})},e.prototype.warnAboutUntrackedRead=function(){},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return S(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(),se=m("ComputedValue",ae);(ne=n.IDerivationState||(n.IDerivationState={}))[ne.NOT_TRACKING=-1]="NOT_TRACKING",ne[ne.UP_TO_DATE=0]="UP_TO_DATE",ne[ne.POSSIBLY_STALE=1]="POSSIBLY_STALE",ne[ne.STALE=2]="STALE",function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(re||(re={}));var ue=function(){return function(e){this.cause=e}}();function ce(e){return e instanceof ue}function le(e){switch(e.dependenciesState){case n.IDerivationState.UP_TO_DATE:return!1;case n.IDerivationState.NOT_TRACKING:case n.IDerivationState.STALE:return!0;case n.IDerivationState.POSSIBLY_STALE:for(var t=ve(),r=e.observing,i=r.length,o=0;o<i;o++){var a=r[o];if(se(a)){if(Se.disableErrorBoundaries)a.get();else try{a.get()}catch(e){return ye(t),!0}if(e.dependenciesState===n.IDerivationState.STALE)return ye(t),!0}}return be(e),ye(t),!1}}function fe(e){var t=e.observers.size>0;Se.computationDepth>0&&t&&f(!1),Se.allowStateChanges||!t&&"strict"!==Se.enforceActions||f(!1)}function he(e,t,r){be(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++Se.runId;var i,o=Se.trackingDerivation;if(Se.trackingDerivation=e,!0===Se.disableErrorBoundaries)i=t.call(r);else try{i=t.call(r)}catch(e){i=new ue(e)}return Se.trackingDerivation=o,function(e){for(var t=e.observing,r=e.observing=e.newObserving,i=n.IDerivationState.UP_TO_DATE,o=0,a=e.unboundDepsCount,s=0;s<a;s++){var u=r[s];0===u.diffValue&&(u.diffValue=1,o!==s&&(r[o]=u),o++),u.dependenciesState>i&&(i=u.dependenciesState)}r.length=o,e.newObserving=null,a=t.length;for(;a--;){var u=t[a];0===u.diffValue&&Ee(u,e),u.diffValue=0}for(;o--;){var u=r[o];1===u.diffValue&&(u.diffValue=0,_e(u,e))}i!==n.IDerivationState.UP_TO_DATE&&(e.dependenciesState=i,e.onBecomeStale())}(e),i}function pe(e){var t=e.observing;e.observing=[];for(var r=t.length;r--;)Ee(t[r],e);e.dependenciesState=n.IDerivationState.NOT_TRACKING}function de(e){var t=ve();try{return e()}finally{ye(t)}}function ve(){var e=Se.trackingDerivation;return Se.trackingDerivation=null,e}function ye(e){Se.trackingDerivation=e}function be(e){if(e.dependenciesState!==n.IDerivationState.UP_TO_DATE){e.dependenciesState=n.IDerivationState.UP_TO_DATE;for(var t=e.observing,r=t.length;r--;)t[r].lowestObserverState=n.IDerivationState.UP_TO_DATE}}var ge=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","disableErrorBoundaries","runId","UNCHANGED"],me=function(){return function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}}(),we=!0,Oe=!1,Se=function(){var e=Ae();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(we=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new me).version&&(we=!1),we?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new me):(setTimeout(function(){Oe||f("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new me)}();function Ae(){return"undefined"!=typeof window?window:t}function _e(e,t){e.observers.add(t),e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function Ee(e,t){e.observers.delete(t),0===e.observers.size&&xe(e)}function xe(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,Se.pendingUnobservations.push(e))}function De(){Se.inBatch++}function Te(){if(0==--Se.inBatch){Pe();for(var e=Se.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers.size&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof ae&&n.suspend())}Se.pendingUnobservations=[]}}function je(e){var t=Se.trackingDerivation;return null!==t?(t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e,e.isBeingObserved||(e.isBeingObserved=!0,e.onBecomeObserved())),!0):(0===e.observers.size&&Se.inBatch>0&&xe(e),!1)}function Ce(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===re.BREAK){var n=[];!function e(t,n,r){if(n.length>=1e3)return void n.push("(and many more)");n.push(""+new Array(r).join("\t")+t.name);t.dependencies&&t.dependencies.forEach(function(t){return e(t,n,r+1)})}(tt(e),n,1),new Function("debugger;\n/*\nTracing '"+e.name+"'\n\nYou are entering this break point because derivation '"+e.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof ae?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}var Ie=function(){function e(e,t,r){void 0===e&&(e="Reaction@"+l()),this.name=e,this.onInvalidate=t,this.errorHandler=r,this.observing=[],this.newObserving=[],this.dependenciesState=n.IDerivationState.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+l(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=re.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Se.pendingReactions.push(this),Pe())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){if(!this.isDisposed){if(De(),this._isScheduled=!1,le(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&Be()}catch(e){this.reportExceptionInDerivation(e)}}Te()}},e.prototype.track=function(e){this.isDisposed&&console.warn("Reaction already disposed"),De();Be();this._isRunning=!0;var t=he(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&pe(this),ce(t)&&this.reportExceptionInDerivation(t.cause),Te()},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{if(Se.disableErrorBoundaries)throw e;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";Se.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,e),Be()&&Me({type:"error",name:this.name,message:n,error:""+e}),Se.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(De(),pe(this),Te()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e[A]=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.trace=function(e){void 0===e&&(e=!1),vt(this,e)},e}();var Ne=100,Ve=function(e){return e()};function Pe(){Se.inBatch>0||Se.isRunningReactions||Ve(ke)}function ke(){Se.isRunningReactions=!0;for(var e=Se.pendingReactions,t=0;e.length>0;){++t===Ne&&(console.error("Reaction doesn't converge to a stable state after "+Ne+" iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction()}Se.isRunningReactions=!1}var Re=m("Reaction",Ie);function Le(e){var t=Ve;Ve=function(n){return e(function(){return t(n)})}}function Be(){return!1}function Me(e){}function Ue(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function Ge(){f(!1)}function Ke(e){return function(t,n,r){if(r){if(r.value)return{value:$(e,r.value),enumerable:!1,configurable:!0,writable:!0};var i=r.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return $(e,i.call(this))}}}return function(e){return function(t,n,r){Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:function(){},set:function(t){b(this,n,ze(e,t))}})}}(e).apply(this,arguments)}}var ze=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?$(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?$(e,t):1===arguments.length&&"string"==typeof e?Ke(e):!0!==r?Ke(t).apply(null,arguments):void b(e,t,$(e.name||t,n.value,this))};function He(e){return"function"==typeof e&&!0===e.isMobxAction}function qe(e,t,n){b(e,t,$(t,n.bind(e)))}function We(e,t){void 0===t&&(t=c);var n,r=t&&t.name||e.name||"Autorun@"+l();if(!t.scheduler&&!t.delay)n=new Ie(r,function(){this.track(a)},t.onError);else{var i=Xe(t),o=!1;n=new Ie(r,function(){o||(o=!0,i(function(){o=!1,n.isDisposed||n.track(a)}))},t.onError)}function a(){e(n)}return n.schedule(),n.getDisposer()}ze.bound=function(e,t,n,r){return!0===r?(qe(e,t,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return qe(this,t,n.value||n.initializer.call(this)),this[t]},set:Ge}:{enumerable:!1,configurable:!0,set:function(e){qe(this,t,e)},get:function(){}}};var Je=function(e){return e()};function Xe(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Je}function Ye(e,t,n){return $e("onBecomeObserved",e,t,n)}function Fe(e,t,n){return $e("onBecomeUnobserved",e,t,n)}function $e(e,t,n,r){var i="string"==typeof n?Jt(t,n):Jt(t),o="string"==typeof n?r:n,a=e+"Listeners";return i[a]?i[a].add(o):i[a]=new Set([o]),"function"!=typeof i[e]?f(!1):function(){var e=i[a];e&&(e.delete(o),0===e.size&&delete i[a])}}function Qe(e,t,n,r){var i=Ze(r=M(r));return N(e),Gt(e,r.name,i.enhancer),t&&et(e,t,n,i),e}function Ze(e){return e.defaultDecorator||(!1===e.deep?K:U)}function et(e,t,n,r){De();try{for(var i in t){var o=Object.getOwnPropertyDescriptor(t,i);0;var a=n&&i in n?n[i]:o.get?X:r;0;var s=a(e,i,o,!0);s&&Object.defineProperty(e,i,s)}}finally{Te()}}function tt(e,t){return nt(Jt(e,t))}function nt(e){var t,n,r={name:e.name};return e.observing&&e.observing.length>0&&(r.dependencies=(t=e.observing,n=[],t.forEach(function(e){-1===n.indexOf(e)&&n.push(e)}),n).map(nt)),r}function rt(e){var t,n={name:e.name};return(t=e).observers&&t.observers.size>0&&(n.observers=Array.from(function(e){return e.observers}(e)).map(rt)),n}var it=0;function ot(e){"function"==typeof e.cancel&&e.cancel()}function at(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(!1===Wt(e))return!1;if(!e[A].values.has(t))return!1;var n=Jt(e,t);return se(n)}return se(e)}function st(e){return arguments.length>1?f(!1):at(e)}function ut(e,t){return null!==e&&void 0!==e&&(void 0!==t?!!Wt(e)&&e[A].values.has(t):Wt(e)||!!e[A]||E(e)||Re(e)||se(e))}function ct(e){return 1!==arguments.length&&f(!1),ut(e)}function lt(e){return Wt(e)?e[A].getKeys():Rt(e)?Array.from(e.keys()):Mt(e)?Array.from(e.keys()):It(e)?e.map(function(e,t){return t}):f(!1)}function ft(e,t,n){if(2!==arguments.length||Mt(e))if(Wt(e)){var r=e[A];r.values.get(t)?r.write(t,n):r.addObservableProp(t,n,r.defaultEnhancer)}else if(Rt(e))e.set(t,n);else if(Mt(e))e.add(t);else{if(!It(e))return f(!1);"number"!=typeof t&&(t=parseInt(t,10)),h(t>=0,"Not a valid index: '"+t+"'"),De(),t>=e.length&&(e.length=t+1),e[t]=n,Te()}else{De();var i=t;try{for(var o in i)ft(e,o,i[o])}finally{Te()}}}function ht(e,t){return Wt(e)?Xt(e).has(t):Rt(e)?e.has(t):Mt(e)?e.has(t):It(e)?t>=0&&t<e.length:f(!1)}var pt={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function dt(e,t,n,r){return r.detectCycles&&e.set(t,n),n}function vt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!1;"boolean"==typeof e[e.length-1]&&(n=e.pop());var r=function(e){switch(e.length){case 0:return Se.trackingDerivation;case 1:return Jt(e[0]);case 2:return Jt(e[0],e[1])}}(e);if(!r)return f(!1);r.isTracing===re.NONE&&console.log("[mobx.trace] '"+r.name+"' tracing enabled"),r.isTracing=n?re.BREAK:re.LOG}function yt(e,t){void 0===t&&(t=void 0),De();try{return e.apply(t)}finally{Te()}}function bt(e,t,n){var r;"number"==typeof n.timeout&&(r=setTimeout(function(){if(!o[A].isDisposed){o();var e=new Error("WHEN_TIMEOUT");if(!n.onError)throw e;n.onError(e)}},n.timeout)),n.name=n.name||"When@"+l();var i=$(n.name+"-effect",t),o=We(function(t){e()&&(t.dispose(),r&&clearTimeout(r),i())},n);return o}function gt(e){return e[A]}var mt={has:function(e,t){if(t===A||"constructor"===t||t===T)return!0;var n=gt(e);return"string"==typeof t?n.has(t):t in e},get:function(e,t){if(t===A||"constructor"===t||t===T)return e[t];var n=gt(e),r=n.values.get(t);if(r instanceof _){var i=r.get();return void 0===i&&n.has(t),i}return"string"==typeof t&&n.has(t),e[t]},set:function(e,t,n){return"string"==typeof t&&(ft(e,t,n),!0)},deleteProperty:function(e,t){return"string"==typeof t&&(gt(e).remove(t),!0)},ownKeys:function(e){return gt(e).keysAtom.reportObserved(),Reflect.ownKeys(e)},preventExtensions:function(e){return f("Dynamic observable objects cannot be frozen"),!1}};function wt(e){return void 0!==e.interceptors&&e.interceptors.length>0}function Ot(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),p(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function St(e,t){var n=ve();try{var r=e.interceptors;if(r)for(var i=0,o=r.length;i<o&&(h(!(t=r[i](t))||t.type,"Intercept handlers should return nothing or a change object"),t);i++);return t}finally{ye(n)}}function At(e){return void 0!==e.changeListeners&&e.changeListeners.length>0}function _t(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),p(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Et(e,t){var n=ve(),r=e.changeListeners;if(r){for(var i=0,o=(r=r.slice()).length;i<o;i++)r[i](t);ye(n)}}var xt={get:function(e,t){return t===A?e[A]:"length"===t?e[A].getArrayLength():"number"==typeof t?Tt.get.call(e,t):"string"!=typeof t||isNaN(t)?Tt.hasOwnProperty(t)?Tt[t]:e[t]:Tt.get.call(e,parseInt(t))},set:function(e,t,n){return"length"===t?(e[A].setArrayLength(n),!0):"number"==typeof t?(Tt.set.call(e,t,n),!0):!isNaN(t)&&(Tt.set.call(e,parseInt(t),n),!0)},preventExtensions:function(e){return f("Observable arrays cannot be frozen"),!1}};var Dt=function(){function e(e,t,n){this.owned=n,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new _(e||"ObservableArray@"+l()),this.enhancer=function(n,r){return t(n,r,e+"[..]")}}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.dehanceValues=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},e.prototype.intercept=function(e){return Ot(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),_t(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray(t,0,n)}else this.spliceWithArray(e,t-e)},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=t},e.prototype.spliceWithArray=function(e,t,n){var r=this;fe(this.atom);var i=this.values.length;if(void 0===e?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:void 0===t||null===t?0:Math.max(0,Math.min(t,i-e)),void 0===n&&(n=u),wt(this)){var o=St(this,{object:this.proxy,type:"splice",index:e,removedCount:t,added:n});if(!o)return u;t=o.removedCount,n=o.added}n=0===n.length?n:n.map(function(e){return r.enhancer(e,void 0)});var a=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,a),this.dehanceValues(a)},e.prototype.spliceItemsIntoValues=function(e,t,n){var r;if(n.length<1e4)return(r=this.values).splice.apply(r,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e}([e,t],n));var i=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(n,this.values.slice(e+t)),i},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&!1,i=At(this),o=i||r?{object:this.proxy,type:"update",index:e,newValue:t,oldValue:n}:null;this.atom.reportChanged(),i&&Et(this,o)},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&!1,i=At(this),o=i||r?{object:this.proxy,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;this.atom.reportChanged(),i&&Et(this,o)},e}(),Tt={intercept:function(e){return this[A].intercept(e)},observe:function(e,t){return void 0===t&&(t=!1),this[A].observe(e,t)},clear:function(){return this.splice(0)},replace:function(e){var t=this[A];return t.spliceWithArray(0,t.values.length,e)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=this[A];switch(arguments.length){case 0:return[];case 1:return i.spliceWithArray(e);case 2:return i.spliceWithArray(e,t)}return i.spliceWithArray(e,t,n)},spliceWithArray:function(e,t,n){return this[A].spliceWithArray(e,t,n)},push:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this[A];return n.spliceWithArray(n.values.length,0,e),n.values.length},pop:function(){return this.splice(Math.max(this[A].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this[A];return n.spliceWithArray(0,0,e),n.values.length},reverse:function(){var e=this.slice();return e.reverse.apply(e,arguments)},sort:function(e){var t=this.slice();return t.sort.apply(t,arguments)},remove:function(e){var t=this[A],n=t.dehanceValues(t.values).indexOf(e);return n>-1&&(this.splice(n,1),!0)},get:function(e){var t=this[A];if(t){if(e<t.values.length)return t.atom.reportObserved(),t.dehanceValue(t.values[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},set:function(e,t){var n=this[A],r=n.values;if(e<r.length){fe(n.atom);var i=r[e];if(wt(n)){var o=St(n,{type:"update",object:this,index:e,newValue:t});if(!o)return;t=o.newValue}(t=n.enhancer(t,i))!==i&&(r[e]=t,n.notifyArrayChildUpdate(e,t,i))}else{if(e!==r.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+r.length);n.spliceWithArray(e,0,[t])}}};["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach(function(e){Tt[e]=function(){var t=this[A];t.atom.reportObserved();var n=t.dehanceValues(t.values);return n[e].apply(n,arguments)}});var jt,Ct=m("ObservableArrayAdministration",Dt);function It(e){return v(e)&&Ct(e[A])}var Nt={},Vt=function(){function e(e,t,n){if(void 0===t&&(t=k),void 0===n&&(n="ObservableMap@"+l()),this.enhancer=t,this.name=n,this[jt]=Nt,this._keysAtom=x(this.name+".keys()"),this[Symbol.toStringTag]="Map","function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(e)}return e.prototype._has=function(e){return this._data.has(e)},e.prototype.has=function(e){return this._hasMap.has(e)?this._hasMap.get(e).get():this._updateHasMapEntry(e,!1).get()},e.prototype.set=function(e,t){var n=this._has(e);if(wt(this)){var r=St(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this._updateValue(e,t):this._addValue(e,t),this},e.prototype.delete=function(e){var t=this;if(wt(this)&&!(r=St(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var n=At(this),r=n?{type:"delete",object:this,oldValue:this._data.get(e).value,name:e}:null;return yt(function(){t._keysAtom.reportChanged(),t._updateHasMapEntry(e,!1),t._data.get(e).setNewValue(void 0),t._data.delete(e)}),n&&Et(this,r),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap.get(e);return n?n.setNewValue(t):(n=new ie(t,R,this.name+"."+Pt(e)+"?",!1),this._hasMap.set(e,n)),n},e.prototype._updateValue=function(e,t){var n=this._data.get(e);if((t=n.prepareNewValue(t))!==Se.UNCHANGED){var r=At(this),i=r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;0,n.setNewValue(t),r&&Et(this,i)}},e.prototype._addValue=function(e,t){var n=this;fe(this._keysAtom),yt(function(){var r=new ie(t,n.enhancer,n.name+"."+Pt(e),!1);n._data.set(e,r),t=r.value,n._updateHasMapEntry(e,!0),n._keysAtom.reportChanged()});var r=At(this),i=r?{type:"add",object:this,name:e,newValue:t}:null;r&&Et(this,i)},e.prototype.get=function(e){return this.has(e)?this.dehanceValue(this._data.get(e).get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},e.prototype.values=function(){var e=this,t=0,n=Array.from(this.keys());return tn({next:function(){return t<n.length?{value:e.get(n[t++]),done:!1}:{done:!0}}})},e.prototype.entries=function(){var e=this,t=0,n=Array.from(this.keys());return tn({next:function(){if(t<n.length){var r=n[t++];return{value:[r,e.get(r)],done:!1}}return{done:!0}}})},e.prototype[(jt=A,Symbol.iterator)]=function(){return this.entries()},e.prototype.forEach=function(e,t){var n,r;try{for(var i=o(this),s=i.next();!s.done;s=i.next()){var u=a(s.value,2),c=u[0],l=u[1];e.call(t,l,c,this)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype.merge=function(e){var t=this;return Rt(e)&&(e=e.toJS()),yt(function(){y(e)?Object.keys(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=a(e,2),r=n[0],i=n[1];return t.set(r,i)}):w(e)?(e.constructor!==Map&&f("Cannot initialize from classes that inherit from Map: "+e.constructor.name),e.forEach(function(e,n){return t.set(n,e)})):null!==e&&void 0!==e&&f("Cannot initialize map from "+e)}),this},e.prototype.clear=function(){var e=this;yt(function(){de(function(){var t,n;try{for(var r=o(e.keys()),i=r.next();!i.done;i=r.next()){var a=i.value;e.delete(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}})})},e.prototype.replace=function(e){var t=this;return yt(function(){var n,r=y(n=e)?Object.keys(n):Array.isArray(n)?n.map(function(e){return a(e,1)[0]}):w(n)||Rt(n)?Array.from(n.keys()):f("Cannot get keys from '"+n+"'");Array.from(t.keys()).filter(function(e){return-1===r.indexOf(e)}).forEach(function(e){return t.delete(e)}),t.merge(e)}),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.toPOJO=function(){var e,t,n={};try{for(var r=o(this),i=r.next();!i.done;i=r.next()){var s=a(i.value,2),u=s[0],c=s[1];n["symbol"==typeof u?u:Pt(u)]=c}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n},e.prototype.toJS=function(){return new Map(this)},e.prototype.toJSON=function(){return this.toPOJO()},e.prototype.toString=function(){var e=this;return this.name+"[{ "+Array.from(this.keys()).map(function(t){return Pt(t)+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return _t(this,e)},e.prototype.intercept=function(e){return Ot(this,e)},e}();function Pt(e){return e&&e.toString?e.toString():new String(e).toString()}var kt,Rt=m("ObservableMap",Vt),Lt={},Bt=function(){function e(e,t,n){if(void 0===t&&(t=k),void 0===n&&(n="ObservableSet@"+l()),this.name=n,this[kt]=Lt,this._data=new Set,this._atom=x(this.name),this[Symbol.toStringTag]="Set","function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(e,r){return t(e,r,n)},e&&this.replace(e)}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.clear=function(){var e=this;yt(function(){de(function(){var t,n;try{for(var r=o(e._data.values()),i=r.next();!i.done;i=r.next()){var a=i.value;e.delete(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}})})},e.prototype.forEach=function(e,t){var n,r;try{for(var i=o(this),a=i.next();!a.done;a=i.next()){var s=a.value;e.call(t,s,s,this)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this;if((fe(this._atom),wt(this))&&!(r=St(this,{type:"add",object:this,newValue:e})))return this;if(!this.has(e)){yt(function(){t._data.add(t.enhancer(e,void 0)),t._atom.reportChanged()});var n=At(this),r=n?{type:"add",object:this,newValue:e}:null;0,n&&Et(this,r)}return this},e.prototype.delete=function(e){var t=this;if(wt(this)&&!(r=St(this,{type:"delete",object:this,oldValue:e})))return!1;if(this.has(e)){var n=At(this),r=n?{type:"delete",object:this,oldValue:e}:null;return yt(function(){t._atom.reportChanged(),t._data.delete(e)}),n&&Et(this,r),!0}return!1},e.prototype.has=function(e){return this._atom.reportObserved(),this._data.has(this.dehanceValue(e))},e.prototype.entries=function(){var e=0,t=Array.from(this.keys()),n=Array.from(this.values());return tn({next:function(){var r=e;return e+=1,r<n.length?{value:[t[r],n[r]],done:!1}:{done:!0}}})},e.prototype.keys=function(){return this.values()},e.prototype.values=function(){this._atom.reportObserved();var e=this,t=0,n=Array.from(this._data.values());return tn({next:function(){return t<n.length?{value:e.dehanceValue(n[t++]),done:!1}:{done:!0}}})},e.prototype.replace=function(e){var t=this;return Mt(e)&&(e=e.toJS()),yt(function(){Array.isArray(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):O(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!==e&&void 0!==e&&f("Cannot initialize set from "+e)}),this},e.prototype.observe=function(e,t){return _t(this,e)},e.prototype.intercept=function(e){return Ot(this,e)},e.prototype.toJS=function(){return new Set(this)},e.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},e.prototype[(kt=A,Symbol.iterator)]=function(){return this.values()},e}(),Mt=m("ObservableSet",Bt),Ut=function(){function e(e,t,n,r){void 0===t&&(t=new Map),this.target=e,this.values=t,this.name=n,this.defaultEnhancer=r,this.keysAtom=new _(n+".keys")}return e.prototype.read=function(e){return this.values.get(e).get()},e.prototype.write=function(e,t){var n=this.target,r=this.values.get(e);if(r instanceof ae)r.set(t);else{if(wt(this)){if(!(o=St(this,{type:"update",object:this.proxy||n,name:e,newValue:t})))return;t=o.newValue}if((t=r.prepareNewValue(t))!==Se.UNCHANGED){var i=At(this),o=i?{type:"update",object:this.proxy||n,oldValue:r.value,name:e,newValue:t}:null;0,r.setNewValue(t),i&&Et(this,o)}}},e.prototype.has=function(e){var t=this.pendingKeys||(this.pendingKeys=new Map),n=t.get(e);if(n)return n.get();var r=!!this.values.get(e);return n=new ie(r,R,this.name+"."+e.toString()+"?",!1),t.set(e,n),n.get()},e.prototype.addObservableProp=function(e,t,n){void 0===n&&(n=this.defaultEnhancer);var r=this.target;if(wt(this)){var i=St(this,{object:this.proxy||r,name:e,type:"add",newValue:t});if(!i)return;t=i.newValue}var o=new ie(t,n,this.name+"."+e,!1);this.values.set(e,o),t=o.value,Object.defineProperty(r,e,function(e){return Kt[e]||(Kt[e]={configurable:!0,enumerable:!0,get:function(){return this[A].read(e)},set:function(t){this[A].write(e,t)}})}(e)),this.notifyPropertyAddition(e,t)},e.prototype.addComputedProp=function(e,t,n){var r=this.target;n.name=n.name||this.name+"."+t,this.values.set(t,new ae(n)),(e===r||g(e,t))&&Object.defineProperty(e,t,function(e){return zt[e]||(zt[e]={configurable:!1,enumerable:!1,get:function(){return Ht(this).read(e)},set:function(t){Ht(this).write(e,t)}})}(t))},e.prototype.remove=function(e){if(this.values.has(e)){var t=this.target;if(wt(this))if(!(a=St(this,{object:this.proxy||t,name:e,type:"remove"})))return;try{De();var n=At(this),r=this.values.get(e),i=r&&r.get();if(r&&r.set(void 0),this.keysAtom.reportChanged(),this.values.delete(e),this.pendingKeys){var o=this.pendingKeys.get(e);o&&o.set(!1)}delete this.target[e];var a=n?{type:"remove",object:this.proxy||t,oldValue:i,name:e}:null;0,n&&Et(this,a)}finally{Te()}}},e.prototype.illegalAccess=function(e,t){console.warn("Property '"+t+"' of '"+e+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},e.prototype.observe=function(e,t){return _t(this,e)},e.prototype.intercept=function(e){return Ot(this,e)},e.prototype.notifyPropertyAddition=function(e,t){var n=At(this),r=n?{type:"add",object:this.proxy||this.target,name:e,newValue:t}:null;if(n&&Et(this,r),this.pendingKeys){var i=this.pendingKeys.get(e);i&&i.set(!0)}this.keysAtom.reportChanged()},e.prototype.getKeys=function(){var e,t;this.keysAtom.reportObserved();var n=[];try{for(var r=o(this.values),i=r.next();!i.done;i=r.next()){var s=a(i.value,2),u=s[0];s[1]instanceof ie&&n.push(u)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n},e}();function Gt(e,t,n){if(void 0===t&&(t=""),void 0===n&&(n=k),Object.prototype.hasOwnProperty.call(e,A))return e[A];y(e)||(t=(e.constructor.name||"ObservableObject")+"@"+l()),t||(t="ObservableObject@"+l());var r=new Ut(e,new Map,t,n);return b(e,A,r),r}var Kt=Object.create(null),zt=Object.create(null);function Ht(e){var t=e[A];return t||(N(e),e[A])}var qt=m("ObservableObjectAdministration",Ut);function Wt(e){return!!v(e)&&(N(e),qt(e[A]))}function Jt(e,t){if("object"==typeof e&&null!==e){if(It(e))return void 0!==t&&f(!1),e[A].atom;if(Mt(e))return e[A];if(Rt(e)){var n=e;return void 0===t?n._keysAtom:((r=n._data.get(t)||n._hasMap.get(t))||f(!1),r)}var r;if(N(e),t&&!e[A]&&e[t],Wt(e))return t?((r=e[A].values.get(t))||f(!1),r):f(!1);if(E(e)||se(e)||Re(e))return e}else if("function"==typeof e&&Re(e[A]))return e[A];return f(!1)}function Xt(e,t){return e||f("Expecting some object"),void 0!==t?Xt(Jt(e,t)):E(e)||se(e)||Re(e)?e:Rt(e)||Mt(e)?e:(N(e),e[A]?e[A]:void f(!1))}function Yt(e,t){return(void 0!==t?Jt(e,t):Wt(e)||Rt(e)||Mt(e)?Xt(e):Jt(e)).name}var Ft=Object.prototype.toString;function $t(e,t){return Qt(e,t)}function Qt(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&function(e,t,n,r){e=Zt(e),t=Zt(t);var i=Ft.call(e);if(i!==Ft.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t)}var o="[object Array]"===i;if(!o){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!("function"==typeof a&&a instanceof a&&"function"==typeof s&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],r=r||[];var u=n.length;for(;u--;)if(n[u]===e)return r[u]===t;if(n.push(e),r.push(t),o){if((u=e.length)!==t.length)return!1;for(;u--;)if(!Qt(e[u],t[u],n,r))return!1}else{var c=Object.keys(e),l=void 0;if(u=c.length,Object.keys(t).length!==u)return!1;for(;u--;)if(l=c[u],!en(t,l)||!Qt(e[l],t[l],n,r))return!1}return n.pop(),r.pop(),!0}(e,t,n,r)}function Zt(e){return It(e)?e.slice():w(e)||Rt(e)?Array.from(e.entries()):O(e)||Mt(e)?Array.from(e.entries()):e}function en(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function tn(e){return e[Symbol.iterator]=nn,e}function nn(){return this}if("undefined"==typeof Proxy||"undefined"==typeof Symbol)throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Ue,extras:{getDebugName:Yt},$mobx:A}),n.Reaction=Ie,n.untracked=de,n.createAtom=x,n.spy=Ue,n.comparer=D,n.isObservableObject=Wt,n.isBoxedObservable=oe,n.isObservableArray=It,n.ObservableMap=Vt,n.isObservableMap=Rt,n.ObservableSet=Bt,n.isObservableSet=Mt,n.transaction=yt,n.observable=W,n.computed=F,n.isObservable=ct,n.isObservableProp=function(e,t){return"string"!=typeof t?f(!1):ut(e,t)},n.isComputed=st,n.isComputedProp=function(e,t){return"string"!=typeof t?f(!1):at(e,t)},n.extendObservable=Qe,n.observe=function(e,t,n,r){return"function"==typeof n?function(e,t,n,r){return Xt(e,t).observe(n,r)}(e,t,n,r):function(e,t,n){return Xt(e).observe(t,n)}(e,t,n)},n.intercept=function(e,t,n){return"function"==typeof n?function(e,t,n){return Xt(e,t).intercept(n)}(e,t,n):function(e,t){return Xt(e).intercept(t)}(e,t)},n.autorun=We,n.reaction=function(e,t,n){void 0===n&&(n=c);var r,i,o,a=n.name||"Reaction@"+l(),s=ze(a,n.onError?(r=n.onError,i=t,function(){try{return i.apply(this,arguments)}catch(e){r.call(this,e)}}):t),u=!n.scheduler&&!n.delay,f=Xe(n),h=!0,p=!1,d=n.compareStructural?D.structural:n.equals||D.default,v=new Ie(a,function(){h||u?y():p||(p=!0,f(y))},n.onError);function y(){if(p=!1,!v.isDisposed){var t=!1;v.track(function(){var n=e(v);t=h||!d(o,n),o=n}),h&&n.fireImmediately&&s(o,v),h||!0!==t||s(o,v),h&&(h=!1)}}return v.schedule(),v.getDisposer()},n.when=function(e,t,n){return 1===arguments.length||t&&"object"==typeof t?function(e,t){var n,r=new Promise(function(r,o){var a=bt(e,r,i({},t,{onError:o}));n=function(){a(),o("WHEN_CANCELLED")}});return r.cancel=n,r}(e,t):bt(e,t,n||{})},n.action=ze,n.isAction=He,n.runInAction=function(e,t){var n="string"==typeof e?e:e.name||"<unnamed action>",r="function"==typeof e?e:t;return Q(n,r,this,void 0)},n.keys=lt,n.values=function(e){return Wt(e)?lt(e).map(function(t){return e[t]}):Rt(e)?lt(e).map(function(t){return e.get(t)}):Mt(e)?Array.from(e.values()):It(e)?e.slice():f(!1)},n.entries=function(e){return Wt(e)?lt(e).map(function(t){return[t,e[t]]}):Rt(e)?lt(e).map(function(t){return[t,e.get(t)]}):Mt(e)?Array.from(e.entries()):It(e)?e.map(function(e,t){return[t,e]}):f(!1)},n.set=ft,n.remove=function(e,t){if(Wt(e))e[A].remove(t);else if(Rt(e))e.delete(t);else if(Mt(e))e.delete(t);else{if(!It(e))return f(!1);"number"!=typeof t&&(t=parseInt(t,10)),h(t>=0,"Not a valid index: '"+t+"'"),e.splice(t,1)}},n.has=ht,n.get=function(e,t){if(ht(e,t))return Wt(e)?e[t]:Rt(e)?e.get(t):It(e)?e[t]:f(!1)},n.decorate=function(e,t){var n="function"==typeof e?e.prototype:e,r=function(e){var r=t[e];Array.isArray(r)||(r=[r]);var i=Object.getOwnPropertyDescriptor(n,e),o=r.reduce(function(t,r){return r(n,e,t)},i);o&&Object.defineProperty(n,e,o)};for(var i in t)r(i);return e},n.configure=function(e){var t=e.enforceActions,n=e.computedRequiresReaction,r=e.disableErrorBoundaries,i=e.reactionScheduler;if(!0===e.isolateGlobalState&&((Se.pendingReactions.length||Se.inBatch||Se.isRunningReactions)&&f("isolateGlobalState should be called before MobX is running any reactions"),Oe=!0,we&&(0==--Ae().__mobxInstanceCount&&(Ae().__mobxGlobals=void 0),Se=new me)),void 0!==t){var o=void 0;switch(t){case!0:case"observed":o=!0;break;case!1:case"never":o=!1;break;case"strict":case"always":o="strict";break;default:f("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}Se.enforceActions=o,Se.allowStateChanges=!0!==o&&"strict"!==o}void 0!==n&&(Se.computedRequiresReaction=!!n),void 0!==r&&(!0===r&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),Se.disableErrorBoundaries=!!r),i&&Le(i)},n.onBecomeObserved=Ye,n.onBecomeUnobserved=Fe,n.flow=function(e){1!==arguments.length&&f("Flow expects one 1 argument and cannot be used as decorator");var t=e.name||"<unnamed flow>";return function(){var n,r=arguments,i=++it,o=ze(t+" - runid: "+i+" - init",e).apply(this,r),a=void 0,s=new Promise(function(e,r){var s=0;function u(e){var n;a=void 0;try{n=ze(t+" - runid: "+i+" - yield "+s++,o.next).call(o,e)}catch(e){return r(e)}l(n)}function c(e){var n;a=void 0;try{n=ze(t+" - runid: "+i+" - yield "+s++,o.throw).call(o,e)}catch(e){return r(e)}l(n)}function l(t){if(!t||"function"!=typeof t.then)return t.done?e(t.value):(a=Promise.resolve(t.value)).then(u,c);t.then(l,r)}n=r,u(void 0)});return s.cancel=ze(t+" - runid: "+i+" - cancel",function(){try{a&&ot(a);var e=o.return(),t=Promise.resolve(e.value);t.then(d,d),ot(t),n(new Error("FLOW_CANCELLED"))}catch(e){n(e)}}),s}},n.toJS=function(e,t){var n;return"boolean"==typeof t&&(t={detectCycles:t}),t||(t=pt),t.detectCycles=void 0===t.detectCycles?!0===t.recurseEverything:!0===t.detectCycles,t.detectCycles&&(n=new Map),function e(t,n,r){if(!n.recurseEverything&&!ct(t))return t;if("object"!=typeof t)return t;if(null===t)return null;if(t instanceof Date)return t;if(oe(t))return e(t.get(),n,r);if(ct(t)&&lt(t),!0===n.detectCycles&&null!==t&&r.has(t))return r.get(t);if(It(t)||Array.isArray(t)){var i=dt(r,t,[],n),o=t.map(function(t){return e(t,n,r)});i.length=o.length;for(var a=0,s=o.length;a<s;a++)i[a]=o[a];return i}if(Mt(t)||Object.getPrototypeOf(t)===Set.prototype){if(!1===n.exportMapsAsObjects){var u=dt(r,t,new Set,n);return t.forEach(function(t){u.add(e(t,n,r))}),u}var c=dt(r,t,[],n);return t.forEach(function(t){c.push(e(t,n,r))}),c}if(Rt(t)||Object.getPrototypeOf(t)===Map.prototype){if(!1===n.exportMapsAsObjects){var l=dt(r,t,new Map,n);return t.forEach(function(t,i){l.set(i,e(t,n,r))}),l}var f=dt(r,t,{},n);return t.forEach(function(t,i){f[i]=e(t,n,r)}),f}var h=dt(r,t,{},n);for(var p in t)h[p]=e(t[p],n,r);return h}(e,t,n)},n.trace=vt,n.getDependencyTree=tt,n.getObserverTree=function(e,t){return rt(Jt(e,t))},n._resetGlobalState=function(){var e=new me;for(var t in e)-1===ge.indexOf(t)&&(Se[t]=e[t]);Se.allowStateChanges=!Se.enforceActions},n._getGlobalState=function(){return Se},n.getDebugName=Yt,n.getAtom=Jt,n._getAdministration=Xt,n._allowStateChanges=function(e,t){var n,r=ee(e);try{n=t()}finally{te(r)}return n},n._allowStateChangesInsideComputed=function(e){var t,n=Se.computationDepth;Se.computationDepth=0;try{t=e()}finally{Se.computationDepth=n}return t},n.isArrayLike=function(e){return Array.isArray(e)||It(e)},n.$mobx=A,n._isComputingDerivation=function(){return null!==Se.trackingDerivation},n.onReactionError=function(e){return Se.globalReactionErrorHandlers.push(e),function(){var t=Se.globalReactionErrorHandlers.indexOf(e);t>=0&&Se.globalReactionErrorHandlers.splice(t,1)}},n._interceptReads=function(e,t,n){var r;if(Rt(e)||It(e)||oe(e))r=Xt(e);else{if(!Wt(e))return f(!1);if("string"!=typeof t)return f(!1);r=Xt(e,t)}return void 0!==r.dehancer?f(!1):(r.dehancer="function"==typeof t?t:n,function(){r.dehancer=void 0})}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:2}],2:[function(e,t,n){var r,i,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,l=[],f=!1,h=-1;function p(){f&&c&&(f=!1,c.length?l=c.concat(l):h=-1,l.length&&d())}function d(){if(!f){var e=u(p);f=!0;for(var t=l.length;t;){for(c=l,l=[];++h<t;)c&&c[h].run();h=-1,t=l.length}c=null,f=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function v(e,t){this.fun=e,this.array=t}function y(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new v(e,t)),1!==l.length||f||u(d)},v.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}]},{},[1])(1)});

@@ -83,2 +83,2 @@ import { $mobx, IEnhancer, IInterceptable, IInterceptor, IListenable, Lambda } from "../internal";

}
export declare var isObservableMap: (thing: any) => thing is ObservableMap<any, any>;
export declare const isObservableMap: (thing: any) => thing is ObservableMap<any, any>;

@@ -38,2 +38,2 @@ import { Atom, IEnhancer, IInterceptable, IEqualsComparer, IInterceptor, IListenable, Lambda } from "../internal";

}
export declare var isObservableValue: (x: any) => x is IObservableValue<any>;
export declare const isObservableValue: (x: any) => x is IObservableValue<any>;
{
"name": "mobx",
"version": "5.9.0",
"version": "5.9.4-special",
"description": "Simple, scalable state management.",

@@ -20,3 +20,3 @@ "main": "lib/mobx.js",

"test:mixed-versions": "jest --testRegex mixed-versions",
"test:all": "yarn small-build && yarn jest -i && yarn test:flow && yarn test:mixed-versions",
"test:all": "yarn lint && yarn small-build && yarn jest -i && yarn test:flow && yarn test:mixed-versions",
"test:webpack": "node scripts/webpack-regression-tests.js",

@@ -30,3 +30,3 @@ "test:flow": "node_modules/.bin/flow check",

"small-build": "node scripts/build.js",
"lint": "tslint -c tslint.json src/*.ts src/types/*.ts src/api/*.ts src/core/*.ts src/utils/*.ts",
"lint": "eslint src/*.ts src/types/*.ts src/api/*.ts src/core/*.ts src/utils/*.ts",
"size": "size-limit --babili 20KB lib/mobx.js",

@@ -57,2 +57,3 @@ "precommit": "lint-staged",

"@types/node": "^7.0.22",
"@typescript-eslint/eslint-plugin": "^1.3.0",
"babel-core": "^7.0.0-bridge.0",

@@ -64,2 +65,3 @@ "babel-jest": "^23.6.0",

"envify": "^4.1.0",
"eslint": "^5.13.0",
"flow-bin": "^0.59.0",

@@ -84,3 +86,2 @@ "fs-extra": "^3.0.1",

"tslib": "^1.7.1",
"tslint-config-prettier": "^1.17.0",
"typescript": "^3.2.1",

@@ -87,0 +88,0 @@ "uglify-es": "^3.3.9"

@@ -15,17 +15,24 @@ <img src="docs/mobx.png" alt="logo" height="120" align="right" />

MobX is proudly sponsored by Mendix, Coinbase, Facebook Open Source, Canva, Algolia, Guilded and many [individual sponsors](#backers)
MobX is proudly sponsored by Mendix, Coinbase, Facebook Open Source, Canva, Algolia, Guilded, Auction Frontier, Mantro and TalentPlot for 100$/month or more! And beyond that by many [individual backers](#backers) and through [one time contributions](https://github.com/mobxjs/mobx/blob/master/sponsors.md).
<img src="docs/mendix-logo.png" align="center" width="100" title="Mendix" alt="Mendix" /> <img src="docs/coinbase.jpeg" align="center" width="100" title="Coinbase" alt="Coinbase" /> <img src="docs/fbos.jpeg" align="center" width="100" title="Facebook Open Source" alt="Facebook Open Source" />
<img src="docs/canva.png" align="center" width="100" title="Canva" alt="Canva" />
<img src="docs/algolia.jpg" align="center" width="100" title="Algolia" alt="Algolia" />
<img src="docs/guilded.jpg" align="center" width="100" title="Guilded" alt="Guilded" />
<a href="https://mendix.com/"><img src="docs/mendix-logo.png" align="center" width="100" title="Mendix" alt="Mendix" /></a>
<a href="https://coinbase.com/"><img src="docs/coinbase.jpeg" align="center" width="100" title="Coinbase" alt="Coinbase" /></a>
<a href="https://opensource.facebook.com/"><img src="docs/fbos.jpeg" align="center" width="100" title="Facebook Open Source" alt="Facebook Open Source" /></a>
<a href="https://www.canva.com/"><img src="docs/canva.png" align="center" width="100" title="Canva" alt="Canva" /></a>
<a href="https://www.algolia.com/"><img src="docs/algolia.jpg" align="center" width="100" title="Algolia" alt="Algolia" /></a>
<a href="https://www.guilded.gg/"><img src="docs/guilded.jpg" align="center" width="100" title="Guilded" alt="Guilded" /></a>
<a href="http://auctionfrontier.com/"><img src="docs/auctionfrontier.jpeg" align="center" width="100" title="Auction Frontier" alt="Auction Frontier"></a>
<a href="https://mantro.net/jobs/warlock"><img src="docs/mantro.png" align="center" width="100" title="mantro GmbH" alt="mantro GmbH"></a>
<a href="https://talentplot.com/"><img src="docs/talentplot.png" align="center" width="100" title="talentplot" alt="talentplot"></a>
<a href="https://www.codefirst.co.uk/"><img src="https://mobx.js.org/docs/codefirst.png" align="center" width="100" title="CodeFirst" alt="CodeFirst"/></a>
<a href="https://blokt.com/"><img src="https://mobx.js.org/docs/blokt.jpg" align="center" width="100" title="Blokt" alt="Blokt"/></a>
<a href="https://www.faire.com/"><img src="https://mobx.js.org/docs/faire.jpg" align="center" width="100" title="Faire" alt="Faire"/></a>
# Installation
* Installation: `npm install mobx --save`. React bindings: `npm install mobx-react --save`. To enable ESNext decorators (optional), see below.
* CDN:
* https://unpkg.com/mobx/lib/mobx.umd.js
* https://cdnjs.com/libraries/mobx
* Installation: `npm install mobx --save`. React bindings: `npm install mobx-react --save`. To enable ESNext decorators (optional), see below.
* CDN:
* https://unpkg.com/mobx/lib/mobx.umd.js
* https://cdnjs.com/libraries/mobx
_Tip: Consider using the faster and smaller ES6 build if targetting a modern environment: `lib/mobx.es6.js`. For example by setting up a webpack alias: `resolve: { alias: { mobx: __dirname + "/node_modules/mobx/lib/mobx.es6.js" }}`_

@@ -35,33 +42,31 @@

| MobX version | Actively supported | Supported browsers | GitHub branch |
| ----- | ----- | --- | --- |
| 5.* | Yes | Any browser that supports [ES6 Proxies](https://kangax.github.io/compat-table/es6/#test-Proxy) (non polyfillable). _NOT:_ IE 11 and lower, Node 5 and lower | `master` |
| 4.* | Yes (LTS) | Any ES5 compliant browser | `mobx4-master` |
| 1-3.* | No | Any ES5 compliant browser | No active branch |
| MobX version | Actively supported | Supported browsers | GitHub branch |
| ------------ | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
| 5.\* | Yes | Any browser that supports [ES6 Proxies](https://kangax.github.io/compat-table/es6/#test-Proxy) (non polyfillable). _NOT:_ IE 11 and lower, Node 5 and lower | `master` |
| 4.\* | Yes (LTS) | Any ES5 compliant browser | `mobx4-master` |
| 1-3.\* | No | Any ES5 compliant browser | No active branch |
* MobX >=5 runs on any browser with [ES6 proxy support](https://kangax.github.io/compat-table/es6/#test-Proxy). It will throw an error on startup on older environments such as IE11, Node.js <6 or React Native Android on old JavaScriptCore [how-to-upgrade](https://github.com/react-community/jsc-android-buildscripts#how-to-use-it-with-my-react-native-app). _Warning: since upgrading JSC is non-trivial, and decorators can be [troublesome](https://github.com/mobxjs/mobx/issues/1777) as well in React Native, for now it is recommended to stick to MobX 4.x for for React Native Android development_.
* MobX 4 runs on any ES5 browser and will be actively maintained. The MobX 4 and 5 api's are the same and semantically can achieve the same, but MobX 4 has some [limitations](#mobx-4-vs-mobx-5).
* MobX >=5 runs on any browser with [ES6 proxy support](https://kangax.github.io/compat-table/es6/#test-Proxy). It will throw an error on startup on older environments such as IE11, Node.js <6 or React Native Android on old JavaScriptCore [how-to-upgrade](https://github.com/react-community/jsc-android-buildscripts#how-to-use-it-with-my-react-native-app).
* MobX 4 runs on any ES5 browser and will be actively maintained. The MobX 4 and 5 api's are the same and semantically can achieve the same, but MobX 4 has some [limitations](#mobx-4-vs-mobx-5).
## Translations
* [中文](http://cn.mobx.js.org)
* [中文](http://cn.mobx.js.org)
## Getting started
* <i><a style="color: white; background:green;padding:5px;margin:5px;border-radius:2px" href="https://egghead.io/courses/manage-complex-state-in-react-apps-with-mobx">Egghead.io course</a></i>
* [Ten minute, interactive MobX + React tutorial](https://mobxjs.github.io/mobx/getting-started.html)
* <img src="docs/book.jpg" height="80px"/> [The MobX book](https://books.google.nl/books?id=ALFmDwAAQBAJ&pg=PP1&lpg=PP1&dq=michel+weststrate+mobx+quick+start+guide:+supercharge+the+client+state+in+your+react+apps+with+mobx&source=bl&ots=D460fxti0F&sig=ivDGTxsPNwlOjLHrpKF1nweZFl8&hl=nl&sa=X&ved=2ahUKEwiwl8XO--ncAhWPmbQKHWOYBqIQ6AEwAnoECAkQAQ#v=onepage&q=michel%20weststrate%20mobx%20quick%20start%20guide%3A%20supercharge%20the%20client%20state%20in%20your%20react%20apps%20with%20mobx&f=false) by Pavan Podila and Michel Weststrate (which despite it's name is in-depth!)
* [Official MobX 4 documentation and API overview](https://mobxjs.github.io/mobx/refguide/api.html) ([MobX 3](https://github.com/mobxjs/mobx/blob/54557dc319b04e92e31cb87427bef194ec1c549c/docs/refguide/api.md), [MobX 2](https://github.com/mobxjs/mobx/blob/7c9e7c86e0c6ead141bb0539d33143d0e1f576dd/docs/refguide/api.md))
* [How to (not) use decorators](https://mobx.js.org/best/decorators.html)
* Videos:
* [ReactNext 2016: Real World MobX](https://www.youtube.com/watch?v=Aws40KOx90U) - 40m [slides](https://docs.google.com/presentation/d/1DrI6Hc2xIPTLBkfNH8YczOcPXQTOaCIcDESdyVfG_bE/edit?usp=sharing)
* [Practical React with MobX](https://www.youtube.com/watch?v=XGwuM_u7UeQ). In depth introduction and explanation to MobX and React by Matt Ruby on OpenSourceNorth (ES5 only) - 42m.
* LearnCode.academy MobX tutorial [Part I: MobX + React is AWESOME (7m)](https://www.youtube.com/watch?v=_q50BXqkAfI) [Part II: Computed Values and Nested/Referenced Observables (12m.)](https://www.youtube.com/watch?v=nYvNqKrl69s)
* [Screencast: intro to MobX](https://www.youtube.com/watch?v=K8dr8BMU7-8) - 8m
* [Talk: State Management Is Easy, React Amsterdam 2016 conf](https://www.youtube.com/watch?v=ApmSsu3qnf0&feature=youtu.be) ([slides](https://speakerdeck.com/mweststrate/state-management-is-easy-introduction-to-mobx))
* [Boilerplates and related projects](http://mobxjs.github.io/mobx/faq/boilerplates.html)
* More tutorials, blogs, videos, and other helpful resources can be found on the [MobX awesome list](https://github.com/mobxjs/awesome-mobx#awesome-mobx)
* <i><a style="color: white; background:green;padding:5px;margin:5px;border-radius:2px" href="https://egghead.io/courses/manage-complex-state-in-react-apps-with-mobx">Egghead.io course</a></i>
* [Ten minute, interactive MobX + React tutorial](https://mobxjs.github.io/mobx/getting-started.html)
* <img src="docs/book.jpg" height="80px"/> [The MobX book](https://books.google.nl/books?id=ALFmDwAAQBAJ&pg=PP1&lpg=PP1&dq=michel+weststrate+mobx+quick+start+guide:+supercharge+the+client+state+in+your+react+apps+with+mobx&source=bl&ots=D460fxti0F&sig=ivDGTxsPNwlOjLHrpKF1nweZFl8&hl=nl&sa=X&ved=2ahUKEwiwl8XO--ncAhWPmbQKHWOYBqIQ6AEwAnoECAkQAQ#v=onepage&q=michel%20weststrate%20mobx%20quick%20start%20guide%3A%20supercharge%20the%20client%20state%20in%20your%20react%20apps%20with%20mobx&f=false) by Pavan Podila and Michel Weststrate (which despite it's name is in-depth!)
* [Official MobX 4 documentation and API overview](https://mobxjs.github.io/mobx/refguide/api.html) ([MobX 3](https://github.com/mobxjs/mobx/blob/54557dc319b04e92e31cb87427bef194ec1c549c/docs/refguide/api.md), [MobX 2](https://github.com/mobxjs/mobx/blob/7c9e7c86e0c6ead141bb0539d33143d0e1f576dd/docs/refguide/api.md))
* [How to (not) use decorators](https://mobx.js.org/best/decorators.html)
* Videos:
* [ReactNext 2016: Real World MobX](https://www.youtube.com/watch?v=Aws40KOx90U) - 40m [slides](https://docs.google.com/presentation/d/1DrI6Hc2xIPTLBkfNH8YczOcPXQTOaCIcDESdyVfG_bE/edit?usp=sharing)
* [Practical React with MobX](https://www.youtube.com/watch?v=XGwuM_u7UeQ). In depth introduction and explanation to MobX and React by Matt Ruby on OpenSourceNorth (ES5 only) - 42m.
* LearnCode.academy MobX tutorial [Part I: MobX + React is AWESOME (7m)](https://www.youtube.com/watch?v=_q50BXqkAfI) [Part II: Computed Values and Nested/Referenced Observables (12m.)](https://www.youtube.com/watch?v=nYvNqKrl69s)
* [Screencast: intro to MobX](https://www.youtube.com/watch?v=K8dr8BMU7-8) - 8m
* [Talk: State Management Is Easy, React Amsterdam 2016 conf](https://www.youtube.com/watch?v=ApmSsu3qnf0&feature=youtu.be) ([slides](https://speakerdeck.com/mweststrate/state-management-is-easy-introduction-to-mobx))
* [Boilerplates and related projects](http://mobxjs.github.io/mobx/faq/boilerplates.html)
* More tutorials, blogs, videos, and other helpful resources can be found on the [MobX awesome list](https://github.com/mobxjs/awesome-mobx#awesome-mobx)
## Introduction

@@ -93,8 +98,8 @@

```javascript
import { observable } from 'mobx';
import { observable } from "mobx"
class Todo {
id = Math.random();
@observable title = '';
@observable finished = false;
id = Math.random()
@observable title = ""
@observable finished = false
}

@@ -112,8 +117,8 @@ ```

```javascript
import { decorate, observable } from 'mobx';
import { decorate, observable } from "mobx"
class Todo {
id = Math.random();
title = '';
finished = false;
id = Math.random()
title = ""
finished = false
}

@@ -135,5 +140,6 @@ decorate(Todo, {

class TodoList {
@observable todos = [];
@computed get unfinishedTodoCount() {
return this.todos.filter(todo => !todo.finished).length;
@observable todos = []
@computed
get unfinishedTodoCount() {
return this.todos.filter(todo => !todo.finished).length
}

@@ -160,5 +166,5 @@ }

```javascript
import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import {observer} from 'mobx-react';
import React, { Component } from "react"
import ReactDOM from "react-dom"
import { observer } from "mobx-react"

@@ -168,25 +174,26 @@ @observer

render() {
return <div>
<ul>
{this.props.todoList.todos.map(todo =>
<TodoView todo={todo} key={todo.id} />
)}
</ul>
Tasks left: {this.props.todoList.unfinishedTodoCount}
</div>
return (
<div>
<ul>
{this.props.todoList.todos.map(todo => <TodoView todo={todo} key={todo.id} />)}
</ul>
Tasks left: {this.props.todoList.unfinishedTodoCount}
</div>
)
}
}
const TodoView = observer(({todo}) =>
const TodoView = observer(({ todo }) => (
<li>
<input
type='checkbox'
type="checkbox"
checked={todo.finished}
onClick={() => todo.finished = !todo.finished}
/>{todo.title}
onClick={() => (todo.finished = !todo.finished)}
/>
{todo.title}
</li>
)
))
const store = new TodoList();
ReactDOM.render(<TodoListView todoList={store} />, document.getElementById('mount'));
const store = new TodoList()
ReactDOM.render(<TodoListView todoList={store} />, document.getElementById("mount"))
```

@@ -200,2 +207,3 @@

#### Custom reactions
Custom reactions can simply be created using the [`autorun`](http://mobxjs.github.io/mobx/refguide/autorun.html),

@@ -208,3 +216,3 @@ [`reaction`](http://mobxjs.github.io/mobx/refguide/reaction.html) or [`when`](http://mobxjs.github.io/mobx/refguide/when.html) functions to fit your specific situations.

autorun(() => {
console.log(`Tasks left: ${ todos.unfinishedTodoCount }`)
console.log(`Tasks left: ${todos.unfinishedTodoCount}`)
})

@@ -227,5 +235,5 @@ ```

* This can be done in a Flux like manner.
* Or by processing events using RxJS.
* Or by simply handling events in the most straightforward way possible, as demonstrated in the above `onClick` handler.
* This can be done in a Flux like manner.
* Or by processing events using RxJS.
* Or by simply handling events in the most straightforward way possible, as demonstrated in the above `onClick` handler.

@@ -239,7 +247,4 @@ In the end it all boils down to: somehow the state should be updated.

```javascript
store.todos.push(
new Todo('Get Coffee'),
new Todo('Write simpler code')
);
store.todos[0].finished = true;
store.todos.push(new Todo("Get Coffee"), new Todo("Write simpler code"))
store.todos[0].finished = true
```

@@ -303,10 +308,9 @@

* <img src="docs/book.jpg" height="80px"/> [The MobX book](https://books.google.nl/books?id=ALFmDwAAQBAJ&pg=PP1&lpg=PP1&dq=michel+weststrate+mobx+quick+start+guide:+supercharge+the+client+state+in+your+react+apps+with+mobx&source=bl&ots=D460fxti0F&sig=ivDGTxsPNwlOjLHrpKF1nweZFl8&hl=nl&sa=X&ved=2ahUKEwiwl8XO--ncAhWPmbQKHWOYBqIQ6AEwAnoECAkQAQ#v=onepage&q=michel%20weststrate%20mobx%20quick%20start%20guide%3A%20supercharge%20the%20client%20state%20in%20your%20react%20apps%20with%20mobx&f=false) by Pavan Podila and Michel Weststrate (which despite it's name is in-depth!)
* [MobX homepage](http://mobxjs.github.io/mobx/faq/blogs.html)
* [API overview](http://mobxjs.github.io/mobx/refguide/api.html)
* [Tutorials, Blogs & Videos](http://mobxjs.github.io/mobx/faq/blogs.html)
* [Boilerplates](http://mobxjs.github.io/mobx/faq/boilerplates.html)
* [Related projects](http://mobxjs.github.io/mobx/faq/related.html)
* <img src="docs/book.jpg" height="80px"/> [The MobX book](https://books.google.nl/books?id=ALFmDwAAQBAJ&pg=PP1&lpg=PP1&dq=michel+weststrate+mobx+quick+start+guide:+supercharge+the+client+state+in+your+react+apps+with+mobx&source=bl&ots=D460fxti0F&sig=ivDGTxsPNwlOjLHrpKF1nweZFl8&hl=nl&sa=X&ved=2ahUKEwiwl8XO--ncAhWPmbQKHWOYBqIQ6AEwAnoECAkQAQ#v=onepage&q=michel%20weststrate%20mobx%20quick%20start%20guide%3A%20supercharge%20the%20client%20state%20in%20your%20react%20apps%20with%20mobx&f=false) by Pavan Podila and Michel Weststrate (which despite it's name is in-depth!)
* [MobX homepage](http://mobxjs.github.io/mobx/faq/blogs.html)
* [API overview](http://mobxjs.github.io/mobx/refguide/api.html)
* [Tutorials, Blogs & Videos](http://mobxjs.github.io/mobx/faq/blogs.html)
* [Boilerplates](http://mobxjs.github.io/mobx/faq/boilerplates.html)
* [Related projects](http://mobxjs.github.io/mobx/faq/related.html)
## What others are saying...

@@ -326,9 +330,11 @@

> I've been using MobX for over 2 years now, and it *still* feels like cheating! 😎
> I've been using MobX for over 2 years now, and it _still_ feels like cheating! 😎
## Contributing
* Feel free to send small pull requests. Please discuss new features or big changes in a GitHub issue first.
* Use `npm test` to run the basic test suite, `npm run coverage` for the test suite with coverage and `npm run test:performance` for the performance tests.
* Please note that if you want to backport a feature / fix to MobX 4 a second PR needs to be opened to the mobx4-master branch.
* Feel free to send small pull requests. Please discuss new features or big changes in a GitHub issue first.
* Use `yarn test` to run the basic test suite.
* Use `yarn test:travis` for the test suite with coverage.
* and `yarn test:performance` for the performance tests.
* Please note that if you want to backport a feature / fix to MobX 4 a second PR needs to be opened to the mobx4-master branch.

@@ -340,8 +346,10 @@ # MobX 4 vs MobX 5

The most noteable limitations of MobX 4:
* Observable arrays are not real arrays, so they won't pass the `Array.isArray()` check. The practical consequence is that you often need to `.slice()` the array first (to get a real array shallow copy) before passing to third party libraries.
* Adding properties to existing observable objects after creation is not automatically picked up. Instead, either use observable maps or use the the built-in [utility functions](https://mobx.js.org/refguide/object-api.html) to read / write / iterate objects that you want to dynamically add properties to.
* Observable arrays are not real arrays, so they won't pass the `Array.isArray()` check. The practical consequence is that you often need to `.slice()` the array first (to get a real array shallow copy) before passing to third party libraries.
* Adding properties to existing observable objects after creation is not automatically picked up. Instead, either use observable maps or use the the built-in [utility functions](https://mobx.js.org/refguide/object-api.html) to read / write / iterate objects that you want to dynamically add properties to.
For more details see the [caveats page](https://mobx.js.org/best/pitfalls.html).
## Flow support
MobX ships with [flow typings](flow-typed/mobx.js). Flow will automatically include them when you import MobX modules. Although you **do not** need to import the types explicitly, you can still do it like this: `import type { ... } from 'mobx'`.

@@ -351,5 +359,5 @@

* In `.flowconfig`, you **cannot** ignore `node_modules`.
* In `.flowconfig`, you **cannot** import it explicitly in the `[libs]` section.
* You **do not** need to install library definition using [flow-typed](https://github.com/flowtype/flow-typed).
* In `.flowconfig`, you **cannot** ignore `node_modules`.
* In `.flowconfig`, you **cannot** import it explicitly in the `[libs]` section.
* You **do not** need to install library definition using [flow-typed](https://github.com/flowtype/flow-typed).

@@ -362,2 +370,3 @@ ## Donating

### Backers
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/mobx#backer)]

@@ -364,0 +373,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc