Socket
Socket
Sign inDemoInstall

mobx

Package Overview
Dependencies
Maintainers
2
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 2.4.0-fix427 to 2.4.0-fix441

4

CHANGELOG.md

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

# 2.4.1
* `@action` decorated methods are now configurable. Fixes #441
# 2.4.0

@@ -2,0 +6,0 @@

20

lib/mobx.d.ts

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

export { IAtom, Atom, BaseAtom };
export { IAtom, Atom };
export { IObservable, IDepTreeNode };

@@ -110,4 +110,6 @@ export { Reaction };

}
declare class BaseAtom implements IAtom {
declare class Atom implements IAtom {
name: string;
onBecomeObserved: () => void;
onBecomeUnobserved: () => void;
isDirty: boolean;

@@ -118,4 +120,3 @@ staleObservers: any[];

lastAccessedBy: number;
constructor(name?: string);
onBecomeUnobserved(): void;
constructor(name?: string, onBecomeObserved?: () => void, onBecomeUnobserved?: () => void);
reportObserved(): void;

@@ -127,11 +128,2 @@ reportChanged(): void;

}
declare class Atom extends BaseAtom implements IAtom {
name: string;
onBecomeObservedHandler: () => void;
onBecomeUnobservedHandler: () => void;
isBeingTracked: boolean;
constructor(name?: string, onBecomeObservedHandler?: () => void, onBecomeUnobservedHandler?: () => void);
reportObserved(): boolean;
onBecomeUnobserved(): void;
}
interface IComputedValue<T> {

@@ -163,2 +155,3 @@ get(): T;

observers: SimpleSet<IDerivation>;
onBecomeObserved(): any;
onBecomeUnobserved(): any;

@@ -184,2 +177,3 @@ }

constructor(name: string, onInvalidate: () => void);
onBecomeObserved(): void;
onBecomeUnobserved(): void;

@@ -186,0 +180,0 @@ onDependenciesReady(): boolean;

/** MobX - (c) Michel Weststrate 2015, 2016 - MIT Licensed */
"use strict";function se(n,a,u){var o,e,r;"string"==typeof n?(o=n,e=a,r=u):"function"==typeof n&&(o=n.name||"Autorun@"+i(),e=n,r=a),p(e,"autorun methods cannot have modifiers"),t("function"==typeof e,"autorun expects a function"),t(0===e.length,"autorun expects a function without arguments"),r&&(e=e.bind(r));var s=new m(o,function(){this.track(e)});return s.schedule(),s.getDisposer()}function Ce(e,s,u,l){var r,o,a,t;"string"==typeof e?(r=e,o=s,a=u,t=l):"function"==typeof e&&(r="When@"+i(),o=e,a=s,t=u);var c=!1,n=se(r,function(){if(o.call(t)){n?n():c=!0;var e=I();a.call(t),j(e)}});return c&&n(),n}function nn(e,t,n){return a("`autorunUntil` is deprecated, please use `when`."),Ce.apply(null,arguments)}function en(e,u,c,l){var a,t,n,r;"string"==typeof e?(a=e,t=u,n=c,r=l):"function"==typeof e&&(a=e.name||"AutorunAsync@"+i(),t=e,n=u,r=c),void 0===n&&(n=1),r&&(t=t.bind(r));var s=!1,o=new m(a,function(){s||(s=!0,setTimeout(function(){s=!1,o.isDisposed||o.track(t)},n))});return o.schedule(),o.getDisposer()}function Yt(a,f,x,g,b,_){function y(){if(!l.isDisposed){var e=!1;l.track(function(){var t=d();e=fe(w,s,t),s=t}),u&&r&&t(s),u||e!==!0||t(s),u&&(u=!1)}}var c,p,t,r,e,o;"string"==typeof a?(c=a,p=f,t=x,r=g,e=b,o=_):(c=a.name||f.name||"Reaction@"+i(),p=a,t=f,r=x,e=g,o=b),void 0===r&&(r=!1),void 0===e&&(e=0);var v=T(p,n.Reference),R=v[0],d=v[1],w=R===n.Structure;o&&(d=d.bind(o),t=he(c,t.bind(o)));var u=!0,h=!1,s=void 0,l=new m(c,function(){1>e?y():h||(h=!0,setTimeout(function(){h=!1,y()},e))});return l.schedule(),l.getDisposer()}function re(e,n,r,o){return arguments.length<3&&"function"==typeof e?qt(e,n):(t(!r||!r.set,"@observable properties cannot have a setter: "+n),gt.apply(null,arguments))}function qt(r,o){var e=T(r,n.Recursive),i=e[0],t=e[1];return new h(t,o,i===n.Structure,t.name)}function Fe(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function Jt(n,o){t("function"==typeof n&&1===n.length,"createTransformer expects a function that accepts one argument");var r={},i=e.resetId,a=function(e){function t(t,r){e.call(this,function(){return n(r)},null,!1,"Transformer-"+n.name+"-"+t),this.sourceIdentifier=t,this.sourceObject=r}return N(t,e),t.prototype.onBecomeUnobserved=function(){var t=this.value;e.prototype.onBecomeUnobserved.call(this),delete r[this.sourceIdentifier],o&&o(t,this.sourceObject)},t}(h);return function(o){i!==e.resetId&&(r={},i=e.resetId);var n=Ut(o),t=r[n];return t?t.get():(t=r[n]=new a(n,o),t.get())}}function Ut(e){if(null===e||"object"!=typeof e)throw new Error("[mobx] transform expected some kind of object, got: "+e);var t=e.$transformId;return void 0===t&&(t=i(),k(e,"$transformId",t)),t}function Mt(e,t){return le()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),re(e,t).get()}function ee(e){for(var o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];return t(arguments.length>=2,"extendObservable expected 2 or more arguments"),t("object"==typeof e,"extendObservable expects an object as first argument"),t(!(e instanceof x),"extendObservable should not be used on maps, use map.merge instead"),o.forEach(function(r){t("object"==typeof r,"all arguments of extendObservable should be objects"),Ge(e,r,n.Recursive,null)}),e}function Ge(e,t,r,o){var i=ne(e,o,r);for(var n in t)if(t.hasOwnProperty(n)){if(e===t&&!Re(e,n))continue;Qt(i,n,t[n])}return e}function Pt(e,t){return We(d(e,t))}function We(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=Q(e.observing).map(We)),t}function Tt(e,t){return qe(d(e,t))}function qe(e){var t={name:e.name};return e.observers&&e.observers.length>0&&(t.observers=e.observers.asArray().map(qe)),t}function Ct(e,t,n){return"function"==typeof n?ot(e,t,n):At(e,t)}function At(e,t){return g(e)&&!y(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),v(me(e)).intercept(t)):v(e).intercept(t)}function ot(e,t,n){return g(e)&&!y(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),ee(e,{property:e[t]}),ot(e,t,n)):v(e,t).intercept(n)}function P(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof x||e instanceof l)throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(y(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof at||e instanceof m||e instanceof h}function Rt(r,e,n){return t(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",e),pt(r,e),t(!n||!n.get,"@observable can not be used on getters, use @computed instead"),xt.apply(null,arguments)}function me(e,u){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return Rt.apply(null,arguments);if(t(arguments.length<3,"observable expects zero, one or two arguments"),P(e))return e;var s=T(e,n.Recursive),r=s[0],i=s[1],c=r===n.Reference?o.Reference:wt(i);switch(c){case o.Array:case o.PlainObject:return G(i,r);case o.Reference:case o.ComplexObject:return new A(i,r);case o.ComplexFunction:throw new Error("[mobx.observable] To be able to make a function reactive it should not have arguments. If you need an observable reference to a function, use `observable(asReference(f))`");case o.ViewFunction:return a("Use `computed(expr)` instead of `observable(expr)`"),re(e,u)}t(!1,"Illegal State")}function wt(e){return null===e||void 0===e?o.Reference:"function"==typeof e?e.length?o.ComplexFunction:o.ViewFunction:Array.isArray(e)||e instanceof l?o.Array:"object"==typeof e?g(e)?o.PlainObject:o.ComplexObject:o.Reference}function bt(t,n,e,r){return"function"==typeof e?ft(t,n,e,r):mt(t,n,e)}function mt(e,t,n){return g(e)&&!y(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),v(me(e)).observe(t,n)):v(e).observe(t,n)}function ft(e,t,n,r){return g(e)&&!y(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),ee(e,{property:e[t]}),ft(e,t,n,r)):v(e,t).observe(n,r)}function w(e,n,t){function i(r){return n&&t.push([e,r]),r}if(void 0===n&&(n=!0),void 0===t&&(t=null),e instanceof Date||e instanceof RegExp)return e;if(n&&null===t&&(t=[]),n&&null!==e&&"object"==typeof e)for(var r=0,s=t.length;s>r;r++)if(t[r][0]===e)return t[r][1];if(!e)return e;if(Array.isArray(e)||e instanceof l){var o=i([]),a=e.map(function(e){return w(e,n,t)});o.length=a.length;for(var r=0,s=a.length;s>r;r++)o[r]=a[r];return o}if(e instanceof x){var u=i({});return e.forEach(function(e,r){return u[r]=w(e,n,t)}),u}if(P(e)&&e.$mobx instanceof A)return w(e(),n,t);if(e instanceof A)return w(e.get(),n,t);if("object"==typeof e){var o=i({});for(var c in e)o[c]=w(e[c],n,t);return o}return e}function dt(n,e,t){return void 0===e&&(e=!0),void 0===t&&(t=null),a("toJSON is deprecated. Use toJS instead"),w.apply(null,arguments)}function ce(e){return console.log(e),e}function yt(n,r){switch(arguments.length){case 0:if(n=e.derivationStack[e.derivationStack.length-1],!n)return ce("whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested it's value.");break;case 2:n=d(n,r)}return n=d(n),n instanceof h?ce(n.whyRun()):n instanceof m?ce(n.whyRun()):void t(!1,"whyRun can only be used on reactions and computed values")}function he(e,t,n,r){return 1===arguments.length&&"function"==typeof e?xe(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?xe(e,t):1===arguments.length&&"string"==typeof e?ut(e):ut(t).apply(null,arguments)}function ut(e){return function(n,r,t){return t&&"function"==typeof t.value?(t.value=xe(e,t.value),t.enumerable=!1,t):_t(e).apply(this,arguments)}}function st(e){return"function"==typeof e&&e.isMobxAction===!0}function St(e,o,i){var n="string"==typeof e?e:e.name||"<unnamed action>",r="function"==typeof e?e:o,a="function"==typeof e?o:i;return t("function"==typeof r,"`runInAction` expects a function"),t(0===r.length,"`runInAction` expects a function without arguments"),t("string"==typeof n&&n.length>0,"actions should have valid names, got: '"+n+"'"),it(n,r,a,void 0)}function xe(e,n){t("function"==typeof n,"`action` can only be invoked on functions"),t("string"==typeof e&&e.length>0,"actions should have valid names, got: '"+e+"'");var r=function(){return it(e,n,this,arguments)};return r.isMobxAction=!0,r}function it(f,p,i,n){var v=e.derivationStack;t(!(v[v.length-1]instanceof h),"Computed values or transformers should not invoke actions or trigger other side effects");var l,c=r();if(c){l=Date.now();var a=n&&n.length||0,d=new Array(a);if(a>0)for(var o=0;a>o;o++)d[o]=n[o];s({type:"action",name:f,fn:p,target:i,arguments:d})}var y=I();Oe(f,i,!1);var m=B(!0);try{return p.apply(i,n)}finally{U(m),ke(!1),j(y),c&&u({time:Date.now()-l})}}function kt(n){t(0===e.derivationStack.length,"It is not allowed to set `useStrict` when a derivation is running"),e.strictMode=n,e.allowStateChanges=!n}function rt(e,t){var n=B(e),r=t();return U(n),r}function B(t){var n=e.allowStateChanges;return e.allowStateChanges=t,n}function U(t){e.allowStateChanges=t}function nt(e){t(e.isDirty,"atom not dirty"),e.isDirty=!1,oe(e,!0)}function le(){return e.derivationStack.length>0&&e.isTracking}function pe(){e.allowStateChanges||t(!1,e.strictMode?"It is not allowed to create or change state outside an `action` when MobX is in strict mode. Wrap the current method in `action` if this state change is intended":"It is not allowed to change the state when a computed value or transformer is being evaluated. Use 'autorun' to create reactive functions with side-effects.")}function jt(e){1===++e.dependencyStaleCount&&Pe(e)}function Vt(e,n){if(t(e.dependencyStaleCount>0,"unexpected ready notification"),n&&(e.dependencyChangeCount+=1),0===--e.dependencyStaleCount)if(e.dependencyChangeCount>0){e.dependencyChangeCount=0;var r=e.onDependenciesReady();oe(e,r)}else oe(e,!1)}function Qe(t,s){var n=t.observing;t.observing=new Array(n.length+100),t.unboundDepsCount=0,t.runId=++e.runId,e.derivationStack.push(t);var u=e.isTracking;e.isTracking=!0;var o,i=!0;try{o=s.call(t),i=!1}finally{if(i){var a="[mobx] An uncaught exception occurred while calculating your computed value, autorun or transformer. Or inside the render() method of an observer based React component. These functions should never throw exceptions as MobX will not always be able to recover from them. "+("Please fix the error reported after this message or enable 'Pause on (caught) exceptions' in your debugger to find the root cause. In: '"+t.name+"'");r()&&S({type:"error",object:this,message:a}),console.warn(a),t.unboundDepsCount=0,t.observing=n,Z()}else e.isTracking=u,e.derivationStack.length-=1,Lt(t,n)}return o}function Lt(n,r){for(var o=r.length,i=n.observing,a=i.length=n.unboundDepsCount,e=0;o>e;e++)r[e].diffValue=-1;for(var e=0;a>e;e++){var t=i[e];++t.diffValue>0&&(t.diffValue=0,zt(t,n))}for(var e=0;o>e;e++){var t=r[e];t.diffValue<0&&(t.diffValue=0,Ne(t,n))}}function ye(n){for(var e=n.observing,r=e.length,t=0;r>t;t++)Ne(e[t],n);e.length=0}function Ke(e){var t=I(),n=e();return j(t),n}function I(){var t=e.isTracking;return e.isTracking=!1,t}function j(t){e.isTracking=t}function an(){}function Z(){e.resetId++;var n=new et;for(var t in n)-1===It.indexOf(t)&&(e[t]=n[t]);e.allowStateChanges=!e.strictMode}function zt(e,t){e.observers.add(t)}function Ne(e,t){e.observers.remove(t),0===e.observers.length&&e.onBecomeUnobserved()}function ze(n){if(e.isTracking!==!1){var t=e.derivationStack[e.derivationStack.length-1];t.runId!==n.lastAccessedBy&&(n.lastAccessedBy=t.runId,t.observing[t.unboundDepsCount++]=n)}}function Pe(e){for(var t=e.observers.asArray(),r=t.length,n=0;r>n;n++)jt(t[n]);e.staleObservers=e.staleObservers.concat(t)}function oe(e,t){e.staleObservers.splice(0).forEach(function(e){return Vt(e,t)})}function ie(){if(!(e.isRunningReactions===!0||e.inTransaction>0)){e.isRunningReactions=!0;for(var t=e.pendingReactions,o=0;t.length>0;){if(++o===Dt)throw new Error("Reaction doesn't converge to a stable state. Probably there is a cycle in the reactive function: "+t[0].toString());for(var r=t.splice(0),n=0,i=r.length;i>n;n++)r[n].runReaction()}e.isRunningReactions=!1}}function r(){return Y}function S(r){if(!Y)return!1;for(var n=e.spyListeners,t=0,o=n.length;o>t;t++)n[t](r)}function s(e){var t=ct({},e,{spyReportStart:!0});S(t)}function u(e){S(e?ct({},e,He):He)}function Le(t){return e.spyListeners.push(t),Y=e.spyListeners.length>0,K(function(){var n=e.spyListeners.indexOf(t);-1!==n&&e.spyListeners.splice(n,1),Y=e.spyListeners.length>0})}function rn(e){return a("trackTransitions is deprecated. Use mobx.spy instead"),"boolean"==typeof e&&(a("trackTransitions only takes a single callback function. If you are using the mobx-react-devtools, please update them first"),e=arguments[1]),e?Le(e):(a("trackTransitions without callback has been deprecated and is a no-op now. If you are using the mobx-react-devtools, please update them first"),function(){})}function L(n,e,t){void 0===e&&(e=void 0),void 0===t&&(t=!0),Oe(n.name||"anonymous transaction",e,t);var r=n.call(e);return ke(t),r}function Oe(o,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),e.inTransaction+=1,n&&r()&&s({type:"transaction",target:t,name:o})}function ke(t){if(void 0===t&&(t=!0),0===--e.inTransaction){for(var o=e.changedAtoms.splice(0),n=0,i=o.length;i>n;n++)nt(o[n]);ie()}t&&r()&&u()}function R(e){return e.interceptors&&e.interceptors.length>0}function H(t,n){var e=t.interceptors||(t.interceptors=[]);return e.push(n),K(function(){var t=e.indexOf(n);-1!==t&&e.splice(t,1)})}function _(o,e){for(var i=I(),r=o.interceptors,n=0,a=r.length;a>n;n++)if(e=r[n](e),t(!e||e.type,"Intercept handlers should return nothing or a change object"),!e)return null;return j(i),e}function f(e){return e.changeListeners&&e.changeListeners.length>0}function q(t,n){var e=t.changeListeners||(t.changeListeners=[]);return e.push(n),K(function(){var t=e.indexOf(n);-1!==t&&e.splice(t,1)})}function b(r,n){var o=I(),e=r.changeListeners;if(e){e=e.slice();for(var t=0,i=e.length;i>t;t++)Array.isArray(n)?e[t].apply(null,n):e[t](n);j(o)}}function we(e){return new ae(e)}function _e(e){return new z(e)}function Se(e){return new ge(e)}function $t(e,t){return $e(e,t)}function T(e,t){return e instanceof ae?[n.Reference,e.value]:e instanceof z?[n.Structure,e.value]:e instanceof ge?[n.Flat,e.value]:[t,e]}function on(e){return e===we?n.Reference:e===_e?n.Structure:e===Se?n.Flat:(t(void 0===e,"Cannot determine value mode from function. Please pass in one of these: mobx.asReference, mobx.asStructure or mobx.asFlat, got: "+e),n.Recursive)}function G(e,a,i){var r;if(P(e))return e;switch(a){case n.Reference:return e;case n.Flat:p(e,"Items inside 'asFlat' cannot have modifiers"),r=n.Reference;break;case n.Structure:p(e,"Items inside 'asStructure' cannot have modifiers"),r=n.Structure;break;case n.Recursive:o=T(e,n.Recursive),r=o[0],e=o[1];break;default:t(!1,"Illegal State")}return Array.isArray(e)?De(e,r,i):g(e)&&Object.isExtensible(e)?Ge(e,e,r,i):e;var o}function p(e,t){if(e instanceof ae||e instanceof z||e instanceof ge)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function Zt(e){var t=ht(e),n=Ee(e);Object.defineProperty(l.prototype,""+e,{enumerable:!1,configurable:!0,set:t,get:n})}function ht(e){return function(t){var r=this.$mobx,o=r.values;if(p(t,"Modifiers cannot be used on array values. For non-reactive array values use makeReactive(asFlat(array))."),e<o.length){pe();var i=o[e];if(R(r)){var a=_(r,{type:"update",object:r.array,index:e,newValue:t});if(!a)return;t=a.newValue}t=r.makeReactiveArrayItem(t);var s=r.mode===n.Structure?!W(i,t):i!==t;s&&(o[e]=t,r.notifyArrayChildUpdate(e,t,i))}else{if(e!==o.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+o.length);r.spliceWithArray(e,0,[t])}}}function Ee(e){return function(){var t=this.$mobx;return t&&e<t.values.length?(t.atom.reportObserved(),t.values[e]):void 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")}}function Ve(t){for(var e=ue;t>e;e++)Zt(e);ue=t}function De(e,t,n){return new l(e,t,n)}function Xt(e){return a("fastArray is deprecated. Please use `observable(asFlat([]))`"),De(e,n.Flat,null)}function F(e){return e instanceof l}function $e(e,t){return new x(e,t)}function J(e){return e instanceof x}function ne(e,t,r){if(void 0===r&&(r=n.Recursive),y(e))return e.$mobx;g(e)||(t=e.constructor.name+"@"+i()),t||(t="ObservableObject@"+i());var o=new Ue(e,t,r);return V(e,"$mobx",o),o}function Qt(e,t,n){e.values[t]?e.target[t]=n:te(e,t,n,!0)}function te(t,n,e,a){a&&pt(t.target,n);var r,o=t.name+"."+n,i=!0;if("function"!=typeof e||0!==e.length||st(e))if(e instanceof z&&"function"==typeof e.value&&0===e.value.length)r=new h(e.value,t.target,!0,o);else{if(i=!1,R(t)){var s=_(t,{object:t.target,name:n,type:"add",newValue:e});if(!s)return;e=s.newValue}r=new A(e,t.mode,o,!1),e=r.value}else r=new h(e,t.target,!1,o);t.values[n]=r,a&&Object.defineProperty(t.target,n,i?Kt(n):Ht(n)),i||Ft(t,t.target,n,e)}function Ht(e){var t=Me[e];return t?t:Me[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){Be(this,e,t)}}}function Kt(e){var t=Te[e];return t?t:Te[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:Fe}}function Be(o,i,e){var t=o.$mobx,a=t.values[i];if(R(t)){var n=_(t,{type:"update",object:o,name:i,newValue:e});if(!n)return;e=n.newValue}if(e=a.prepareNewValue(e),e!==D){var l=f(t),c=r(),n=b||f?{type:"update",object:o,oldValue:a.value,name:i,newValue:e}:null;c&&s(n),a.setNewValue(e),l&&b(t,n),c&&u()}}function Ft(t,i,a,c){var n=f(t),e=r(),o=n||e?{type:"add",object:i,name:a,newValue:c}:null;e&&s(o),n&&b(t,o),e&&u()}function y(e){return"object"==typeof e&&null!==e?(E(e),e.$mobx instanceof Ue):!1}function d(e,n){if("object"==typeof e&&null!==e){if(F(e))return t(void 0===n,"It is not possible to get index atoms from arrays"),e.$mobx.atom;if(J(e)){if(void 0===n)return d(e._keys);var r=e._data[n]||e._hasMap[n];return t(!!r,"the entry '"+n+"' does not exist in the observable map '"+ve(e)+"'"),r}if(E(e),y(e)){t(!!n,"please specify a property");var o=e.$mobx.values[n];return t(!!o,"no observable property '"+n+"' found on the observable object '"+ve(e)+"'"),o}if(e instanceof O||e instanceof h||e instanceof m)return e}else if("function"==typeof e&&e.$mobx instanceof m)return e.$mobx;t(!1,"Cannot obtain atom from "+e)}function v(e,n){return t(e,"Expection some object"),void 0!==n?v(d(e,n)):e instanceof O||e instanceof h||e instanceof m?e:J(e)?e:(E(e),e.$mobx?e.$mobx:void t(!1,"Cannot obtain administration from "+e))}function ve(e,t){var n;return n=void 0!==t?d(e,t):y(e)||J(e)?v(e):d(e),n.name}function de(e,r,o,i,a){function n(s,n,u,c){if(t(a||Ye(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),u){s.hasOwnProperty("__mobxLazyInitializers")||k(s,"__mobxLazyInitializers",s.__mobxLazyInitializers&&s.__mobxLazyInitializers.slice()||[]);var f=u.value,l=u.initializer;return s.__mobxLazyInitializers.push(function(t){e(t,n,l?l.call(t):f,c,u)}),{enumerable:i,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&E(this),r.call(this,n)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&E(this),o.call(this,n,e)}}}var p={enumerable:i,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[n]===!0||Xe(this,n,void 0,e,c,u),r.call(this,n)},set:function(t){this.__mobxInitializedProps&&this.__mobxInitializedProps[n]===!0?o.call(this,n,t):Xe(this,n,t,e,c,u)}};return arguments.length<3&&Object.defineProperty(s,n,p),p}return a?function(){if(Ye(arguments))return n.apply(null,arguments);var e=arguments;return function(t,r,o){return n(t,r,o,e)}}:n}function Xe(e,t,n,r,o,i){e.hasOwnProperty("__mobxInitializedProps")||k(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,o,i)}function E(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(k(e,"__mobxDidRunLazyInitializers",!0),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function Ye(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}function Et(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function M(e){t(e[je]!==!0,"Illegal state: cannot recycle array as iterator"),V(e,je,!0);var n=-1;return V(e,"next",function(){return n++,{done:n>=this.length,value:n<this.length?this[n]:void 0}}),e}function tt(e,t){V(e,Et(),t)}function i(){return++e.mobxGuid}function t(t,n,e){if(!t)throw new Error("[mobx] Invariant failed: "+n+(e?" in '"+e+"'":""))}function a(e){-1===Ie.indexOf(e)&&(Ie.push(e),console.error("[mobx] Deprecated: "+e))}function K(t){var e=!1;return function(){return e?void 0:(e=!0,t.apply(this,arguments))}}function Q(t){var e=[];return t.forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),e}function be(t,e,n){if(void 0===e&&(e=100),void 0===n&&(n=" - "),!t)return"";var r=t.slice(0,e);return""+r.join(n)+(t.length>e?" (... and "+(t.length-e)+"more)":"")}function g(e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype}function ct(){for(var r=arguments[0],e=1,o=arguments.length;o>e;e++){var t=arguments[e];for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n])}return r}function fe(n,e,t){return n?!W(e,t):e!==t}function vt(n,t){for(var e=0;e<t.length;e++)k(n,t[e],n[t[e]])}function k(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function V(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!1,value:n})}function Re(t,n){var e=Object.getOwnPropertyDescriptor(t,n);return!e||e.configurable!==!1&&e.writable!==!1}function pt(n,e){t(Re(n,e),"Cannot make property '"+e+"' observable, it is not configurable and writable in the target object")}function lt(t){var e=[];for(var n in t)e.push(n);return e}function W(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var o=Array.isArray(e)||F(e);if(o!==(Array.isArray(t)||F(t)))return!1;if(o){if(e.length!==t.length)return!1;for(var n=e.length-1;n>=0;n--)if(!W(e[n],t[n]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(lt(e).length!==lt(t).length)return!1;for(var r in e){if(!(r in t))return!1;if(!W(e[r],t[r]))return!1}return!0}return e===t}var N=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)};an(),exports.extras={allowStateChanges:rt,getAtom:d,getDebugName:ve,getDependencyTree:Pt,getObserverTree:Tt,isComputingDerivation:le,isSpyEnabled:r,resetGlobalState:Z,spyReport:S,spyReportEnd:u,spyReportStart:s,trackTransitions:rn},exports._={getAdministration:v,resetGlobalState:Z},exports.autorun=se,exports.when=Ce,exports.autorunUntil=nn,exports.autorunAsync=en,exports.reaction=Yt;var gt=de(function(i,a,c,e,s){var r=s.get;t("function"==typeof r,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'");var o=!1;e&&1===e.length&&e[0].asStructure===!0&&(o=!0);var u=ne(i,void 0,n.Recursive);te(u,a,o?_e(r):r,!1)},function(e){return this.$mobx.values[e].get()},Fe,!1,!0);exports.computed=re,exports.createTransformer=Jt,exports.expr=Mt,exports.extendObservable=ee,exports.intercept=Ct,exports.isObservable=P;var xt=de(function(t,r,e){var o=B(!0);"function"==typeof e&&(e=we(e));var i=ne(t,void 0,n.Recursive);te(i,r,e,!0),U(o)},function(e){return this.$mobx.values[e].get()},function(e,t){Be(this,e,t)},!0,!1);exports.observable=me;var o;!function(e){e[e.Reference=0]="Reference",e[e.PlainObject=1]="PlainObject",e[e.ComplexObject=2]="ComplexObject",e[e.Array=3]="Array",e[e.ViewFunction=4]="ViewFunction",e[e.ComplexFunction=5]="ComplexFunction"}(o||(o={})),exports.observe=bt,exports.toJS=w,exports.toJSON=dt,exports.whyRun=yt;var _t=de(function(r,t,n,e,a){var o=e&&1===e.length?e[0]:n.name||t||"<unnamed action>",i=he(o,n);k(r,t,i)},function(e){return this[e]},function(){t(!1,"It is not allowed to assign new values to @action fields")},!1,!0);exports.action=he,exports.isAction=st,exports.runInAction=St,exports.useStrict=kt;var O=function(){function n(e){void 0===e&&(e="Atom@"+i()),this.name=e,this.isDirty=!1,this.staleObservers=[],this.observers=new X,this.diffValue=0,this.lastAccessedBy=0}return n.prototype.onBecomeUnobserved=function(){},n.prototype.reportObserved=function(){ze(this)},n.prototype.reportChanged=function(){this.isDirty||(this.reportStale(),this.reportReady())},n.prototype.reportStale=function(){this.isDirty||(this.isDirty=!0,Pe(this))},n.prototype.reportReady=function(){t(this.isDirty,"atom not dirty"),e.inTransaction>0?e.changedAtoms.push(this):(nt(this),ie())},n.prototype.toString=function(){return this.name},n}();exports.BaseAtom=O;var at=function(n){function t(e,t,r){void 0===e&&(e="Atom@"+i()),void 0===t&&(t=Ae),void 0===r&&(r=Ae),n.call(this,e),this.name=e,this.onBecomeObservedHandler=t,this.onBecomeUnobservedHandler=r,this.isBeingTracked=!1}return N(t,n),t.prototype.reportObserved=function(){n.prototype.reportObserved.call(this);var t=e.isTracking;return t&&!this.isBeingTracked&&(this.isBeingTracked=!0,this.onBecomeObservedHandler()),t},t.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},t}(O);exports.Atom=at;var h=function(){function n(e,t,n,r){this.derivation=e,this.scope=t,this.compareStructural=n,this.isLazy=!0,this.isComputing=!1,this.staleObservers=[],this.observers=new X,this.observing=[],this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.unboundDepsCount=0,this.__mapid="#"+i(),this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.value=void 0,this.name=r||"ComputedValue@"+i()}return n.prototype.peek=function(){this.isComputing=!0;var e=B(!1),t=this.derivation.call(this.scope);return U(e),this.isComputing=!1,t},n.prototype.onBecomeUnobserved=function(){ye(this),this.isLazy=!0,this.value=void 0},n.prototype.onDependenciesReady=function(){var e=this.trackAndCompute();return e},n.prototype.get=function(){if(t(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),ze(this),this.dependencyStaleCount>0)return this.peek();if(this.isLazy){if(!le())return this.peek();this.isLazy=!1,this.trackAndCompute()}return this.value},n.prototype.set=function(e){throw new Error("[ComputedValue '"+name+"'] It is not possible to assign a new value to a computed value.")},n.prototype.trackAndCompute=function(){r()&&S({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=Qe(this,this.peek);return fe(this.compareStructural,t,e)},n.prototype.observe=function(n,r){var o=this,e=!0,t=void 0;return se(function(){var i=o.get();if(!e||r){var a=I();n(i,t),j(a)}e=!1,t=i})},n.prototype.toJSON=function(){return this.get()},n.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},n.prototype.whyRun=function(){var n=e.derivationStack.length>0,i=Q(this.observing).map(function(e){return e.name}),r=Q(this.observers.asArray()).map(function(e){return e.name}),t=this.isComputing?n?this.observers.length>0?c.INVALIDATED:c.REQUIRED:c.PEEK:c.NOT_RUNNING;if(t===c.REQUIRED){var o=e.derivationStack[e.derivationStack.length-2];o&&r.push(o.name)}return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+Ot[t]+" "+(t===c.NOT_RUNNING&&this.dependencyStaleCount>0?"(a next run is scheduled)":"")+"\n"+(this.isLazy?" * This computation is suspended (not in use by any reaction) and won't run automatically.\n Didn't expect this computation to be suspended at this point?\n 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n 2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).\n":" * This computation will re-run if any of the following observables changes:\n "+be(i)+"\n "+(this.isComputing&&n?" (... or any observable accessed during the remainder of the current run)":"")+"\n Missing items in this list?\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n * If the outcome of this computation changes, the following observers will be re-run:\n "+be(r)+"\n")},n}(),c;!function(e){e[e.PEEK=0]="PEEK",e[e.INVALIDATED=1]="INVALIDATED",e[e.REQUIRED=2]="REQUIRED",e[e.NOT_RUNNING=3]="NOT_RUNNING"}(c||(c={}));var Ot=(C={},C[c.PEEK]="[peek] The value of this computed value was requested outside an reaction",C[c.INVALIDATED]="[invalidated] Some observables used by this computation did change",C[c.REQUIRED]="[started] This computation is required by another computed value / reaction",C[c.NOT_RUNNING]="[idle] This compution is currently not running",C);exports.untracked=Ke;var It=["mobxGuid","resetId","spyListeners","strictMode","runId"],et=function(){function e(){this.version=3,this.derivationStack=[],this.runId=0,this.mobxGuid=0,this.inTransaction=0,this.isTracking=!1,this.isRunningReactions=!1,this.changedAtoms=[],this.pendingReactions=[],this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[]}return e}(),e=function(){var e=new et;if(global.__mobservableTrackingStack||global.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(global.__mobxGlobal&&global.__mobxGlobal.version!==e.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");return global.__mobxGlobal?global.__mobxGlobal:global.__mobxGlobal=e}(),Ze,m=function(){function t(e,t){void 0===e&&(e="Reaction@"+i()),this.name=e,this.onInvalidate=t,this.staleObservers=$,this.observers=Ze||(Ze=new X),this.observing=[],this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.unboundDepsCount=0,this.__mapid="#"+i(),this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1}return t.prototype.onBecomeUnobserved=function(){},t.prototype.onDependenciesReady=function(){return this.schedule(),!1},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,e.pendingReactions.push(this),ie())},t.prototype.isScheduled=function(){return this.dependencyStaleCount>0||this._isScheduled},t.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&r()&&S({object:this,type:"scheduled-reaction"}))},t.prototype.track=function(e){var t,n=r();n&&(t=Date.now(),s({object:this,type:"reaction",fn:e})),this._isRunning=!0,Qe(this,e),this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&ye(this),n&&u({time:Date.now()-t})},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||ye(this))},t.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.whyRun=function(){var e=Q(this.observing).map(function(e){return e.name});return"\nWhyRun? reaction '"+this.name+"':\n * Status: ["+(this.isDisposed?"stopped":this._isRunning?"running":this.isScheduled()?"scheduled":"idle")+"]\n * This reaction will re-run if any of the following observables changes:\n "+be(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n Missing items in this list?\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n";
},t}();exports.Reaction=m;var Dt=100,Y=!1,He={spyReportEnd:!0};exports.spy=Le,exports.transaction=L;var n;!function(e){e[e.Recursive=0]="Recursive",e[e.Reference=1]="Reference",e[e.Structure=2]="Structure",e[e.Flat=3]="Flat"}(n||(n={})),exports.asReference=we,exports.asStructure=_e,exports.asFlat=Se;var ae=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}(),z=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}(),ge=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}();exports.asMap=$t;var Nt=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),ue=0,Je=function(){function e(){}return e}();Je.prototype=[];var Bt=function(){function e(e,t,n,r){this.mode=t,this.array=n,this.owned=r,this.lastKnownLength=0,this.interceptors=null,this.changeListeners=null,this.atom=new O(e||"ObservableArray@"+i())}return e.prototype.makeReactiveArrayItem=function(e){return p(e,"Array values cannot have modifiers"),this.mode===n.Flat||this.mode===n.Reference?e:G(e,this.mode,this.atom.name+"[..]")},e.prototype.intercept=function(e){return H(this,e)},e.prototype.observe=function(t,e){return void 0===e&&(e=!1),e&&t({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),q(this,t)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||0>e)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;e!==t&&(e>t?this.spliceWithArray(t,0,new Array(e-t)):this.spliceWithArray(e,t-e))},e.prototype.updateArrayLength=function(t,e){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=e,e>0&&t+e+1>ue&&Ve(t+e+1)},e.prototype.spliceWithArray=function(e,n,t){pe();var r=this.values.length;if(void 0===e?e=0:e>r?e=r:0>e&&(e=Math.max(0,r+e)),n=1===arguments.length?r-e:void 0===n||null===n?0:Math.max(0,Math.min(n,r-e)),void 0===t&&(t=[]),R(this)){var o=_(this,{object:this.array,type:"splice",index:e,removedCount:n,added:t});if(!o)return $;n=o.removedCount,t=o.added}t=t.map(this.makeReactiveArrayItem,this);var s=t.length-n;this.updateArrayLength(r,s);var i=(a=this.values).splice.apply(a,[e,n].concat(t));return(0!==n||0!==t.length)&&this.notifyArraySplice(e,t,i),i;var a},e.prototype.notifyArrayChildUpdate=function(o,i,a){var e=!this.owned&&r(),t=f(this),n=t||e?{object:this.array,type:"update",index:o,newValue:i,oldValue:a}:null;e&&s(n),this.atom.reportChanged(),t&&b(this,n),e&&u()},e.prototype.notifyArraySplice=function(a,t,n){var e=!this.owned&&r(),o=f(this),i=o||e?{object:this.array,type:"splice",index:a,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;e&&s(i),this.atom.reportChanged(),o&&b(this,i),e&&u()},e}(),l=function(t){function e(n,o,i,r){void 0===r&&(r=!1),t.call(this);var e=new Bt(i,o,this,r);V(this,"$mobx",e),n&&n.length?(e.updateArrayLength(0,n.length),e.values=n.map(e.makeReactiveArrayItem,e),e.notifyArraySplice(0,e.values.slice(),$)):e.values=[],Nt&&Object.defineProperty(e.array,"0",Gt)}return N(e,t),e.prototype.intercept=function(e){return this.$mobx.intercept(e)},e.prototype.observe=function(t,e){return void 0===e&&(e=!1),this.$mobx.observe(t,e)},e.prototype.clear=function(){return this.splice(0)},e.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},e.prototype.toJS=function(){return this.slice()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.peek=function(){return this.$mobx.values},e.prototype.find=function(r,o,t){void 0===t&&(t=0),this.$mobx.atom.reportObserved();for(var n=this.$mobx.values,i=n.length,e=t;i>e;e++)if(r.call(o,n[e],e,this))return n[e]},e.prototype.splice=function(t,n){for(var r=[],e=2;e<arguments.length;e++)r[e-2]=arguments[e];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(t);case 2:return this.$mobx.spliceWithArray(t,n)}return this.$mobx.spliceWithArray(t,n,r)},e.prototype.push=function(){for(var n=[],e=0;e<arguments.length;e++)n[e-0]=arguments[e];var t=this.$mobx;return t.spliceWithArray(t.values.length,0,n),t.values.length},e.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},e.prototype.shift=function(){return this.splice(0,1)[0]},e.prototype.unshift=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var n=this.$mobx;return n.spliceWithArray(0,0,t),n.values.length},e.prototype.reverse=function(){this.$mobx.atom.reportObserved();var e=this.slice();return e.reverse.apply(e,arguments)},e.prototype.sort=function(t){this.$mobx.atom.reportObserved();var e=this.slice();return e.sort.apply(e,arguments)},e.prototype.remove=function(t){var e=this.$mobx.values.indexOf(t);return e>-1?(this.splice(e,1),!0):!1},e.prototype.toString=function(){return"[mobx.array] "+Array.prototype.toString.apply(this.$mobx.values,arguments)},e.prototype.toLocaleString=function(){return"[mobx.array] "+Array.prototype.toLocaleString.apply(this.$mobx.values,arguments)},e}(Je);tt(l.prototype,function(){return M(this.slice())}),vt(l.prototype,["constructor","observe","clear","replace","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(l.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];k(l.prototype,e,function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)})});var Gt={configurable:!0,enumerable:!1,set:ht(0),get:Ee(0)};Ve(1e3),exports.fastArray=Xt,exports.isObservableArray=F;var Wt={},x=function(){function e(e,r){var t=this;this.$mobx=Wt,this._data={},this._hasMap={},this.name="ObservableMap@"+i(),this._keys=new l(null,n.Reference,this.name+".keys()",!0),this.interceptors=null,this.changeListeners=null,this._valueMode=on(r),this._valueMode===n.Flat&&(this._valueMode=n.Reference),rt(!0,function(){g(e)?t.merge(e):Array.isArray(e)&&e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)})})}return e.prototype._has=function(e){return"undefined"!=typeof this._data[e]},e.prototype.has=function(e){return this.isValidKey(e)?(e=""+e,this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get()):!1},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(p(t,"[mobx.map.set] Expected unwrapped value to be inserted to key '"+e+"'. If you need to use modifiers pass them as second argument to the constructor"),R(this)){var r=_(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return;t=r.newValue}n?this._updateValue(e,t):this._addValue(e,t)},e.prototype.delete=function(e){var t=this;if(this.assertValidKey(e),e=""+e,R(this)){var n=_(this,{type:"delete",object:this,name:e});if(!n)return}if(this._has(e)){var o=r(),i=f(this),n=i||o?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;o&&s(n),L(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1);var n=t._data[e];n.setNewValue(void 0),t._data[e]=void 0},void 0,!1),i&&b(this,n),o&&u()}},e.prototype._updateHasMapEntry=function(t,r){var e=this._hasMap[t];return e?e.setNewValue(r):e=this._hasMap[t]=new A(r,n.Reference,this.name+"."+t+"?",!1),e},e.prototype._updateValue=function(o,e){var t=this._data[o];if(e=t.prepareNewValue(e),e!==D){var n=r(),i=f(this),a=i||n?{type:"update",object:this,oldValue:t.value,name:o,newValue:e}:null;n&&s(a),t.setNewValue(e),i&&b(this,a),n&&u()}},e.prototype._addValue=function(e,n){var t=this;L(function(){var r=t._data[e]=new A(n,t._valueMode,t.name+"."+e,!1);n=r.value,t._updateHasMapEntry(e,!0),t._keys.push(e)},void 0,!1);var o=r(),i=f(this),a=i||o?{type:"add",object:this,name:e,newValue:n}:null;o&&s(a),i&&b(this,a),o&&u()},e.prototype.get=function(e){return e=""+e,this.has(e)?this._data[e].get():void 0},e.prototype.keys=function(){return M(this._keys.slice())},e.prototype.values=function(){return M(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return M(this._keys.map(function(t){return[t,e.get(t)]}))},e.prototype.forEach=function(e,t){var n=this;this.keys().forEach(function(r){return e.call(t,n.get(r),r)})},e.prototype.merge=function(t){var n=this;return L(function(){t instanceof e?t.keys().forEach(function(e){return n.set(e,t.get(e))}):Object.keys(t).forEach(function(e){return n.set(e,t[e])})},void 0,!1),this},e.prototype.clear=function(){var e=this;L(function(){Ke(function(){e.keys().forEach(e.delete,e)})},void 0,!1)},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.toJS=function(){var t=this,e={};return this.keys().forEach(function(n){return e[n]=t.get(n)}),e},e.prototype.toJs=function(){return a("toJs is deprecated, use toJS instead"),this.toJS()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.isValidKey=function(e){return null===e||void 0===e?!1:"string"!=typeof e&&"number"!=typeof e&&"boolean"!=typeof e?!1:!0},e.prototype.assertValidKey=function(e){if(!this.isValidKey(e))throw new Error("[mobx.map] Invalid key: '"+e+"'")},e.prototype.toString=function(){var e=this;return this.name+"[{ "+this.keys().map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,n){return t(n!==!0,"`observe` doesn't support the fire immediately property for observable maps."),q(this,e)},e.prototype.intercept=function(e){return H(this,e)},e}();exports.ObservableMap=x,tt(x.prototype,function(){return this.entries()}),exports.map=$e,exports.isObservableMap=J;var Ue=function(){function e(e,t,n){this.target=e,this.name=t,this.mode=n,this.values={},this.changeListeners=null,this.interceptors=null}return e.prototype.observe=function(e,n){return t(n!==!0,"`observe` doesn't support the fire immediately property for observable objects."),q(this,e)},e.prototype.intercept=function(e){return H(this,e)},e}(),Me={},Te={};exports.isObservableObject=y;var D={},A=function(t){function e(s,u,e,o){void 0===e&&(e="ObservableValue@"+i()),void 0===o&&(o=!0),t.call(this,e),this.mode=u,this.hasUnreportedChange=!1,this.value=void 0;var a=T(s,n.Recursive),c=a[0],l=a[1];this.mode===n.Recursive&&(this.mode=c),this.value=G(l,this.mode,this.name),o&&r()&&S({type:"create",object:this,newValue:this.value})}return N(e,t),e.prototype.set=function(e){var n=this.value;if(e=this.prepareNewValue(e),e!==D){var t=r();t&&s({type:"update",object:this,newValue:e,oldValue:n}),this.setNewValue(e),t&&u()}},e.prototype.prepareNewValue=function(e){if(p(e,"Modifiers cannot be used on non-initial values."),pe(),R(this)){var t=_(this,{object:this,type:"update",newValue:e});if(!t)return D;e=t.newValue}var r=fe(this.mode===n.Structure,this.value,e);return r?G(e,this.mode,this.name):D},e.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),f(this)&&b(this,[e,t])},e.prototype.get=function(){return this.reportObserved(),this.value},e.prototype.intercept=function(e){return H(this,e)},e.prototype.observe=function(e,t){return t&&e(this.value,void 0),q(this,e)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e}(O),je="__$$iterating",X=function(){function e(){this.size=0,this.data={}}return Object.defineProperty(e.prototype,"length",{get:function(){return this.size},enumerable:!0,configurable:!0}),e.prototype.asArray=function(){var e=new Array(this.size),t=0;for(var n in this.data)e[t]=this.data[n],t++;return e},e.prototype.add=function(e){var t=e.__mapid;t in this.data||(this.data[t]=e,this.size++)},e.prototype.remove=function(e){e.__mapid in this.data&&(delete this.data[e.__mapid],this.size--)},e}();exports.SimpleSet=X;var tn=function(){function e(){this.listeners=[],a("extras.SimpleEventEmitter is deprecated and will be removed in the next major release")}return e.prototype.emit=function(){for(var t=this.listeners.slice(),e=0,n=t.length;n>e;e++)t[e].apply(null,arguments)},e.prototype.on=function(e){var t=this;return this.listeners.push(e),K(function(){var n=t.listeners.indexOf(e);-1!==n&&t.listeners.splice(n,1)})},e.prototype.once=function(t){var e=this.on(function(){e(),t.apply(this,arguments)});return e},e}();exports.SimpleEventEmitter=tn;var $=[];Object.freeze($);var Ie=[],Ae=function(){},C;
"use strict";function le(n,a,u){var o,e,r;"string"==typeof n?(o=n,e=a,r=u):"function"==typeof n&&(o=n.name||"Autorun@"+i(),e=n,r=a),p(e,"autorun methods cannot have modifiers"),t("function"==typeof e,"autorun expects a function"),t(0===e.length,"autorun expects a function without arguments"),r&&(e=e.bind(r));var s=new f(o,function(){this.track(e)});return s.schedule(),s.getDisposer()}function je(e,s,u,l){var r,o,a,t;"string"==typeof e?(r=e,o=s,a=u,t=l):"function"==typeof e&&(r="When@"+i(),o=e,a=s,t=u);var c=!1,n=le(r,function(){if(o.call(t)){n?n():c=!0;var e=j();a.call(t),A(e)}});return c&&n(),n}function tn(e,t,n){return a("`autorunUntil` is deprecated, please use `when`."),je.apply(null,arguments)}function Zt(e,u,c,l){var a,t,n,r;"string"==typeof e?(a=e,t=u,n=c,r=l):"function"==typeof e&&(a=e.name||"AutorunAsync@"+i(),t=e,n=u,r=c),void 0===n&&(n=1),r&&(t=t.bind(r));var s=!1,o=new f(a,function(){s||(s=!0,setTimeout(function(){s=!1,o.isDisposed||o.track(t)},n))});return o.schedule(),o.getDisposer()}function qt(a,h,x,g,m,_){function b(){if(!l.isDisposed){var e=!1;l.track(function(){var t=v();e=de(w,s,t),s=t}),u&&r&&t(s),u||e!==!0||t(s),u&&(u=!1)}}var c,p,t,r,e,o;"string"==typeof a?(c=a,p=h,t=x,r=g,e=m,o=_):(c=a.name||h.name||"Reaction@"+i(),p=a,t=h,r=x,e=g,o=m),void 0===r&&(r=!1),void 0===e&&(e=0);var y=L(p,n.Reference),R=y[0],v=y[1],w=R===n.Structure;o&&(v=v.bind(o),t=me(c,t.bind(o)));var u=!0,d=!1,s=void 0,l=new f(c,function(){1>e?b():d||(d=!0,setTimeout(function(){d=!1,b()},e))});return l.schedule(),l.getDisposer()}function ue(e,n,r,o){return arguments.length<3&&"function"==typeof e?Ht(e,n):(t(!r||!r.set,"@observable properties cannot have a setter: "+n),gt.apply(null,arguments))}function Ht(r,o){var e=L(r,n.Recursive),i=e[0],t=e[1];return new b(t,o,i===n.Structure,t.name)}function Be(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function Jt(n,o){t("function"==typeof n&&1===n.length,"createTransformer expects a function that accepts one argument");var r={},i=e.resetId,a=function(e){function t(t,r){e.call(this,function(){return n(r)},null,!1,"Transformer-"+n.name+"-"+t),this.sourceIdentifier=t,this.sourceObject=r}return ae(t,e),t.prototype.onBecomeUnobserved=function(){var t=this.value;e.prototype.onBecomeUnobserved.call(this),delete r[this.sourceIdentifier],o&&o(t,this.sourceObject)},t}(b);return function(o){i!==e.resetId&&(r={},i=e.resetId);var n=Nt(o),t=r[n];return t?t.get():(t=r[n]=new a(n,o),t.get())}}function Nt(e){if(null===e||"object"!=typeof e)throw new Error("[mobx] transform expected some kind of object, got: "+e);var t=e.$transformId;return void 0===t&&(t=i(),x(e,"$transformId",t)),t}function zt(e,t){return pe()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),ue(e,t).get()}function se(e){for(var o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];return t(arguments.length>=2,"extendObservable expected 2 or more arguments"),t("object"==typeof e,"extendObservable expects an object as first argument"),t(!(e instanceof S),"extendObservable should not be used on maps, use map.merge instead"),o.forEach(function(r){t("object"==typeof r,"all arguments of extendObservable should be objects"),We(e,r,n.Recursive,null)}),e}function We(e,t,r,o){var i=ne(e,o,r);for(var n in t)if(t.hasOwnProperty(n)){if(e===t&&!Re(e,n))continue;Xt(i,n,t[n])}return e}function ht(e,t){return Qe(v(e,t))}function Qe(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=P(e.observing).map(Qe)),t}function Dt(e,t){return Ze(v(e,t))}function Ze(e){var t={name:e.name};return e.observers&&e.observers.length>0&&(t.observers=e.observers.asArray().map(Ze)),t}function jt(e,t,n){return"function"==typeof n?at(e,t,n):kt(e,t)}function kt(e,t){return g(e)&&!y(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),m(Y(e)).intercept(t)):m(e).intercept(t)}function at(e,t,n){return g(e)&&!y(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),se(e,{property:e[t]}),at(e,t,n)):m(e,t).intercept(n)}function N(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof S||e instanceof l)throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(y(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof I||e instanceof f||e instanceof b}function Rt(r,e,n){return t(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",e),pt(r,e),t(!n||!n.get,"@observable can not be used on getters, use @computed instead"),xt.apply(null,arguments)}function Y(e,u){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return Rt.apply(null,arguments);if(t(arguments.length<3,"observable expects zero, one or two arguments"),N(e))return e;var s=L(e,n.Recursive),r=s[0],i=s[1],c=r===n.Reference?o.Reference:wt(i);switch(c){case o.Array:case o.PlainObject:return B(i,r);case o.Reference:case o.ComplexObject:return new C(i,r);case o.ComplexFunction:throw new Error("[mobx.observable] To be able to make a function reactive it should not have arguments. If you need an observable reference to a function, use `observable(asReference(f))`");case o.ViewFunction:return a("Use `computed(expr)` instead of `observable(expr)`"),ue(e,u)}t(!1,"Illegal State")}function wt(e){return null===e||void 0===e?o.Reference:"function"==typeof e?e.length?o.ComplexFunction:o.ViewFunction:Array.isArray(e)||e instanceof l?o.Array:"object"==typeof e?g(e)?o.PlainObject:o.ComplexObject:o.Reference}function mt(t,n,e,r){return"function"==typeof e?ft(t,n,e,r):bt(t,n,e)}function bt(e,t,n){return g(e)&&!y(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),m(Y(e)).observe(t,n)):m(e).observe(t,n)}function ft(e,t,n,r){return g(e)&&!y(e)?(a("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),se(e,{property:e[t]}),ft(e,t,n,r)):m(e,t).observe(n,r)}function w(e,n,t){function i(r){return n&&t.push([e,r]),r}if(void 0===n&&(n=!0),void 0===t&&(t=null),e instanceof Date||e instanceof RegExp)return e;if(n&&null===t&&(t=[]),n&&null!==e&&"object"==typeof e)for(var r=0,s=t.length;s>r;r++)if(t[r][0]===e)return t[r][1];if(!e)return e;if(Array.isArray(e)||e instanceof l){var o=i([]),a=e.map(function(e){return w(e,n,t)});o.length=a.length;for(var r=0,s=a.length;s>r;r++)o[r]=a[r];return o}if(e instanceof S){var u=i({});return e.forEach(function(e,r){return u[r]=w(e,n,t)}),u}if(N(e)&&e.$mobx instanceof C)return w(e(),n,t);if(e instanceof C)return w(e.get(),n,t);if("object"==typeof e){var o=i({});for(var c in e)o[c]=w(e[c],n,t);return o}return e}function dt(n,e,t){return void 0===e&&(e=!0),void 0===t&&(t=null),a("toJSON is deprecated. Use toJS instead"),w.apply(null,arguments)}function he(e){return console.log(e),e}function yt(n,r){switch(arguments.length){case 0:if(n=e.derivationStack[e.derivationStack.length-1],!n)return he("whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested it's value.");break;case 2:n=v(n,r)}return n=v(n),n instanceof b?he(n.whyRun()):n instanceof f?he(n.whyRun()):void t(!1,"whyRun can only be used on reactions and computed values")}function me(e,t,n,r){return 1===arguments.length&&"function"==typeof e?ee(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?ee(e,t):1===arguments.length&&"string"==typeof e?ut(e):ut(t).apply(null,arguments)}function ut(e){return function(n,r,t){return t&&"function"==typeof t.value?(t.value=ee(e,t.value),t.enumerable=!1,t.configurable=!0,t):_t(e).apply(this,arguments)}}function st(e){return"function"==typeof e&&e.isMobxAction===!0}function St(e,o,i){var n="string"==typeof e?e:e.name||"<unnamed action>",r="function"==typeof e?e:o,a="function"==typeof e?o:i;return t("function"==typeof r,"`runInAction` expects a function"),t(0===r.length,"`runInAction` expects a function without arguments"),t("string"==typeof n&&n.length>0,"actions should have valid names, got: '"+n+"'"),it(n,r,a,void 0)}function ee(e,n){t("function"==typeof n,"`action` can only be invoked on functions"),t("string"==typeof e&&e.length>0,"actions should have valid names, got: '"+e+"'");var r=function(){return it(e,n,this,arguments)};return r.isMobxAction=!0,r}function it(f,p,i,n){var d=e.derivationStack;t(!(d[d.length-1]instanceof b),"Computed values or transformers should not invoke actions or trigger other side effects");var l,s=r();if(s){l=Date.now();var a=n&&n.length||0,h=new Array(a);if(a>0)for(var o=0;a>o;o++)h[o]=n[o];c({type:"action",name:f,fn:p,target:i,arguments:h})}var v=j();Ae(f,i,!1);var y=z(!0);try{return p.apply(i,n)}finally{J(y),ke(!1),A(v),s&&u({time:Date.now()-l})}}function It(n){t(0===e.derivationStack.length,"It is not allowed to set `useStrict` when a derivation is running"),e.strictMode=n,e.allowStateChanges=!n}function rt(e,t){var n=z(e),r=t();return J(n),r}function z(t){var n=e.allowStateChanges;return e.allowStateChanges=t,n}function J(t){e.allowStateChanges=t}function nt(e){t(e.isDirty,"atom not dirty"),e.isDirty=!1,oe(e,!0)}function pe(){return e.derivationStack.length>0&&e.isTracking}function fe(){e.allowStateChanges||t(!1,e.strictMode?"It is not allowed to create or change state outside an `action` when MobX is in strict mode. Wrap the current method in `action` if this state change is intended":"It is not allowed to change the state when a computed value or transformer is being evaluated. Use 'autorun' to create reactive functions with side-effects.")}function Ct(e){1===++e.dependencyStaleCount&&Pe(e)}function Lt(e,n){if(t(e.dependencyStaleCount>0,"unexpected ready notification"),n&&(e.dependencyChangeCount+=1),0===--e.dependencyStaleCount)if(e.dependencyChangeCount>0){e.dependencyChangeCount=0;var r=e.onDependenciesReady();oe(e,r)}else oe(e,!1)}function Xe(t,s){var n=t.observing;t.observing=new Array(n.length+100),t.unboundDepsCount=0,t.runId=++e.runId,e.derivationStack.push(t);var u=e.isTracking;e.isTracking=!0;var o,i=!0;try{o=s.call(t),i=!1}finally{if(i){var a="[mobx] An uncaught exception occurred while calculating your computed value, autorun or transformer. Or inside the render() method of an observer based React component. These functions should never throw exceptions as MobX will not always be able to recover from them. "+("Please fix the error reported after this message or enable 'Pause on (caught) exceptions' in your debugger to find the root cause. In: '"+t.name+"'");r()&&_({type:"error",object:this,message:a}),console.warn(a),t.unboundDepsCount=0,t.observing=n,Z()}else e.isTracking=u,e.derivationStack.length-=1,Tt(t,n)}return o}function Tt(n,r){for(var o=r.length,i=n.observing,a=i.length=n.unboundDepsCount,e=0;o>e;e++)r[e].diffValue=-1;for(var e=0;a>e;e++){var t=i[e];++t.diffValue>0&&(t.diffValue=0,Ut(t,n))}for(var e=0;o>e;e++){var t=r[e];t.diffValue<0&&(t.diffValue=0,Ne(t,n))}}function be(n){for(var e=n.observing,r=e.length,t=0;r>t;t++)Ne(e[t],n);e.length=0}function Ke(e){var t=j(),n=e();return A(t),n}function j(){var t=e.isTracking;return e.isTracking=!1,t}function A(t){e.isTracking=t}function Pt(){}function Z(){e.resetId++;var n=new ot;for(var t in n)-1===At.indexOf(t)&&(e[t]=n[t]);e.allowStateChanges=!e.strictMode}function Ut(e,t){var n=0===e.observers.length;e.observers.add(t),n&&e.onBecomeObserved()}function Ne(e,t){e.observers.remove(t),0===e.observers.length&&e.onBecomeUnobserved()}function ze(n){if(e.isTracking!==!1){var t=e.derivationStack[e.derivationStack.length-1];t.runId!==n.lastAccessedBy&&(n.lastAccessedBy=t.runId,t.observing[t.unboundDepsCount++]=n)}}function Pe(e){for(var t=e.observers.asArray(),r=t.length,n=0;r>n;n++)Ct(t[n]);e.staleObservers=e.staleObservers.concat(t)}function oe(e,t){e.staleObservers.splice(0).forEach(function(e){return Lt(e,t)})}function ie(){if(!(e.isRunningReactions===!0||e.inTransaction>0)){e.isRunningReactions=!0;for(var t=e.pendingReactions,o=0;t.length>0;){if(++o===Vt)throw new Error("Reaction doesn't converge to a stable state. Probably there is a cycle in the reactive function: "+t[0].toString());for(var r=t.splice(0),n=0,i=r.length;i>n;n++)r[n].runReaction()}e.isRunningReactions=!1}}function r(){return F}function _(r){if(!F)return!1;for(var n=e.spyListeners,t=0,o=n.length;o>t;t++)n[t](r)}function c(e){var t=ct({},e,{spyReportStart:!0});_(t)}function u(e){_(e?ct({},e,qe):qe)}function Te(t){return e.spyListeners.push(t),F=e.spyListeners.length>0,Q(function(){var n=e.spyListeners.indexOf(t);-1!==n&&e.spyListeners.splice(n,1),F=e.spyListeners.length>0})}function nn(e){return a("trackTransitions is deprecated. Use mobx.spy instead"),"boolean"==typeof e&&(a("trackTransitions only takes a single callback function. If you are using the mobx-react-devtools, please update them first"),e=arguments[1]),e?Te(e):(a("trackTransitions without callback has been deprecated and is a no-op now. If you are using the mobx-react-devtools, please update them first"),function(){})}function D(n,e,t){void 0===e&&(e=void 0),void 0===t&&(t=!0),Ae(n.name||"anonymous transaction",e,t);var r=n.call(e);return ke(t),r}function Ae(o,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),e.inTransaction+=1,n&&r()&&c({type:"transaction",target:t,name:o})}function ke(t){if(void 0===t&&(t=!0),0===--e.inTransaction){for(var o=e.changedAtoms.splice(0),n=0,i=o.length;i>n;n++)nt(o[n]);ie()}t&&r()&&u()}function R(e){return e.interceptors&&e.interceptors.length>0}function K(t,n){var e=t.interceptors||(t.interceptors=[]);return e.push(n),Q(function(){var t=e.indexOf(n);-1!==t&&e.splice(t,1)})}function k(o,e){for(var i=j(),r=o.interceptors,n=0,a=r.length;a>n;n++)if(e=r[n](e),t(!e||e.type,"Intercept handlers should return nothing or a change object"),!e)return null;return A(i),e}function h(e){return e.changeListeners&&e.changeListeners.length>0}function H(t,n){var e=t.changeListeners||(t.changeListeners=[]);return e.push(n),Q(function(){var t=e.indexOf(n);-1!==t&&e.splice(t,1)})}function d(r,n){var o=j(),e=r.changeListeners;if(e){e=e.slice();for(var t=0,i=e.length;i>t;t++)Array.isArray(n)?e[t].apply(null,n):e[t](n);A(o)}}function we(e){return new ce(e)}function _e(e){return new W(e)}function Se(e){return new re(e)}function $t(e,t){return $e(e,t)}function L(e,t){return e instanceof ce?[n.Reference,e.value]:e instanceof W?[n.Structure,e.value]:e instanceof re?[n.Flat,e.value]:[t,e]}function rn(e){return e===we?n.Reference:e===_e?n.Structure:e===Se?n.Flat:(t(void 0===e,"Cannot determine value mode from function. Please pass in one of these: mobx.asReference, mobx.asStructure or mobx.asFlat, got: "+e),n.Recursive)}function B(e,a,i){var r;if(N(e))return e;switch(a){case n.Reference:return e;case n.Flat:p(e,"Items inside 'asFlat' cannot have modifiers"),r=n.Reference;break;case n.Structure:p(e,"Items inside 'asStructure' cannot have modifiers"),r=n.Structure;break;case n.Recursive:o=L(e,n.Recursive),r=o[0],e=o[1];break;default:t(!1,"Illegal State")}return Array.isArray(e)?De(e,r,i):g(e)&&Object.isExtensible(e)?We(e,e,r,i):e;var o}function p(e,t){if(e instanceof ce||e instanceof W||e instanceof re)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function on(e){var t=Ce(e),n=Ee(e);Object.defineProperty(l.prototype,""+e,{enumerable:!1,configurable:!0,set:t,get:n})}function Ce(e){return function(t){var r=this.$mobx,o=r.values;if(p(t,"Modifiers cannot be used on array values. For non-reactive array values use makeReactive(asFlat(array))."),e<o.length){fe();var i=o[e];if(R(r)){var a=k(r,{type:"update",object:r.array,index:e,newValue:t});if(!a)return;t=a.newValue}t=r.makeReactiveArrayItem(t);var s=r.mode===n.Structure?!M(i,t):i!==t;s&&(o[e]=t,r.notifyArrayChildUpdate(e,t,i))}else{if(e!==o.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+o.length);r.spliceWithArray(e,0,[t])}}}function Ee(e){return function(){var t=this.$mobx;return t&&e<t.values.length?(t.atom.reportObserved(),t.values[e]):void 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")}}function Ve(t){for(var e=ge;t>e;e++)on(e);ge=t}function De(e,t,n){return new l(e,t,n)}function Yt(e){return a("fastArray is deprecated. Please use `observable(asFlat([]))`"),De(e,n.Flat,null)}function q(e){return e instanceof l}function $e(e,t){return new S(e,t)}function $(e){return e instanceof S}function ne(e,t,r){if(void 0===r&&(r=n.Recursive),y(e))return e.$mobx;g(e)||(t=e.constructor.name+"@"+i()),t||(t="ObservableObject@"+i());var o=new Fe(e,t,r);return V(e,"$mobx",o),o}function Xt(e,t,n){e.values[t]?e.target[t]=n:te(e,t,n,!0)}function te(t,n,e,a){a&&pt(t.target,n);var r,o=t.name+"."+n,i=!0;if("function"!=typeof e||0!==e.length||st(e))if(e instanceof W&&"function"==typeof e.value&&0===e.value.length)r=new b(e.value,t.target,!0,o);else{if(i=!1,R(t)){var s=k(t,{object:t.target,name:n,type:"add",newValue:e});if(!s)return;e=s.newValue}r=new C(e,t.mode,o,!1),e=r.value}else r=new b(e,t.target,!1,o);t.values[n]=r,a&&Object.defineProperty(t.target,n,i?Kt(n):Qt(n)),i||Wt(t,t.target,n,e)}function Qt(e){var t=Ue[e];return t?t:Ue[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){Je(this,e,t)}}}function Kt(e){var t=Me[e];return t?t:Me[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:Be}}function Je(o,i,e){var t=o.$mobx,a=t.values[i];if(R(t)){var n=k(t,{type:"update",object:o,name:i,newValue:e});if(!n)return;e=n.newValue}if(e=a.prepareNewValue(e),e!==T){var l=h(t),s=r(),n=d||h?{type:"update",object:o,oldValue:a.value,name:i,newValue:e}:null;s&&c(n),a.setNewValue(e),l&&d(t,n),s&&u()}}function Wt(t,i,a,s){var n=h(t),e=r(),o=n||e?{type:"add",object:i,name:a,newValue:s}:null;e&&c(o),n&&d(t,o),e&&u()}function y(e){return"object"==typeof e&&null!==e?(E(e),e.$mobx instanceof Fe):!1}function v(e,n){if("object"==typeof e&&null!==e){if(q(e))return t(void 0===n,"It is not possible to get index atoms from arrays"),e.$mobx.atom;if($(e)){if(void 0===n)return v(e._keys);var r=e._data[n]||e._hasMap[n];return t(!!r,"the entry '"+n+"' does not exist in the observable map '"+ye(e)+"'"),r}if(E(e),y(e)){t(!!n,"please specify a property");var o=e.$mobx.values[n];return t(!!o,"no observable property '"+n+"' found on the observable object '"+ye(e)+"'"),o}if(e instanceof I||e instanceof b||e instanceof f)return e}else if("function"==typeof e&&e.$mobx instanceof f)return e.$mobx;t(!1,"Cannot obtain atom from "+e)}function m(e,n){return t(e,"Expection some object"),void 0!==n?m(v(e,n)):e instanceof I||e instanceof b||e instanceof f?e:$(e)?e:(E(e),e.$mobx?e.$mobx:void t(!1,"Cannot obtain administration from "+e))}function ye(e,t){var n;return n=void 0!==t?v(e,t):y(e)||$(e)?m(e):v(e),n.name}function ve(e,r,o,i,a){function n(s,n,u,c){if(t(a||Ye(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),u){s.hasOwnProperty("__mobxLazyInitializers")||x(s,"__mobxLazyInitializers",s.__mobxLazyInitializers&&s.__mobxLazyInitializers.slice()||[]);var f=u.value,l=u.initializer;return s.__mobxLazyInitializers.push(function(t){e(t,n,l?l.call(t):f,c,u)}),{enumerable:i,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&E(this),r.call(this,n)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&E(this),o.call(this,n,e)}}}var p={enumerable:i,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[n]===!0||He(this,n,void 0,e,c,u),r.call(this,n)},set:function(t){this.__mobxInitializedProps&&this.__mobxInitializedProps[n]===!0?o.call(this,n,t):He(this,n,t,e,c,u)}};return arguments.length<3&&Object.defineProperty(s,n,p),p}return a?function(){if(Ye(arguments))return n.apply(null,arguments);var e=arguments;return function(t,r,o){return n(t,r,o,e)}}:n}function He(e,t,n,r,o,i){e.hasOwnProperty("__mobxInitializedProps")||x(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,o,i)}function E(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(x(e,"__mobxDidRunLazyInitializers",!0),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function Ye(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}function Et(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function U(e){t(e[Le]!==!0,"Illegal state: cannot recycle array as iterator"),V(e,Le,!0);var n=-1;return V(e,"next",function(){return n++,{done:n>=this.length,value:n<this.length?this[n]:void 0}}),e}function tt(e,t){V(e,Et(),t)}function i(){return++e.mobxGuid}function t(t,n,e){if(!t)throw new Error("[mobx] Invariant failed: "+n+(e?" in '"+e+"'":""))}function a(e){-1===Ie.indexOf(e)&&(Ie.push(e),console.error("[mobx] Deprecated: "+e))}function Q(t){var e=!1;return function(){return e?void 0:(e=!0,t.apply(this,arguments))}}function P(t){var e=[];return t.forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),e}function xe(t,e,n){if(void 0===e&&(e=100),void 0===n&&(n=" - "),!t)return"";var r=t.slice(0,e);return""+r.join(n)+(t.length>e?" (... and "+(t.length-e)+"more)":"")}function g(e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype}function ct(){for(var r=arguments[0],e=1,o=arguments.length;o>e;e++){var t=arguments[e];for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n])}return r}function de(n,e,t){return n?!M(e,t):e!==t}function vt(n,t){for(var e=0;e<t.length;e++)x(n,t[e],n[t[e]])}function x(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function V(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!1,value:n})}function Re(t,n){var e=Object.getOwnPropertyDescriptor(t,n);return!e||e.configurable!==!1&&e.writable!==!1}function pt(n,e){t(Re(n,e),"Cannot make property '"+e+"' observable, it is not configurable and writable in the target object")}function lt(t){var e=[];for(var n in t)e.push(n);return e}function M(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var o=Array.isArray(e)||q(e);if(o!==(Array.isArray(t)||q(t)))return!1;if(o){if(e.length!==t.length)return!1;for(var n=e.length-1;n>=0;n--)if(!M(e[n],t[n]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(lt(e).length!==lt(t).length)return!1;for(var r in e){if(!(r in t))return!1;if(!M(e[r],t[r]))return!1}return!0}return e===t}var ae=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)};Pt(),exports.extras={allowStateChanges:rt,getAtom:v,getDebugName:ye,getDependencyTree:ht,getObserverTree:Dt,isComputingDerivation:pe,isSpyEnabled:r,resetGlobalState:Z,spyReport:_,spyReportEnd:u,spyReportStart:c,trackTransitions:nn},exports._={getAdministration:m,resetGlobalState:Z},exports.autorun=le,exports.when=je,exports.autorunUntil=tn,exports.autorunAsync=Zt,exports.reaction=qt;var gt=ve(function(i,a,c,e,s){var r=s.get;t("function"==typeof r,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'");var o=!1;e&&1===e.length&&e[0].asStructure===!0&&(o=!0);var u=ne(i,void 0,n.Recursive);te(u,a,o?_e(r):r,!1)},function(e){return this.$mobx.values[e].get()},Be,!1,!0);exports.computed=ue,exports.createTransformer=Jt,exports.expr=zt,exports.extendObservable=se,exports.intercept=jt,exports.isObservable=N;var xt=ve(function(t,r,e){var o=z(!0);"function"==typeof e&&(e=we(e));var i=ne(t,void 0,n.Recursive);te(i,r,e,!0),J(o)},function(e){return this.$mobx.values[e].get()},function(e,t){Je(this,e,t)},!0,!1);exports.observable=Y;var o;!function(e){e[e.Reference=0]="Reference",e[e.PlainObject=1]="PlainObject",e[e.ComplexObject=2]="ComplexObject",e[e.Array=3]="Array",e[e.ViewFunction=4]="ViewFunction",e[e.ComplexFunction=5]="ComplexFunction"}(o||(o={})),exports.observe=mt,exports.toJS=w,exports.toJSON=dt,exports.whyRun=yt;var _t=ve(function(r,t,n,e,a){var o=e&&1===e.length?e[0]:n.name||t||"<unnamed action>",i=me(o,n);x(r,t,i)},function(e){return this[e]},function(){t(!1,"It is not allowed to assign new values to @action fields")},!1,!0);exports.action=me,exports.isAction=st,exports.runInAction=St,exports.useStrict=It;var I=function(){function n(e,t,n){void 0===e&&(e="Atom@"+i()),void 0===t&&(t=Oe),void 0===n&&(n=Oe),this.name=e,this.onBecomeObserved=t,this.onBecomeUnobserved=n,this.isDirty=!1,this.staleObservers=[],this.observers=new X,this.diffValue=0,this.lastAccessedBy=0}return n.prototype.reportObserved=function(){ze(this)},n.prototype.reportChanged=function(){this.isDirty||(this.reportStale(),this.reportReady())},n.prototype.reportStale=function(){this.isDirty||(this.isDirty=!0,Pe(this))},n.prototype.reportReady=function(){t(this.isDirty,"atom not dirty"),e.inTransaction>0?e.changedAtoms.push(this):(nt(this),ie())},n.prototype.toString=function(){return this.name},n}();exports.Atom=I;var b=function(){function n(e,t,n,r){this.derivation=e,this.scope=t,this.compareStructural=n,this.isLazy=!0,this.isComputing=!1,this.staleObservers=[],this.observers=new X,this.observing=[],this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.unboundDepsCount=0,this.__mapid="#"+i(),this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.value=void 0,this.name=r||"ComputedValue@"+i()}return n.prototype.peek=function(){this.isComputing=!0;var e=z(!1),t=this.derivation.call(this.scope);return J(e),this.isComputing=!1,t},n.prototype.onBecomeObserved=function(){},n.prototype.onBecomeUnobserved=function(){be(this),this.isLazy=!0,this.value=void 0},n.prototype.onDependenciesReady=function(){var e=this.trackAndCompute();return e},n.prototype.get=function(){if(t(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),ze(this),this.dependencyStaleCount>0)return this.peek();if(this.isLazy){if(!pe())return this.peek();this.isLazy=!1,this.trackAndCompute()}return this.value},n.prototype.set=function(e){throw new Error("[ComputedValue '"+name+"'] It is not possible to assign a new value to a computed value.")},n.prototype.trackAndCompute=function(){r()&&_({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=Xe(this,this.peek);return de(this.compareStructural,t,e)},n.prototype.observe=function(n,r){var o=this,e=!0,t=void 0;return le(function(){var i=o.get();if(!e||r){var a=j();n(i,t),A(a)}e=!1,t=i})},n.prototype.toJSON=function(){return this.get()},n.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},n.prototype.whyRun=function(){var n=e.derivationStack.length>0,i=P(this.observing).map(function(e){return e.name}),r=P(this.observers.asArray()).map(function(e){return e.name}),t=this.isComputing?n?this.observers.length>0?s.INVALIDATED:s.REQUIRED:s.PEEK:s.NOT_RUNNING;if(t===s.REQUIRED){var o=e.derivationStack[e.derivationStack.length-2];o&&r.push(o.name)}return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+Ot[t]+" "+(t===s.NOT_RUNNING&&this.dependencyStaleCount>0?"(a next run is scheduled)":"")+"\n"+(this.isLazy?" * This computation is suspended (not in use by any reaction) and won't run automatically.\n Didn't expect this computation to be suspended at this point?\n 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n 2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).\n":" * This computation will re-run if any of the following observables changes:\n "+xe(i)+"\n "+(this.isComputing&&n?" (... or any observable accessed during the remainder of the current run)":"")+"\n Missing items in this list?\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n * If the outcome of this computation changes, the following observers will be re-run:\n "+xe(r)+"\n")},n}(),s;!function(e){e[e.PEEK=0]="PEEK",e[e.INVALIDATED=1]="INVALIDATED",e[e.REQUIRED=2]="REQUIRED",e[e.NOT_RUNNING=3]="NOT_RUNNING"}(s||(s={}));var Ot=(O={},O[s.PEEK]="[peek] The value of this computed value was requested outside an reaction",O[s.INVALIDATED]="[invalidated] Some observables used by this computation did change",O[s.REQUIRED]="[started] This computation is required by another computed value / reaction",O[s.NOT_RUNNING]="[idle] This compution is currently not running",O);exports.untracked=Ke;var At=["mobxGuid","resetId","spyListeners","strictMode","runId"],ot=function(){function e(){this.version=3,this.derivationStack=[],this.runId=0,this.mobxGuid=0,this.inTransaction=0,this.isTracking=!1,this.isRunningReactions=!1,this.changedAtoms=[],this.pendingReactions=[],this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[]}return e}(),e=function(){var e=new ot;if(global.__mobservableTrackingStack||global.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(global.__mobxGlobal&&global.__mobxGlobal.version!==e.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");return global.__mobxGlobal?global.__mobxGlobal:global.__mobxGlobal=e}(),et,f=function(){function t(e,t){void 0===e&&(e="Reaction@"+i()),this.name=e,this.onInvalidate=t,this.staleObservers=G,this.observers=et||(et=new X),this.observing=[],this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.unboundDepsCount=0,this.__mapid="#"+i(),this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1}return t.prototype.onBecomeObserved=function(){},t.prototype.onBecomeUnobserved=function(){},t.prototype.onDependenciesReady=function(){return this.schedule(),!1},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,e.pendingReactions.push(this),ie())},t.prototype.isScheduled=function(){return this.dependencyStaleCount>0||this._isScheduled},t.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&r()&&_({object:this,type:"scheduled-reaction"}))},t.prototype.track=function(e){var t,n=r();n&&(t=Date.now(),c({object:this,type:"reaction",fn:e})),this._isRunning=!0,Xe(this,e),this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&be(this),n&&u({time:Date.now()-t})},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||be(this))},t.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.whyRun=function(){var e=P(this.observing).map(function(e){return e.name});return"\nWhyRun? reaction '"+this.name+"':\n * Status: ["+(this.isDisposed?"stopped":this._isRunning?"running":this.isScheduled()?"scheduled":"idle")+"]\n * This reaction will re-run if any of the following observables changes:\n "+xe(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n Missing items in this list?\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n"},t}();exports.Reaction=f;var Vt=100,F=!1,qe={spyReportEnd:!0};exports.spy=Te,exports.transaction=D;var n;!function(e){e[e.Recursive=0]="Recursive",e[e.Reference=1]="Reference",e[e.Structure=2]="Structure",e[e.Flat=3]="Flat";
}(n||(n={})),exports.asReference=we,exports.asStructure=_e,exports.asFlat=Se;var ce=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}(),W=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}(),re=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}();exports.asMap=$t;var Mt=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),ge=0,Ge=function(){function e(){}return e}();Ge.prototype=[];var Ft=function(){function e(e,t,n,r){this.mode=t,this.array=n,this.owned=r,this.lastKnownLength=0,this.interceptors=null,this.changeListeners=null,this.atom=new I(e||"ObservableArray@"+i())}return e.prototype.makeReactiveArrayItem=function(e){return p(e,"Array values cannot have modifiers"),this.mode===n.Flat||this.mode===n.Reference?e:B(e,this.mode,this.atom.name+"[..]")},e.prototype.intercept=function(e){return K(this,e)},e.prototype.observe=function(t,e){return void 0===e&&(e=!1),e&&t({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),H(this,t)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||0>e)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;e!==t&&(e>t?this.spliceWithArray(t,0,new Array(e-t)):this.spliceWithArray(e,t-e))},e.prototype.updateArrayLength=function(t,e){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=e,e>0&&t+e+1>ge&&Ve(t+e+1)},e.prototype.spliceWithArray=function(e,n,t){fe();var r=this.values.length;if(void 0===e?e=0:e>r?e=r:0>e&&(e=Math.max(0,r+e)),n=1===arguments.length?r-e:void 0===n||null===n?0:Math.max(0,Math.min(n,r-e)),void 0===t&&(t=[]),R(this)){var o=k(this,{object:this.array,type:"splice",index:e,removedCount:n,added:t});if(!o)return G;n=o.removedCount,t=o.added}t=t.map(this.makeReactiveArrayItem,this);var s=t.length-n;this.updateArrayLength(r,s);var i=(a=this.values).splice.apply(a,[e,n].concat(t));return(0!==n||0!==t.length)&&this.notifyArraySplice(e,t,i),i;var a},e.prototype.notifyArrayChildUpdate=function(o,i,a){var e=!this.owned&&r(),t=h(this),n=t||e?{object:this.array,type:"update",index:o,newValue:i,oldValue:a}:null;e&&c(n),this.atom.reportChanged(),t&&d(this,n),e&&u()},e.prototype.notifyArraySplice=function(a,t,n){var e=!this.owned&&r(),o=h(this),i=o||e?{object:this.array,type:"splice",index:a,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;e&&c(i),this.atom.reportChanged(),o&&d(this,i),e&&u()},e}(),l=function(t){function e(n,o,i,r){void 0===r&&(r=!1),t.call(this);var e=new Ft(i,o,this,r);V(this,"$mobx",e),n&&n.length?(e.updateArrayLength(0,n.length),e.values=n.map(e.makeReactiveArrayItem,e),e.notifyArraySplice(0,e.values.slice(),G)):e.values=[],Mt&&Object.defineProperty(e.array,"0",Bt)}return ae(e,t),e.prototype.intercept=function(e){return this.$mobx.intercept(e)},e.prototype.observe=function(t,e){return void 0===e&&(e=!1),this.$mobx.observe(t,e)},e.prototype.clear=function(){return this.splice(0)},e.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},e.prototype.toJS=function(){return this.slice()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.peek=function(){return this.$mobx.values},e.prototype.find=function(r,o,t){void 0===t&&(t=0),this.$mobx.atom.reportObserved();for(var n=this.$mobx.values,i=n.length,e=t;i>e;e++)if(r.call(o,n[e],e,this))return n[e]},e.prototype.splice=function(t,n){for(var r=[],e=2;e<arguments.length;e++)r[e-2]=arguments[e];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(t);case 2:return this.$mobx.spliceWithArray(t,n)}return this.$mobx.spliceWithArray(t,n,r)},e.prototype.push=function(){for(var n=[],e=0;e<arguments.length;e++)n[e-0]=arguments[e];var t=this.$mobx;return t.spliceWithArray(t.values.length,0,n),t.values.length},e.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},e.prototype.shift=function(){return this.splice(0,1)[0]},e.prototype.unshift=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var n=this.$mobx;return n.spliceWithArray(0,0,t),n.values.length},e.prototype.reverse=function(){this.$mobx.atom.reportObserved();var e=this.slice();return e.reverse.apply(e,arguments)},e.prototype.sort=function(t){this.$mobx.atom.reportObserved();var e=this.slice();return e.sort.apply(e,arguments)},e.prototype.remove=function(t){var e=this.$mobx.values.indexOf(t);return e>-1?(this.splice(e,1),!0):!1},e.prototype.toString=function(){return"[mobx.array] "+Array.prototype.toString.apply(this.$mobx.values,arguments)},e.prototype.toLocaleString=function(){return"[mobx.array] "+Array.prototype.toLocaleString.apply(this.$mobx.values,arguments)},e}(Ge);tt(l.prototype,function(){return U(this.slice())}),vt(l.prototype,["constructor","observe","clear","replace","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(l.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];x(l.prototype,e,function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)})});var Bt={configurable:!0,enumerable:!1,set:Ce(0),get:Ee(0)};Ve(1e3),exports.fastArray=Yt,exports.isObservableArray=q;var Gt={},S=function(){function e(e,r){var t=this;this.$mobx=Gt,this._data={},this._hasMap={},this.name="ObservableMap@"+i(),this._keys=new l(null,n.Reference,this.name+".keys()",!0),this.interceptors=null,this.changeListeners=null,this._valueMode=rn(r),this._valueMode===n.Flat&&(this._valueMode=n.Reference),rt(!0,function(){g(e)?t.merge(e):Array.isArray(e)&&e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)})})}return e.prototype._has=function(e){return"undefined"!=typeof this._data[e]},e.prototype.has=function(e){return this.isValidKey(e)?(e=""+e,this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get()):!1},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(p(t,"[mobx.map.set] Expected unwrapped value to be inserted to key '"+e+"'. If you need to use modifiers pass them as second argument to the constructor"),R(this)){var r=k(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return;t=r.newValue}n?this._updateValue(e,t):this._addValue(e,t)},e.prototype.delete=function(e){var t=this;if(this.assertValidKey(e),e=""+e,R(this)){var n=k(this,{type:"delete",object:this,name:e});if(!n)return}if(this._has(e)){var o=r(),i=h(this),n=i||o?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;o&&c(n),D(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1);var n=t._data[e];n.setNewValue(void 0),t._data[e]=void 0},void 0,!1),i&&d(this,n),o&&u()}},e.prototype._updateHasMapEntry=function(t,r){var e=this._hasMap[t];return e?e.setNewValue(r):e=this._hasMap[t]=new C(r,n.Reference,this.name+"."+t+"?",!1),e},e.prototype._updateValue=function(o,e){var t=this._data[o];if(e=t.prepareNewValue(e),e!==T){var n=r(),i=h(this),a=i||n?{type:"update",object:this,oldValue:t.value,name:o,newValue:e}:null;n&&c(a),t.setNewValue(e),i&&d(this,a),n&&u()}},e.prototype._addValue=function(e,n){var t=this;D(function(){var r=t._data[e]=new C(n,t._valueMode,t.name+"."+e,!1);n=r.value,t._updateHasMapEntry(e,!0),t._keys.push(e)},void 0,!1);var o=r(),i=h(this),a=i||o?{type:"add",object:this,name:e,newValue:n}:null;o&&c(a),i&&d(this,a),o&&u()},e.prototype.get=function(e){return e=""+e,this.has(e)?this._data[e].get():void 0},e.prototype.keys=function(){return U(this._keys.slice())},e.prototype.values=function(){return U(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return U(this._keys.map(function(t){return[t,e.get(t)]}))},e.prototype.forEach=function(e,t){var n=this;this.keys().forEach(function(r){return e.call(t,n.get(r),r)})},e.prototype.merge=function(t){var n=this;return D(function(){t instanceof e?t.keys().forEach(function(e){return n.set(e,t.get(e))}):Object.keys(t).forEach(function(e){return n.set(e,t[e])})},void 0,!1),this},e.prototype.clear=function(){var e=this;D(function(){Ke(function(){e.keys().forEach(e.delete,e)})},void 0,!1)},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.toJS=function(){var t=this,e={};return this.keys().forEach(function(n){return e[n]=t.get(n)}),e},e.prototype.toJs=function(){return a("toJs is deprecated, use toJS instead"),this.toJS()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.isValidKey=function(e){return null===e||void 0===e?!1:"string"!=typeof e&&"number"!=typeof e&&"boolean"!=typeof e?!1:!0},e.prototype.assertValidKey=function(e){if(!this.isValidKey(e))throw new Error("[mobx.map] Invalid key: '"+e+"'")},e.prototype.toString=function(){var e=this;return this.name+"[{ "+this.keys().map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,n){return t(n!==!0,"`observe` doesn't support the fire immediately property for observable maps."),H(this,e)},e.prototype.intercept=function(e){return K(this,e)},e}();exports.ObservableMap=S,tt(S.prototype,function(){return this.entries()}),exports.map=$e,exports.isObservableMap=$;var Fe=function(){function e(e,t,n){this.target=e,this.name=t,this.mode=n,this.values={},this.changeListeners=null,this.interceptors=null}return e.prototype.observe=function(e,n){return t(n!==!0,"`observe` doesn't support the fire immediately property for observable objects."),H(this,e)},e.prototype.intercept=function(e){return K(this,e)},e}(),Ue={},Me={};exports.isObservableObject=y;var T={},C=function(t){function e(s,u,e,o){void 0===e&&(e="ObservableValue@"+i()),void 0===o&&(o=!0),t.call(this,e),this.mode=u,this.hasUnreportedChange=!1,this.value=void 0;var a=L(s,n.Recursive),c=a[0],l=a[1];this.mode===n.Recursive&&(this.mode=c),this.value=B(l,this.mode,this.name),o&&r()&&_({type:"create",object:this,newValue:this.value})}return ae(e,t),e.prototype.set=function(e){var n=this.value;if(e=this.prepareNewValue(e),e!==T){var t=r();t&&c({type:"update",object:this,newValue:e,oldValue:n}),this.setNewValue(e),t&&u()}},e.prototype.prepareNewValue=function(e){if(p(e,"Modifiers cannot be used on non-initial values."),fe(),R(this)){var t=k(this,{object:this,type:"update",newValue:e});if(!t)return T;e=t.newValue}var r=de(this.mode===n.Structure,this.value,e);return r?B(e,this.mode,this.name):T},e.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),h(this)&&d(this,[e,t])},e.prototype.get=function(){return this.reportObserved(),this.value},e.prototype.intercept=function(e){return K(this,e)},e.prototype.observe=function(e,t){return t&&e(this.value,void 0),H(this,e)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e}(I),Le="__$$iterating",X=function(){function e(){this.size=0,this.data={}}return Object.defineProperty(e.prototype,"length",{get:function(){return this.size},enumerable:!0,configurable:!0}),e.prototype.asArray=function(){var e=new Array(this.size),t=0;for(var n in this.data)e[t]=this.data[n],t++;return e},e.prototype.add=function(e){var t=e.__mapid;t in this.data||(this.data[t]=e,this.size++)},e.prototype.remove=function(e){e.__mapid in this.data&&(delete this.data[e.__mapid],this.size--)},e}();exports.SimpleSet=X;var en=function(){function e(){this.listeners=[],a("extras.SimpleEventEmitter is deprecated and will be removed in the next major release")}return e.prototype.emit=function(){for(var t=this.listeners.slice(),e=0,n=t.length;n>e;e++)t[e].apply(null,arguments)},e.prototype.on=function(e){var t=this;return this.listeners.push(e),Q(function(){var n=t.listeners.indexOf(e);-1!==n&&t.listeners.splice(n,1)})},e.prototype.once=function(t){var e=this.on(function(){e(),t.apply(this,arguments)});return e},e}();exports.SimpleEventEmitter=en;var G=[];Object.freeze(G);var Ie=[],Oe=function(){},O;
//# sourceMappingURL=lib/mobx.min.js.map
/** MobX - (c) Michel Weststrate 2015, 2016 - MIT Licensed */
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.mobx=e()}}(function(){return function a(e,t,n){function r(i,l){if(!t[i]){if(!e[i]){var u="function"==typeof require&&require;if(!l&&u)return u(i,!0);if(o)return o(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var s=t[i]={exports:{}};e[i][0].call(s.exports,function(t){var n=e[i][1][t];return r(n?n:t)},s,s.exports,a,e,t,n)}return t[i].exports}for(var o="function"==typeof require&&require,i=0;i<n.length;i++)r(n[i]);return r}({1:[function(t,n,e){(function(O){"use strict";function ge(t,o,u){var i,e,r;"string"==typeof t?(i=t,e=o,r=u):"function"==typeof t&&(i=t.name||"Autorun@"+a(),e=t,r=o),p(e,"autorun methods cannot have modifiers"),n("function"==typeof e,"autorun expects a function"),n(0===e.length,"autorun expects a function without arguments"),r&&(e=e.bind(r));var s=new y(i,function(){this.track(e)});return s.schedule(),s.getDisposer()}function st(e,s,u,l){var r,i,o,t;"string"==typeof e?(r=e,i=s,o=u,t=l):"function"==typeof e&&(r="When@"+a(),i=e,o=s,t=u);var c=!1,n=ge(r,function(){if(i.call(t)){n?n():c=!0;var e=j();o.call(t),I(e)}});return c&&n(),n}function sn(e,t,n){return s("`autorunUntil` is deprecated, please use `when`."),st.apply(null,arguments)}function an(e,u,c,l){var o,t,n,r;"string"==typeof e?(o=e,t=u,n=c,r=l):"function"==typeof e&&(o=e.name||"AutorunAsync@"+a(),t=e,n=u,r=c),void 0===n&&(n=1),r&&(t=t.bind(r));var s=!1,i=new y(o,function(){s||(s=!0,setTimeout(function(){s=!1,i.isDisposed||i.track(t)},n))});return i.schedule(),i.getDisposer()}function on(o,p,w,g,b,_){function m(){if(!l.isDisposed){var e=!1;l.track(function(){var t=d();e=_e(x,s,t),s=t}),u&&n&&t(s),u||e!==!0||t(s),u&&(u=!1)}}var c,f,t,n,e,i;"string"==typeof o?(c=o,f=p,t=w,n=g,e=b,i=_):(c=o.name||p.name||"Reaction@"+a(),f=o,t=p,n=w,e=g,i=b),void 0===n&&(n=!1),void 0===e&&(e=0);var v=D(f,r.Reference),R=v[0],d=v[1],x=R===r.Structure;i&&(d=d.bind(i),t=be(c,t.bind(i)));var u=!0,h=!1,s=void 0,l=new y(c,function(){1>e?m():h||(h=!0,setTimeout(function(){h=!1,m()},e))});return l.schedule(),l.getDisposer()}function xe(e,t,r,i){return arguments.length<3&&"function"==typeof e?nn(e,t):(n(!r||!r.set,"@observable properties cannot have a setter: "+t),xt.apply(null,arguments))}function nn(n,i){var e=D(n,r.Recursive),o=e[0],t=e[1];return new g(t,i,o===r.Structure,t.name)}function He(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function tn(e,i){n("function"==typeof e&&1===e.length,"createTransformer expects a function that accepts one argument");var r={},o=t.resetId,a=function(t){function n(n,r){t.call(this,function(){return e(r)},null,!1,"Transformer-"+e.name+"-"+n),this.sourceIdentifier=n,this.sourceObject=r}return ee(n,t),n.prototype.onBecomeUnobserved=function(){var e=this.value;t.prototype.onBecomeUnobserved.call(this),delete r[this.sourceIdentifier],i&&i(e,this.sourceObject)},n}(g);return function(i){o!==t.resetId&&(r={},o=t.resetId);var n=en(i),e=r[n];return e?e.get():(e=r[n]=new a(n,i),e.get())}}function en(e){if(null===e||"object"!=typeof e)throw new Error("[mobx] transform expected some kind of object, got: "+e);var t=e.$transformId;return void 0===t&&(t=a(),R(e,"$transformId",t)),t}function Zt(e,t){return te()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),xe(e,t).get()}function ye(e){for(var i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];return n(arguments.length>=2,"extendObservable expected 2 or more arguments"),n("object"==typeof e,"extendObservable expects an object as first argument"),n(!(e instanceof S),"extendObservable should not be used on maps, use map.merge instead"),i.forEach(function(t){n("object"==typeof t,"all arguments of extendObservable should be objects"),dt(e,t,r.Recursive,null)}),e}function dt(e,t,r,i){var o=re(e,i,r);for(var n in t)if(t.hasOwnProperty(n)){if(e===t&&!ht(e,n))continue;Rt(o,n,t[n])}return e}function Yt(e,t){return Ce(b(e,t))}function Ce(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=Z(e.observing).map(Ce)),t}function Xt(e,t){return Pe(b(e,t))}function Pe(e){var t={name:e.name};return e.observers&&e.observers.length>0&&(t.observers=e.observers.asArray().map(Pe)),t}function Qt(e,t,n){return"function"==typeof n?qe(e,t,n):qt(e,t)}function qt(e,t){return w(e)&&!m(e)?(s("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),h(he(e)).intercept(t)):h(e).intercept(t)}function qe(e,t,n){return w(e)&&!m(e)?(s("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),ye(e,{property:e[t]}),qe(e,t,n)):h(e,t).intercept(n)}function Q(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof S||e instanceof f)throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(m(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof Ie||e instanceof y||e instanceof g}function Wt(r,e,t){return n(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",e),tt(r,e),n(!t||!t.get,"@observable can not be used on getters, use @computed instead"),_t.apply(null,arguments)}function he(e,u){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return Wt.apply(null,arguments);if(n(arguments.length<3,"observable expects zero, one or two arguments"),Q(e))return e;var a=D(e,r.Recursive),t=a[0],i=a[1],c=t===r.Reference?o.Reference:Jt(i);switch(c){case o.Array:case o.PlainObject:return B(i,t);case o.Reference:case o.ComplexObject:return new V(i,t);case o.ComplexFunction:throw new Error("[mobx.observable] To be able to make a function reactive it should not have arguments. If you need an observable reference to a function, use `observable(asReference(f))`");case o.ViewFunction:return s("Use `computed(expr)` instead of `observable(expr)`"),xe(e,u)}n(!1,"Illegal State")}function Jt(e){return null===e||void 0===e?o.Reference:"function"==typeof e?e.length?o.ComplexFunction:o.ViewFunction:Array.isArray(e)||e instanceof f?o.Array:"object"==typeof e?w(e)?o.PlainObject:o.ComplexObject:o.Reference}function Bt(t,n,e,r){return"function"==typeof e?Oe(t,n,e,r):Ut(t,n,e)}function Ut(e,t,n){return w(e)&&!m(e)?(s("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),h(he(e)).observe(t,n)):h(e).observe(t,n)}function Oe(e,t,n,r){return w(e)&&!m(e)?(s("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),ye(e,{property:e[t]}),Oe(e,t,n,r)):h(e,t).observe(n,r)}function k(e,n,t){function o(r){return n&&t.push([e,r]),r}if(void 0===n&&(n=!0),void 0===t&&(t=null),e instanceof Date||e instanceof RegExp)return e;if(n&&null===t&&(t=[]),n&&null!==e&&"object"==typeof e)for(var r=0,s=t.length;s>r;r++)if(t[r][0]===e)return t[r][1];if(!e)return e;if(Array.isArray(e)||e instanceof f){var i=o([]),a=e.map(function(e){return k(e,n,t)});i.length=a.length;for(var r=0,s=a.length;s>r;r++)i[r]=a[r];return i}if(e instanceof S){var u=o({});return e.forEach(function(e,r){return u[r]=k(e,n,t)}),u}if(Q(e)&&e.$mobx instanceof V)return k(e(),n,t);if(e instanceof V)return k(e.get(),n,t);if("object"==typeof e){var i=o({});for(var c in e)i[c]=k(e[c],n,t);return i}return e}function Nt(n,e,t){return void 0===e&&(e=!0),void 0===t&&(t=null),s("toJSON is deprecated. Use toJS instead"),k.apply(null,arguments)}function Se(e){return console.log(e),e}function yt(e,r){switch(arguments.length){case 0:if(e=t.derivationStack[t.derivationStack.length-1],!e)return Se("whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested it's value.");break;case 2:e=b(e,r)}return e=b(e),e instanceof g?Se(e.whyRun()):e instanceof y?Se(e.whyRun()):void n(!1,"whyRun can only be used on reactions and computed values")}function be(e,t,n,r){return 1===arguments.length&&"function"==typeof e?ve(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?ve(e,t):1===arguments.length&&"string"==typeof e?Je(e):Je(t).apply(null,arguments)}function Je(e){return function(n,r,t){return t&&"function"==typeof t.value?(t.value=ve(e,t.value),t.enumerable=!1,t):St(e).apply(this,arguments)}}function Ke(e){return"function"==typeof e&&e.isMobxAction===!0}function Mt(e,i,o){var t="string"==typeof e?e:e.name||"<unnamed action>",r="function"==typeof e?e:i,a="function"==typeof e?i:o;return n("function"==typeof r,"`runInAction` expects a function"),n(0===r.length,"`runInAction` expects a function without arguments"),n("string"==typeof t&&t.length>0,"actions should have valid names, got: '"+t+"'"),Qe(t,r,a,void 0)}function ve(e,t){n("function"==typeof t,"`action` can only be invoked on functions"),n("string"==typeof e&&e.length>0,"actions should have valid names, got: '"+e+"'");var r=function(){return Qe(e,t,this,arguments)};return r.isMobxAction=!0,r}function Qe(p,f,o,e){var d=t.derivationStack;n(!(d[d.length-1]instanceof g),"Computed values or transformers should not invoke actions or trigger other side effects");var u,s=i();if(s){u=Date.now();var a=e&&e.length||0,h=new Array(a);if(a>0)for(var r=0;a>r;r++)h[r]=e[r];l({type:"action",name:p,fn:f,target:o,arguments:h})}var v=j();it(p,o,!1);var y=F(!0);try{return f.apply(o,e)}finally{U(y),ot(!1),I(v),s&&c({time:Date.now()-u})}}function Pt(e){n(0===t.derivationStack.length,"It is not allowed to set `useStrict` when a derivation is running"),t.strictMode=e,t.allowStateChanges=!e}function nt(e,t){var n=F(e),r=t();return U(n),r}function F(e){var n=t.allowStateChanges;return t.allowStateChanges=e,n}function U(e){t.allowStateChanges=e}function ut(e){n(e.isDirty,"atom not dirty"),e.isDirty=!1,ie(e,!0)}function te(){return t.derivationStack.length>0&&t.isTracking}function me(){t.allowStateChanges||n(!1,t.strictMode?"It is not allowed to create or change state outside an `action` when MobX is in strict mode. Wrap the current method in `action` if this state change is intended":"It is not allowed to change the state when a computed value or transformer is being evaluated. Use 'autorun' to create reactive functions with side-effects.")}function $t(e){1===++e.dependencyStaleCount&&Fe(e)}function Tt(e,t){if(n(e.dependencyStaleCount>0,"unexpected ready notification"),t&&(e.dependencyChangeCount+=1),0===--e.dependencyStaleCount)if(e.dependencyChangeCount>0){e.dependencyChangeCount=0;var r=e.onDependenciesReady();ie(e,r)}else ie(e,!1)}function vt(e,s){var n=e.observing;e.observing=new Array(n.length+100),e.unboundDepsCount=0,e.runId=++t.runId,t.derivationStack.push(e);var u=t.isTracking;t.isTracking=!0;var r,o=!0;try{r=s.call(e),o=!1}finally{if(o){var a="[mobx] An uncaught exception occurred while calculating your computed value, autorun or transformer. Or inside the render() method of an observer based React component. These functions should never throw exceptions as MobX will not always be able to recover from them. "+("Please fix the error reported after this message or enable 'Pause on (caught) exceptions' in your debugger to find the root cause. In: '"+e.name+"'");i()&&A({type:"error",object:this,message:a}),console.warn(a),e.unboundDepsCount=0,e.observing=n,de()}else t.isTracking=u,t.derivationStack.length-=1,Dt(e,n)}return r}function Dt(n,r){for(var i=r.length,o=n.observing,a=o.length=n.unboundDepsCount,e=0;i>e;e++)r[e].diffValue=-1;for(var e=0;a>e;e++){var t=o[e];++t.diffValue>0&&(t.diffValue=0,Ct(t,n))}for(var e=0;i>e;e++){var t=r[e];t.diffValue<0&&(t.diffValue=0,Ne(t,n))}}function ne(n){for(var e=n.observing,r=e.length,t=0;r>t;t++)Ne(e[t],n);e.length=0}function je(e){var t=j(),n=e();return I(t),n}function j(){var e=t.isTracking;return t.isTracking=!1,e}function I(e){t.isTracking=e}function Vt(){}function de(){t.resetId++;var n=new $e;for(var e in n)-1===Et.indexOf(e)&&(t[e]=n[e]);t.allowStateChanges=!t.strictMode}function Ct(e,t){e.observers.add(t)}function Ne(e,t){e.observers.remove(t),0===e.observers.length&&e.onBecomeUnobserved()}function Ue(n){if(t.isTracking!==!1){var e=t.derivationStack[t.derivationStack.length-1];e.runId!==n.lastAccessedBy&&(n.lastAccessedBy=e.runId,e.observing[e.unboundDepsCount++]=n)}}function Fe(e){for(var t=e.observers.asArray(),r=t.length,n=0;r>n;n++)$t(t[n]);e.staleObservers=e.staleObservers.concat(t)}function ie(e,t){e.staleObservers.splice(0).forEach(function(e){return Tt(e,t)})}function ae(){if(!(t.isRunningReactions===!0||t.inTransaction>0)){t.isRunningReactions=!0;for(var e=t.pendingReactions,i=0;e.length>0;){if(++i===Lt)throw new Error("Reaction doesn't converge to a stable state. Probably there is a cycle in the reactive function: "+e[0].toString());for(var r=e.splice(0),n=0,o=r.length;o>n;n++)r[n].runReaction()}t.isRunningReactions=!1}}function i(){return W}function A(r){if(!W)return!1;for(var n=t.spyListeners,e=0,i=n.length;i>e;e++)n[e](r)}function l(e){var t=ft({},e,{spyReportStart:!0});A(t)}function c(e){A(e?ft({},e,Ze):Ze)}function Xe(e){return t.spyListeners.push(e),W=t.spyListeners.length>0,Y(function(){var n=t.spyListeners.indexOf(e);-1!==n&&t.spyListeners.splice(n,1),W=t.spyListeners.length>0})}function It(e){return s("trackTransitions is deprecated. Use mobx.spy instead"),"boolean"==typeof e&&(s("trackTransitions only takes a single callback function. If you are using the mobx-react-devtools, please update them first"),e=arguments[1]),e?Xe(e):(s("trackTransitions without callback has been deprecated and is a no-op now. If you are using the mobx-react-devtools, please update them first"),function(){})}function P(n,e,t){void 0===e&&(e=void 0),void 0===t&&(t=!0),it(n.name||"anonymous transaction",e,t);var r=n.call(e);return ot(t),r}function it(r,e,n){void 0===e&&(e=void 0),void 0===n&&(n=!0),t.inTransaction+=1,n&&i()&&l({type:"transaction",target:e,name:r})}function ot(e){if(void 0===e&&(e=!0),0===--t.inTransaction){for(var r=t.changedAtoms.splice(0),n=0,o=r.length;o>n;n++)ut(r[n]);ae()}e&&i()&&c()}function _(e){return e.interceptors&&e.interceptors.length>0}function z(t,n){var e=t.interceptors||(t.interceptors=[]);return e.push(n),Y(function(){var t=e.indexOf(n);-1!==t&&e.splice(t,1)})}function x(i,e){for(var o=j(),r=i.interceptors,t=0,a=r.length;a>t;t++)if(e=r[t](e),n(!e||e.type,"Intercept handlers should return nothing or a change object"),!e)return null;return I(o),e}function v(e){return e.changeListeners&&e.changeListeners.length>0}function N(t,n){var e=t.changeListeners||(t.changeListeners=[]);return e.push(n),Y(function(){var t=e.indexOf(n);-1!==t&&e.splice(t,1)})}function d(r,n){var i=j(),e=r.changeListeners;if(e){e=e.slice();for(var t=0,o=e.length;o>t;t++)Array.isArray(n)?e[t].apply(null,n):e[t](n);I(i)}}function se(e){return new Re(e)}function ue(e){return new H(e)}function ke(e){return new ce(e)}function At(e,t){return Me(e,t)}function D(e,t){return e instanceof Re?[r.Reference,e.value]:e instanceof H?[r.Structure,e.value]:e instanceof ce?[r.Flat,e.value]:[t,e]}function Ot(e){return e===se?r.Reference:e===ue?r.Structure:e===ke?r.Flat:(n(void 0===e,"Cannot determine value mode from function. Please pass in one of these: mobx.asReference, mobx.asStructure or mobx.asFlat, got: "+e),r.Recursive)}function B(e,a,o){var t;if(Q(e))return e;switch(a){case r.Reference:return e;case r.Flat:p(e,"Items inside 'asFlat' cannot have modifiers"),t=r.Reference;break;case r.Structure:p(e,"Items inside 'asStructure' cannot have modifiers"),t=r.Structure;break;case r.Recursive:i=D(e,r.Recursive),t=i[0],e=i[1];break;default:n(!1,"Illegal State")}return Array.isArray(e)?Le(e,t,o):w(e)&&Object.isExtensible(e)?dt(e,e,t,o):e;var i}function p(e,t){if(e instanceof Re||e instanceof H||e instanceof ce)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function un(e){var t=Ve(e),n=De(e);Object.defineProperty(f.prototype,""+e,{enumerable:!1,configurable:!0,set:t,get:n})}function Ve(e){return function(t){var n=this.$mobx,i=n.values;if(p(t,"Modifiers cannot be used on array values. For non-reactive array values use makeReactive(asFlat(array))."),e<i.length){me();var o=i[e];if(_(n)){var a=x(n,{type:"update",object:n.array,index:e,newValue:t});if(!a)return;t=a.newValue}t=n.makeReactiveArrayItem(t);var s=n.mode===r.Structure?!K(o,t):o!==t;s&&(i[e]=t,n.notifyArrayChildUpdate(e,t,o))}else{if(e!==i.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+i.length);n.spliceWithArray(e,0,[t])}}}function De(e){return function(){var t=this.$mobx;return t&&e<t.values.length?(t.atom.reportObserved(),t.values[e]):void 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")}}function Te(t){for(var e=le;t>e;e++)un(e);le=t}function Le(e,t,n){return new f(e,t,n)}function kt(e){return s("fastArray is deprecated. Please use `observable(asFlat([]))`"),Le(e,r.Flat,null)}function J(e){return e instanceof f}function Me(e,t){return new S(e,t)}function G(e){return e instanceof S}function re(e,t,n){if(void 0===n&&(n=r.Recursive),m(e))return e.$mobx;w(e)||(t=e.constructor.name+"@"+a()),t||(t="ObservableObject@"+a());var i=new Be(e,t,n);return L(e,"$mobx",i),i}function Rt(e,t,n){e.values[t]?e.target[t]=n:oe(e,t,n,!0)}function oe(t,n,e,a){a&&tt(t.target,n);var r,i=t.name+"."+n,o=!0;if("function"!=typeof e||0!==e.length||Ke(e))if(e instanceof H&&"function"==typeof e.value&&0===e.value.length)r=new g(e.value,t.target,!0,i);else{if(o=!1,_(t)){var s=x(t,{object:t.target,name:n,type:"add",newValue:e});if(!s)return;e=s.newValue}r=new V(e,t.mode,i,!1),e=r.value}else r=new g(e,t.target,!1,i);t.values[n]=r,a&&Object.defineProperty(t.target,n,o?gt(n):wt(n)),o||bt(t,t.target,n,e)}function wt(e){var t=Ee[e];return t?t:Ee[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){Ge(this,e,t)}}}function gt(e){var t=Ae[e];return t?t:Ae[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:He}}function Ge(r,o,e){var t=r.$mobx,a=t.values[o];if(_(t)){var n=x(t,{type:"update",object:r,name:o,newValue:e});if(!n)return;e=n.newValue}if(e=a.prepareNewValue(e),e!==$){var u=v(t),s=i(),n=d||v?{type:"update",object:r,oldValue:a.value,name:o,newValue:e}:null;s&&l(n),a.setNewValue(e),u&&d(t,n),s&&c()}}function bt(t,o,a,s){var n=v(t),e=i(),r=n||e?{type:"add",object:o,name:a,newValue:s}:null;e&&l(r),n&&d(t,r),e&&c()}function m(e){return"object"==typeof e&&null!==e?(T(e),e.$mobx instanceof Be):!1}function b(e,t){if("object"==typeof e&&null!==e){if(J(e))return n(void 0===t,"It is not possible to get index atoms from arrays"),e.$mobx.atom;if(G(e)){if(void 0===t)return b(e._keys);var r=e._data[t]||e._hasMap[t];return n(!!r,"the entry '"+t+"' does not exist in the observable map '"+fe(e)+"'"),r}if(T(e),m(e)){n(!!t,"please specify a property");var i=e.$mobx.values[t];return n(!!i,"no observable property '"+t+"' found on the observable object '"+fe(e)+"'"),i}if(e instanceof E||e instanceof g||e instanceof y)return e}else if("function"==typeof e&&e.$mobx instanceof y)return e.$mobx;n(!1,"Cannot obtain atom from "+e)}function h(e,t){return n(e,"Expection some object"),void 0!==t?h(b(e,t)):e instanceof E||e instanceof g||e instanceof y?e:G(e)?e:(T(e),e.$mobx?e.$mobx:void n(!1,"Cannot obtain administration from "+e))}function fe(e,t){var n;return n=void 0!==t?b(e,t):m(e)||G(e)?h(e):b(e),n.name}function pe(e,r,i,o,a){function t(s,t,u,c){if(n(a||et(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),u){s.hasOwnProperty("__mobxLazyInitializers")||R(s,"__mobxLazyInitializers",s.__mobxLazyInitializers&&s.__mobxLazyInitializers.slice()||[]);var p=u.value,l=u.initializer;return s.__mobxLazyInitializers.push(function(n){e(n,t,l?l.call(n):p,c,u)}),{enumerable:o,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&T(this),r.call(this,t)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&T(this),i.call(this,t,e)}}}var f={enumerable:o,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[t]===!0||Ye(this,t,void 0,e,c,u),r.call(this,t)},set:function(n){this.__mobxInitializedProps&&this.__mobxInitializedProps[t]===!0?i.call(this,t,n):Ye(this,t,n,e,c,u)}};return arguments.length<3&&Object.defineProperty(s,t,f),f}return a?function(){if(et(arguments))return t.apply(null,arguments);var e=arguments;return function(n,r,i){return t(n,r,i,e)}}:t}function Ye(e,t,n,r,i,o){e.hasOwnProperty("__mobxInitializedProps")||R(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,i,o)}function T(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(R(e,"__mobxDidRunLazyInitializers",!0),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function et(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}function zt(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function q(e){n(e[at]!==!0,"Illegal state: cannot recycle array as iterator"),L(e,at,!0);var t=-1;return L(e,"next",function(){return t++,{done:t>=this.length,value:t<this.length?this[t]:void 0}}),e}function rt(e,t){L(e,zt(),t)}function a(){return++t.mobxGuid}function n(t,n,e){if(!t)throw new Error("[mobx] Invariant failed: "+n+(e?" in '"+e+"'":""))}function s(e){-1===ct.indexOf(e)&&(ct.push(e),console.error("[mobx] Deprecated: "+e))}function Y(t){var e=!1;return function(){return e?void 0:(e=!0,t.apply(this,arguments))}}function Z(t){var e=[];return t.forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),e}function we(t,e,n){if(void 0===e&&(e=100),void 0===n&&(n=" - "),!t)return"";var r=t.slice(0,e);return""+r.join(n)+(t.length>e?" (... and "+(t.length-e)+"more)":"")}function w(e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype}function ft(){for(var r=arguments[0],e=1,i=arguments.length;i>e;e++){var t=arguments[e];for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n])}return r}function _e(n,e,t){return n?!K(e,t):e!==t}function mt(n,t){for(var e=0;e<t.length;e++)R(n,t[e],n[t[e]])}function R(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function L(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!1,value:n})}function ht(t,n){var e=Object.getOwnPropertyDescriptor(t,n);return!e||e.configurable!==!1&&e.writable!==!1}function tt(t,e){n(ht(t,e),"Cannot make property '"+e+"' observable, it is not configurable and writable in the target object")}function We(t){var e=[];for(var n in t)e.push(n);return e}function K(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var i=Array.isArray(e)||J(e);if(i!==(Array.isArray(t)||J(t)))return!1;if(i){if(e.length!==t.length)return!1;for(var n=e.length-1;n>=0;n--)if(!K(e[n],t[n]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(We(e).length!==We(t).length)return!1;for(var r in e){if(!(r in t))return!1;if(!K(e[r],t[r]))return!1}return!0}return e===t}var ee=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)};Vt(),e.extras={allowStateChanges:nt,getAtom:b,getDebugName:fe,getDependencyTree:Yt,getObserverTree:Xt,isComputingDerivation:te,isSpyEnabled:i,resetGlobalState:de,spyReport:A,spyReportEnd:c,spyReportStart:l,trackTransitions:It},e._={getAdministration:h,resetGlobalState:de},e.autorun=ge,e.when=st,e.autorunUntil=sn,e.autorunAsync=an,e.reaction=on;var xt=pe(function(o,a,c,e,s){var t=s.get;n("function"==typeof t,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'");var i=!1;e&&1===e.length&&e[0].asStructure===!0&&(i=!0);var u=re(o,void 0,r.Recursive);oe(u,a,i?ue(t):t,!1)},function(e){return this.$mobx.values[e].get()},He,!1,!0);e.computed=xe,e.createTransformer=tn,e.expr=Zt,e.extendObservable=ye,e.intercept=Qt,e.isObservable=Q;var _t=pe(function(t,n,e){var i=F(!0);"function"==typeof e&&(e=se(e));var o=re(t,void 0,r.Recursive);oe(o,n,e,!0),U(i)},function(e){return this.$mobx.values[e].get()},function(e,t){Ge(this,e,t)},!0,!1);e.observable=he;var o;!function(e){e[e.Reference=0]="Reference",e[e.PlainObject=1]="PlainObject",e[e.ComplexObject=2]="ComplexObject",e[e.Array=3]="Array",e[e.ViewFunction=4]="ViewFunction",e[e.ComplexFunction=5]="ComplexFunction"}(o||(o={})),e.observe=Bt,e.toJS=k,e.toJSON=Nt,e.whyRun=yt;var St=pe(function(r,t,n,e,a){var i=e&&1===e.length?e[0]:n.name||t||"<unnamed action>",o=be(i,n);R(r,t,o)},function(e){return this[e]},function(){n(!1,"It is not allowed to assign new values to @action fields")},!1,!0);e.action=be,e.isAction=Ke,e.runInAction=Mt,e.useStrict=Pt;var E=function(){function e(e){void 0===e&&(e="Atom@"+a()),this.name=e,this.isDirty=!1,this.staleObservers=[],this.observers=new X,this.diffValue=0,this.lastAccessedBy=0}return e.prototype.onBecomeUnobserved=function(){},e.prototype.reportObserved=function(){Ue(this)},e.prototype.reportChanged=function(){this.isDirty||(this.reportStale(),this.reportReady())},e.prototype.reportStale=function(){this.isDirty||(this.isDirty=!0,Fe(this))},e.prototype.reportReady=function(){n(this.isDirty,"atom not dirty"),t.inTransaction>0?t.changedAtoms.push(this):(ut(this),ae())},e.prototype.toString=function(){return this.name},e}();e.BaseAtom=E;var Ie=function(n){function e(e,t,r){void 0===e&&(e="Atom@"+a()),void 0===t&&(t=pt),void 0===r&&(r=pt),n.call(this,e),this.name=e,this.onBecomeObservedHandler=t,this.onBecomeUnobservedHandler=r,this.isBeingTracked=!1}return ee(e,n),e.prototype.reportObserved=function(){n.prototype.reportObserved.call(this);var e=t.isTracking;return e&&!this.isBeingTracked&&(this.isBeingTracked=!0,this.onBecomeObservedHandler()),e},e.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},e}(E);e.Atom=Ie;var u,g=function(){function e(e,t,n,r){this.derivation=e,this.scope=t,this.compareStructural=n,this.isLazy=!0,this.isComputing=!1,this.staleObservers=[],this.observers=new X,this.observing=[],this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.unboundDepsCount=0,this.__mapid="#"+a(),this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.value=void 0,this.name=r||"ComputedValue@"+a()}return e.prototype.peek=function(){this.isComputing=!0;var e=F(!1),t=this.derivation.call(this.scope);return U(e),this.isComputing=!1,t},e.prototype.onBecomeUnobserved=function(){ne(this),this.isLazy=!0,this.value=void 0},e.prototype.onDependenciesReady=function(){var e=this.trackAndCompute();return e},e.prototype.get=function(){if(n(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),Ue(this),this.dependencyStaleCount>0)return this.peek();if(this.isLazy){if(!te())return this.peek();this.isLazy=!1,this.trackAndCompute()}return this.value},e.prototype.set=function(e){throw new Error("[ComputedValue '"+name+"'] It is not possible to assign a new value to a computed value.")},e.prototype.trackAndCompute=function(){i()&&A({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=vt(this,this.peek);return _e(this.compareStructural,t,e)},e.prototype.observe=function(n,r){var i=this,e=!0,t=void 0;return ge(function(){var o=i.get();if(!e||r){var a=j();n(o,t),I(a)}e=!1,t=o})},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.whyRun=function(){var n=t.derivationStack.length>0,o=Z(this.observing).map(function(e){return e.name}),r=Z(this.observers.asArray()).map(function(e){return e.name}),e=this.isComputing?n?this.observers.length>0?u.INVALIDATED:u.REQUIRED:u.PEEK:u.NOT_RUNNING;if(e===u.REQUIRED){var i=t.derivationStack[t.derivationStack.length-2];i&&r.push(i.name)}return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+jt[e]+" "+(e===u.NOT_RUNNING&&this.dependencyStaleCount>0?"(a next run is scheduled)":"")+"\n"+(this.isLazy?" * This computation is suspended (not in use by any reaction) and won't run automatically.\n Didn't expect this computation to be suspended at this point?\n 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n 2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).\n":" * This computation will re-run if any of the following observables changes:\n "+we(o)+"\n "+(this.isComputing&&n?" (... or any observable accessed during the remainder of the current run)":"")+"\n Missing items in this list?\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n * If the outcome of this computation changes, the following observers will be re-run:\n "+we(r)+"\n")},e}();!function(e){e[e.PEEK=0]="PEEK",e[e.INVALIDATED=1]="INVALIDATED",e[e.REQUIRED=2]="REQUIRED",e[e.NOT_RUNNING=3]="NOT_RUNNING"}(u||(u={}));var jt=(C={},C[u.PEEK]="[peek] The value of this computed value was requested outside an reaction",C[u.INVALIDATED]="[invalidated] Some observables used by this computation did change",C[u.REQUIRED]="[started] This computation is required by another computed value / reaction",C[u.NOT_RUNNING]="[idle] This compution is currently not running",C);e.untracked=je;var ze,Et=["mobxGuid","resetId","spyListeners","strictMode","runId"],$e=function(){function e(){this.version=3,this.derivationStack=[],this.runId=0,this.mobxGuid=0,this.inTransaction=0,this.isTracking=!1,this.isRunningReactions=!1,this.changedAtoms=[],this.pendingReactions=[],this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[]}return e}(),t=function(){var e=new $e;if(O.__mobservableTrackingStack||O.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(O.__mobxGlobal&&O.__mobxGlobal.version!==e.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");return O.__mobxGlobal?O.__mobxGlobal:O.__mobxGlobal=e}(),y=function(){function e(e,t){void 0===e&&(e="Reaction@"+a()),this.name=e,this.onInvalidate=t,this.staleObservers=M,this.observers=ze||(ze=new X),this.observing=[],this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.unboundDepsCount=0,this.__mapid="#"+a(),this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1}return e.prototype.onBecomeUnobserved=function(){},e.prototype.onDependenciesReady=function(){return this.schedule(),!1},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,t.pendingReactions.push(this),ae())},e.prototype.isScheduled=function(){return this.dependencyStaleCount>0||this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&i()&&A({object:this,type:"scheduled-reaction"}))},e.prototype.track=function(e){var t,n=i();n&&(t=Date.now(),l({object:this,type:"reaction",fn:e})),this._isRunning=!0,vt(this,e),this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&ne(this),n&&c({time:Date.now()-t})},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||ne(this))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.whyRun=function(){
var e=Z(this.observing).map(function(e){return e.name});return"\nWhyRun? reaction '"+this.name+"':\n * Status: ["+(this.isDisposed?"stopped":this._isRunning?"running":this.isScheduled()?"scheduled":"idle")+"]\n * This reaction will re-run if any of the following observables changes:\n "+we(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n Missing items in this list?\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n"},e}();e.Reaction=y;var Lt=100,W=!1,Ze={spyReportEnd:!0};e.spy=Xe,e.transaction=P;var r;!function(e){e[e.Recursive=0]="Recursive",e[e.Reference=1]="Reference",e[e.Structure=2]="Structure",e[e.Flat=3]="Flat"}(r||(r={})),e.asReference=se,e.asStructure=ue,e.asFlat=ke;var Re=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}(),H=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}(),ce=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}();e.asMap=At;var Ft=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),le=0,lt=function(){function e(){}return e}();lt.prototype=[];var Gt=function(){function e(e,t,n,r){this.mode=t,this.array=n,this.owned=r,this.lastKnownLength=0,this.interceptors=null,this.changeListeners=null,this.atom=new E(e||"ObservableArray@"+a())}return e.prototype.makeReactiveArrayItem=function(e){return p(e,"Array values cannot have modifiers"),this.mode===r.Flat||this.mode===r.Reference?e:B(e,this.mode,this.atom.name+"[..]")},e.prototype.intercept=function(e){return z(this,e)},e.prototype.observe=function(t,e){return void 0===e&&(e=!1),e&&t({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),N(this,t)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||0>e)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;e!==t&&(e>t?this.spliceWithArray(t,0,new Array(e-t)):this.spliceWithArray(e,t-e))},e.prototype.updateArrayLength=function(t,e){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=e,e>0&&t+e+1>le&&Te(t+e+1)},e.prototype.spliceWithArray=function(e,n,t){me();var r=this.values.length;if(void 0===e?e=0:e>r?e=r:0>e&&(e=Math.max(0,r+e)),n=1===arguments.length?r-e:void 0===n||null===n?0:Math.max(0,Math.min(n,r-e)),void 0===t&&(t=[]),_(this)){var i=x(this,{object:this.array,type:"splice",index:e,removedCount:n,added:t});if(!i)return M;n=i.removedCount,t=i.added}t=t.map(this.makeReactiveArrayItem,this);var s=t.length-n;this.updateArrayLength(r,s);var o=(a=this.values).splice.apply(a,[e,n].concat(t));return(0!==n||0!==t.length)&&this.notifyArraySplice(e,t,o),o;var a},e.prototype.notifyArrayChildUpdate=function(r,o,a){var e=!this.owned&&i(),t=v(this),n=t||e?{object:this.array,type:"update",index:r,newValue:o,oldValue:a}:null;e&&l(n),this.atom.reportChanged(),t&&d(this,n),e&&c()},e.prototype.notifyArraySplice=function(a,t,n){var e=!this.owned&&i(),r=v(this),o=r||e?{object:this.array,type:"splice",index:a,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;e&&l(o),this.atom.reportChanged(),r&&d(this,o),e&&c()},e}(),f=function(t){function e(n,i,o,r){void 0===r&&(r=!1),t.call(this);var e=new Gt(o,i,this,r);L(this,"$mobx",e),n&&n.length?(e.updateArrayLength(0,n.length),e.values=n.map(e.makeReactiveArrayItem,e),e.notifyArraySplice(0,e.values.slice(),M)):e.values=[],Ft&&Object.defineProperty(e.array,"0",Kt)}return ee(e,t),e.prototype.intercept=function(e){return this.$mobx.intercept(e)},e.prototype.observe=function(t,e){return void 0===e&&(e=!1),this.$mobx.observe(t,e)},e.prototype.clear=function(){return this.splice(0)},e.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},e.prototype.toJS=function(){return this.slice()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.peek=function(){return this.$mobx.values},e.prototype.find=function(r,i,t){void 0===t&&(t=0),this.$mobx.atom.reportObserved();for(var n=this.$mobx.values,o=n.length,e=t;o>e;e++)if(r.call(i,n[e],e,this))return n[e]},e.prototype.splice=function(t,n){for(var r=[],e=2;e<arguments.length;e++)r[e-2]=arguments[e];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(t);case 2:return this.$mobx.spliceWithArray(t,n)}return this.$mobx.spliceWithArray(t,n,r)},e.prototype.push=function(){for(var n=[],e=0;e<arguments.length;e++)n[e-0]=arguments[e];var t=this.$mobx;return t.spliceWithArray(t.values.length,0,n),t.values.length},e.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},e.prototype.shift=function(){return this.splice(0,1)[0]},e.prototype.unshift=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var n=this.$mobx;return n.spliceWithArray(0,0,t),n.values.length},e.prototype.reverse=function(){this.$mobx.atom.reportObserved();var e=this.slice();return e.reverse.apply(e,arguments)},e.prototype.sort=function(t){this.$mobx.atom.reportObserved();var e=this.slice();return e.sort.apply(e,arguments)},e.prototype.remove=function(t){var e=this.$mobx.values.indexOf(t);return e>-1?(this.splice(e,1),!0):!1},e.prototype.toString=function(){return"[mobx.array] "+Array.prototype.toString.apply(this.$mobx.values,arguments)},e.prototype.toLocaleString=function(){return"[mobx.array] "+Array.prototype.toLocaleString.apply(this.$mobx.values,arguments)},e}(lt);rt(f.prototype,function(){return q(this.slice())}),mt(f.prototype,["constructor","observe","clear","replace","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(f.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];R(f.prototype,e,function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)})});var Kt={configurable:!0,enumerable:!1,set:Ve(0),get:De(0)};Te(1e3),e.fastArray=kt,e.isObservableArray=J;var Ht={},S=function(){function e(e,n){var t=this;this.$mobx=Ht,this._data={},this._hasMap={},this.name="ObservableMap@"+a(),this._keys=new f(null,r.Reference,this.name+".keys()",!0),this.interceptors=null,this.changeListeners=null,this._valueMode=Ot(n),this._valueMode===r.Flat&&(this._valueMode=r.Reference),nt(!0,function(){w(e)?t.merge(e):Array.isArray(e)&&e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)})})}return e.prototype._has=function(e){return"undefined"!=typeof this._data[e]},e.prototype.has=function(e){return this.isValidKey(e)?(e=""+e,this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get()):!1},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(p(t,"[mobx.map.set] Expected unwrapped value to be inserted to key '"+e+"'. If you need to use modifiers pass them as second argument to the constructor"),_(this)){var r=x(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return;t=r.newValue}n?this._updateValue(e,t):this._addValue(e,t)},e.prototype.delete=function(e){var t=this;if(this.assertValidKey(e),e=""+e,_(this)){var n=x(this,{type:"delete",object:this,name:e});if(!n)return}if(this._has(e)){var r=i(),o=v(this),n=o||r?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;r&&l(n),P(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1);var n=t._data[e];n.setNewValue(void 0),t._data[e]=void 0},void 0,!1),o&&d(this,n),r&&c()}},e.prototype._updateHasMapEntry=function(t,n){var e=this._hasMap[t];return e?e.setNewValue(n):e=this._hasMap[t]=new V(n,r.Reference,this.name+"."+t+"?",!1),e},e.prototype._updateValue=function(r,e){var t=this._data[r];if(e=t.prepareNewValue(e),e!==$){var n=i(),o=v(this),a=o||n?{type:"update",object:this,oldValue:t.value,name:r,newValue:e}:null;n&&l(a),t.setNewValue(e),o&&d(this,a),n&&c()}},e.prototype._addValue=function(e,n){var t=this;P(function(){var r=t._data[e]=new V(n,t._valueMode,t.name+"."+e,!1);n=r.value,t._updateHasMapEntry(e,!0),t._keys.push(e)},void 0,!1);var r=i(),o=v(this),a=o||r?{type:"add",object:this,name:e,newValue:n}:null;r&&l(a),o&&d(this,a),r&&c()},e.prototype.get=function(e){return e=""+e,this.has(e)?this._data[e].get():void 0},e.prototype.keys=function(){return q(this._keys.slice())},e.prototype.values=function(){return q(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return q(this._keys.map(function(t){return[t,e.get(t)]}))},e.prototype.forEach=function(e,t){var n=this;this.keys().forEach(function(r){return e.call(t,n.get(r),r)})},e.prototype.merge=function(t){var n=this;return P(function(){t instanceof e?t.keys().forEach(function(e){return n.set(e,t.get(e))}):Object.keys(t).forEach(function(e){return n.set(e,t[e])})},void 0,!1),this},e.prototype.clear=function(){var e=this;P(function(){je(function(){e.keys().forEach(e.delete,e)})},void 0,!1)},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.toJS=function(){var t=this,e={};return this.keys().forEach(function(n){return e[n]=t.get(n)}),e},e.prototype.toJs=function(){return s("toJs is deprecated, use toJS instead"),this.toJS()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.isValidKey=function(e){return null===e||void 0===e?!1:"string"!=typeof e&&"number"!=typeof e&&"boolean"!=typeof e?!1:!0},e.prototype.assertValidKey=function(e){if(!this.isValidKey(e))throw new Error("[mobx.map] Invalid key: '"+e+"'")},e.prototype.toString=function(){var e=this;return this.name+"[{ "+this.keys().map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return n(t!==!0,"`observe` doesn't support the fire immediately property for observable maps."),N(this,e)},e.prototype.intercept=function(e){return z(this,e)},e}();e.ObservableMap=S,rt(S.prototype,function(){return this.entries()}),e.map=Me,e.isObservableMap=G;var Be=function(){function e(e,t,n){this.target=e,this.name=t,this.mode=n,this.values={},this.changeListeners=null,this.interceptors=null}return e.prototype.observe=function(e,t){return n(t!==!0,"`observe` doesn't support the fire immediately property for observable objects."),N(this,e)},e.prototype.intercept=function(e){return z(this,e)},e}(),Ee={},Ae={};e.isObservableObject=m;var $={},V=function(t){function e(s,u,e,n){void 0===e&&(e="ObservableValue@"+a()),void 0===n&&(n=!0),t.call(this,e),this.mode=u,this.hasUnreportedChange=!1,this.value=void 0;var o=D(s,r.Recursive),c=o[0],l=o[1];this.mode===r.Recursive&&(this.mode=c),this.value=B(l,this.mode,this.name),n&&i()&&A({type:"create",object:this,newValue:this.value})}return ee(e,t),e.prototype.set=function(e){var n=this.value;if(e=this.prepareNewValue(e),e!==$){var t=i();t&&l({type:"update",object:this,newValue:e,oldValue:n}),this.setNewValue(e),t&&c()}},e.prototype.prepareNewValue=function(e){if(p(e,"Modifiers cannot be used on non-initial values."),me(),_(this)){var t=x(this,{object:this,type:"update",newValue:e});if(!t)return $;e=t.newValue}var n=_e(this.mode===r.Structure,this.value,e);return n?B(e,this.mode,this.name):$},e.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),v(this)&&d(this,[e,t])},e.prototype.get=function(){return this.reportObserved(),this.value},e.prototype.intercept=function(e){return z(this,e)},e.prototype.observe=function(e,t){return t&&e(this.value,void 0),N(this,e)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e}(E),at="__$$iterating",X=function(){function e(){this.size=0,this.data={}}return Object.defineProperty(e.prototype,"length",{get:function(){return this.size},enumerable:!0,configurable:!0}),e.prototype.asArray=function(){var e=new Array(this.size),t=0;for(var n in this.data)e[t]=this.data[n],t++;return e},e.prototype.add=function(e){var t=e.__mapid;t in this.data||(this.data[t]=e,this.size++)},e.prototype.remove=function(e){e.__mapid in this.data&&(delete this.data[e.__mapid],this.size--)},e}();e.SimpleSet=X;var rn=function(){function e(){this.listeners=[],s("extras.SimpleEventEmitter is deprecated and will be removed in the next major release")}return e.prototype.emit=function(){for(var t=this.listeners.slice(),e=0,n=t.length;n>e;e++)t[e].apply(null,arguments)},e.prototype.on=function(e){var t=this;return this.listeners.push(e),Y(function(){var n=t.listeners.indexOf(e);-1!==n&&t.listeners.splice(n,1)})},e.prototype.once=function(t){var e=this.on(function(){e(),t.apply(this,arguments)});return e},e}();e.SimpleEventEmitter=rn;var M=[];Object.freeze(M);var C,ct=[],pt=function(){}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.mobx=e()}}(function(){return function a(e,t,n){function r(i,l){if(!t[i]){if(!e[i]){var u="function"==typeof require&&require;if(!l&&u)return u(i,!0);if(o)return o(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var s=t[i]={exports:{}};e[i][0].call(s.exports,function(t){var n=e[i][1][t];return r(n?n:t)},s,s.exports,a,e,t,n)}return t[i].exports}for(var o="function"==typeof require&&require,i=0;i<n.length;i++)r(n[i]);return r}({1:[function(t,n,e){(function(x){"use strict";function te(t,o,u){var i,e,r;"string"==typeof t?(i=t,e=o,r=u):"function"==typeof t&&(i=t.name||"Autorun@"+a(),e=t,r=o),p(e,"autorun methods cannot have modifiers"),n("function"==typeof e,"autorun expects a function"),n(0===e.length,"autorun expects a function without arguments"),r&&(e=e.bind(r));var s=new v(i,function(){this.track(e)});return s.schedule(),s.getDisposer()}function st(e,s,u,l){var r,i,o,t;"string"==typeof e?(r=e,i=s,o=u,t=l):"function"==typeof e&&(r="When@"+a(),i=e,o=s,t=u);var c=!1,n=te(r,function(){if(i.call(t)){n?n():c=!0;var e=I();o.call(t),j(e)}});return c&&n(),n}function an(e,t,n){return s("`autorunUntil` is deprecated, please use `when`."),st.apply(null,arguments)}function on(e,u,c,l){var o,t,n,r;"string"==typeof e?(o=e,t=u,n=c,r=l):"function"==typeof e&&(o=e.name||"AutorunAsync@"+a(),t=e,n=u,r=c),void 0===n&&(n=1),r&&(t=t.bind(r));var s=!1,i=new v(o,function(){s||(s=!0,setTimeout(function(){s=!1,i.isDisposed||i.track(t)},n))});return i.schedule(),i.getDisposer()}function rn(o,p,w,g,b,_){function m(){if(!l.isDisposed){var e=!1;l.track(function(){var t=d();e=_e(x,s,t),s=t}),u&&n&&t(s),u||e!==!0||t(s),u&&(u=!1)}}var c,f,t,n,e,i;"string"==typeof o?(c=o,f=p,t=w,n=g,e=b,i=_):(c=o.name||p.name||"Reaction@"+a(),f=o,t=p,n=w,e=g,i=b),void 0===n&&(n=!1),void 0===e&&(e=0);var y=P(f,r.Reference),R=y[0],d=y[1],x=R===r.Structure;i&&(d=d.bind(i),t=de(c,t.bind(i)));var u=!0,h=!1,s=void 0,l=new v(c,function(){1>e?m():h||(h=!0,setTimeout(function(){h=!1,m()},e))});return l.schedule(),l.getDisposer()}function me(e,t,r,i){return arguments.length<3&&"function"==typeof e?tn(e,t):(n(!r||!r.set,"@observable properties cannot have a setter: "+t),xt.apply(null,arguments))}function tn(n,i){var e=P(n,r.Recursive),o=e[0],t=e[1];return new y(t,i,o===r.Structure,t.name)}function qe(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function en(e,i){n("function"==typeof e&&1===e.length,"createTransformer expects a function that accepts one argument");var r={},o=t.resetId,a=function(t){function n(n,r){t.call(this,function(){return e(r)},null,!1,"Transformer-"+e.name+"-"+n),this.sourceIdentifier=n,this.sourceObject=r}return oe(n,t),n.prototype.onBecomeUnobserved=function(){var e=this.value;t.prototype.onBecomeUnobserved.call(this),delete r[this.sourceIdentifier],i&&i(e,this.sourceObject)},n}(y);return function(i){o!==t.resetId&&(r={},o=t.resetId);var n=Zt(i),e=r[n];return e?e.get():(e=r[n]=new a(n,i),e.get())}}function Zt(e){if(null===e||"object"!=typeof e)throw new Error("[mobx] transform expected some kind of object, got: "+e);var t=e.$transformId;return void 0===t&&(t=a(),_(e,"$transformId",t)),t}function Yt(e,t){return ye()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),me(e,t).get()}function ce(e){for(var i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];return n(arguments.length>=2,"extendObservable expected 2 or more arguments"),n("object"==typeof e,"extendObservable expects an object as first argument"),n(!(e instanceof A),"extendObservable should not be used on maps, use map.merge instead"),i.forEach(function(t){n("object"==typeof t,"all arguments of extendObservable should be objects"),ht(e,t,r.Recursive,null)}),e}function ht(e,t,r,i){var o=ie(e,i,r);for(var n in t)if(t.hasOwnProperty(n)){if(e===t&&!tt(e,n))continue;wt(o,n,t[n])}return e}function Ht(e,t){return je(b(e,t))}function je(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=J(e.observing).map(je)),t}function Xt(e,t){return $e(b(e,t))}function $e(e){var t={name:e.name};return e.observers&&e.observers.length>0&&(t.observers=e.observers.asArray().map($e)),t}function Qt(e,t,n){return"function"==typeof n?Qe(e,t,n):qt(e,t)}function qt(e,t){return w(e)&&!g(e)?(s("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),m(pe(e)).intercept(t)):m(e).intercept(t)}function Qe(e,t,n){return w(e)&&!g(e)?(s("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),ce(e,{property:e[t]}),Qe(e,t,n)):m(e,t).intercept(n)}function K(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof A||e instanceof f)throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(g(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof V||e instanceof v||e instanceof y}function Gt(r,e,t){return n(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",e),We(r,e),n(!t||!t.get,"@observable can not be used on getters, use @computed instead"),_t.apply(null,arguments)}function pe(e,u){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return Gt.apply(null,arguments);if(n(arguments.length<3,"observable expects zero, one or two arguments"),K(e))return e;var a=P(e,r.Recursive),t=a[0],i=a[1],c=t===r.Reference?o.Reference:Jt(i);switch(c){case o.Array:case o.PlainObject:return Y(i,t);case o.Reference:case o.ComplexObject:return new C(i,t);case o.ComplexFunction:throw new Error("[mobx.observable] To be able to make a function reactive it should not have arguments. If you need an observable reference to a function, use `observable(asReference(f))`");case o.ViewFunction:return s("Use `computed(expr)` instead of `observable(expr)`"),me(e,u)}n(!1,"Illegal State")}function Jt(e){return null===e||void 0===e?o.Reference:"function"==typeof e?e.length?o.ComplexFunction:o.ViewFunction:Array.isArray(e)||e instanceof f?o.Array:"object"==typeof e?w(e)?o.PlainObject:o.ComplexObject:o.Reference}function Ft(t,n,e,r){return"function"==typeof e?ke(t,n,e,r):Nt(t,n,e)}function Nt(e,t,n){return w(e)&&!g(e)?(s("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),m(pe(e)).observe(t,n)):m(e).observe(t,n)}function ke(e,t,n,r){return w(e)&&!g(e)?(s("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),ce(e,{property:e[t]}),ke(e,t,n,r)):m(e,t).observe(n,r)}function k(e,n,t){function o(r){return n&&t.push([e,r]),r}if(void 0===n&&(n=!0),void 0===t&&(t=null),e instanceof Date||e instanceof RegExp)return e;if(n&&null===t&&(t=[]),n&&null!==e&&"object"==typeof e)for(var r=0,s=t.length;s>r;r++)if(t[r][0]===e)return t[r][1];if(!e)return e;if(Array.isArray(e)||e instanceof f){var i=o([]),a=e.map(function(e){return k(e,n,t)});i.length=a.length;for(var r=0,s=a.length;s>r;r++)i[r]=a[r];return i}if(e instanceof A){var u=o({});return e.forEach(function(e,r){return u[r]=k(e,n,t)}),u}if(K(e)&&e.$mobx instanceof C)return k(e(),n,t);if(e instanceof C)return k(e.get(),n,t);if("object"==typeof e){var i=o({});for(var c in e)i[c]=k(e[c],n,t);return i}return e}function zt(n,e,t){return void 0===e&&(e=!0),void 0===t&&(t=null),s("toJSON is deprecated. Use toJS instead"),k.apply(null,arguments)}function le(e){return console.log(e),e}function vt(e,r){switch(arguments.length){case 0:if(e=t.derivationStack[t.derivationStack.length-1],!e)return le("whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested it's value.");break;case 2:e=b(e,r)}return e=b(e),e instanceof y?le(e.whyRun()):e instanceof v?le(e.whyRun()):void n(!1,"whyRun can only be used on reactions and computed values")}function de(e,t,n,r){return 1===arguments.length&&"function"==typeof e?ve(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?ve(e,t):1===arguments.length&&"string"==typeof e?Je(e):Je(t).apply(null,arguments)}function Je(e){return function(n,r,t){return t&&"function"==typeof t.value?(t.value=ve(e,t.value),t.enumerable=!1,t.configurable=!0,t):St(e).apply(this,arguments)}}function Ke(e){return"function"==typeof e&&e.isMobxAction===!0}function Pt(e,i,o){var t="string"==typeof e?e:e.name||"<unnamed action>",r="function"==typeof e?e:i,a="function"==typeof e?i:o;return n("function"==typeof r,"`runInAction` expects a function"),n(0===r.length,"`runInAction` expects a function without arguments"),n("string"==typeof t&&t.length>0,"actions should have valid names, got: '"+t+"'"),Xe(t,r,a,void 0)}function ve(e,t){n("function"==typeof t,"`action` can only be invoked on functions"),n("string"==typeof e&&e.length>0,"actions should have valid names, got: '"+e+"'");var r=function(){return Xe(e,t,this,arguments)};return r.isMobxAction=!0,r}function Xe(p,f,o,e){var d=t.derivationStack;n(!(d[d.length-1]instanceof y),"Computed values or transformers should not invoke actions or trigger other side effects");var u,s=i();if(s){u=Date.now();var a=e&&e.length||0,h=new Array(a);if(a>0)for(var r=0;a>r;r++)h[r]=e[r];l({type:"action",name:p,fn:f,target:o,arguments:h})}var v=I();it(p,o,!1);var m=M(!0);try{return f.apply(o,e)}finally{H(m),ot(!1),j(v),s&&c({time:Date.now()-u})}}function $t(e){n(0===t.derivationStack.length,"It is not allowed to set `useStrict` when a derivation is running"),t.strictMode=e,t.allowStateChanges=!e}function nt(e,t){var n=M(e),r=t();return H(n),r}function M(e){var n=t.allowStateChanges;return t.allowStateChanges=e,n}function H(e){t.allowStateChanges=e}function ut(e){n(e.isDirty,"atom not dirty"),e.isDirty=!1,xe(e,!0)}function ye(){return t.derivationStack.length>0&&t.isTracking}function be(){t.allowStateChanges||n(!1,t.strictMode?"It is not allowed to create or change state outside an `action` when MobX is in strict mode. Wrap the current method in `action` if this state change is intended":"It is not allowed to change the state when a computed value or transformer is being evaluated. Use 'autorun' to create reactive functions with side-effects.")}function Tt(e){1===++e.dependencyStaleCount&&Ue(e)}function Dt(e,t){if(n(e.dependencyStaleCount>0,"unexpected ready notification"),t&&(e.dependencyChangeCount+=1),0===--e.dependencyStaleCount)if(e.dependencyChangeCount>0){e.dependencyChangeCount=0;var r=e.onDependenciesReady();xe(e,r)}else xe(e,!1)}function dt(e,s){var n=e.observing;e.observing=new Array(n.length+100),e.unboundDepsCount=0,e.runId=++t.runId,t.derivationStack.push(e);var u=t.isTracking;t.isTracking=!0;var r,o=!0;try{r=s.call(e),o=!1}finally{if(o){var a="[mobx] An uncaught exception occurred while calculating your computed value, autorun or transformer. Or inside the render() method of an observer based React component. These functions should never throw exceptions as MobX will not always be able to recover from them. "+("Please fix the error reported after this message or enable 'Pause on (caught) exceptions' in your debugger to find the root cause. In: '"+e.name+"'");i()&&S({type:"error",object:this,message:a}),console.warn(a),e.unboundDepsCount=0,e.observing=n,Re()}else t.isTracking=u,t.derivationStack.length-=1,Vt(e,n)}return r}function Vt(n,r){for(var i=r.length,o=n.observing,a=o.length=n.unboundDepsCount,e=0;i>e;e++)r[e].diffValue=-1;for(var e=0;a>e;e++){var t=o[e];++t.diffValue>0&&(t.diffValue=0,jt(t,n))}for(var e=0;i>e;e++){var t=r[e];t.diffValue<0&&(t.diffValue=0,ze(t,n))}}function ne(n){for(var e=n.observing,r=e.length,t=0;r>t;t++)ze(e[t],n);e.length=0}function Ie(e){var t=I(),n=e();return j(t),n}function I(){var e=t.isTracking;return t.isTracking=!1,e}function j(e){t.isTracking=e}function Et(){}function Re(){t.resetId++;var n=new Ee;for(var e in n)-1===Ct.indexOf(e)&&(t[e]=n[e]);t.allowStateChanges=!t.strictMode}function jt(e,t){var n=0===e.observers.length;e.observers.add(t),n&&e.onBecomeObserved()}function ze(e,t){e.observers.remove(t),0===e.observers.length&&e.onBecomeUnobserved()}function Ne(n){if(t.isTracking!==!1){var e=t.derivationStack[t.derivationStack.length-1];e.runId!==n.lastAccessedBy&&(n.lastAccessedBy=e.runId,e.observing[e.unboundDepsCount++]=n)}}function Ue(e){for(var t=e.observers.asArray(),r=t.length,n=0;r>n;n++)Tt(t[n]);e.staleObservers=e.staleObservers.concat(t)}function xe(e,t){e.staleObservers.splice(0).forEach(function(e){return Dt(e,t)})}function ge(){if(!(t.isRunningReactions===!0||t.inTransaction>0)){t.isRunningReactions=!0;for(var e=t.pendingReactions,i=0;e.length>0;){if(++i===Lt)throw new Error("Reaction doesn't converge to a stable state. Probably there is a cycle in the reactive function: "+e[0].toString());for(var r=e.splice(0),n=0,o=r.length;o>n;n++)r[n].runReaction()}t.isRunningReactions=!1}}function i(){return z}function S(r){if(!z)return!1;for(var n=t.spyListeners,e=0,i=n.length;i>e;e++)n[e](r)}function l(e){var t=ft({},e,{spyReportStart:!0});S(t)}function c(e){S(e?ft({},e,Ze):Ze)}function He(e){return t.spyListeners.push(e),z=t.spyListeners.length>0,B(function(){var n=t.spyListeners.indexOf(e);-1!==n&&t.spyListeners.splice(n,1),z=t.spyListeners.length>0})}function At(e){return s("trackTransitions is deprecated. Use mobx.spy instead"),"boolean"==typeof e&&(s("trackTransitions only takes a single callback function. If you are using the mobx-react-devtools, please update them first"),e=arguments[1]),e?He(e):(s("trackTransitions without callback has been deprecated and is a no-op now. If you are using the mobx-react-devtools, please update them first"),function(){})}function D(n,e,t){void 0===e&&(e=void 0),void 0===t&&(t=!0),it(n.name||"anonymous transaction",e,t);var r=n.call(e);return ot(t),r}function it(r,e,n){void 0===e&&(e=void 0),void 0===n&&(n=!0),t.inTransaction+=1,n&&i()&&l({type:"transaction",target:e,name:r})}function ot(e){if(void 0===e&&(e=!0),0===--t.inTransaction){for(var r=t.changedAtoms.splice(0),n=0,o=r.length;o>n;n++)ut(r[n]);ge()}e&&i()&&c()}function O(e){return e.interceptors&&e.interceptors.length>0}function F(t,n){var e=t.interceptors||(t.interceptors=[]);return e.push(n),B(function(){var t=e.indexOf(n);-1!==t&&e.splice(t,1)})}function R(i,e){for(var o=I(),r=i.interceptors,t=0,a=r.length;a>t;t++)if(e=r[t](e),n(!e||e.type,"Intercept handlers should return nothing or a change object"),!e)return null;return j(o),e}function d(e){return e.changeListeners&&e.changeListeners.length>0}function G(t,n){var e=t.changeListeners||(t.changeListeners=[]);return e.push(n),B(function(){var t=e.indexOf(n);-1!==t&&e.splice(t,1)})}function h(r,n){var i=I(),e=r.changeListeners;if(e){e=e.slice();for(var t=0,o=e.length;o>t;t++)Array.isArray(n)?e[t].apply(null,n):e[t](n);j(i)}}function ue(e){return new he(e)}function se(e){return new W(e)}function Oe(e){return new re(e)}function kt(e,t){return Me(e,t)}function P(e,t){return e instanceof he?[r.Reference,e.value]:e instanceof W?[r.Structure,e.value]:e instanceof re?[r.Flat,e.value]:[t,e]}function Ot(e){return e===ue?r.Reference:e===se?r.Structure:e===Oe?r.Flat:(n(void 0===e,"Cannot determine value mode from function. Please pass in one of these: mobx.asReference, mobx.asStructure or mobx.asFlat, got: "+e),r.Recursive)}function Y(e,a,o){var t;if(K(e))return e;switch(a){case r.Reference:return e;case r.Flat:p(e,"Items inside 'asFlat' cannot have modifiers"),t=r.Reference;break;case r.Structure:p(e,"Items inside 'asStructure' cannot have modifiers"),t=r.Structure;break;case r.Recursive:i=P(e,r.Recursive),t=i[0],e=i[1];break;default:n(!1,"Illegal State")}return Array.isArray(e)?Te(e,t,o):w(e)&&Object.isExtensible(e)?ht(e,e,t,o):e;var i}function p(e,t){if(e instanceof he||e instanceof W||e instanceof re)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function sn(e){var t=Ve(e),n=De(e);Object.defineProperty(f.prototype,""+e,{enumerable:!1,configurable:!0,set:t,get:n})}function Ve(e){return function(t){var n=this.$mobx,i=n.values;if(p(t,"Modifiers cannot be used on array values. For non-reactive array values use makeReactive(asFlat(array))."),e<i.length){be();var o=i[e];if(O(n)){var a=R(n,{type:"update",object:n.array,index:e,newValue:t});if(!a)return;t=a.newValue}t=n.makeReactiveArrayItem(t);var s=n.mode===r.Structure?!q(o,t):o!==t;s&&(i[e]=t,n.notifyArrayChildUpdate(e,t,o))}else{if(e!==i.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+i.length);n.spliceWithArray(e,0,[t])}}}function De(e){return function(){var t=this.$mobx;return t&&e<t.values.length?(t.atom.reportObserved(),t.values[e]):void 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")}}function Le(t){for(var e=Se;t>e;e++)sn(e);Se=t}function Te(e,t,n){return new f(e,t,n)}function Rt(e){return s("fastArray is deprecated. Please use `observable(asFlat([]))`"),Te(e,r.Flat,null)}function Z(e){return e instanceof f}function Me(e,t){return new A(e,t)}function Q(e){return e instanceof A}function ie(e,t,n){if(void 0===n&&(n=r.Recursive),g(e))return e.$mobx;w(e)||(t=e.constructor.name+"@"+a()),t||(t="ObservableObject@"+a());var i=new Fe(e,t,n);return L(e,"$mobx",i),i}function wt(e,t,n){e.values[t]?e.target[t]=n:ae(e,t,n,!0)}function ae(t,n,e,a){a&&We(t.target,n);var r,i=t.name+"."+n,o=!0;if("function"!=typeof e||0!==e.length||Ke(e))if(e instanceof W&&"function"==typeof e.value&&0===e.value.length)r=new y(e.value,t.target,!0,i);else{if(o=!1,O(t)){var s=R(t,{object:t.target,name:n,type:"add",newValue:e});if(!s)return;e=s.newValue}r=new C(e,t.mode,i,!1),e=r.value}else r=new y(e,t.target,!1,i);t.values[n]=r,a&&Object.defineProperty(t.target,n,o?bt(n):gt(n)),o||mt(t,t.target,n,e)}function gt(e){var t=Ce[e];return t?t:Ce[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){Ge(this,e,t)}}}function bt(e){var t=Ae[e];return t?t:Ae[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:qe}}function Ge(r,o,e){var t=r.$mobx,a=t.values[o];if(O(t)){var n=R(t,{type:"update",object:r,name:o,newValue:e});if(!n)return;e=n.newValue}if(e=a.prepareNewValue(e),e!==$){var u=d(t),s=i(),n=h||d?{type:"update",object:r,oldValue:a.value,name:o,newValue:e}:null;s&&l(n),a.setNewValue(e),u&&h(t,n),s&&c()}}function mt(t,o,a,s){var n=d(t),e=i(),r=n||e?{type:"add",object:o,name:a,newValue:s}:null;e&&l(r),n&&h(t,r),e&&c()}function g(e){return"object"==typeof e&&null!==e?(T(e),e.$mobx instanceof Fe):!1}function b(e,t){if("object"==typeof e&&null!==e){if(Z(e))return n(void 0===t,"It is not possible to get index atoms from arrays"),e.$mobx.atom;if(Q(e)){if(void 0===t)return b(e._keys);var r=e._data[t]||e._hasMap[t];return n(!!r,"the entry '"+t+"' does not exist in the observable map '"+fe(e)+"'"),r}if(T(e),g(e)){n(!!t,"please specify a property");var i=e.$mobx.values[t];return n(!!i,"no observable property '"+t+"' found on the observable object '"+fe(e)+"'"),i}if(e instanceof V||e instanceof y||e instanceof v)return e}else if("function"==typeof e&&e.$mobx instanceof v)return e.$mobx;n(!1,"Cannot obtain atom from "+e)}function m(e,t){return n(e,"Expection some object"),void 0!==t?m(b(e,t)):e instanceof V||e instanceof y||e instanceof v?e:Q(e)?e:(T(e),e.$mobx?e.$mobx:void n(!1,"Cannot obtain administration from "+e))}function fe(e,t){var n;return n=void 0!==t?b(e,t):g(e)||Q(e)?m(e):b(e),n.name}function ee(e,r,i,o,a){function t(s,t,u,c){if(n(a||et(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),u){s.hasOwnProperty("__mobxLazyInitializers")||_(s,"__mobxLazyInitializers",s.__mobxLazyInitializers&&s.__mobxLazyInitializers.slice()||[]);var p=u.value,l=u.initializer;return s.__mobxLazyInitializers.push(function(n){e(n,t,l?l.call(n):p,c,u)}),{enumerable:o,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&T(this),r.call(this,t)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&T(this),i.call(this,t,e)}}}var f={enumerable:o,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[t]===!0||Ye(this,t,void 0,e,c,u),r.call(this,t)},set:function(n){this.__mobxInitializedProps&&this.__mobxInitializedProps[t]===!0?i.call(this,t,n):Ye(this,t,n,e,c,u)}};return arguments.length<3&&Object.defineProperty(s,t,f),f}return a?function(){if(et(arguments))return t.apply(null,arguments);var e=arguments;return function(n,r,i){return t(n,r,i,e)}}:t}function Ye(e,t,n,r,i,o){e.hasOwnProperty("__mobxInitializedProps")||_(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,i,o)}function T(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(_(e,"__mobxDidRunLazyInitializers",!0),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function et(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}function Mt(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function U(e){n(e[at]!==!0,"Illegal state: cannot recycle array as iterator"),L(e,at,!0);var t=-1;return L(e,"next",function(){return t++,{done:t>=this.length,value:t<this.length?this[t]:void 0}}),e}function rt(e,t){L(e,Mt(),t)}function a(){return++t.mobxGuid}function n(t,n,e){if(!t)throw new Error("[mobx] Invariant failed: "+n+(e?" in '"+e+"'":""))}function s(e){-1===ct.indexOf(e)&&(ct.push(e),console.error("[mobx] Deprecated: "+e))}function B(t){var e=!1;return function(){return e?void 0:(e=!0,t.apply(this,arguments))}}function J(t){var e=[];return t.forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),e}function we(t,e,n){if(void 0===e&&(e=100),void 0===n&&(n=" - "),!t)return"";var r=t.slice(0,e);return""+r.join(n)+(t.length>e?" (... and "+(t.length-e)+"more)":"")}function w(e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype}function ft(){for(var r=arguments[0],e=1,i=arguments.length;i>e;e++){var t=arguments[e];for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n])}return r}function _e(n,e,t){return n?!q(e,t):e!==t}function yt(n,t){for(var e=0;e<t.length;e++)_(n,t[e],n[t[e]])}function _(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function L(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!1,value:n})}function tt(t,n){var e=Object.getOwnPropertyDescriptor(t,n);return!e||e.configurable!==!1&&e.writable!==!1}function We(t,e){n(tt(t,e),"Cannot make property '"+e+"' observable, it is not configurable and writable in the target object")}function Be(t){var e=[];for(var n in t)e.push(n);return e}function q(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var i=Array.isArray(e)||Z(e);if(i!==(Array.isArray(t)||Z(t)))return!1;if(i){if(e.length!==t.length)return!1;for(var n=e.length-1;n>=0;n--)if(!q(e[n],t[n]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(Be(e).length!==Be(t).length)return!1;for(var r in e){if(!(r in t))return!1;if(!q(e[r],t[r]))return!1}return!0}return e===t}var oe=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)};Et(),e.extras={allowStateChanges:nt,getAtom:b,getDebugName:fe,getDependencyTree:Ht,getObserverTree:Xt,isComputingDerivation:ye,isSpyEnabled:i,resetGlobalState:Re,spyReport:S,spyReportEnd:c,spyReportStart:l,trackTransitions:At},e._={getAdministration:m,resetGlobalState:Re},e.autorun=te,e.when=st,e.autorunUntil=an,e.autorunAsync=on,e.reaction=rn;var xt=ee(function(o,a,c,e,s){var t=s.get;n("function"==typeof t,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'");var i=!1;e&&1===e.length&&e[0].asStructure===!0&&(i=!0);var u=ie(o,void 0,r.Recursive);ae(u,a,i?se(t):t,!1)},function(e){return this.$mobx.values[e].get()},qe,!1,!0);e.computed=me,e.createTransformer=en,e.expr=Yt,e.extendObservable=ce,e.intercept=Qt,e.isObservable=K;var _t=ee(function(t,n,e){var i=M(!0);"function"==typeof e&&(e=ue(e));var o=ie(t,void 0,r.Recursive);ae(o,n,e,!0),H(i)},function(e){return this.$mobx.values[e].get()},function(e,t){Ge(this,e,t)},!0,!1);e.observable=pe;var o;!function(e){e[e.Reference=0]="Reference",e[e.PlainObject=1]="PlainObject",e[e.ComplexObject=2]="ComplexObject",e[e.Array=3]="Array",e[e.ViewFunction=4]="ViewFunction",e[e.ComplexFunction=5]="ComplexFunction"}(o||(o={})),e.observe=Ft,e.toJS=k,e.toJSON=zt,e.whyRun=vt;var St=ee(function(r,t,n,e,a){var i=e&&1===e.length?e[0]:n.name||t||"<unnamed action>",o=de(i,n);_(r,t,o)},function(e){return this[e]},function(){n(!1,"It is not allowed to assign new values to @action fields")},!1,!0);e.action=de,e.isAction=Ke,e.runInAction=Pt,e.useStrict=$t;var V=function(){function e(e,t,n){void 0===e&&(e="Atom@"+a()),void 0===t&&(t=pt),void 0===n&&(n=pt),this.name=e,this.onBecomeObserved=t,this.onBecomeUnobserved=n,this.isDirty=!1,this.staleObservers=[],this.observers=new X,this.diffValue=0,this.lastAccessedBy=0}return e.prototype.reportObserved=function(){Ne(this)},e.prototype.reportChanged=function(){this.isDirty||(this.reportStale(),this.reportReady())},e.prototype.reportStale=function(){this.isDirty||(this.isDirty=!0,Ue(this))},e.prototype.reportReady=function(){n(this.isDirty,"atom not dirty"),t.inTransaction>0?t.changedAtoms.push(this):(ut(this),ge())},e.prototype.toString=function(){return this.name},e}();e.Atom=V;var u,y=function(){function e(e,t,n,r){this.derivation=e,this.scope=t,this.compareStructural=n,this.isLazy=!0,this.isComputing=!1,this.staleObservers=[],this.observers=new X,this.observing=[],this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.unboundDepsCount=0,this.__mapid="#"+a(),this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.value=void 0,this.name=r||"ComputedValue@"+a()}return e.prototype.peek=function(){this.isComputing=!0;var e=M(!1),t=this.derivation.call(this.scope);return H(e),this.isComputing=!1,t},e.prototype.onBecomeObserved=function(){},e.prototype.onBecomeUnobserved=function(){ne(this),this.isLazy=!0,this.value=void 0},e.prototype.onDependenciesReady=function(){var e=this.trackAndCompute();return e},e.prototype.get=function(){if(n(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),Ne(this),this.dependencyStaleCount>0)return this.peek();if(this.isLazy){if(!ye())return this.peek();this.isLazy=!1,this.trackAndCompute()}return this.value},e.prototype.set=function(e){throw new Error("[ComputedValue '"+name+"'] It is not possible to assign a new value to a computed value.")},e.prototype.trackAndCompute=function(){i()&&S({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=dt(this,this.peek);return _e(this.compareStructural,t,e)},e.prototype.observe=function(n,r){var i=this,e=!0,t=void 0;return te(function(){var o=i.get();if(!e||r){var a=I();n(o,t),j(a)}e=!1,t=o})},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.whyRun=function(){var n=t.derivationStack.length>0,o=J(this.observing).map(function(e){return e.name}),r=J(this.observers.asArray()).map(function(e){return e.name}),e=this.isComputing?n?this.observers.length>0?u.INVALIDATED:u.REQUIRED:u.PEEK:u.NOT_RUNNING;if(e===u.REQUIRED){var i=t.derivationStack[t.derivationStack.length-2];i&&r.push(i.name)}return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+It[e]+" "+(e===u.NOT_RUNNING&&this.dependencyStaleCount>0?"(a next run is scheduled)":"")+"\n"+(this.isLazy?" * This computation is suspended (not in use by any reaction) and won't run automatically.\n Didn't expect this computation to be suspended at this point?\n 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n 2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).\n":" * This computation will re-run if any of the following observables changes:\n "+we(o)+"\n "+(this.isComputing&&n?" (... or any observable accessed during the remainder of the current run)":"")+"\n Missing items in this list?\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n * If the outcome of this computation changes, the following observers will be re-run:\n "+we(r)+"\n")},e}();!function(e){e[e.PEEK=0]="PEEK",e[e.INVALIDATED=1]="INVALIDATED",e[e.REQUIRED=2]="REQUIRED",e[e.NOT_RUNNING=3]="NOT_RUNNING"}(u||(u={}));var It=(E={},E[u.PEEK]="[peek] The value of this computed value was requested outside an reaction",E[u.INVALIDATED]="[invalidated] Some observables used by this computation did change",E[u.REQUIRED]="[started] This computation is required by another computed value / reaction",E[u.NOT_RUNNING]="[idle] This compution is currently not running",E);e.untracked=Ie;var Pe,Ct=["mobxGuid","resetId","spyListeners","strictMode","runId"],Ee=function(){function e(){this.version=3,this.derivationStack=[],this.runId=0,this.mobxGuid=0,this.inTransaction=0,this.isTracking=!1,this.isRunningReactions=!1,this.changedAtoms=[],this.pendingReactions=[],this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[]}return e}(),t=function(){var e=new Ee;if(x.__mobservableTrackingStack||x.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(x.__mobxGlobal&&x.__mobxGlobal.version!==e.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");return x.__mobxGlobal?x.__mobxGlobal:x.__mobxGlobal=e}(),v=function(){function e(e,t){void 0===e&&(e="Reaction@"+a()),this.name=e,this.onInvalidate=t,this.staleObservers=N,this.observers=Pe||(Pe=new X),this.observing=[],this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.unboundDepsCount=0,this.__mapid="#"+a(),this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1}return e.prototype.onBecomeObserved=function(){},e.prototype.onBecomeUnobserved=function(){},e.prototype.onDependenciesReady=function(){return this.schedule(),!1},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,t.pendingReactions.push(this),ge())},e.prototype.isScheduled=function(){return this.dependencyStaleCount>0||this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&i()&&S({object:this,type:"scheduled-reaction"}))},e.prototype.track=function(e){var t,n=i();n&&(t=Date.now(),l({object:this,type:"reaction",fn:e})),this._isRunning=!0,dt(this,e),this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&ne(this),n&&c({time:Date.now()-t})},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||ne(this))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.whyRun=function(){var e=J(this.observing).map(function(e){return e.name});return"\nWhyRun? reaction '"+this.name+"':\n * Status: ["+(this.isDisposed?"stopped":this._isRunning?"running":this.isScheduled()?"scheduled":"idle")+"]\n * This reaction will re-run if any of the following observables changes:\n "+we(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n Missing items in this list?\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n";
},e}();e.Reaction=v;var Lt=100,z=!1,Ze={spyReportEnd:!0};e.spy=He,e.transaction=D;var r;!function(e){e[e.Recursive=0]="Recursive",e[e.Reference=1]="Reference",e[e.Structure=2]="Structure",e[e.Flat=3]="Flat"}(r||(r={})),e.asReference=ue,e.asStructure=se,e.asFlat=Oe;var he=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}(),W=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}(),re=function(){function e(e){this.value=e,p(e,"Modifiers are not allowed to be nested")}return e}();e.asMap=kt;var Ut=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),Se=0,lt=function(){function e(){}return e}();lt.prototype=[];var Bt=function(){function e(e,t,n,r){this.mode=t,this.array=n,this.owned=r,this.lastKnownLength=0,this.interceptors=null,this.changeListeners=null,this.atom=new V(e||"ObservableArray@"+a())}return e.prototype.makeReactiveArrayItem=function(e){return p(e,"Array values cannot have modifiers"),this.mode===r.Flat||this.mode===r.Reference?e:Y(e,this.mode,this.atom.name+"[..]")},e.prototype.intercept=function(e){return F(this,e)},e.prototype.observe=function(t,e){return void 0===e&&(e=!1),e&&t({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),G(this,t)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||0>e)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;e!==t&&(e>t?this.spliceWithArray(t,0,new Array(e-t)):this.spliceWithArray(e,t-e))},e.prototype.updateArrayLength=function(t,e){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=e,e>0&&t+e+1>Se&&Le(t+e+1)},e.prototype.spliceWithArray=function(e,n,t){be();var r=this.values.length;if(void 0===e?e=0:e>r?e=r:0>e&&(e=Math.max(0,r+e)),n=1===arguments.length?r-e:void 0===n||null===n?0:Math.max(0,Math.min(n,r-e)),void 0===t&&(t=[]),O(this)){var i=R(this,{object:this.array,type:"splice",index:e,removedCount:n,added:t});if(!i)return N;n=i.removedCount,t=i.added}t=t.map(this.makeReactiveArrayItem,this);var s=t.length-n;this.updateArrayLength(r,s);var o=(a=this.values).splice.apply(a,[e,n].concat(t));return(0!==n||0!==t.length)&&this.notifyArraySplice(e,t,o),o;var a},e.prototype.notifyArrayChildUpdate=function(r,o,a){var e=!this.owned&&i(),t=d(this),n=t||e?{object:this.array,type:"update",index:r,newValue:o,oldValue:a}:null;e&&l(n),this.atom.reportChanged(),t&&h(this,n),e&&c()},e.prototype.notifyArraySplice=function(a,t,n){var e=!this.owned&&i(),r=d(this),o=r||e?{object:this.array,type:"splice",index:a,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;e&&l(o),this.atom.reportChanged(),r&&h(this,o),e&&c()},e}(),f=function(t){function e(n,i,o,r){void 0===r&&(r=!1),t.call(this);var e=new Bt(o,i,this,r);L(this,"$mobx",e),n&&n.length?(e.updateArrayLength(0,n.length),e.values=n.map(e.makeReactiveArrayItem,e),e.notifyArraySplice(0,e.values.slice(),N)):e.values=[],Ut&&Object.defineProperty(e.array,"0",Wt)}return oe(e,t),e.prototype.intercept=function(e){return this.$mobx.intercept(e)},e.prototype.observe=function(t,e){return void 0===e&&(e=!1),this.$mobx.observe(t,e)},e.prototype.clear=function(){return this.splice(0)},e.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},e.prototype.toJS=function(){return this.slice()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.peek=function(){return this.$mobx.values},e.prototype.find=function(r,i,t){void 0===t&&(t=0),this.$mobx.atom.reportObserved();for(var n=this.$mobx.values,o=n.length,e=t;o>e;e++)if(r.call(i,n[e],e,this))return n[e]},e.prototype.splice=function(t,n){for(var r=[],e=2;e<arguments.length;e++)r[e-2]=arguments[e];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(t);case 2:return this.$mobx.spliceWithArray(t,n)}return this.$mobx.spliceWithArray(t,n,r)},e.prototype.push=function(){for(var n=[],e=0;e<arguments.length;e++)n[e-0]=arguments[e];var t=this.$mobx;return t.spliceWithArray(t.values.length,0,n),t.values.length},e.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},e.prototype.shift=function(){return this.splice(0,1)[0]},e.prototype.unshift=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var n=this.$mobx;return n.spliceWithArray(0,0,t),n.values.length},e.prototype.reverse=function(){this.$mobx.atom.reportObserved();var e=this.slice();return e.reverse.apply(e,arguments)},e.prototype.sort=function(t){this.$mobx.atom.reportObserved();var e=this.slice();return e.sort.apply(e,arguments)},e.prototype.remove=function(t){var e=this.$mobx.values.indexOf(t);return e>-1?(this.splice(e,1),!0):!1},e.prototype.toString=function(){return"[mobx.array] "+Array.prototype.toString.apply(this.$mobx.values,arguments)},e.prototype.toLocaleString=function(){return"[mobx.array] "+Array.prototype.toLocaleString.apply(this.$mobx.values,arguments)},e}(lt);rt(f.prototype,function(){return U(this.slice())}),yt(f.prototype,["constructor","observe","clear","replace","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(f.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];_(f.prototype,e,function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)})});var Wt={configurable:!0,enumerable:!1,set:Ve(0),get:De(0)};Le(1e3),e.fastArray=Rt,e.isObservableArray=Z;var Kt={},A=function(){function e(e,n){var t=this;this.$mobx=Kt,this._data={},this._hasMap={},this.name="ObservableMap@"+a(),this._keys=new f(null,r.Reference,this.name+".keys()",!0),this.interceptors=null,this.changeListeners=null,this._valueMode=Ot(n),this._valueMode===r.Flat&&(this._valueMode=r.Reference),nt(!0,function(){w(e)?t.merge(e):Array.isArray(e)&&e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)})})}return e.prototype._has=function(e){return"undefined"!=typeof this._data[e]},e.prototype.has=function(e){return this.isValidKey(e)?(e=""+e,this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get()):!1},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(p(t,"[mobx.map.set] Expected unwrapped value to be inserted to key '"+e+"'. If you need to use modifiers pass them as second argument to the constructor"),O(this)){var r=R(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return;t=r.newValue}n?this._updateValue(e,t):this._addValue(e,t)},e.prototype.delete=function(e){var t=this;if(this.assertValidKey(e),e=""+e,O(this)){var n=R(this,{type:"delete",object:this,name:e});if(!n)return}if(this._has(e)){var r=i(),o=d(this),n=o||r?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;r&&l(n),D(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1);var n=t._data[e];n.setNewValue(void 0),t._data[e]=void 0},void 0,!1),o&&h(this,n),r&&c()}},e.prototype._updateHasMapEntry=function(t,n){var e=this._hasMap[t];return e?e.setNewValue(n):e=this._hasMap[t]=new C(n,r.Reference,this.name+"."+t+"?",!1),e},e.prototype._updateValue=function(r,e){var t=this._data[r];if(e=t.prepareNewValue(e),e!==$){var n=i(),o=d(this),a=o||n?{type:"update",object:this,oldValue:t.value,name:r,newValue:e}:null;n&&l(a),t.setNewValue(e),o&&h(this,a),n&&c()}},e.prototype._addValue=function(e,n){var t=this;D(function(){var r=t._data[e]=new C(n,t._valueMode,t.name+"."+e,!1);n=r.value,t._updateHasMapEntry(e,!0),t._keys.push(e)},void 0,!1);var r=i(),o=d(this),a=o||r?{type:"add",object:this,name:e,newValue:n}:null;r&&l(a),o&&h(this,a),r&&c()},e.prototype.get=function(e){return e=""+e,this.has(e)?this._data[e].get():void 0},e.prototype.keys=function(){return U(this._keys.slice())},e.prototype.values=function(){return U(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return U(this._keys.map(function(t){return[t,e.get(t)]}))},e.prototype.forEach=function(e,t){var n=this;this.keys().forEach(function(r){return e.call(t,n.get(r),r)})},e.prototype.merge=function(t){var n=this;return D(function(){t instanceof e?t.keys().forEach(function(e){return n.set(e,t.get(e))}):Object.keys(t).forEach(function(e){return n.set(e,t[e])})},void 0,!1),this},e.prototype.clear=function(){var e=this;D(function(){Ie(function(){e.keys().forEach(e.delete,e)})},void 0,!1)},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.toJS=function(){var t=this,e={};return this.keys().forEach(function(n){return e[n]=t.get(n)}),e},e.prototype.toJs=function(){return s("toJs is deprecated, use toJS instead"),this.toJS()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.isValidKey=function(e){return null===e||void 0===e?!1:"string"!=typeof e&&"number"!=typeof e&&"boolean"!=typeof e?!1:!0},e.prototype.assertValidKey=function(e){if(!this.isValidKey(e))throw new Error("[mobx.map] Invalid key: '"+e+"'")},e.prototype.toString=function(){var e=this;return this.name+"[{ "+this.keys().map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return n(t!==!0,"`observe` doesn't support the fire immediately property for observable maps."),G(this,e)},e.prototype.intercept=function(e){return F(this,e)},e}();e.ObservableMap=A,rt(A.prototype,function(){return this.entries()}),e.map=Me,e.isObservableMap=Q;var Fe=function(){function e(e,t,n){this.target=e,this.name=t,this.mode=n,this.values={},this.changeListeners=null,this.interceptors=null}return e.prototype.observe=function(e,t){return n(t!==!0,"`observe` doesn't support the fire immediately property for observable objects."),G(this,e)},e.prototype.intercept=function(e){return F(this,e)},e}(),Ce={},Ae={};e.isObservableObject=g;var $={},C=function(t){function e(s,u,e,n){void 0===e&&(e="ObservableValue@"+a()),void 0===n&&(n=!0),t.call(this,e),this.mode=u,this.hasUnreportedChange=!1,this.value=void 0;var o=P(s,r.Recursive),c=o[0],l=o[1];this.mode===r.Recursive&&(this.mode=c),this.value=Y(l,this.mode,this.name),n&&i()&&S({type:"create",object:this,newValue:this.value})}return oe(e,t),e.prototype.set=function(e){var n=this.value;if(e=this.prepareNewValue(e),e!==$){var t=i();t&&l({type:"update",object:this,newValue:e,oldValue:n}),this.setNewValue(e),t&&c()}},e.prototype.prepareNewValue=function(e){if(p(e,"Modifiers cannot be used on non-initial values."),be(),O(this)){var t=R(this,{object:this,type:"update",newValue:e});if(!t)return $;e=t.newValue}var n=_e(this.mode===r.Structure,this.value,e);return n?Y(e,this.mode,this.name):$},e.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),d(this)&&h(this,[e,t])},e.prototype.get=function(){return this.reportObserved(),this.value},e.prototype.intercept=function(e){return F(this,e)},e.prototype.observe=function(e,t){return t&&e(this.value,void 0),G(this,e)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e}(V),at="__$$iterating",X=function(){function e(){this.size=0,this.data={}}return Object.defineProperty(e.prototype,"length",{get:function(){return this.size},enumerable:!0,configurable:!0}),e.prototype.asArray=function(){var e=new Array(this.size),t=0;for(var n in this.data)e[t]=this.data[n],t++;return e},e.prototype.add=function(e){var t=e.__mapid;t in this.data||(this.data[t]=e,this.size++)},e.prototype.remove=function(e){e.__mapid in this.data&&(delete this.data[e.__mapid],this.size--)},e}();e.SimpleSet=X;var nn=function(){function e(){this.listeners=[],s("extras.SimpleEventEmitter is deprecated and will be removed in the next major release")}return e.prototype.emit=function(){for(var t=this.listeners.slice(),e=0,n=t.length;n>e;e++)t[e].apply(null,arguments)},e.prototype.on=function(e){var t=this;return this.listeners.push(e),B(function(){var n=t.listeners.indexOf(e);-1!==n&&t.listeners.splice(n,1)})},e.prototype.once=function(t){var e=this.on(function(){e(),t.apply(this,arguments)});return e},e}();e.SimpleEventEmitter=nn;var N=[];Object.freeze(N);var E,ct=[],pt=function(){}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)});
//# sourceMappingURL=lib/mobx.umd.min.js.map
{
"name": "mobx",
"version": "2.4.0-fix427",
"version": "2.4.0-fix441",
"description": "Simple, scalable state management.",

@@ -76,2 +76,2 @@ "main": "lib/mobx.js",

]
}
}

@@ -160,4 +160,2 @@ <img src="docs/mobx.png" alt="logo" height="120" align="right" />

For an in-depth explanation about how MobX determines to which observables needs to be reacted, check out: [Understanding what MobX reacts to](https://github.com/mobxjs/mobx/blob/gh-pages/docs/best/react.md)
### Actions

@@ -164,0 +162,0 @@

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 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