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.5.0 to 2.5.1

18

CHANGELOG.md

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

# 2.5.1
* Computed properties can now be created by using getter / setter functions. This is the idiomatic way to introduce computed properties from now on:
```javascript
const box = observable({
length: 2,
get squared() {
return this.length * this.length
},
set squared(value) {
this.length = Math.sqrt(value)
}
})
```
# 2.5.0
* Core derivation algorithm has received some majore improvements by @asterius1! See below. Pr #452, 489
* Introduced setters for computed properties, use `computed(expr, setter)` or `@computed name get() { return expr } set(value) { action }`. `computed` can now be used as modifier in `observable` / `extendObservable`, #421, #463
* Introduced setters for computed properties, use `computed(expr, setter)` or `@computed get name() { return expr } set name (value) { action }`. `computed` can now be used as modifier in `observable` / `extendObservable`, #421, #463 (see below for example)
* Introduced `isStrictModeEnabled()`, deprecated `useStrict()` without arguments, see #464

@@ -6,0 +22,0 @@ * Fixed #505, accessing an observable property throws before it is initialized

4

lib/mobx.min.js
/** MobX - (c) Michel Weststrate 2015, 2016 - MIT Licensed */
"use strict";function e(e,n,r,o){return 1===arguments.length&&"function"==typeof e?P(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof n?P(e,n):1===arguments.length&&"string"==typeof e?t(e):t(n).apply(null,arguments)}function t(e){return function(t,n,r){return r&&"function"==typeof r.value?(r.value=P(e,r.value),r.enumerable=!1,r.configurable=!0,r):It(e).apply(this,arguments)}}function n(e,t,n){var r="string"==typeof e?e:e.name||"<unnamed action>",o="function"==typeof e?e:t,i="function"==typeof e?t:n;return ft("function"==typeof o,"`runInAction` expects a function"),ft(0===o.length,"`runInAction` expects a function without arguments"),ft("string"==typeof r&&r.length>0,"actions should have valid names, got: '"+r+"'"),D(r,o,i,void 0)}function r(e){return"function"==typeof e&&e.isMobxAction===!0}function o(e,t,n){function r(){i(a)}var o,i,s;"string"==typeof e?(o=e,i=t,s=n):"function"==typeof e&&(o=e.name||"Autorun@"+lt(),i=e,s=t),Ve(i,"autorun methods cannot have modifiers"),ft("function"==typeof i,"autorun expects a function"),s&&(i=i.bind(s));var a=new Nt(o,function(){this.track(r)});return a.schedule(),a.getDisposer()}function i(e,t,n,r){var i,s,a,u;"string"==typeof e?(i=e,s=t,a=n,u=r):"function"==typeof e&&(i="When@"+lt(),s=e,a=t,u=n);var c=o(i,function(e){if(s.call(u)){e.dispose();var t=X();a.call(u),Y(t)}});return c}function s(e,t,n){return pt("`autorunUntil` is deprecated, please use `when`."),i.apply(null,arguments)}function a(e,t,n,r){function o(){s(l)}var i,s,a,u;"string"==typeof e?(i=e,s=t,a=n,u=r):"function"==typeof e&&(i=e.name||"AutorunAsync@"+lt(),s=e,a=t,u=n),void 0===a&&(a=1),u&&(s=s.bind(u));var c=!1,l=new Nt(i,function(){c||(c=!0,setTimeout(function(){c=!1,l.isDisposed||l.track(o)},a))});return l.schedule(),l.getDisposer()}function u(t,n,r,o,i,s){function a(){if(!w.isDisposed){var e=!1;w.track(function(){var t=b(w);e=mt(y,x,t),x=t}),m&&f&&l(x,w),m||e!==!0||l(x,w),m&&(m=!1)}}var u,c,l,f,p,h;"string"==typeof t?(u=t,c=n,l=r,f=o,p=i,h=s):(u=t.name||n.name||"Reaction@"+lt(),c=t,l=n,f=r,p=o,h=i),void 0===f&&(f=!1),void 0===p&&(p=0);var d=Ce(c,Ft.Reference),v=d[0],b=d[1],y=v===Ft.Structure;h&&(b=b.bind(h),l=e(u,l.bind(h)));var m=!0,g=!1,x=void 0,w=new Nt(u,function(){p<1?a():g||(g=!0,setTimeout(function(){g=!1,a()},p))});return w.schedule(),w.getDisposer()}function c(e,t,n,r){return"function"==typeof e&&arguments.length<3?"function"==typeof t?l(e,t,void 0):l(e,void 0,t):Tt.apply(null,arguments)}function l(e,t,n){var r=Ce(e,Ft.Recursive),o=r[0],i=r[1];return new Pt(i,n,o===Ft.Structure,i.name,t)}function f(e,t){ft("function"==typeof e&&1===e.length,"createTransformer expects a function that accepts one argument");var n={},r=$t.resetId,o=function(r){function o(t,n){r.call(this,function(){return e(n)},null,!1,"Transformer-"+e.name+"-"+t,void 0),this.sourceIdentifier=t,this.sourceObject=n}return kt(o,r),o.prototype.onBecomeUnobserved=function(){var e=this.value;r.prototype.onBecomeUnobserved.call(this),delete n[this.sourceIdentifier],t&&t(e,this.sourceObject)},o}(Pt);return function(e){r!==$t.resetId&&(n={},r=$t.resetId);var t=p(e),i=n[t];return i?i.get():(i=n[t]=new o(t,e),i.get())}}function p(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=lt(),wt(e,"$transformId",t)),t}function h(e,t){return z()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),c(e,t).get()}function d(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return ft(arguments.length>=2,"extendObservable expected 2 or more arguments"),ft("object"==typeof e,"extendObservable expects an object as first argument"),ft(!(e instanceof en),"extendObservable should not be used on maps, use map.merge instead"),t.forEach(function(t){ft("object"==typeof t,"all arguments of extendObservable should be objects"),v(e,t,Ft.Recursive,null)}),e}function v(e,t,n,r){var o=Je(e,r,n);for(var i in t)if(gt(t,i)){if(e===t&&!Ot(e,i))continue;We(o,i,t[i])}return e}function b(e,t){return y(et(e,t))}function y(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=dt(e.observing).map(y)),t}function m(e,t){return g(et(e,t))}function g(e){var t={name:e.name};return ee(e)&&(t.observers=te(e).map(g)),t}function x(e,t,n){return"function"==typeof n?_(e,t,n):w(e,t)}function w(e,t){return bt(e)&&!Ze(e)?(pt("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),tt(A(e)).intercept(t)):tt(e).intercept(t)}function _(e,t,n){return bt(e)&&!Ze(e)?(pt("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),d(e,{property:e[t]}),_(e,t,n)):tt(e,t).intercept(n)}function O(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof en||e instanceof qt)throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(Ze(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof Lt||e instanceof Nt||e instanceof Pt}function S(e,t,n){return ft(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",t),St(e,t),ft(!n||!n.get,"@observable can not be used on getters, use @computed instead"),Et.apply(null,arguments)}function A(e,t){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return S.apply(null,arguments);if(ft(arguments.length<3,"observable expects zero, one or two arguments"),O(e))return e;var n=Ce(e,Ft.Recursive),r=n[0],o=n[1],i=r===Ft.Reference?jt.Reference:R(o);switch(i){case jt.Array:case jt.PlainObject:return De(o,r);case jt.Reference:case jt.ComplexObject:return new sn(o,r);case jt.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 jt.ViewFunction:return pt("Use `computed(expr)` instead of `observable(expr)`"),c(e,t)}ft(!1,"Illegal State")}function R(e){return null===e||void 0===e?jt.Reference:"function"==typeof e?e.length?jt.ComplexFunction:jt.ViewFunction:Array.isArray(e)||e instanceof qt?jt.Array:"object"==typeof e?bt(e)?jt.PlainObject:jt.ComplexObject:jt.Reference}function k(e,t,n,r){return"function"==typeof n?T(e,t,n,r):I(e,t,n)}function I(e,t,n){return bt(e)&&!Ze(e)?(pt("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),tt(A(e)).observe(t,n)):tt(e).observe(t,n)}function T(e,t,n,r){return bt(e)&&!Ze(e)?(pt("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),d(e,{property:e[t]}),T(e,t,n,r)):tt(e,t).observe(n,r)}function E(e,t,n){function r(r){return t&&n.push([e,r]),r}if(void 0===t&&(t=!0),void 0===n&&(n=null),e instanceof Date||e instanceof RegExp)return e;if(t&&null===n&&(n=[]),t&&null!==e&&"object"==typeof e)for(var o=0,i=n.length;o<i;o++)if(n[o][0]===e)return n[o][1];if(!e)return e;if(Array.isArray(e)||e instanceof qt){var s=r([]),a=e.map(function(e){return E(e,t,n)});s.length=a.length;for(var o=0,i=a.length;o<i;o++)s[o]=a[o];return s}if(e instanceof en){var u=r({});return e.forEach(function(e,r){return u[r]=E(e,t,n)}),u}if(O(e)&&e.$mobx instanceof sn)return E(e(),t,n);if(e instanceof sn)return E(e.get(),t,n);if("object"==typeof e){var s=r({});for(var c in e)s[c]=E(e[c],t,n);return s}return e}function j(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n=null),pt("toJSON is deprecated. Use toJS instead"),E.apply(null,arguments)}function L(e){return console.log(e),e}function C(e,t){switch(arguments.length){case 0:if(e=$t.trackingDerivation,!e)return L("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=et(e,t)}return e=et(e),e instanceof Pt?L(e.whyRun()):e instanceof Nt?L(e.whyRun()):void ft(!1,"whyRun can only be used on reactions and computed values")}function P(e,t){ft("function"==typeof t,"`action` can only be invoked on functions"),ft("string"==typeof e&&e.length>0,"actions should have valid names, got: '"+e+"'");var n=function(){return D(e,t,this,arguments)};return n.isMobxAction=!0,n}function D(e,t,n,r){ft(!($t.trackingDerivation instanceof Pt),"Computed values or transformers should not invoke actions or trigger other side effects");var o,i=de();if(i){o=Date.now();var s=r&&r.length||0,a=new Array(s);if(s>0)for(var u=0;u<s;u++)a[u]=r[u];be({type:"action",name:e,fn:t,target:n,arguments:a})}var c=X();we(e,n,!1);var l=N(!0);try{return t.apply(n,r)}finally{U(l),_e(!1),Y(c),i&&ye({time:Date.now()-o})}}function V(e){return 0===arguments.length?(pt("`useStrict` without arguments is deprecated, use `isStrictModeEnabled()` instead"),$t.strictMode):(ft(null===$t.trackingDerivation,"It is not allowed to set `useStrict` when a derivation is running"),$t.strictMode=e,$t.allowStateChanges=!e,void 0)}function M(){return $t.strictMode}function $(e,t){var n=N(e),r=t();return U(n),r}function N(e){var t=$t.allowStateChanges;return $t.allowStateChanges=e,t}function U(e){$t.allowStateChanges=e}function B(e){switch(e.dependenciesState){case Dt.UP_TO_DATE:return!1;case Dt.NOT_TRACKING:case Dt.STALE:return!0;case Dt.POSSIBLY_STALE:var t=!0,n=X();try{for(var r=e.observing,o=r.length,i=0;i<o;i++){var s=r[i];if(s instanceof Pt&&(s.get(),e.dependenciesState===Dt.STALE))return t=!1,Y(n),!0}return t=!1,q(e),Y(n),!1}finally{t&&q(e)}}}function z(){return null!==$t.trackingDerivation}function F(){$t.allowStateChanges||ft(!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 G(e,t){q(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++$t.runId;var n=$t.trackingDerivation;$t.trackingDerivation=e;var r,o=!0;try{r=t.call(e),o=!1}finally{o?K(e):($t.trackingDerivation=n,J(e))}return r}function K(e){var t="[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+"'. ")+"For more details see https://github.com/mobxjs/mobx/issues/462";de()&&ve({type:"error",message:t}),console.warn(t),q(e),e.newObserving=null,e.unboundDepsCount=0,e.recoverFromError(),ae(),Z()}function J(e){var t=e.observing,n=e.observing=e.newObserving;e.newObserving=null;for(var r=0,o=e.unboundDepsCount,i=0;i<o;i++){var s=n[i];0===s.diffValue&&(s.diffValue=1,r!==i&&(n[r]=s),r++)}for(n.length=r,o=t.length;o--;){var s=t[o];0===s.diffValue&&oe(s,e),s.diffValue=0}for(;r--;){var s=n[r];1===s.diffValue&&(s.diffValue=0,re(s,e))}}function W(e){for(var t=e.observing,n=t.length;n--;)oe(t[n],e);e.dependenciesState=Dt.NOT_TRACKING,t.length=0}function H(e){var t=X(),n=e();return Y(t),n}function X(){var e=$t.trackingDerivation;return $t.trackingDerivation=null,e}function Y(e){$t.trackingDerivation=e}function q(e){if(e.dependenciesState!==Dt.UP_TO_DATE){e.dependenciesState=Dt.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=Dt.UP_TO_DATE}}function Q(){}function Z(){$t.resetId++;var e=new Mt;for(var t in e)Vt.indexOf(t)===-1&&($t[t]=e[t]);$t.allowStateChanges=!$t.strictMode}function ee(e){return e.observers&&e.observers.length>0}function te(e){return e.observers}function ne(e){for(var t=e.observers,n=e.observersIndexes,r=t.length,o=0;o<r;o++){var i=t[o].__mapid;o?ft(n[i]===o,"INTERNAL ERROR maps derivation.__mapid to index in list"):ft(!(i in n),"INTERNAL ERROR observer on index 0 shouldnt be held in map.")}ft(0===t.length||Object.keys(n).length===t.length-1,"INTERNAL ERROR there is no junk in map")}function re(e,t){var n=e.observers.length;n&&(e.observersIndexes[t.__mapid]=n),e.observers[n]=t,e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function oe(e,t){if(1===e.observers.length)e.observers.length=0,ie(e);else{var n=e.observers,r=e.observersIndexes,o=n.pop();if(o!==t){var i=r[t.__mapid]||0;i?r[o.__mapid]=i:delete r[o.__mapid],n[i]=o}delete r[t.__mapid]}}function ie(e){e.isPendingUnobservation||(e.isPendingUnobservation=!0,$t.pendingUnobservations.push(e))}function se(){$t.inBatch++}function ae(){if(1===$t.inBatch){for(var e=$t.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers.length&&n.onBecomeUnobserved()}$t.pendingUnobservations=[]}$t.inBatch--}function ue(e){var t=$t.trackingDerivation;null!==t?t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e):0===e.observers.length&&ie(e)}function ce(e,t){var n=te(e).reduce(function(e,t){return Math.min(e,t.dependenciesState)},2);if(!(n>=e.lowestObserverState))throw new Error("lowestObserverState is wrong for "+t+" because "+n+" < "+e.lowestObserverState)}function le(e){if(e.lowestObserverState!==Dt.STALE){e.lowestObserverState=Dt.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Dt.UP_TO_DATE&&r.onBecomeStale(),r.dependenciesState=Dt.STALE}}}function fe(e){if(e.lowestObserverState!==Dt.STALE){e.lowestObserverState=Dt.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Dt.POSSIBLY_STALE?r.dependenciesState=Dt.STALE:r.dependenciesState===Dt.UP_TO_DATE&&(e.lowestObserverState=Dt.UP_TO_DATE)}}}function pe(e){if(e.lowestObserverState===Dt.UP_TO_DATE){e.lowestObserverState=Dt.POSSIBLY_STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Dt.UP_TO_DATE&&(r.dependenciesState=Dt.POSSIBLY_STALE,r.onBecomeStale())}}}function he(){if(!($t.isRunningReactions===!0||$t.inTransaction>0)){$t.isRunningReactions=!0;for(var e=$t.pendingReactions,t=0;e.length>0;){if(++t===Ut)throw Z(),new Error("Reaction doesn't converge to a stable state after "+Ut+" iterations. Probably there is a cycle in the reactive function: "+e[0]);for(var n=e.splice(0),r=0,o=n.length;r<o;r++)n[r].runReaction()}$t.isRunningReactions=!1}}function de(){return Bt}function ve(e){if(!Bt)return!1;for(var t=$t.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function be(e){var t=yt({},e,{spyReportStart:!0});ve(t)}function ye(e){ve(e?yt({},e,zt):zt)}function me(e){return $t.spyListeners.push(e),Bt=$t.spyListeners.length>0,ht(function(){var t=$t.spyListeners.indexOf(e);t!==-1&&$t.spyListeners.splice(t,1),Bt=$t.spyListeners.length>0})}function ge(e){return pt("trackTransitions is deprecated. Use mobx.spy instead"),"boolean"==typeof e&&(pt("trackTransitions only takes a single callback function. If you are using the mobx-react-devtools, please update them first"),e=arguments[1]),e?me(e):(pt("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 xe(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),we(e.name||"anonymous transaction",t,n);var r=e.call(t);return _e(n),r}function we(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),se(),$t.inTransaction+=1,n&&de()&&be({type:"transaction",target:t,name:e})}function _e(e){void 0===e&&(e=!0),0===--$t.inTransaction&&he(),e&&de()&&ye(),ae()}function Oe(e){return e.interceptors&&e.interceptors.length>0}function Se(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),ht(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function Ae(e,t){for(var n=X(),r=e.interceptors,o=0,i=r.length;o<i;o++)if(t=r[o](t),ft(!t||t.type,"Intercept handlers should return nothing or a change object"),!t)return null;return Y(n),t}function Re(e){return e.changeListeners&&e.changeListeners.length>0}function ke(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),ht(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function Ie(e,t){var n=X(),r=e.changeListeners;if(r){r=r.slice();for(var o=0,i=r.length;o<i;o++)Array.isArray(t)?r[o].apply(null,t):r[o](t);Y(n)}}function Te(e){return new Gt(e)}function Ee(e){return new Kt(e)}function je(e){return new Jt(e)}function Le(e,t){return Ge(e,t)}function Ce(e,t){return e instanceof Gt?[Ft.Reference,e.value]:e instanceof Kt?[Ft.Structure,e.value]:e instanceof Jt?[Ft.Flat,e.value]:[t,e]}function Pe(e){return e===Te?Ft.Reference:e===Ee?Ft.Structure:e===je?Ft.Flat:(ft(void 0===e,"Cannot determine value mode from function. Please pass in one of these: mobx.asReference, mobx.asStructure or mobx.asFlat, got: "+e),Ft.Recursive)}function De(e,t,n){var r;if(O(e))return e;switch(t){case Ft.Reference:return e;case Ft.Flat:Ve(e,"Items inside 'asFlat' cannot have modifiers"),r=Ft.Reference;break;case Ft.Structure:Ve(e,"Items inside 'asStructure' cannot have modifiers"),r=Ft.Structure;break;case Ft.Recursive:o=Ce(e,Ft.Recursive),r=o[0],e=o[1];break;default:ft(!1,"Illegal State")}return Array.isArray(e)?Be(e,r,n):bt(e)&&Object.isExtensible(e)?v(e,e,r,n):e;var o}function Ve(e,t){if(e instanceof Gt||e instanceof Kt||e instanceof Jt)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function Me(e){var t=$e(e),n=Ne(e);Object.defineProperty(qt.prototype,""+e,{enumerable:!1,configurable:!0,set:t,get:n})}function $e(e){return function(t){var n=this.$mobx,r=n.values;if(Ve(t,"Modifiers cannot be used on array values. For non-reactive array values use makeReactive(asFlat(array))."),e<r.length){F();var o=r[e];if(Oe(n)){var i=Ae(n,{type:"update",object:n.array,index:e,newValue:t});if(!i)return;t=i.newValue}t=n.makeReactiveArrayItem(t);var s=n.mode===Ft.Structure?!Rt(o,t):o!==t;s&&(r[e]=t,n.notifyArrayChildUpdate(e,t,o))}else{if(e!==r.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+r.length);n.spliceWithArray(e,0,[t])}}}function Ne(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 Ue(e){for(var t=Ht;t<e;t++)Me(t);Ht=e}function Be(e,t,n){return new qt(e,t,n)}function ze(e){return pt("fastArray is deprecated. Please use `observable(asFlat([]))`"),Be(e,Ft.Flat,null)}function Fe(e){return e instanceof qt}function Ge(e,t){return new en(e,t)}function Ke(e){return e instanceof en}function Je(e,t,n){if(void 0===n&&(n=Ft.Recursive),Ze(e))return e.$mobx;bt(e)||(t=e.constructor.name+"@"+lt()),t||(t="ObservableObject@"+lt());var r=new tn(e,t,n);return _t(e,"$mobx",r),r}function We(e,t,n){e.values[t]?e.target[t]=n:He(e,t,n,!0,void 0)}function He(e,t,n,o,i){o&&St(e.target,t);var s,a=e.name+"."+t,u=!0;if(n instanceof sn)s=n,u=!1;else if(n instanceof Pt)s=n,n.scope||(n.scope=e.target);else if("function"!=typeof n||0!==n.length||r(n))if(n instanceof Kt&&"function"==typeof n.value&&0===n.value.length)s=new Pt(n.value,e.target,(!0),a,i);else{if(u=!1,Oe(e)){var c=Ae(e,{object:e.target,name:t,type:"add",newValue:n});if(!c)return;n=c.newValue}s=new sn(n,e.mode,a,(!1)),n=s.value}else s=new Pt(n,e.target,(!1),a,i);e.values[t]=s,o&&Object.defineProperty(e.target,t,u?Ye(t):Xe(t)),u||Qe(e,e.target,t,n)}function Xe(e){var t=nn[e];return t?t:nn[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){qe(this,e,t)}}}function Ye(e){var t=rn[e];return t?t:rn[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:function(t){return this.$mobx.values[e].set(t)}}}function qe(e,t,n){var r=e.$mobx,o=r.values[t];if(Oe(r)){var i=Ae(r,{type:"update",object:e,name:t,newValue:n});if(!i)return;n=i.newValue}if(n=o.prepareNewValue(n),n!==on){var s=Re(r),a=de(),i=Ie||Re?{type:"update",object:e,oldValue:o.value,name:t,newValue:n}:null;a&&be(i),o.setNewValue(n),s&&Ie(r,i),a&&ye()}}function Qe(e,t,n,r){var o=Re(e),i=de(),s=o||i?{type:"add",object:t,name:n,newValue:r}:null;i&&be(s),o&&Ie(e,s),i&&ye()}function Ze(e){return"object"==typeof e&&null!==e&&(it(e),e.$mobx instanceof tn)}function et(e,t){if("object"==typeof e&&null!==e){if(Fe(e))return ft(void 0===t,"It is not possible to get index atoms from arrays"),e.$mobx.atom;if(Ke(e)){if(void 0===t)return et(e._keys);var n=e._data[t]||e._hasMap[t];return ft(!!n,"the entry '"+t+"' does not exist in the observable map '"+nt(e)+"'"),n}if(it(e),Ze(e)){ft(!!t,"please specify a property");var r=e.$mobx.values[t];return ft(!!r,"no observable property '"+t+"' found on the observable object '"+nt(e)+"'"),r}if(e instanceof Lt||e instanceof Pt||e instanceof Nt)return e}else if("function"==typeof e&&e.$mobx instanceof Nt)return e.$mobx;ft(!1,"Cannot obtain atom from "+e)}function tt(e,t){return ft(e,"Expection some object"),void 0!==t?tt(et(e,t)):e instanceof Lt||e instanceof Pt||e instanceof Nt?e:Ke(e)?e:(it(e),e.$mobx?e.$mobx:void ft(!1,"Cannot obtain administration from "+e))}function nt(e,t){var n;return n=void 0!==t?et(e,t):Ze(e)||Ke(e)?tt(e):et(e),n.name}function rt(e,t,n,r,o){function i(i,s,a,u){if(ft(o||st(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),a){gt(i,"__mobxLazyInitializers")||wt(i,"__mobxLazyInitializers",i.__mobxLazyInitializers&&i.__mobxLazyInitializers.slice()||[]);var c=a.value,l=a.initializer;return i.__mobxLazyInitializers.push(function(t){e(t,s,l?l.call(t):c,u,a)}),{enumerable:r,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&it(this),t.call(this,s)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&it(this),n.call(this,s,e)}}}var f={enumerable:r,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[s]===!0||ot(this,s,void 0,e,u,a),t.call(this,s)},set:function(t){this.__mobxInitializedProps&&this.__mobxInitializedProps[s]===!0?n.call(this,s,t):ot(this,s,t,e,u,a)}};return arguments.length<3&&Object.defineProperty(i,s,f),f}return o?function(){if(st(arguments))return i.apply(null,arguments);var e=arguments;return function(t,n,r){return i(t,n,r,e)}}:i}function ot(e,t,n,r,o,i){gt(e,"__mobxInitializedProps")||wt(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,o,i)}function it(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(wt(e,"__mobxDidRunLazyInitializers",!0),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function st(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}function at(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function ut(e){ft(e[an]!==!0,"Illegal state: cannot recycle array as iterator"),_t(e,an,!0);var t=-1;return _t(e,"next",function(){return t++,{done:t>=this.length,value:t<this.length?this[t]:void 0}}),e}function ct(e,t){_t(e,at(),t)}function lt(){return++$t.mobxGuid}function ft(e,t,n){if(!e)throw new Error("[mobx] Invariant failed: "+t+(n?" in '"+n+"'":""))}function pt(e){ln.indexOf(e)===-1&&(ln.push(e),console.error("[mobx] Deprecated: "+e))}function ht(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}function dt(e){var t=[];return e.forEach(function(e){t.indexOf(e)===-1&&t.push(e)}),t}function vt(e,t,n){if(void 0===t&&(t=100),void 0===n&&(n=" - "),!e)return"";var r=e.slice(0,t);return""+r.join(n)+(e.length>t?" (... and "+(e.length-t)+"more)":"")}function bt(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function yt(){for(var e=arguments[0],t=1,n=arguments.length;t<n;t++){var r=arguments[t];for(var o in r)gt(r,o)&&(e[o]=r[o])}return e}function mt(e,t,n){return e?!Rt(t,n):t!==n}function gt(e,t){return pn.call(e,t)}function xt(e,t){for(var n=0;n<t.length;n++)wt(e,t[n],e[t[n]])}function wt(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function _t(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Ot(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return!n||n.configurable!==!1&&n.writable!==!1}function St(e,t){ft(Ot(e,t),"Cannot make property '"+t+"' observable, it is not configurable and writable in the target object")}function At(e){var t=[];for(var n in e)t.push(n);return t}function Rt(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var n=Array.isArray(e)||Fe(e);if(n!==(Array.isArray(t)||Fe(t)))return!1;if(n){if(e.length!==t.length)return!1;for(var r=e.length-1;r>=0;r--)if(!Rt(e[r],t[r]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(At(e).length!==At(t).length)return!1;for(var o in e){if(!(o in t))return!1;if(!Rt(e[o],t[o]))return!1}return!0}return e===t}var kt=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)};Q(),exports.extras={allowStateChanges:$,getAtom:et,getDebugName:nt,getDependencyTree:b,getObserverTree:m,isComputingDerivation:z,isSpyEnabled:de,resetGlobalState:Z,spyReport:ve,spyReportEnd:ye,spyReportStart:be,trackTransitions:ge},exports._={getAdministration:tt,resetGlobalState:Z},"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx(module.exports);var It=rt(function(t,n,r,o,i){var s=o&&1===o.length?o[0]:r.name||n||"<unnamed action>",a=e(s,r);wt(t,n,a)},function(e){return this[e]},function(){ft(!1,"It is not allowed to assign new values to @action fields")},!1,!0);exports.action=e,exports.runInAction=n,exports.isAction=r,exports.autorun=o,exports.when=i,exports.autorunUntil=s,exports.autorunAsync=a,exports.reaction=u;var Tt=rt(function(e,t,n,r,o){ft("undefined"!=typeof o,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'. It looks like it was used on a property.");var i=o.get,s=o.set;ft("function"==typeof i,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'");var a=!1;r&&1===r.length&&r[0].asStructure===!0&&(a=!0);var u=Je(e,void 0,Ft.Recursive);He(u,t,a?Ee(i):i,!1,s)},function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()},function(e,t){this.$mobx.values[e].set(t)},!1,!0);exports.computed=c,exports.createTransformer=f,exports.expr=h,exports.extendObservable=d,exports.intercept=x,exports.isObservable=O;var Et=rt(function(e,t,n){var r=N(!0);"function"==typeof n&&(n=Te(n));var o=Je(e,void 0,Ft.Recursive);He(o,t,n,!0,void 0),U(r)},function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()},function(e,t){qe(this,e,t)},!0,!1);exports.observable=A;var jt;!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"}(jt||(jt={})),exports.observe=k,exports.toJS=E,exports.toJSON=j,exports.whyRun=C,exports.useStrict=V,exports.isStrictModeEnabled=M;var Lt=function(){function e(e){void 0===e&&(e="Atom@"+lt()),this.name=e,this.isPendingUnobservation=!0,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Dt.NOT_TRACKING}return e.prototype.onBecomeUnobserved=function(){},e.prototype.reportObserved=function(){ue(this)},e.prototype.reportChanged=function(){we("propagatingAtomChange",null,!1),le(this),_e(!1)},e.prototype.toString=function(){return this.name},e}();exports.BaseAtom=Lt;var Ct=function(e){function t(t,n,r){void 0===t&&(t="Atom@"+lt()),void 0===n&&(n=fn),void 0===r&&(r=fn),e.call(this,t),this.name=t,this.onBecomeObservedHandler=n,this.onBecomeUnobservedHandler=r,this.isPendingUnobservation=!1,this.isBeingTracked=!1}return kt(t,e),t.prototype.reportObserved=function(){return se(),e.prototype.reportObserved.call(this),this.isBeingTracked||(this.isBeingTracked=!0,this.onBecomeObservedHandler()),ae(),!!$t.trackingDerivation},t.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},t}(Lt);exports.Atom=Ct;var Pt=function(){function e(e,t,n,r,o){this.derivation=e,this.scope=t,this.compareStructural=n,this.dependenciesState=Dt.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=Dt.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+lt(),this.value=void 0,this.isComputing=!1,this.name=r||"ComputedValue@"+lt(),o&&(this.setter=P(r+"-setter",o))}return e.prototype.peek=function(){this.isComputing=!0;var e=N(!1),t=this.derivation.call(this.scope);return U(e),this.isComputing=!1,t},e.prototype.peekUntracked=function(){var e=!0;try{var t=this.peek();return e=!1,t}finally{e&&K(this)}},e.prototype.onBecomeStale=function(){pe(this)},e.prototype.onBecomeUnobserved=function(){ft(this.dependenciesState!==Dt.NOT_TRACKING,"INTERNAL ERROR only onBecomeUnobserved shouldn't be called twice in a row"),W(this),this.value=void 0},e.prototype.get=function(){ft(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),se(),1===$t.inBatch?B(this)&&(this.value=this.peekUntracked()):(ue(this),B(this)&&this.trackAndCompute()&&fe(this));var e=this.value;return ae(),e},e.prototype.recoverFromError=function(){this.isComputing=!1},e.prototype.set=function(e){if(!this.setter)throw new Error("[ComputedValue '"+this.name+"'] It is not possible to assign a new value to a computed value.");this.setter.call(this.scope,e)},e.prototype.trackAndCompute=function(){de()&&ve({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=G(this,this.peek);return mt(this.compareStructural,t,e)},e.prototype.observe=function(e,t){var n=this,r=!0,i=void 0;return o(function(){var o=n.get();if(!r||t){var s=X();e(o,i),Y(s)}r=!1,i=o})},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.whyRun=function(){var e=Boolean($t.trackingDerivation),t=dt(this.isComputing?this.newObserving:this.observing).map(function(e){return e.name}),n=dt(te(this).map(function(e){return e.name}));return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+(e?"[active] the value of this computation is needed by a reaction":this.isComputing?"[get] The value of this computed was requested outside a reaction":"[idle] not running at the moment")+"\n"+(this.dependenciesState===Dt.NOT_TRACKING?" * This computation is suspended (not in use by any reaction) and won't run automatically.\n\tDidn't expect this computation to be suspended at this point?\n\t 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n\t 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 "+vt(t)+"\n "+(this.isComputing&&e?" (... or any observable accessed during the remainder of the current run)":"")+"\n\tMissing items in this list?\n\t 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n\t 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 "+vt(n)+"\n")},e}(),Dt;!function(e){e[e.NOT_TRACKING=-1]="NOT_TRACKING",e[e.UP_TO_DATE=0]="UP_TO_DATE",e[e.POSSIBLY_STALE=1]="POSSIBLY_STALE",e[e.STALE=2]="STALE"}(Dt||(Dt={})),exports.IDerivationState=Dt,
exports.untracked=H;var Vt=["mobxGuid","resetId","spyListeners","strictMode","runId"],Mt=function(){function e(){this.version=4,this.trackingDerivation=null,this.runId=0,this.mobxGuid=0,this.inTransaction=0,this.isRunningReactions=!1,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[]}return e}(),$t=function(){var e=new Mt;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}(),Nt=function(){function e(e,t){void 0===e&&(e="Reaction@"+lt()),this.name=e,this.onInvalidate=t,this.observing=[],this.newObserving=[],this.dependenciesState=Dt.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+lt(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,$t.pendingReactions.push(this),se(),he(),ae())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,B(this)&&(this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&de()&&ve({object:this,type:"scheduled-reaction"})))},e.prototype.track=function(e){se();var t,n=de();n&&(t=Date.now(),be({object:this,type:"reaction",fn:e})),this._isRunning=!0,G(this,e),this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&W(this),n&&ye({time:Date.now()-t}),ae()},e.prototype.recoverFromError=function(){this._isRunning=!1,this._isTrackPending=!1},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(se(),W(this),ae()))},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=dt(this._isRunning?this.newObserving: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 "+vt(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n\tMissing items in this list?\n\t 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n\t 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}();exports.Reaction=Nt;var Ut=100,Bt=!1,zt={spyReportEnd:!0};exports.spy=me,exports.transaction=xe;var Ft;!function(e){e[e.Recursive=0]="Recursive",e[e.Reference=1]="Reference",e[e.Structure=2]="Structure",e[e.Flat=3]="Flat"}(Ft||(Ft={})),exports.asReference=Te,exports.asStructure=Ee,exports.asFlat=je;var Gt=function(){function e(e){this.value=e,Ve(e,"Modifiers are not allowed to be nested")}return e}(),Kt=function(){function e(e){this.value=e,Ve(e,"Modifiers are not allowed to be nested")}return e}(),Jt=function(){function e(e){this.value=e,Ve(e,"Modifiers are not allowed to be nested")}return e}();exports.asMap=Le;var Wt=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),Ht=0,Xt=function(){function e(){}return e}();Xt.prototype=[];var Yt=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 Lt(e||"ObservableArray@"+lt())}return e.prototype.makeReactiveArrayItem=function(e){return Ve(e,"Array values cannot have modifiers"),this.mode===Ft.Flat||this.mode===Ft.Reference?e:De(e,this.mode,this.atom.name+"[..]")},e.prototype.intercept=function(e){return Se(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),ke(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;e!==t&&(e>t?this.spliceWithArray(t,0,new Array(e-t)):this.spliceWithArray(e,t-e))},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=t,t>0&&e+t+1>Ht&&Ue(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){F();var r=this.values.length;if(void 0===e?e=0:e>r?e=r:e<0&&(e=Math.max(0,r+e)),t=1===arguments.length?r-e:void 0===t||null===t?0:Math.max(0,Math.min(t,r-e)),void 0===n&&(n=[]),Oe(this)){var o=Ae(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!o)return cn;t=o.removedCount,n=o.added}n=n.map(this.makeReactiveArrayItem,this);var i=n.length-t;this.updateArrayLength(r,i);var s=(a=this.values).splice.apply(a,[e,t].concat(n));return 0===t&&0===n.length||this.notifyArraySplice(e,n,s),s;var a},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&de(),o=Re(this),i=o||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&be(i),this.atom.reportChanged(),o&&Ie(this,i),r&&ye()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&de(),o=Re(this),i=o||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&be(i),this.atom.reportChanged(),o&&Ie(this,i),r&&ye()},e}(),qt=function(e){function t(t,n,r,o){void 0===o&&(o=!1),e.call(this);var i=new Yt(r,n,this,o);_t(this,"$mobx",i),t&&t.length?(i.updateArrayLength(0,t.length),i.values=t.map(i.makeReactiveArrayItem,i),i.notifyArraySplice(0,i.values.slice(),cn)):i.values=[],Wt&&Object.defineProperty(i.array,"0",Qt)}return kt(t,e),t.prototype.intercept=function(e){return this.$mobx.intercept(e)},t.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},t.prototype.clear=function(){return this.splice(0)},t.prototype.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.slice(),e.map(function(e){return Fe(e)?e.slice():e}))},t.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},t.prototype.toJS=function(){return this.slice()},t.prototype.toJSON=function(){return this.toJS()},t.prototype.peek=function(){return this.$mobx.values},t.prototype.find=function(e,t,n){void 0===n&&(n=0),this.$mobx.atom.reportObserved();for(var r=this.$mobx.values,o=r.length,i=n;i<o;i++)if(e.call(t,r[i],i,this))return r[i]},t.prototype.splice=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(e);case 2:return this.$mobx.spliceWithArray(e,t)}return this.$mobx.spliceWithArray(e,t,n)},t.prototype.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=this.$mobx;return n.spliceWithArray(n.values.length,0,e),n.values.length},t.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},t.prototype.shift=function(){return this.splice(0,1)[0]},t.prototype.unshift=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=this.$mobx;return n.spliceWithArray(0,0,e),n.values.length},t.prototype.reverse=function(){this.$mobx.atom.reportObserved();var e=this.slice();return e.reverse.apply(e,arguments)},t.prototype.sort=function(e){this.$mobx.atom.reportObserved();var t=this.slice();return t.sort.apply(t,arguments)},t.prototype.remove=function(e){var t=this.$mobx.values.indexOf(e);return t>-1&&(this.splice(t,1),!0)},t.prototype.toString=function(){return"[mobx.array] "+Array.prototype.toString.apply(this.$mobx.values,arguments)},t.prototype.toLocaleString=function(){return"[mobx.array] "+Array.prototype.toLocaleString.apply(this.$mobx.values,arguments)},t}(Xt);ct(qt.prototype,function(){return ut(this.slice())}),xt(qt.prototype,["constructor","intercept","observe","clear","concat","replace","toJS","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(qt.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];wt(qt.prototype,e,function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)})});var Qt={configurable:!0,enumerable:!1,set:$e(0),get:Ne(0)};Ue(1e3),exports.fastArray=ze,exports.isObservableArray=Fe;var Zt={},en=function(){function e(e,t){var n=this;this.$mobx=Zt,this._data={},this._hasMap={},this.name="ObservableMap@"+lt(),this._keys=new qt(null,Ft.Reference,this.name+".keys()",(!0)),this.interceptors=null,this.changeListeners=null,this._valueMode=Pe(t),this._valueMode===Ft.Flat&&(this._valueMode=Ft.Reference),$(!0,function(){bt(e)?n.merge(e):Array.isArray(e)&&e.forEach(function(e){var t=e[0],r=e[1];return n.set(t,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())},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(Ve(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"),Oe(this)){var r=Ae(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,Oe(this)){var n=Ae(this,{type:"delete",object:this,name:e});if(!n)return!1}if(this._has(e)){var r=de(),o=Re(this),n=o||r?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;return r&&be(n),xe(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&&Ie(this,n),r&&ye(),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap[e];return n?n.setNewValue(t):n=this._hasMap[e]=new sn(t,Ft.Reference,this.name+"."+e+"?",(!1)),n},e.prototype._updateValue=function(e,t){var n=this._data[e];if(t=n.prepareNewValue(t),t!==on){var r=de(),o=Re(this),i=o||r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;r&&be(i),n.setNewValue(t),o&&Ie(this,i),r&&ye()}},e.prototype._addValue=function(e,t){var n=this;xe(function(){var r=n._data[e]=new sn(t,n._valueMode,n.name+"."+e,(!1));t=r.value,n._updateHasMapEntry(e,!0),n._keys.push(e)},void 0,!1);var r=de(),o=Re(this),i=o||r?{type:"add",object:this,name:e,newValue:t}:null;r&&be(i),o&&Ie(this,i),r&&ye()},e.prototype.get=function(e){if(e=""+e,this.has(e))return this._data[e].get()},e.prototype.keys=function(){return ut(this._keys.slice())},e.prototype.values=function(){return ut(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return ut(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 xe(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;xe(function(){H(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 e=this,t={};return this.keys().forEach(function(n){return t[n]=e.get(n)}),t},e.prototype.toJs=function(){return pt("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&&("string"==typeof e||"number"==typeof e||"boolean"==typeof e)},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 ft(t!==!0,"`observe` doesn't support the fire immediately property for observable maps."),ke(this,e)},e.prototype.intercept=function(e){return Se(this,e)},e}();exports.ObservableMap=en,ct(en.prototype,function(){return this.entries()}),exports.map=Ge,exports.isObservableMap=Ke;var tn=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 ft(t!==!0,"`observe` doesn't support the fire immediately property for observable objects."),ke(this,e)},e.prototype.intercept=function(e){return Se(this,e)},e}(),nn={},rn={};exports.isObservableObject=Ze;var on={},sn=function(e){function t(t,n,r,o){void 0===r&&(r="ObservableValue@"+lt()),void 0===o&&(o=!0),e.call(this,r),this.mode=n,this.hasUnreportedChange=!1,this.value=void 0;var i=Ce(t,Ft.Recursive),s=i[0],a=i[1];this.mode===Ft.Recursive&&(this.mode=s),this.value=De(a,this.mode,this.name),o&&de()&&ve({type:"create",object:this,newValue:this.value})}return kt(t,e),t.prototype.set=function(e){var t=this.value;if(e=this.prepareNewValue(e),e!==on){var n=de();n&&be({type:"update",object:this,newValue:e,oldValue:t}),this.setNewValue(e),n&&ye()}},t.prototype.prepareNewValue=function(e){if(Ve(e,"Modifiers cannot be used on non-initial values."),F(),Oe(this)){var t=Ae(this,{object:this,type:"update",newValue:e});if(!t)return on;e=t.newValue}var n=mt(this.mode===Ft.Structure,this.value,e);return n?De(e,this.mode,this.name):on},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),Re(this)&&Ie(this,[e,t])},t.prototype.get=function(){return this.reportObserved(),this.value},t.prototype.intercept=function(e){return Se(this,e)},t.prototype.observe=function(e,t){return t&&e(this.value,void 0),ke(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t}(Lt),an="__$$iterating",un=function(){function e(){this.listeners=[],pt("extras.SimpleEventEmitter is deprecated and will be removed in the next major release")}return e.prototype.emit=function(){for(var e=this.listeners.slice(),t=0,n=e.length;t<n;t++)e[t].apply(null,arguments)},e.prototype.on=function(e){var t=this;return this.listeners.push(e),ht(function(){var n=t.listeners.indexOf(e);n!==-1&&t.listeners.splice(n,1)})},e.prototype.once=function(e){var t=this.on(function(){t(),e.apply(this,arguments)});return t},e}();exports.SimpleEventEmitter=un;var cn=[];Object.freeze(cn);var ln=[],fn=function(){},pn=Object.prototype.hasOwnProperty;
"use strict";function e(e,n,r,o){return 1===arguments.length&&"function"==typeof e?D(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof n?D(e,n):1===arguments.length&&"string"==typeof e?t(e):t(n).apply(null,arguments)}function t(e){return function(t,n,r){return r&&"function"==typeof r.value?(r.value=D(e,r.value),r.enumerable=!1,r.configurable=!0,r):Tt(e).apply(this,arguments)}}function n(e,t,n){var r="string"==typeof e?e:e.name||"<unnamed action>",o="function"==typeof e?e:t,i="function"==typeof e?t:n;return pt("function"==typeof o,"`runInAction` expects a function"),pt(0===o.length,"`runInAction` expects a function without arguments"),pt("string"==typeof r&&r.length>0,"actions should have valid names, got: '"+r+"'"),P(r,o,i,void 0)}function r(e){return"function"==typeof e&&e.isMobxAction===!0}function o(e,t,n){function r(){i(a)}var o,i,s;"string"==typeof e?(o=e,i=t,s=n):"function"==typeof e&&(o=e.name||"Autorun@"+lt(),i=e,s=t),Ve(i,"autorun methods cannot have modifiers"),pt("function"==typeof i,"autorun expects a function"),s&&(i=i.bind(s));var a=new Nt(o,function(){this.track(r)});return a.schedule(),a.getDisposer()}function i(e,t,n,r){var i,s,a,u;"string"==typeof e?(i=e,s=t,a=n,u=r):"function"==typeof e&&(i="When@"+lt(),s=e,a=t,u=n);var c=o(i,function(e){if(s.call(u)){e.dispose();var t=X();a.call(u),Y(t)}});return c}function s(e,t,n){return ft("`autorunUntil` is deprecated, please use `when`."),i.apply(null,arguments)}function a(e,t,n,r){function o(){s(l)}var i,s,a,u;"string"==typeof e?(i=e,s=t,a=n,u=r):"function"==typeof e&&(i=e.name||"AutorunAsync@"+lt(),s=e,a=t,u=n),void 0===a&&(a=1),u&&(s=s.bind(u));var c=!1,l=new Nt(i,function(){c||(c=!0,setTimeout(function(){c=!1,l.isDisposed||l.track(o)},a))});return l.schedule(),l.getDisposer()}function u(t,n,r,o,i,s){function a(){if(!w.isDisposed){var e=!1;w.track(function(){var t=b(w);e=mt(y,x,t),x=t}),m&&p&&l(x,w),m||e!==!0||l(x,w),m&&(m=!1)}}var u,c,l,p,f,h;"string"==typeof t?(u=t,c=n,l=r,p=o,f=i,h=s):(u=t.name||n.name||"Reaction@"+lt(),c=t,l=n,p=r,f=o,h=i),void 0===p&&(p=!1),void 0===f&&(f=0);var d=Ce(c,Ft.Reference),v=d[0],b=d[1],y=v===Ft.Structure;h&&(b=b.bind(h),l=e(u,l.bind(h)));var m=!0,g=!1,x=void 0,w=new Nt(u,function(){f<1?a():g||(g=!0,setTimeout(function(){g=!1,a()},f))});return w.schedule(),w.getDisposer()}function c(e,t,n,r){return"function"==typeof e&&arguments.length<3?"function"==typeof t?l(e,t,void 0):l(e,void 0,t):It.apply(null,arguments)}function l(e,t,n){var r=Ce(e,Ft.Recursive),o=r[0],i=r[1];return new Dt(i,n,o===Ft.Structure,i.name,t)}function p(e,t){pt("function"==typeof e&&1===e.length,"createTransformer expects a function that accepts one argument");var n={},r=$t.resetId,o=function(r){function o(t,n){r.call(this,function(){return e(n)},null,!1,"Transformer-"+e.name+"-"+t,void 0),this.sourceIdentifier=t,this.sourceObject=n}return kt(o,r),o.prototype.onBecomeUnobserved=function(){var e=this.value;r.prototype.onBecomeUnobserved.call(this),delete n[this.sourceIdentifier],t&&t(e,this.sourceObject)},o}(Dt);return function(e){r!==$t.resetId&&(n={},r=$t.resetId);var t=f(e),i=n[t];return i?i.get():(i=n[t]=new o(t,e),i.get())}}function f(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=lt(),wt(e,"$transformId",t)),t}function h(e,t){return z()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),c(e,t).get()}function d(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return pt(arguments.length>=2,"extendObservable expected 2 or more arguments"),pt("object"==typeof e,"extendObservable expects an object as first argument"),pt(!(e instanceof en),"extendObservable should not be used on maps, use map.merge instead"),t.forEach(function(t){pt("object"==typeof t,"all arguments of extendObservable should be objects"),v(e,t,Ft.Recursive,null)}),e}function v(e,t,n,r){var o=Je(e,r,n);for(var i in t)if(gt(t,i)){if(e===t&&!Ot(e,i))continue;var s=Object.getOwnPropertyDescriptor(t,i);We(o,i,s)}return e}function b(e,t){return y(et(e,t))}function y(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=dt(e.observing).map(y)),t}function m(e,t){return g(et(e,t))}function g(e){var t={name:e.name};return ee(e)&&(t.observers=te(e).map(g)),t}function x(e,t,n){return"function"==typeof n?_(e,t,n):w(e,t)}function w(e,t){return bt(e)&&!Ze(e)?(ft("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),tt(A(e)).intercept(t)):tt(e).intercept(t)}function _(e,t,n){return bt(e)&&!Ze(e)?(ft("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),d(e,{property:e[t]}),_(e,t,n)):tt(e,t).intercept(n)}function O(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof en||e instanceof qt)throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(Ze(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof Lt||e instanceof Nt||e instanceof Dt}function S(e,t,n){return pt(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",t),St(e,t),pt(!n||!n.get,"@observable can not be used on getters, use @computed instead"),Et.apply(null,arguments)}function A(e,t){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return S.apply(null,arguments);if(pt(arguments.length<3,"observable expects zero, one or two arguments"),O(e))return e;var n=Ce(e,Ft.Recursive),r=n[0],o=n[1],i=r===Ft.Reference?jt.Reference:R(o);switch(i){case jt.Array:case jt.PlainObject:return Pe(o,r);case jt.Reference:case jt.ComplexObject:return new sn(o,r);case jt.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 jt.ViewFunction:return ft("Use `computed(expr)` instead of `observable(expr)`"),c(e,t)}pt(!1,"Illegal State")}function R(e){return null===e||void 0===e?jt.Reference:"function"==typeof e?e.length?jt.ComplexFunction:jt.ViewFunction:Array.isArray(e)||e instanceof qt?jt.Array:"object"==typeof e?bt(e)?jt.PlainObject:jt.ComplexObject:jt.Reference}function k(e,t,n,r){return"function"==typeof n?I(e,t,n,r):T(e,t,n)}function T(e,t,n){return bt(e)&&!Ze(e)?(ft("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),tt(A(e)).observe(t,n)):tt(e).observe(t,n)}function I(e,t,n,r){return bt(e)&&!Ze(e)?(ft("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),d(e,{property:e[t]}),I(e,t,n,r)):tt(e,t).observe(n,r)}function E(e,t,n){function r(r){return t&&n.push([e,r]),r}if(void 0===t&&(t=!0),void 0===n&&(n=null),e instanceof Date||e instanceof RegExp)return e;if(t&&null===n&&(n=[]),t&&null!==e&&"object"==typeof e)for(var o=0,i=n.length;o<i;o++)if(n[o][0]===e)return n[o][1];if(!e)return e;if(Array.isArray(e)||e instanceof qt){var s=r([]),a=e.map(function(e){return E(e,t,n)});s.length=a.length;for(var o=0,i=a.length;o<i;o++)s[o]=a[o];return s}if(e instanceof en){var u=r({});return e.forEach(function(e,r){return u[r]=E(e,t,n)}),u}if(O(e)&&e.$mobx instanceof sn)return E(e(),t,n);if(e instanceof sn)return E(e.get(),t,n);if("object"==typeof e){var s=r({});for(var c in e)s[c]=E(e[c],t,n);return s}return e}function j(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n=null),ft("toJSON is deprecated. Use toJS instead"),E.apply(null,arguments)}function L(e){return console.log(e),e}function C(e,t){switch(arguments.length){case 0:if(e=$t.trackingDerivation,!e)return L("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=et(e,t)}return e=et(e),e instanceof Dt?L(e.whyRun()):e instanceof Nt?L(e.whyRun()):void pt(!1,"whyRun can only be used on reactions and computed values")}function D(e,t){pt("function"==typeof t,"`action` can only be invoked on functions"),pt("string"==typeof e&&e.length>0,"actions should have valid names, got: '"+e+"'");var n=function(){return P(e,t,this,arguments)};return n.isMobxAction=!0,n}function P(e,t,n,r){pt(!($t.trackingDerivation instanceof Dt),"Computed values or transformers should not invoke actions or trigger other side effects");var o,i=de();if(i){o=Date.now();var s=r&&r.length||0,a=new Array(s);if(s>0)for(var u=0;u<s;u++)a[u]=r[u];be({type:"action",name:e,fn:t,target:n,arguments:a})}var c=X();we(e,n,!1);var l=N(!0);try{return t.apply(n,r)}finally{U(l),_e(!1),Y(c),i&&ye({time:Date.now()-o})}}function V(e){return 0===arguments.length?(ft("`useStrict` without arguments is deprecated, use `isStrictModeEnabled()` instead"),$t.strictMode):(pt(null===$t.trackingDerivation,"It is not allowed to set `useStrict` when a derivation is running"),$t.strictMode=e,$t.allowStateChanges=!e,void 0)}function M(){return $t.strictMode}function $(e,t){var n=N(e),r=t();return U(n),r}function N(e){var t=$t.allowStateChanges;return $t.allowStateChanges=e,t}function U(e){$t.allowStateChanges=e}function B(e){switch(e.dependenciesState){case Pt.UP_TO_DATE:return!1;case Pt.NOT_TRACKING:case Pt.STALE:return!0;case Pt.POSSIBLY_STALE:var t=!0,n=X();try{for(var r=e.observing,o=r.length,i=0;i<o;i++){var s=r[i];if(s instanceof Dt&&(s.get(),e.dependenciesState===Pt.STALE))return t=!1,Y(n),!0}return t=!1,q(e),Y(n),!1}finally{t&&q(e)}}}function z(){return null!==$t.trackingDerivation}function F(){$t.allowStateChanges||pt(!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 G(e,t){q(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++$t.runId;var n=$t.trackingDerivation;$t.trackingDerivation=e;var r,o=!0;try{r=t.call(e),o=!1}finally{o?K(e):($t.trackingDerivation=n,J(e))}return r}function K(e){var t="[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+"'. ")+"For more details see https://github.com/mobxjs/mobx/issues/462";de()&&ve({type:"error",message:t}),console.warn(t),q(e),e.newObserving=null,e.unboundDepsCount=0,e.recoverFromError(),ae(),Z()}function J(e){var t=e.observing,n=e.observing=e.newObserving;e.newObserving=null;for(var r=0,o=e.unboundDepsCount,i=0;i<o;i++){var s=n[i];0===s.diffValue&&(s.diffValue=1,r!==i&&(n[r]=s),r++)}for(n.length=r,o=t.length;o--;){var s=t[o];0===s.diffValue&&oe(s,e),s.diffValue=0}for(;r--;){var s=n[r];1===s.diffValue&&(s.diffValue=0,re(s,e))}}function W(e){for(var t=e.observing,n=t.length;n--;)oe(t[n],e);e.dependenciesState=Pt.NOT_TRACKING,t.length=0}function H(e){var t=X(),n=e();return Y(t),n}function X(){var e=$t.trackingDerivation;return $t.trackingDerivation=null,e}function Y(e){$t.trackingDerivation=e}function q(e){if(e.dependenciesState!==Pt.UP_TO_DATE){e.dependenciesState=Pt.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=Pt.UP_TO_DATE}}function Q(){}function Z(){$t.resetId++;var e=new Mt;for(var t in e)Vt.indexOf(t)===-1&&($t[t]=e[t]);$t.allowStateChanges=!$t.strictMode}function ee(e){return e.observers&&e.observers.length>0}function te(e){return e.observers}function ne(e){for(var t=e.observers,n=e.observersIndexes,r=t.length,o=0;o<r;o++){var i=t[o].__mapid;o?pt(n[i]===o,"INTERNAL ERROR maps derivation.__mapid to index in list"):pt(!(i in n),"INTERNAL ERROR observer on index 0 shouldnt be held in map.")}pt(0===t.length||Object.keys(n).length===t.length-1,"INTERNAL ERROR there is no junk in map")}function re(e,t){var n=e.observers.length;n&&(e.observersIndexes[t.__mapid]=n),e.observers[n]=t,e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function oe(e,t){if(1===e.observers.length)e.observers.length=0,ie(e);else{var n=e.observers,r=e.observersIndexes,o=n.pop();if(o!==t){var i=r[t.__mapid]||0;i?r[o.__mapid]=i:delete r[o.__mapid],n[i]=o}delete r[t.__mapid]}}function ie(e){e.isPendingUnobservation||(e.isPendingUnobservation=!0,$t.pendingUnobservations.push(e))}function se(){$t.inBatch++}function ae(){if(1===$t.inBatch){for(var e=$t.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers.length&&n.onBecomeUnobserved()}$t.pendingUnobservations=[]}$t.inBatch--}function ue(e){var t=$t.trackingDerivation;null!==t?t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e):0===e.observers.length&&ie(e)}function ce(e,t){var n=te(e).reduce(function(e,t){return Math.min(e,t.dependenciesState)},2);if(!(n>=e.lowestObserverState))throw new Error("lowestObserverState is wrong for "+t+" because "+n+" < "+e.lowestObserverState)}function le(e){if(e.lowestObserverState!==Pt.STALE){e.lowestObserverState=Pt.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Pt.UP_TO_DATE&&r.onBecomeStale(),r.dependenciesState=Pt.STALE}}}function pe(e){if(e.lowestObserverState!==Pt.STALE){e.lowestObserverState=Pt.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Pt.POSSIBLY_STALE?r.dependenciesState=Pt.STALE:r.dependenciesState===Pt.UP_TO_DATE&&(e.lowestObserverState=Pt.UP_TO_DATE)}}}function fe(e){if(e.lowestObserverState===Pt.UP_TO_DATE){e.lowestObserverState=Pt.POSSIBLY_STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Pt.UP_TO_DATE&&(r.dependenciesState=Pt.POSSIBLY_STALE,r.onBecomeStale())}}}function he(){if(!($t.isRunningReactions===!0||$t.inTransaction>0)){$t.isRunningReactions=!0;for(var e=$t.pendingReactions,t=0;e.length>0;){if(++t===Ut)throw Z(),new Error("Reaction doesn't converge to a stable state after "+Ut+" iterations. Probably there is a cycle in the reactive function: "+e[0]);for(var n=e.splice(0),r=0,o=n.length;r<o;r++)n[r].runReaction()}$t.isRunningReactions=!1}}function de(){return Bt}function ve(e){if(!Bt)return!1;for(var t=$t.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function be(e){var t=yt({},e,{spyReportStart:!0});ve(t)}function ye(e){ve(e?yt({},e,zt):zt)}function me(e){return $t.spyListeners.push(e),Bt=$t.spyListeners.length>0,ht(function(){var t=$t.spyListeners.indexOf(e);t!==-1&&$t.spyListeners.splice(t,1),Bt=$t.spyListeners.length>0})}function ge(e){return ft("trackTransitions is deprecated. Use mobx.spy instead"),"boolean"==typeof e&&(ft("trackTransitions only takes a single callback function. If you are using the mobx-react-devtools, please update them first"),e=arguments[1]),e?me(e):(ft("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 xe(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),we(e.name||"anonymous transaction",t,n);var r=e.call(t);return _e(n),r}function we(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),se(),$t.inTransaction+=1,n&&de()&&be({type:"transaction",target:t,name:e})}function _e(e){void 0===e&&(e=!0),0===--$t.inTransaction&&he(),e&&de()&&ye(),ae()}function Oe(e){return e.interceptors&&e.interceptors.length>0}function Se(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),ht(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function Ae(e,t){for(var n=X(),r=e.interceptors,o=0,i=r.length;o<i;o++)if(t=r[o](t),pt(!t||t.type,"Intercept handlers should return nothing or a change object"),!t)return null;return Y(n),t}function Re(e){return e.changeListeners&&e.changeListeners.length>0}function ke(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),ht(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function Te(e,t){var n=X(),r=e.changeListeners;if(r){r=r.slice();for(var o=0,i=r.length;o<i;o++)Array.isArray(t)?r[o].apply(null,t):r[o](t);Y(n)}}function Ie(e){return new Gt(e)}function Ee(e){return new Kt(e)}function je(e){return new Jt(e)}function Le(e,t){return Ge(e,t)}function Ce(e,t){return e instanceof Gt?[Ft.Reference,e.value]:e instanceof Kt?[Ft.Structure,e.value]:e instanceof Jt?[Ft.Flat,e.value]:[t,e]}function De(e){return e===Ie?Ft.Reference:e===Ee?Ft.Structure:e===je?Ft.Flat:(pt(void 0===e,"Cannot determine value mode from function. Please pass in one of these: mobx.asReference, mobx.asStructure or mobx.asFlat, got: "+e),Ft.Recursive)}function Pe(e,t,n){var r;if(O(e))return e;switch(t){case Ft.Reference:return e;case Ft.Flat:Ve(e,"Items inside 'asFlat' cannot have modifiers"),r=Ft.Reference;break;case Ft.Structure:Ve(e,"Items inside 'asStructure' cannot have modifiers"),r=Ft.Structure;break;case Ft.Recursive:o=Ce(e,Ft.Recursive),r=o[0],e=o[1];break;default:pt(!1,"Illegal State")}return Array.isArray(e)?Be(e,r,n):bt(e)&&Object.isExtensible(e)?v(e,e,r,n):e;var o}function Ve(e,t){if(e instanceof Gt||e instanceof Kt||e instanceof Jt)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function Me(e){var t=$e(e),n=Ne(e);Object.defineProperty(qt.prototype,""+e,{enumerable:!1,configurable:!0,set:t,get:n})}function $e(e){return function(t){var n=this.$mobx,r=n.values;if(Ve(t,"Modifiers cannot be used on array values. For non-reactive array values use makeReactive(asFlat(array))."),e<r.length){F();var o=r[e];if(Oe(n)){var i=Ae(n,{type:"update",object:n.array,index:e,newValue:t});if(!i)return;t=i.newValue}t=n.makeReactiveArrayItem(t);var s=n.mode===Ft.Structure?!Rt(o,t):o!==t;s&&(r[e]=t,n.notifyArrayChildUpdate(e,t,o))}else{if(e!==r.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+r.length);n.spliceWithArray(e,0,[t])}}}function Ne(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 Ue(e){for(var t=Ht;t<e;t++)Me(t);Ht=e}function Be(e,t,n){return new qt(e,t,n)}function ze(e){return ft("fastArray is deprecated. Please use `observable(asFlat([]))`"),Be(e,Ft.Flat,null)}function Fe(e){return e instanceof qt}function Ge(e,t){return new en(e,t)}function Ke(e){return e instanceof en}function Je(e,t,n){if(void 0===n&&(n=Ft.Recursive),Ze(e))return e.$mobx;bt(e)||(t=e.constructor.name+"@"+lt()),t||(t="ObservableObject@"+lt());var r=new tn(e,t,n);return _t(e,"$mobx",r),r}function We(e,t,n){e.values[t]?(pt("value"in n,"cannot redefine property "+t),e.target[t]=n.value):"value"in n?He(e,t,n.value,!0,void 0):He(e,t,n.get,!0,n.set)}function He(e,t,n,o,i){o&&St(e.target,t);var s,a=e.name+"."+t,u=!0;if(n instanceof sn)s=n,n.name=a,u=!1;else if(n instanceof Dt)s=n,n.name=a,n.scope||(n.scope=e.target);else if("function"!=typeof n||0!==n.length||r(n))if(n instanceof Kt&&"function"==typeof n.value&&0===n.value.length)s=new Dt(n.value,e.target,(!0),a,i);else{if(u=!1,Oe(e)){var c=Ae(e,{object:e.target,name:t,type:"add",newValue:n});if(!c)return;n=c.newValue}s=new sn(n,e.mode,a,(!1)),n=s.value}else s=new Dt(n,e.target,(!1),a,i);e.values[t]=s,o&&Object.defineProperty(e.target,t,u?Ye(t):Xe(t)),u||Qe(e,e.target,t,n)}function Xe(e){var t=nn[e];return t?t:nn[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){qe(this,e,t)}}}function Ye(e){var t=rn[e];return t?t:rn[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:function(t){return this.$mobx.values[e].set(t)}}}function qe(e,t,n){var r=e.$mobx,o=r.values[t];if(Oe(r)){var i=Ae(r,{type:"update",object:e,name:t,newValue:n});if(!i)return;n=i.newValue}if(n=o.prepareNewValue(n),n!==on){var s=Re(r),a=de(),i=Te||Re?{type:"update",object:e,oldValue:o.value,name:t,newValue:n}:null;a&&be(i),o.setNewValue(n),s&&Te(r,i),a&&ye()}}function Qe(e,t,n,r){var o=Re(e),i=de(),s=o||i?{type:"add",object:t,name:n,newValue:r}:null;i&&be(s),o&&Te(e,s),i&&ye()}function Ze(e){return"object"==typeof e&&null!==e&&(it(e),e.$mobx instanceof tn)}function et(e,t){if("object"==typeof e&&null!==e){if(Fe(e))return pt(void 0===t,"It is not possible to get index atoms from arrays"),e.$mobx.atom;if(Ke(e)){if(void 0===t)return et(e._keys);var n=e._data[t]||e._hasMap[t];return pt(!!n,"the entry '"+t+"' does not exist in the observable map '"+nt(e)+"'"),n}if(it(e),Ze(e)){pt(!!t,"please specify a property");var r=e.$mobx.values[t];return pt(!!r,"no observable property '"+t+"' found on the observable object '"+nt(e)+"'"),r}if(e instanceof Lt||e instanceof Dt||e instanceof Nt)return e}else if("function"==typeof e&&e.$mobx instanceof Nt)return e.$mobx;pt(!1,"Cannot obtain atom from "+e)}function tt(e,t){return pt(e,"Expection some object"),void 0!==t?tt(et(e,t)):e instanceof Lt||e instanceof Dt||e instanceof Nt?e:Ke(e)?e:(it(e),e.$mobx?e.$mobx:void pt(!1,"Cannot obtain administration from "+e))}function nt(e,t){var n;return n=void 0!==t?et(e,t):Ze(e)||Ke(e)?tt(e):et(e),n.name}function rt(e,t,n,r,o){function i(i,s,a,u){if(pt(o||st(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),a){gt(i,"__mobxLazyInitializers")||wt(i,"__mobxLazyInitializers",i.__mobxLazyInitializers&&i.__mobxLazyInitializers.slice()||[]);var c=a.value,l=a.initializer;return i.__mobxLazyInitializers.push(function(t){e(t,s,l?l.call(t):c,u,a)}),{enumerable:r,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&it(this),t.call(this,s)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&it(this),n.call(this,s,e)}}}var p={enumerable:r,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[s]===!0||ot(this,s,void 0,e,u,a),t.call(this,s)},set:function(t){this.__mobxInitializedProps&&this.__mobxInitializedProps[s]===!0?n.call(this,s,t):ot(this,s,t,e,u,a)}};return arguments.length<3&&Object.defineProperty(i,s,p),p}return o?function(){if(st(arguments))return i.apply(null,arguments);var e=arguments;return function(t,n,r){return i(t,n,r,e)}}:i}function ot(e,t,n,r,o,i){gt(e,"__mobxInitializedProps")||wt(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,o,i)}function it(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(wt(e,"__mobxDidRunLazyInitializers",!0),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function st(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}function at(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function ut(e){pt(e[an]!==!0,"Illegal state: cannot recycle array as iterator"),_t(e,an,!0);var t=-1;return _t(e,"next",function(){return t++,{done:t>=this.length,value:t<this.length?this[t]:void 0}}),e}function ct(e,t){_t(e,at(),t)}function lt(){return++$t.mobxGuid}function pt(e,t,n){if(!e)throw new Error("[mobx] Invariant failed: "+t+(n?" in '"+n+"'":""))}function ft(e){ln.indexOf(e)===-1&&(ln.push(e),console.error("[mobx] Deprecated: "+e))}function ht(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}function dt(e){var t=[];return e.forEach(function(e){t.indexOf(e)===-1&&t.push(e)}),t}function vt(e,t,n){if(void 0===t&&(t=100),void 0===n&&(n=" - "),!e)return"";var r=e.slice(0,t);return""+r.join(n)+(e.length>t?" (... and "+(e.length-t)+"more)":"")}function bt(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function yt(){for(var e=arguments[0],t=1,n=arguments.length;t<n;t++){var r=arguments[t];for(var o in r)gt(r,o)&&(e[o]=r[o])}return e}function mt(e,t,n){return e?!Rt(t,n):t!==n}function gt(e,t){return fn.call(e,t)}function xt(e,t){for(var n=0;n<t.length;n++)wt(e,t[n],e[t[n]])}function wt(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function _t(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Ot(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return!n||n.configurable!==!1&&n.writable!==!1}function St(e,t){pt(Ot(e,t),"Cannot make property '"+t+"' observable, it is not configurable and writable in the target object")}function At(e){var t=[];for(var n in e)t.push(n);return t}function Rt(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var n=Array.isArray(e)||Fe(e);if(n!==(Array.isArray(t)||Fe(t)))return!1;if(n){if(e.length!==t.length)return!1;for(var r=e.length-1;r>=0;r--)if(!Rt(e[r],t[r]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(At(e).length!==At(t).length)return!1;for(var o in e){if(!(o in t))return!1;if(!Rt(e[o],t[o]))return!1}return!0}return e===t}var kt=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)};Q(),exports.extras={allowStateChanges:$,getAtom:et,getDebugName:nt,getDependencyTree:b,getObserverTree:m,isComputingDerivation:z,isSpyEnabled:de,resetGlobalState:Z,spyReport:ve,spyReportEnd:ye,spyReportStart:be,trackTransitions:ge},exports._={getAdministration:tt,resetGlobalState:Z},"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx(module.exports);var Tt=rt(function(t,n,r,o,i){var s=o&&1===o.length?o[0]:r.name||n||"<unnamed action>",a=e(s,r);wt(t,n,a)},function(e){return this[e]},function(){pt(!1,"It is not allowed to assign new values to @action fields")},!1,!0);exports.action=e,exports.runInAction=n,exports.isAction=r,exports.autorun=o,exports.when=i,exports.autorunUntil=s,exports.autorunAsync=a,exports.reaction=u;var It=rt(function(e,t,n,r,o){pt("undefined"!=typeof o,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'. It looks like it was used on a property.");var i=o.get,s=o.set;pt("function"==typeof i,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'");var a=!1;r&&1===r.length&&r[0].asStructure===!0&&(a=!0);var u=Je(e,void 0,Ft.Recursive);He(u,t,a?Ee(i):i,!1,s)},function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()},function(e,t){this.$mobx.values[e].set(t)},!1,!0);exports.computed=c,exports.createTransformer=p,exports.expr=h,exports.extendObservable=d,exports.intercept=x,exports.isObservable=O;var Et=rt(function(e,t,n){var r=N(!0);"function"==typeof n&&(n=Ie(n));var o=Je(e,void 0,Ft.Recursive);He(o,t,n,!0,void 0),U(r)},function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()},function(e,t){qe(this,e,t)},!0,!1);exports.observable=A;var jt;!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"}(jt||(jt={})),exports.observe=k,exports.toJS=E,exports.toJSON=j,exports.whyRun=C,exports.useStrict=V,exports.isStrictModeEnabled=M;var Lt=function(){function e(e){void 0===e&&(e="Atom@"+lt()),this.name=e,this.isPendingUnobservation=!0,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Pt.NOT_TRACKING}return e.prototype.onBecomeUnobserved=function(){},e.prototype.reportObserved=function(){ue(this)},e.prototype.reportChanged=function(){we("propagatingAtomChange",null,!1),le(this),_e(!1)},e.prototype.toString=function(){return this.name},e}();exports.BaseAtom=Lt;var Ct=function(e){function t(t,n,r){void 0===t&&(t="Atom@"+lt()),void 0===n&&(n=pn),void 0===r&&(r=pn),e.call(this,t),this.name=t,this.onBecomeObservedHandler=n,this.onBecomeUnobservedHandler=r,this.isPendingUnobservation=!1,this.isBeingTracked=!1}return kt(t,e),t.prototype.reportObserved=function(){return se(),e.prototype.reportObserved.call(this),this.isBeingTracked||(this.isBeingTracked=!0,this.onBecomeObservedHandler()),ae(),!!$t.trackingDerivation},t.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},t}(Lt);exports.Atom=Ct;var Dt=function(){function e(e,t,n,r,o){this.derivation=e,this.scope=t,this.compareStructural=n,this.dependenciesState=Pt.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=Pt.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+lt(),this.value=void 0,this.isComputing=!1,this.isRunningSetter=!1,this.name=r||"ComputedValue@"+lt(),o&&(this.setter=D(r+"-setter",o))}return e.prototype.peek=function(){this.isComputing=!0;var e=N(!1),t=this.derivation.call(this.scope);return U(e),this.isComputing=!1,t},e.prototype.peekUntracked=function(){var e=!0;try{var t=this.peek();return e=!1,t}finally{e&&K(this)}},e.prototype.onBecomeStale=function(){fe(this)},e.prototype.onBecomeUnobserved=function(){pt(this.dependenciesState!==Pt.NOT_TRACKING,"INTERNAL ERROR only onBecomeUnobserved shouldn't be called twice in a row"),W(this),this.value=void 0},e.prototype.get=function(){pt(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),se(),1===$t.inBatch?B(this)&&(this.value=this.peekUntracked()):(ue(this),B(this)&&this.trackAndCompute()&&pe(this));var e=this.value;return ae(),e},e.prototype.recoverFromError=function(){this.isComputing=!1},e.prototype.set=function(e){if(this.setter){pt(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else pt(!1,"[ComputedValue '"+this.name+"'] It is not possible to assign a new value to a computed value.")},e.prototype.trackAndCompute=function(){de()&&ve({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=G(this,this.peek);return mt(this.compareStructural,t,e)},e.prototype.observe=function(e,t){var n=this,r=!0,i=void 0;return o(function(){var o=n.get();if(!r||t){var s=X();e(o,i),Y(s)}r=!1,i=o})},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.whyRun=function(){var e=Boolean($t.trackingDerivation),t=dt(this.isComputing?this.newObserving:this.observing).map(function(e){return e.name}),n=dt(te(this).map(function(e){return e.name}));return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+(e?"[active] the value of this computation is needed by a reaction":this.isComputing?"[get] The value of this computed was requested outside a reaction":"[idle] not running at the moment")+"\n"+(this.dependenciesState===Pt.NOT_TRACKING?" * This computation is suspended (not in use by any reaction) and won't run automatically.\n\tDidn't expect this computation to be suspended at this point?\n\t 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n\t 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 "+vt(t)+"\n "+(this.isComputing&&e?" (... or any observable accessed during the remainder of the current run)":"")+"\n\tMissing items in this list?\n\t 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n\t 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 "+vt(n)+"\n");
},e}(),Pt;!function(e){e[e.NOT_TRACKING=-1]="NOT_TRACKING",e[e.UP_TO_DATE=0]="UP_TO_DATE",e[e.POSSIBLY_STALE=1]="POSSIBLY_STALE",e[e.STALE=2]="STALE"}(Pt||(Pt={})),exports.IDerivationState=Pt,exports.untracked=H;var Vt=["mobxGuid","resetId","spyListeners","strictMode","runId"],Mt=function(){function e(){this.version=4,this.trackingDerivation=null,this.runId=0,this.mobxGuid=0,this.inTransaction=0,this.isRunningReactions=!1,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[]}return e}(),$t=function(){var e=new Mt;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}(),Nt=function(){function e(e,t){void 0===e&&(e="Reaction@"+lt()),this.name=e,this.onInvalidate=t,this.observing=[],this.newObserving=[],this.dependenciesState=Pt.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+lt(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,$t.pendingReactions.push(this),se(),he(),ae())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,B(this)&&(this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&de()&&ve({object:this,type:"scheduled-reaction"})))},e.prototype.track=function(e){se();var t,n=de();n&&(t=Date.now(),be({object:this,type:"reaction",fn:e})),this._isRunning=!0,G(this,e),this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&W(this),n&&ye({time:Date.now()-t}),ae()},e.prototype.recoverFromError=function(){this._isRunning=!1,this._isTrackPending=!1},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(se(),W(this),ae()))},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=dt(this._isRunning?this.newObserving: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 "+vt(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n\tMissing items in this list?\n\t 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n\t 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}();exports.Reaction=Nt;var Ut=100,Bt=!1,zt={spyReportEnd:!0};exports.spy=me,exports.transaction=xe;var Ft;!function(e){e[e.Recursive=0]="Recursive",e[e.Reference=1]="Reference",e[e.Structure=2]="Structure",e[e.Flat=3]="Flat"}(Ft||(Ft={})),exports.asReference=Ie,exports.asStructure=Ee,exports.asFlat=je;var Gt=function(){function e(e){this.value=e,Ve(e,"Modifiers are not allowed to be nested")}return e}(),Kt=function(){function e(e){this.value=e,Ve(e,"Modifiers are not allowed to be nested")}return e}(),Jt=function(){function e(e){this.value=e,Ve(e,"Modifiers are not allowed to be nested")}return e}();exports.asMap=Le;var Wt=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),Ht=0,Xt=function(){function e(){}return e}();Xt.prototype=[];var Yt=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 Lt(e||"ObservableArray@"+lt())}return e.prototype.makeReactiveArrayItem=function(e){return Ve(e,"Array values cannot have modifiers"),this.mode===Ft.Flat||this.mode===Ft.Reference?e:Pe(e,this.mode,this.atom.name+"[..]")},e.prototype.intercept=function(e){return Se(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),ke(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;e!==t&&(e>t?this.spliceWithArray(t,0,new Array(e-t)):this.spliceWithArray(e,t-e))},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=t,t>0&&e+t+1>Ht&&Ue(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){F();var r=this.values.length;if(void 0===e?e=0:e>r?e=r:e<0&&(e=Math.max(0,r+e)),t=1===arguments.length?r-e:void 0===t||null===t?0:Math.max(0,Math.min(t,r-e)),void 0===n&&(n=[]),Oe(this)){var o=Ae(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!o)return cn;t=o.removedCount,n=o.added}n=n.map(this.makeReactiveArrayItem,this);var i=n.length-t;this.updateArrayLength(r,i);var s=(a=this.values).splice.apply(a,[e,t].concat(n));return 0===t&&0===n.length||this.notifyArraySplice(e,n,s),s;var a},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&de(),o=Re(this),i=o||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&be(i),this.atom.reportChanged(),o&&Te(this,i),r&&ye()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&de(),o=Re(this),i=o||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&be(i),this.atom.reportChanged(),o&&Te(this,i),r&&ye()},e}(),qt=function(e){function t(t,n,r,o){void 0===o&&(o=!1),e.call(this);var i=new Yt(r,n,this,o);_t(this,"$mobx",i),t&&t.length?(i.updateArrayLength(0,t.length),i.values=t.map(i.makeReactiveArrayItem,i),i.notifyArraySplice(0,i.values.slice(),cn)):i.values=[],Wt&&Object.defineProperty(i.array,"0",Qt)}return kt(t,e),t.prototype.intercept=function(e){return this.$mobx.intercept(e)},t.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},t.prototype.clear=function(){return this.splice(0)},t.prototype.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.slice(),e.map(function(e){return Fe(e)?e.slice():e}))},t.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},t.prototype.toJS=function(){return this.slice()},t.prototype.toJSON=function(){return this.toJS()},t.prototype.peek=function(){return this.$mobx.values},t.prototype.find=function(e,t,n){void 0===n&&(n=0),this.$mobx.atom.reportObserved();for(var r=this.$mobx.values,o=r.length,i=n;i<o;i++)if(e.call(t,r[i],i,this))return r[i]},t.prototype.splice=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(e);case 2:return this.$mobx.spliceWithArray(e,t)}return this.$mobx.spliceWithArray(e,t,n)},t.prototype.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=this.$mobx;return n.spliceWithArray(n.values.length,0,e),n.values.length},t.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},t.prototype.shift=function(){return this.splice(0,1)[0]},t.prototype.unshift=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=this.$mobx;return n.spliceWithArray(0,0,e),n.values.length},t.prototype.reverse=function(){this.$mobx.atom.reportObserved();var e=this.slice();return e.reverse.apply(e,arguments)},t.prototype.sort=function(e){this.$mobx.atom.reportObserved();var t=this.slice();return t.sort.apply(t,arguments)},t.prototype.remove=function(e){var t=this.$mobx.values.indexOf(e);return t>-1&&(this.splice(t,1),!0)},t.prototype.toString=function(){return"[mobx.array] "+Array.prototype.toString.apply(this.$mobx.values,arguments)},t.prototype.toLocaleString=function(){return"[mobx.array] "+Array.prototype.toLocaleString.apply(this.$mobx.values,arguments)},t}(Xt);ct(qt.prototype,function(){return ut(this.slice())}),xt(qt.prototype,["constructor","intercept","observe","clear","concat","replace","toJS","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(qt.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];wt(qt.prototype,e,function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)})});var Qt={configurable:!0,enumerable:!1,set:$e(0),get:Ne(0)};Ue(1e3),exports.fastArray=ze,exports.isObservableArray=Fe;var Zt={},en=function(){function e(e,t){var n=this;this.$mobx=Zt,this._data={},this._hasMap={},this.name="ObservableMap@"+lt(),this._keys=new qt(null,Ft.Reference,this.name+".keys()",(!0)),this.interceptors=null,this.changeListeners=null,this._valueMode=De(t),this._valueMode===Ft.Flat&&(this._valueMode=Ft.Reference),$(!0,function(){bt(e)?n.merge(e):Array.isArray(e)&&e.forEach(function(e){var t=e[0],r=e[1];return n.set(t,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())},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(Ve(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"),Oe(this)){var r=Ae(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,Oe(this)){var n=Ae(this,{type:"delete",object:this,name:e});if(!n)return!1}if(this._has(e)){var r=de(),o=Re(this),n=o||r?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;return r&&be(n),xe(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&&Te(this,n),r&&ye(),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap[e];return n?n.setNewValue(t):n=this._hasMap[e]=new sn(t,Ft.Reference,this.name+"."+e+"?",(!1)),n},e.prototype._updateValue=function(e,t){var n=this._data[e];if(t=n.prepareNewValue(t),t!==on){var r=de(),o=Re(this),i=o||r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;r&&be(i),n.setNewValue(t),o&&Te(this,i),r&&ye()}},e.prototype._addValue=function(e,t){var n=this;xe(function(){var r=n._data[e]=new sn(t,n._valueMode,n.name+"."+e,(!1));t=r.value,n._updateHasMapEntry(e,!0),n._keys.push(e)},void 0,!1);var r=de(),o=Re(this),i=o||r?{type:"add",object:this,name:e,newValue:t}:null;r&&be(i),o&&Te(this,i),r&&ye()},e.prototype.get=function(e){if(e=""+e,this.has(e))return this._data[e].get()},e.prototype.keys=function(){return ut(this._keys.slice())},e.prototype.values=function(){return ut(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return ut(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 xe(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;xe(function(){H(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 e=this,t={};return this.keys().forEach(function(n){return t[n]=e.get(n)}),t},e.prototype.toJs=function(){return ft("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&&("string"==typeof e||"number"==typeof e||"boolean"==typeof e)},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 pt(t!==!0,"`observe` doesn't support the fire immediately property for observable maps."),ke(this,e)},e.prototype.intercept=function(e){return Se(this,e)},e}();exports.ObservableMap=en,ct(en.prototype,function(){return this.entries()}),exports.map=Ge,exports.isObservableMap=Ke;var tn=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 pt(t!==!0,"`observe` doesn't support the fire immediately property for observable objects."),ke(this,e)},e.prototype.intercept=function(e){return Se(this,e)},e}(),nn={},rn={};exports.isObservableObject=Ze;var on={},sn=function(e){function t(t,n,r,o){void 0===r&&(r="ObservableValue@"+lt()),void 0===o&&(o=!0),e.call(this,r),this.mode=n,this.hasUnreportedChange=!1,this.value=void 0;var i=Ce(t,Ft.Recursive),s=i[0],a=i[1];this.mode===Ft.Recursive&&(this.mode=s),this.value=Pe(a,this.mode,this.name),o&&de()&&ve({type:"create",object:this,newValue:this.value})}return kt(t,e),t.prototype.set=function(e){var t=this.value;if(e=this.prepareNewValue(e),e!==on){var n=de();n&&be({type:"update",object:this,newValue:e,oldValue:t}),this.setNewValue(e),n&&ye()}},t.prototype.prepareNewValue=function(e){if(Ve(e,"Modifiers cannot be used on non-initial values."),F(),Oe(this)){var t=Ae(this,{object:this,type:"update",newValue:e});if(!t)return on;e=t.newValue}var n=mt(this.mode===Ft.Structure,this.value,e);return n?Pe(e,this.mode,this.name):on},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),Re(this)&&Te(this,[e,t])},t.prototype.get=function(){return this.reportObserved(),this.value},t.prototype.intercept=function(e){return Se(this,e)},t.prototype.observe=function(e,t){return t&&e(this.value,void 0),ke(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t}(Lt),an="__$$iterating",un=function(){function e(){this.listeners=[],ft("extras.SimpleEventEmitter is deprecated and will be removed in the next major release")}return e.prototype.emit=function(){for(var e=this.listeners.slice(),t=0,n=e.length;t<n;t++)e[t].apply(null,arguments)},e.prototype.on=function(e){var t=this;return this.listeners.push(e),ht(function(){var n=t.listeners.indexOf(e);n!==-1&&t.listeners.splice(n,1)})},e.prototype.once=function(e){var t=this.on(function(){t(),e.apply(this,arguments)});return t},e}();exports.SimpleEventEmitter=un;var cn=[];Object.freeze(cn);var ln=[],pn=function(){},fn=Object.prototype.hasOwnProperty;
//# 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 e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return i(n?n:e)},l,l.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){(function(e){"use strict";function r(e,t,n,r){return 1===arguments.length&&"function"==typeof e?M(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?M(e,t):1===arguments.length&&"string"==typeof e?i(e):i(t).apply(null,arguments)}function i(e){return function(t,n,r){return r&&"function"==typeof r.value?(r.value=M(e,r.value),r.enumerable=!1,r.configurable=!0,r):It(e).apply(this,arguments)}}function o(e,t,n){var r="string"==typeof e?e:e.name||"<unnamed action>",i="function"==typeof e?e:t,o="function"==typeof e?t:n;return pt("function"==typeof i,"`runInAction` expects a function"),pt(0===i.length,"`runInAction` expects a function without arguments"),pt("string"==typeof r&&r.length>0,"actions should have valid names, got: '"+r+"'"),$(r,i,o,void 0)}function a(e){return"function"==typeof e&&e.isMobxAction===!0}function s(e,t,n){function r(){o(s)}var i,o,a;"string"==typeof e?(i=e,o=t,a=n):"function"==typeof e&&(i=e.name||"Autorun@"+ft(),o=e,a=t),Me(o,"autorun methods cannot have modifiers"),pt("function"==typeof o,"autorun expects a function"),a&&(o=o.bind(a));var s=new Nt(i,function(){this.track(r)});return s.schedule(),s.getDisposer()}function u(e,t,n,r){var i,o,a,u;"string"==typeof e?(i=e,o=t,a=n,u=r):"function"==typeof e&&(i="When@"+ft(),o=e,a=t,u=n);var c=s(i,function(e){if(o.call(u)){e.dispose();var t=Q();a.call(u),Z(t)}});return c}function c(e,t,n){return ht("`autorunUntil` is deprecated, please use `when`."),u.apply(null,arguments)}function l(e,t,n,r){function i(){a(l)}var o,a,s,u;"string"==typeof e?(o=e,a=t,s=n,u=r):"function"==typeof e&&(o=e.name||"AutorunAsync@"+ft(),a=e,s=t,u=n),void 0===s&&(s=1),u&&(a=a.bind(u));var c=!1,l=new Nt(o,function(){c||(c=!0,setTimeout(function(){c=!1,l.isDisposed||l.track(i)},s))});return l.schedule(),l.getDisposer()}function f(e,t,n,i,o,a){function s(){if(!_.isDisposed){var e=!1;_.track(function(){var t=b(_);e=gt(y,w,t),w=t}),m&&f&&l(w,_),m||e!==!0||l(w,_),m&&(m=!1)}}var u,c,l,f,p,h;"string"==typeof e?(u=e,c=t,l=n,f=i,p=o,h=a):(u=e.name||t.name||"Reaction@"+ft(),c=e,l=t,f=n,p=i,h=o),void 0===f&&(f=!1),void 0===p&&(p=0);var d=De(c,Gt.Reference),v=d[0],b=d[1],y=v===Gt.Structure;h&&(b=b.bind(h),l=r(u,l.bind(h)));var m=!0,g=!1,w=void 0,_=new Nt(u,function(){p<1?s():g||(g=!0,setTimeout(function(){g=!1,s()},p))});return _.schedule(),_.getDisposer()}function p(e,t,n,r){return"function"==typeof e&&arguments.length<3?"function"==typeof t?h(e,t,void 0):h(e,void 0,t):jt.apply(null,arguments)}function h(e,t,n){var r=De(e,Gt.Recursive),i=r[0],o=r[1];return new Vt(o,n,i===Gt.Structure,o.name,t)}function d(e,t){pt("function"==typeof e&&1===e.length,"createTransformer expects a function that accepts one argument");var n={},r=Ut.resetId,i=function(r){function i(t,n){r.call(this,function(){return e(n)},null,!1,"Transformer-"+e.name+"-"+t,void 0),this.sourceIdentifier=t,this.sourceObject=n}return Tt(i,r),i.prototype.onBecomeUnobserved=function(){var e=this.value;r.prototype.onBecomeUnobserved.call(this),delete n[this.sourceIdentifier],t&&t(e,this.sourceObject)},i}(Vt);return function(e){r!==Ut.resetId&&(n={},r=Ut.resetId);var t=v(e),o=n[t];return o?o.get():(o=n[t]=new i(t,e),o.get())}}function v(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=ft(),xt(e,"$transformId",t)),t}function b(e,t){return K()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),p(e,t).get()}function y(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return pt(arguments.length>=2,"extendObservable expected 2 or more arguments"),pt("object"==typeof e,"extendObservable expects an object as first argument"),pt(!(e instanceof tn),"extendObservable should not be used on maps, use map.merge instead"),t.forEach(function(t){pt("object"==typeof t,"all arguments of extendObservable should be objects"),m(e,t,Gt.Recursive,null)}),e}function m(e,t,n,r){var i=We(e,r,n);for(var o in t)if(wt(t,o)){if(e===t&&!St(e,o))continue;He(i,o,t[o])}return e}function g(e,t){return w(tt(e,t))}function w(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=vt(e.observing).map(w)),t}function _(e,t){return x(tt(e,t))}function x(e){var t={name:e.name};return re(e)&&(t.observers=ie(e).map(x)),t}function O(e,t,n){return"function"==typeof n?A(e,t,n):S(e,t)}function S(e,t){return yt(e)&&!et(e)?(ht("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),nt(T(e)).intercept(t)):nt(e).intercept(t)}function A(e,t,n){return yt(e)&&!et(e)?(ht("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),y(e,{property:e[t]}),A(e,t,n)):nt(e,t).intercept(n)}function R(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof tn||e instanceof Qt)throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(et(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof Ct||e instanceof Nt||e instanceof Vt}function k(e,t,n){return pt(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",t),At(e,t),pt(!n||!n.get,"@observable can not be used on getters, use @computed instead"),Et.apply(null,arguments)}function T(e,t){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return k.apply(null,arguments);if(pt(arguments.length<3,"observable expects zero, one or two arguments"),R(e))return e;var n=De(e,Gt.Recursive),r=n[0],i=n[1],o=r===Gt.Reference?Lt.Reference:I(i);switch(o){case Lt.Array:case Lt.PlainObject:return Ve(i,r);case Lt.Reference:case Lt.ComplexObject:return new sn(i,r);case Lt.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 Lt.ViewFunction:return ht("Use `computed(expr)` instead of `observable(expr)`"),p(e,t)}pt(!1,"Illegal State")}function I(e){return null===e||void 0===e?Lt.Reference:"function"==typeof e?e.length?Lt.ComplexFunction:Lt.ViewFunction:Array.isArray(e)||e instanceof Qt?Lt.Array:"object"==typeof e?yt(e)?Lt.PlainObject:Lt.ComplexObject:Lt.Reference}function j(e,t,n,r){return"function"==typeof n?L(e,t,n,r):E(e,t,n)}function E(e,t,n){return yt(e)&&!et(e)?(ht("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),nt(T(e)).observe(t,n)):nt(e).observe(t,n)}function L(e,t,n,r){return yt(e)&&!et(e)?(ht("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),y(e,{property:e[t]}),L(e,t,n,r)):nt(e,t).observe(n,r)}function C(e,t,n){function r(r){return t&&n.push([e,r]),r}if(void 0===t&&(t=!0),void 0===n&&(n=null),e instanceof Date||e instanceof RegExp)return e;if(t&&null===n&&(n=[]),t&&null!==e&&"object"==typeof e)for(var i=0,o=n.length;i<o;i++)if(n[i][0]===e)return n[i][1];if(!e)return e;if(Array.isArray(e)||e instanceof Qt){var a=r([]),s=e.map(function(e){return C(e,t,n)});a.length=s.length;for(var i=0,o=s.length;i<o;i++)a[i]=s[i];return a}if(e instanceof tn){var u=r({});return e.forEach(function(e,r){return u[r]=C(e,t,n)}),u}if(R(e)&&e.$mobx instanceof sn)return C(e(),t,n);if(e instanceof sn)return C(e.get(),t,n);if("object"==typeof e){var a=r({});for(var c in e)a[c]=C(e[c],t,n);return a}return e}function D(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n=null),ht("toJSON is deprecated. Use toJS instead"),C.apply(null,arguments)}function P(e){return console.log(e),e}function V(e,t){switch(arguments.length){case 0:if(e=Ut.trackingDerivation,!e)return P("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=tt(e,t)}return e=tt(e),e instanceof Vt?P(e.whyRun()):e instanceof Nt?P(e.whyRun()):void pt(!1,"whyRun can only be used on reactions and computed values")}function M(e,t){pt("function"==typeof t,"`action` can only be invoked on functions"),pt("string"==typeof e&&e.length>0,"actions should have valid names, got: '"+e+"'");var n=function(){return $(e,t,this,arguments)};return n.isMobxAction=!0,n}function $(e,t,n,r){pt(!(Ut.trackingDerivation instanceof Vt),"Computed values or transformers should not invoke actions or trigger other side effects");var i,o=ve();if(o){i=Date.now();var a=r&&r.length||0,s=new Array(a);if(a>0)for(var u=0;u<a;u++)s[u]=r[u];ye({type:"action",name:e,fn:t,target:n,arguments:s})}var c=Q();xe(e,n,!1);var l=z(!0);try{return t.apply(n,r)}finally{F(l),Oe(!1),Z(c),o&&me({time:Date.now()-i})}}function U(e){return 0===arguments.length?(ht("`useStrict` without arguments is deprecated, use `isStrictModeEnabled()` instead"),Ut.strictMode):(pt(null===Ut.trackingDerivation,"It is not allowed to set `useStrict` when a derivation is running"),Ut.strictMode=e,Ut.allowStateChanges=!e,void 0)}function N(){return Ut.strictMode}function B(e,t){var n=z(e),r=t();return F(n),r}function z(e){var t=Ut.allowStateChanges;return Ut.allowStateChanges=e,t}function F(e){Ut.allowStateChanges=e}function G(e){switch(e.dependenciesState){case Pt.UP_TO_DATE:return!1;case Pt.NOT_TRACKING:case Pt.STALE:return!0;case Pt.POSSIBLY_STALE:var t=!0,n=Q();try{for(var r=e.observing,i=r.length,o=0;o<i;o++){var a=r[o];if(a instanceof Vt&&(a.get(),e.dependenciesState===Pt.STALE))return t=!1,Z(n),!0}return t=!1,ee(e),Z(n),!1}finally{t&&ee(e)}}}function K(){return null!==Ut.trackingDerivation}function J(){Ut.allowStateChanges||pt(!1,Ut.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 W(e,t){ee(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++Ut.runId;var n=Ut.trackingDerivation;Ut.trackingDerivation=e;var r,i=!0;try{r=t.call(e),i=!1}finally{i?H(e):(Ut.trackingDerivation=n,X(e))}return r}function H(e){var t="[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+"'. ")+"For more details see https://github.com/mobxjs/mobx/issues/462";ve()&&be({type:"error",message:t}),console.warn(t),ee(e),e.newObserving=null,e.unboundDepsCount=0,e.recoverFromError(),ce(),ne()}function X(e){var t=e.observing,n=e.observing=e.newObserving;e.newObserving=null;for(var r=0,i=e.unboundDepsCount,o=0;o<i;o++){var a=n[o];0===a.diffValue&&(a.diffValue=1,r!==o&&(n[r]=a),r++)}for(n.length=r,i=t.length;i--;){var a=t[i];0===a.diffValue&&ae(a,e),a.diffValue=0}for(;r--;){var a=n[r];1===a.diffValue&&(a.diffValue=0,oe(a,e))}}function q(e){for(var t=e.observing,n=t.length;n--;)ae(t[n],e);e.dependenciesState=Pt.NOT_TRACKING,t.length=0}function Y(e){var t=Q(),n=e();return Z(t),n}function Q(){var e=Ut.trackingDerivation;return Ut.trackingDerivation=null,e}function Z(e){Ut.trackingDerivation=e}function ee(e){if(e.dependenciesState!==Pt.UP_TO_DATE){e.dependenciesState=Pt.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=Pt.UP_TO_DATE}}function te(){}function ne(){Ut.resetId++;var e=new $t;for(var t in e)Mt.indexOf(t)===-1&&(Ut[t]=e[t]);Ut.allowStateChanges=!Ut.strictMode}function re(e){return e.observers&&e.observers.length>0}function ie(e){return e.observers}function oe(e,t){var n=e.observers.length;n&&(e.observersIndexes[t.__mapid]=n),e.observers[n]=t,e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function ae(e,t){if(1===e.observers.length)e.observers.length=0,se(e);else{var n=e.observers,r=e.observersIndexes,i=n.pop();if(i!==t){var o=r[t.__mapid]||0;o?r[i.__mapid]=o:delete r[i.__mapid],n[o]=i}delete r[t.__mapid]}}function se(e){e.isPendingUnobservation||(e.isPendingUnobservation=!0,Ut.pendingUnobservations.push(e))}function ue(){Ut.inBatch++}function ce(){if(1===Ut.inBatch){for(var e=Ut.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers.length&&n.onBecomeUnobserved()}Ut.pendingUnobservations=[]}Ut.inBatch--}function le(e){var t=Ut.trackingDerivation;null!==t?t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e):0===e.observers.length&&se(e)}function fe(e){if(e.lowestObserverState!==Pt.STALE){e.lowestObserverState=Pt.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Pt.UP_TO_DATE&&r.onBecomeStale(),r.dependenciesState=Pt.STALE}}}function pe(e){if(e.lowestObserverState!==Pt.STALE){e.lowestObserverState=Pt.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Pt.POSSIBLY_STALE?r.dependenciesState=Pt.STALE:r.dependenciesState===Pt.UP_TO_DATE&&(e.lowestObserverState=Pt.UP_TO_DATE)}}}function he(e){if(e.lowestObserverState===Pt.UP_TO_DATE){e.lowestObserverState=Pt.POSSIBLY_STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Pt.UP_TO_DATE&&(r.dependenciesState=Pt.POSSIBLY_STALE,r.onBecomeStale())}}}function de(){if(!(Ut.isRunningReactions===!0||Ut.inTransaction>0)){Ut.isRunningReactions=!0;for(var e=Ut.pendingReactions,t=0;e.length>0;){if(++t===Bt)throw ne(),new Error("Reaction doesn't converge to a stable state after "+Bt+" iterations. Probably there is a cycle in the reactive function: "+e[0]);for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction()}Ut.isRunningReactions=!1}}function ve(){return zt}function be(e){if(!zt)return!1;for(var t=Ut.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function ye(e){var t=mt({},e,{spyReportStart:!0});be(t)}function me(e){be(e?mt({},e,Ft):Ft)}function ge(e){return Ut.spyListeners.push(e),zt=Ut.spyListeners.length>0,dt(function(){var t=Ut.spyListeners.indexOf(e);t!==-1&&Ut.spyListeners.splice(t,1),zt=Ut.spyListeners.length>0})}function we(e){return ht("trackTransitions is deprecated. Use mobx.spy instead"),"boolean"==typeof e&&(ht("trackTransitions only takes a single callback function. If you are using the mobx-react-devtools, please update them first"),e=arguments[1]),e?ge(e):(ht("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 _e(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),xe(e.name||"anonymous transaction",t,n);var r=e.call(t);return Oe(n),r}function xe(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),ue(),Ut.inTransaction+=1,n&&ve()&&ye({type:"transaction",target:t,name:e})}function Oe(e){void 0===e&&(e=!0),0===--Ut.inTransaction&&de(),e&&ve()&&me(),ce()}function Se(e){return e.interceptors&&e.interceptors.length>0}function Ae(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),dt(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function Re(e,t){for(var n=Q(),r=e.interceptors,i=0,o=r.length;i<o;i++)if(t=r[i](t),pt(!t||t.type,"Intercept handlers should return nothing or a change object"),!t)return null;return Z(n),t}function ke(e){return e.changeListeners&&e.changeListeners.length>0}function Te(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),dt(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function Ie(e,t){var n=Q(),r=e.changeListeners;if(r){r=r.slice();for(var i=0,o=r.length;i<o;i++)Array.isArray(t)?r[i].apply(null,t):r[i](t);Z(n)}}function je(e){return new Kt(e)}function Ee(e){return new Jt(e)}function Le(e){return new Wt(e)}function Ce(e,t){return Ke(e,t)}function De(e,t){return e instanceof Kt?[Gt.Reference,e.value]:e instanceof Jt?[Gt.Structure,e.value]:e instanceof Wt?[Gt.Flat,e.value]:[t,e]}function Pe(e){return e===je?Gt.Reference:e===Ee?Gt.Structure:e===Le?Gt.Flat:(pt(void 0===e,"Cannot determine value mode from function. Please pass in one of these: mobx.asReference, mobx.asStructure or mobx.asFlat, got: "+e),Gt.Recursive)}function Ve(e,t,n){var r;if(R(e))return e;switch(t){case Gt.Reference:return e;case Gt.Flat:Me(e,"Items inside 'asFlat' cannot have modifiers"),r=Gt.Reference;break;case Gt.Structure:Me(e,"Items inside 'asStructure' cannot have modifiers"),r=Gt.Structure;break;case Gt.Recursive:i=De(e,Gt.Recursive),r=i[0],e=i[1];break;default:pt(!1,"Illegal State")}return Array.isArray(e)?ze(e,r,n):yt(e)&&Object.isExtensible(e)?m(e,e,r,n):e;var i}function Me(e,t){if(e instanceof Kt||e instanceof Jt||e instanceof Wt)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function $e(e){var t=Ue(e),n=Ne(e);Object.defineProperty(Qt.prototype,""+e,{enumerable:!1,configurable:!0,set:t,get:n})}function Ue(e){return function(t){var n=this.$mobx,r=n.values;if(Me(t,"Modifiers cannot be used on array values. For non-reactive array values use makeReactive(asFlat(array))."),e<r.length){J();var i=r[e];if(Se(n)){var o=Re(n,{type:"update",object:n.array,index:e,newValue:t});if(!o)return;t=o.newValue}t=n.makeReactiveArrayItem(t);var a=n.mode===Gt.Structure?!kt(i,t):i!==t;a&&(r[e]=t,n.notifyArrayChildUpdate(e,t,i))}else{if(e!==r.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+r.length);n.spliceWithArray(e,0,[t])}}}function Ne(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 Be(e){for(var t=Xt;t<e;t++)$e(t);Xt=e}function ze(e,t,n){return new Qt(e,t,n)}function Fe(e){return ht("fastArray is deprecated. Please use `observable(asFlat([]))`"),ze(e,Gt.Flat,null)}function Ge(e){return e instanceof Qt}function Ke(e,t){return new tn(e,t)}function Je(e){return e instanceof tn}function We(e,t,n){if(void 0===n&&(n=Gt.Recursive),et(e))return e.$mobx;yt(e)||(t=e.constructor.name+"@"+ft()),t||(t="ObservableObject@"+ft());var r=new nn(e,t,n);return Ot(e,"$mobx",r),r}function He(e,t,n){e.values[t]?e.target[t]=n:Xe(e,t,n,!0,void 0)}function Xe(e,t,n,r,i){r&&At(e.target,t);var o,s=e.name+"."+t,u=!0;if(n instanceof sn)o=n,u=!1;else if(n instanceof Vt)o=n,n.scope||(n.scope=e.target);else if("function"!=typeof n||0!==n.length||a(n))if(n instanceof Jt&&"function"==typeof n.value&&0===n.value.length)o=new Vt(n.value,e.target,(!0),s,i);else{if(u=!1,Se(e)){var c=Re(e,{object:e.target,name:t,type:"add",newValue:n});if(!c)return;n=c.newValue}o=new sn(n,e.mode,s,(!1)),n=o.value}else o=new Vt(n,e.target,(!1),s,i);e.values[t]=o,r&&Object.defineProperty(e.target,t,u?Ye(t):qe(t)),u||Ze(e,e.target,t,n)}function qe(e){var t=rn[e];return t?t:rn[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){Qe(this,e,t)}}}function Ye(e){var t=on[e];return t?t:on[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:function(t){return this.$mobx.values[e].set(t)}}}function Qe(e,t,n){var r=e.$mobx,i=r.values[t];if(Se(r)){var o=Re(r,{type:"update",object:e,name:t,newValue:n});if(!o)return;n=o.newValue}if(n=i.prepareNewValue(n),n!==an){var a=ke(r),s=ve(),o=Ie||ke?{type:"update",object:e,oldValue:i.value,name:t,newValue:n}:null;s&&ye(o),i.setNewValue(n),a&&Ie(r,o),s&&me()}}function Ze(e,t,n,r){var i=ke(e),o=ve(),a=i||o?{type:"add",object:t,name:n,newValue:r}:null;o&&ye(a),i&&Ie(e,a),o&&me()}function et(e){return"object"==typeof e&&null!==e&&(at(e),e.$mobx instanceof nn)}function tt(e,t){if("object"==typeof e&&null!==e){if(Ge(e))return pt(void 0===t,"It is not possible to get index atoms from arrays"),e.$mobx.atom;if(Je(e)){if(void 0===t)return tt(e._keys);var n=e._data[t]||e._hasMap[t];return pt(!!n,"the entry '"+t+"' does not exist in the observable map '"+rt(e)+"'"),n}if(at(e),et(e)){pt(!!t,"please specify a property");var r=e.$mobx.values[t];return pt(!!r,"no observable property '"+t+"' found on the observable object '"+rt(e)+"'"),r}if(e instanceof Ct||e instanceof Vt||e instanceof Nt)return e}else if("function"==typeof e&&e.$mobx instanceof Nt)return e.$mobx;pt(!1,"Cannot obtain atom from "+e)}function nt(e,t){return pt(e,"Expection some object"),void 0!==t?nt(tt(e,t)):e instanceof Ct||e instanceof Vt||e instanceof Nt?e:Je(e)?e:(at(e),e.$mobx?e.$mobx:void pt(!1,"Cannot obtain administration from "+e))}function rt(e,t){var n;return n=void 0!==t?tt(e,t):et(e)||Je(e)?nt(e):tt(e),n.name}function it(e,t,n,r,i){function o(o,a,s,u){if(pt(i||st(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),s){wt(o,"__mobxLazyInitializers")||xt(o,"__mobxLazyInitializers",o.__mobxLazyInitializers&&o.__mobxLazyInitializers.slice()||[]);var c=s.value,l=s.initializer;return o.__mobxLazyInitializers.push(function(t){e(t,a,l?l.call(t):c,u,s)}),{enumerable:r,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&at(this),t.call(this,a)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&at(this),n.call(this,a,e)}}}var f={enumerable:r,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[a]===!0||ot(this,a,void 0,e,u,s),t.call(this,a)},set:function(t){this.__mobxInitializedProps&&this.__mobxInitializedProps[a]===!0?n.call(this,a,t):ot(this,a,t,e,u,s)}};return arguments.length<3&&Object.defineProperty(o,a,f),f}return i?function(){if(st(arguments))return o.apply(null,arguments);var e=arguments;return function(t,n,r){return o(t,n,r,e)}}:o}function ot(e,t,n,r,i,o){wt(e,"__mobxInitializedProps")||xt(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,i,o)}function at(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(xt(e,"__mobxDidRunLazyInitializers",!0),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function st(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}function ut(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function ct(e){pt(e[un]!==!0,"Illegal state: cannot recycle array as iterator"),Ot(e,un,!0);var t=-1;return Ot(e,"next",function(){return t++,{done:t>=this.length,value:t<this.length?this[t]:void 0}}),e}function lt(e,t){Ot(e,ut(),t)}function ft(){return++Ut.mobxGuid}function pt(e,t,n){if(!e)throw new Error("[mobx] Invariant failed: "+t+(n?" in '"+n+"'":""))}function ht(e){fn.indexOf(e)===-1&&(fn.push(e),console.error("[mobx] Deprecated: "+e))}function dt(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}function vt(e){var t=[];return e.forEach(function(e){t.indexOf(e)===-1&&t.push(e)}),t}function bt(e,t,n){if(void 0===t&&(t=100),void 0===n&&(n=" - "),!e)return"";var r=e.slice(0,t);return""+r.join(n)+(e.length>t?" (... and "+(e.length-t)+"more)":"")}function yt(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function mt(){for(var e=arguments[0],t=1,n=arguments.length;t<n;t++){var r=arguments[t];for(var i in r)wt(r,i)&&(e[i]=r[i])}return e}function gt(e,t,n){return e?!kt(t,n):t!==n}function wt(e,t){return hn.call(e,t)}function _t(e,t){for(var n=0;n<t.length;n++)xt(e,t[n],e[t[n]])}function xt(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Ot(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function St(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return!n||n.configurable!==!1&&n.writable!==!1}function At(e,t){pt(St(e,t),"Cannot make property '"+t+"' observable, it is not configurable and writable in the target object")}function Rt(e){var t=[];for(var n in e)t.push(n);return t}function kt(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var n=Array.isArray(e)||Ge(e);if(n!==(Array.isArray(t)||Ge(t)))return!1;if(n){if(e.length!==t.length)return!1;for(var r=e.length-1;r>=0;r--)if(!kt(e[r],t[r]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(Rt(e).length!==Rt(t).length)return!1;for(var i in e){if(!(i in t))return!1;if(!kt(e[i],t[i]))return!1}return!0}return e===t}var Tt=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)};te(),n.extras={allowStateChanges:B,getAtom:tt,getDebugName:rt,getDependencyTree:g,getObserverTree:_,isComputingDerivation:K,isSpyEnabled:ve,resetGlobalState:ne,spyReport:be,spyReportEnd:me,spyReportStart:ye,trackTransitions:we},n._={getAdministration:nt,resetGlobalState:ne},"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx(t.exports);var It=it(function(e,t,n,i,o){var a=i&&1===i.length?i[0]:n.name||t||"<unnamed action>",s=r(a,n);xt(e,t,s)},function(e){return this[e]},function(){pt(!1,"It is not allowed to assign new values to @action fields")},!1,!0);n.action=r,n.runInAction=o,n.isAction=a,n.autorun=s,n.when=u,n.autorunUntil=c,n.autorunAsync=l,n.reaction=f;var jt=it(function(e,t,n,r,i){pt("undefined"!=typeof i,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'. It looks like it was used on a property.");var o=i.get,a=i.set;pt("function"==typeof o,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'");var s=!1;r&&1===r.length&&r[0].asStructure===!0&&(s=!0);var u=We(e,void 0,Gt.Recursive);Xe(u,t,s?Ee(o):o,!1,a)},function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()},function(e,t){this.$mobx.values[e].set(t)},!1,!0);n.computed=p,n.createTransformer=d,n.expr=b,n.extendObservable=y,n.intercept=O,n.isObservable=R;var Et=it(function(e,t,n){var r=z(!0);"function"==typeof n&&(n=je(n));var i=We(e,void 0,Gt.Recursive);Xe(i,t,n,!0,void 0),F(r)},function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()},function(e,t){Qe(this,e,t)},!0,!1);n.observable=T;var Lt;!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"}(Lt||(Lt={})),n.observe=j,n.toJS=C,n.toJSON=D,n.whyRun=V,n.useStrict=U,n.isStrictModeEnabled=N;var Ct=function(){function e(e){void 0===e&&(e="Atom@"+ft()),this.name=e,this.isPendingUnobservation=!0,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Pt.NOT_TRACKING}return e.prototype.onBecomeUnobserved=function(){},e.prototype.reportObserved=function(){le(this)},e.prototype.reportChanged=function(){xe("propagatingAtomChange",null,!1),fe(this),Oe(!1)},e.prototype.toString=function(){return this.name},e}();n.BaseAtom=Ct;var Dt=function(e){function t(t,n,r){void 0===t&&(t="Atom@"+ft()),void 0===n&&(n=pn),void 0===r&&(r=pn),e.call(this,t),this.name=t,this.onBecomeObservedHandler=n,this.onBecomeUnobservedHandler=r,this.isPendingUnobservation=!1,this.isBeingTracked=!1}return Tt(t,e),t.prototype.reportObserved=function(){return ue(),e.prototype.reportObserved.call(this),this.isBeingTracked||(this.isBeingTracked=!0,this.onBecomeObservedHandler()),ce(),!!Ut.trackingDerivation},t.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},t}(Ct);n.Atom=Dt;var Pt,Vt=function(){function e(e,t,n,r,i){this.derivation=e,this.scope=t,this.compareStructural=n,this.dependenciesState=Pt.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=Pt.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+ft(),this.value=void 0,this.isComputing=!1,this.name=r||"ComputedValue@"+ft(),i&&(this.setter=M(r+"-setter",i))}return e.prototype.peek=function(){this.isComputing=!0;var e=z(!1),t=this.derivation.call(this.scope);return F(e),this.isComputing=!1,t},e.prototype.peekUntracked=function(){var e=!0;try{var t=this.peek();return e=!1,t}finally{e&&H(this)}},e.prototype.onBecomeStale=function(){he(this)},e.prototype.onBecomeUnobserved=function(){pt(this.dependenciesState!==Pt.NOT_TRACKING,"INTERNAL ERROR only onBecomeUnobserved shouldn't be called twice in a row"),q(this),this.value=void 0},e.prototype.get=function(){pt(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),ue(),1===Ut.inBatch?G(this)&&(this.value=this.peekUntracked()):(le(this),G(this)&&this.trackAndCompute()&&pe(this));var e=this.value;return ce(),e},e.prototype.recoverFromError=function(){this.isComputing=!1},e.prototype.set=function(e){if(!this.setter)throw new Error("[ComputedValue '"+this.name+"'] It is not possible to assign a new value to a computed value.");this.setter.call(this.scope,e)},e.prototype.trackAndCompute=function(){ve()&&be({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=W(this,this.peek);return gt(this.compareStructural,t,e)},e.prototype.observe=function(e,t){var n=this,r=!0,i=void 0;return s(function(){var o=n.get();if(!r||t){var a=Q();e(o,i),Z(a)}r=!1,i=o})},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.whyRun=function(){var e=Boolean(Ut.trackingDerivation),t=vt(this.isComputing?this.newObserving:this.observing).map(function(e){return e.name}),n=vt(ie(this).map(function(e){return e.name}));return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+(e?"[active] the value of this computation is needed by a reaction":this.isComputing?"[get] The value of this computed was requested outside a reaction":"[idle] not running at the moment")+"\n"+(this.dependenciesState===Pt.NOT_TRACKING?" * This computation is suspended (not in use by any reaction) and won't run automatically.\n\tDidn't expect this computation to be suspended at this point?\n\t 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n\t 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 "+bt(t)+"\n "+(this.isComputing&&e?" (... or any observable accessed during the remainder of the current run)":"")+"\n\tMissing items in this list?\n\t 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n\t 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 "+bt(n)+"\n")},e}();!function(e){e[e.NOT_TRACKING=-1]="NOT_TRACKING",e[e.UP_TO_DATE=0]="UP_TO_DATE",e[e.POSSIBLY_STALE=1]="POSSIBLY_STALE",
e[e.STALE=2]="STALE"}(Pt||(Pt={})),n.IDerivationState=Pt,n.untracked=Y;var Mt=["mobxGuid","resetId","spyListeners","strictMode","runId"],$t=function(){function e(){this.version=4,this.trackingDerivation=null,this.runId=0,this.mobxGuid=0,this.inTransaction=0,this.isRunningReactions=!1,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[]}return e}(),Ut=function(){var t=new $t;if(e.__mobservableTrackingStack||e.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(e.__mobxGlobal&&e.__mobxGlobal.version!==t.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");return e.__mobxGlobal?e.__mobxGlobal:e.__mobxGlobal=t}(),Nt=function(){function e(e,t){void 0===e&&(e="Reaction@"+ft()),this.name=e,this.onInvalidate=t,this.observing=[],this.newObserving=[],this.dependenciesState=Pt.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+ft(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Ut.pendingReactions.push(this),ue(),de(),ce())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,G(this)&&(this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&ve()&&be({object:this,type:"scheduled-reaction"})))},e.prototype.track=function(e){ue();var t,n=ve();n&&(t=Date.now(),ye({object:this,type:"reaction",fn:e})),this._isRunning=!0,W(this,e),this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&q(this),n&&me({time:Date.now()-t}),ce()},e.prototype.recoverFromError=function(){this._isRunning=!1,this._isTrackPending=!1},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(ue(),q(this),ce()))},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=vt(this._isRunning?this.newObserving: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 "+bt(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n\tMissing items in this list?\n\t 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n\t 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}();n.Reaction=Nt;var Bt=100,zt=!1,Ft={spyReportEnd:!0};n.spy=ge,n.transaction=_e;var Gt;!function(e){e[e.Recursive=0]="Recursive",e[e.Reference=1]="Reference",e[e.Structure=2]="Structure",e[e.Flat=3]="Flat"}(Gt||(Gt={})),n.asReference=je,n.asStructure=Ee,n.asFlat=Le;var Kt=function(){function e(e){this.value=e,Me(e,"Modifiers are not allowed to be nested")}return e}(),Jt=function(){function e(e){this.value=e,Me(e,"Modifiers are not allowed to be nested")}return e}(),Wt=function(){function e(e){this.value=e,Me(e,"Modifiers are not allowed to be nested")}return e}();n.asMap=Ce;var Ht=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),Xt=0,qt=function(){function e(){}return e}();qt.prototype=[];var Yt=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 Ct(e||"ObservableArray@"+ft())}return e.prototype.makeReactiveArrayItem=function(e){return Me(e,"Array values cannot have modifiers"),this.mode===Gt.Flat||this.mode===Gt.Reference?e:Ve(e,this.mode,this.atom.name+"[..]")},e.prototype.intercept=function(e){return Ae(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Te(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;e!==t&&(e>t?this.spliceWithArray(t,0,new Array(e-t)):this.spliceWithArray(e,t-e))},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=t,t>0&&e+t+1>Xt&&Be(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){J();var r=this.values.length;if(void 0===e?e=0:e>r?e=r:e<0&&(e=Math.max(0,r+e)),t=1===arguments.length?r-e:void 0===t||null===t?0:Math.max(0,Math.min(t,r-e)),void 0===n&&(n=[]),Se(this)){var i=Re(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!i)return ln;t=i.removedCount,n=i.added}n=n.map(this.makeReactiveArrayItem,this);var o=n.length-t;this.updateArrayLength(r,o);var a=(s=this.values).splice.apply(s,[e,t].concat(n));return 0===t&&0===n.length||this.notifyArraySplice(e,n,a),a;var s},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&ve(),i=ke(this),o=i||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&ye(o),this.atom.reportChanged(),i&&Ie(this,o),r&&me()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&ve(),i=ke(this),o=i||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&ye(o),this.atom.reportChanged(),i&&Ie(this,o),r&&me()},e}(),Qt=function(e){function t(t,n,r,i){void 0===i&&(i=!1),e.call(this);var o=new Yt(r,n,this,i);Ot(this,"$mobx",o),t&&t.length?(o.updateArrayLength(0,t.length),o.values=t.map(o.makeReactiveArrayItem,o),o.notifyArraySplice(0,o.values.slice(),ln)):o.values=[],Ht&&Object.defineProperty(o.array,"0",Zt)}return Tt(t,e),t.prototype.intercept=function(e){return this.$mobx.intercept(e)},t.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},t.prototype.clear=function(){return this.splice(0)},t.prototype.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.slice(),e.map(function(e){return Ge(e)?e.slice():e}))},t.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},t.prototype.toJS=function(){return this.slice()},t.prototype.toJSON=function(){return this.toJS()},t.prototype.peek=function(){return this.$mobx.values},t.prototype.find=function(e,t,n){void 0===n&&(n=0),this.$mobx.atom.reportObserved();for(var r=this.$mobx.values,i=r.length,o=n;o<i;o++)if(e.call(t,r[o],o,this))return r[o]},t.prototype.splice=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(e);case 2:return this.$mobx.spliceWithArray(e,t)}return this.$mobx.spliceWithArray(e,t,n)},t.prototype.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=this.$mobx;return n.spliceWithArray(n.values.length,0,e),n.values.length},t.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},t.prototype.shift=function(){return this.splice(0,1)[0]},t.prototype.unshift=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=this.$mobx;return n.spliceWithArray(0,0,e),n.values.length},t.prototype.reverse=function(){this.$mobx.atom.reportObserved();var e=this.slice();return e.reverse.apply(e,arguments)},t.prototype.sort=function(e){this.$mobx.atom.reportObserved();var t=this.slice();return t.sort.apply(t,arguments)},t.prototype.remove=function(e){var t=this.$mobx.values.indexOf(e);return t>-1&&(this.splice(t,1),!0)},t.prototype.toString=function(){return"[mobx.array] "+Array.prototype.toString.apply(this.$mobx.values,arguments)},t.prototype.toLocaleString=function(){return"[mobx.array] "+Array.prototype.toLocaleString.apply(this.$mobx.values,arguments)},t}(qt);lt(Qt.prototype,function(){return ct(this.slice())}),_t(Qt.prototype,["constructor","intercept","observe","clear","concat","replace","toJS","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(Qt.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];xt(Qt.prototype,e,function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)})});var Zt={configurable:!0,enumerable:!1,set:Ue(0),get:Ne(0)};Be(1e3),n.fastArray=Fe,n.isObservableArray=Ge;var en={},tn=function(){function e(e,t){var n=this;this.$mobx=en,this._data={},this._hasMap={},this.name="ObservableMap@"+ft(),this._keys=new Qt(null,Gt.Reference,this.name+".keys()",(!0)),this.interceptors=null,this.changeListeners=null,this._valueMode=Pe(t),this._valueMode===Gt.Flat&&(this._valueMode=Gt.Reference),B(!0,function(){yt(e)?n.merge(e):Array.isArray(e)&&e.forEach(function(e){var t=e[0],r=e[1];return n.set(t,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())},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(Me(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"),Se(this)){var r=Re(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,Se(this)){var n=Re(this,{type:"delete",object:this,name:e});if(!n)return!1}if(this._has(e)){var r=ve(),i=ke(this),n=i||r?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;return r&&ye(n),_e(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&&Ie(this,n),r&&me(),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap[e];return n?n.setNewValue(t):n=this._hasMap[e]=new sn(t,Gt.Reference,this.name+"."+e+"?",(!1)),n},e.prototype._updateValue=function(e,t){var n=this._data[e];if(t=n.prepareNewValue(t),t!==an){var r=ve(),i=ke(this),o=i||r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;r&&ye(o),n.setNewValue(t),i&&Ie(this,o),r&&me()}},e.prototype._addValue=function(e,t){var n=this;_e(function(){var r=n._data[e]=new sn(t,n._valueMode,n.name+"."+e,(!1));t=r.value,n._updateHasMapEntry(e,!0),n._keys.push(e)},void 0,!1);var r=ve(),i=ke(this),o=i||r?{type:"add",object:this,name:e,newValue:t}:null;r&&ye(o),i&&Ie(this,o),r&&me()},e.prototype.get=function(e){if(e=""+e,this.has(e))return this._data[e].get()},e.prototype.keys=function(){return ct(this._keys.slice())},e.prototype.values=function(){return ct(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return ct(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 _e(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;_e(function(){Y(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 e=this,t={};return this.keys().forEach(function(n){return t[n]=e.get(n)}),t},e.prototype.toJs=function(){return ht("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&&("string"==typeof e||"number"==typeof e||"boolean"==typeof e)},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 pt(t!==!0,"`observe` doesn't support the fire immediately property for observable maps."),Te(this,e)},e.prototype.intercept=function(e){return Ae(this,e)},e}();n.ObservableMap=tn,lt(tn.prototype,function(){return this.entries()}),n.map=Ke,n.isObservableMap=Je;var nn=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 pt(t!==!0,"`observe` doesn't support the fire immediately property for observable objects."),Te(this,e)},e.prototype.intercept=function(e){return Ae(this,e)},e}(),rn={},on={};n.isObservableObject=et;var an={},sn=function(e){function t(t,n,r,i){void 0===r&&(r="ObservableValue@"+ft()),void 0===i&&(i=!0),e.call(this,r),this.mode=n,this.hasUnreportedChange=!1,this.value=void 0;var o=De(t,Gt.Recursive),a=o[0],s=o[1];this.mode===Gt.Recursive&&(this.mode=a),this.value=Ve(s,this.mode,this.name),i&&ve()&&be({type:"create",object:this,newValue:this.value})}return Tt(t,e),t.prototype.set=function(e){var t=this.value;if(e=this.prepareNewValue(e),e!==an){var n=ve();n&&ye({type:"update",object:this,newValue:e,oldValue:t}),this.setNewValue(e),n&&me()}},t.prototype.prepareNewValue=function(e){if(Me(e,"Modifiers cannot be used on non-initial values."),J(),Se(this)){var t=Re(this,{object:this,type:"update",newValue:e});if(!t)return an;e=t.newValue}var n=gt(this.mode===Gt.Structure,this.value,e);return n?Ve(e,this.mode,this.name):an},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),ke(this)&&Ie(this,[e,t])},t.prototype.get=function(){return this.reportObserved(),this.value},t.prototype.intercept=function(e){return Ae(this,e)},t.prototype.observe=function(e,t){return t&&e(this.value,void 0),Te(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t}(Ct),un="__$$iterating",cn=function(){function e(){this.listeners=[],ht("extras.SimpleEventEmitter is deprecated and will be removed in the next major release")}return e.prototype.emit=function(){for(var e=this.listeners.slice(),t=0,n=e.length;t<n;t++)e[t].apply(null,arguments)},e.prototype.on=function(e){var t=this;return this.listeners.push(e),dt(function(){var n=t.listeners.indexOf(e);n!==-1&&t.listeners.splice(n,1)})},e.prototype.once=function(e){var t=this.on(function(){t(),e.apply(this,arguments)});return t},e}();n.SimpleEventEmitter=cn;var ln=[];Object.freeze(ln);var fn=[],pn=function(){},hn=Object.prototype.hasOwnProperty}).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 e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return i(n?n:e)},l,l.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){(function(e){"use strict";function r(e,t,n,r){return 1===arguments.length&&"function"==typeof e?M(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?M(e,t):1===arguments.length&&"string"==typeof e?i(e):i(t).apply(null,arguments)}function i(e){return function(t,n,r){return r&&"function"==typeof r.value?(r.value=M(e,r.value),r.enumerable=!1,r.configurable=!0,r):It(e).apply(this,arguments)}}function o(e,t,n){var r="string"==typeof e?e:e.name||"<unnamed action>",i="function"==typeof e?e:t,o="function"==typeof e?t:n;return pt("function"==typeof i,"`runInAction` expects a function"),pt(0===i.length,"`runInAction` expects a function without arguments"),pt("string"==typeof r&&r.length>0,"actions should have valid names, got: '"+r+"'"),$(r,i,o,void 0)}function a(e){return"function"==typeof e&&e.isMobxAction===!0}function s(e,t,n){function r(){o(s)}var i,o,a;"string"==typeof e?(i=e,o=t,a=n):"function"==typeof e&&(i=e.name||"Autorun@"+ft(),o=e,a=t),Me(o,"autorun methods cannot have modifiers"),pt("function"==typeof o,"autorun expects a function"),a&&(o=o.bind(a));var s=new Nt(i,function(){this.track(r)});return s.schedule(),s.getDisposer()}function u(e,t,n,r){var i,o,a,u;"string"==typeof e?(i=e,o=t,a=n,u=r):"function"==typeof e&&(i="When@"+ft(),o=e,a=t,u=n);var c=s(i,function(e){if(o.call(u)){e.dispose();var t=Q();a.call(u),Z(t)}});return c}function c(e,t,n){return ht("`autorunUntil` is deprecated, please use `when`."),u.apply(null,arguments)}function l(e,t,n,r){function i(){a(l)}var o,a,s,u;"string"==typeof e?(o=e,a=t,s=n,u=r):"function"==typeof e&&(o=e.name||"AutorunAsync@"+ft(),a=e,s=t,u=n),void 0===s&&(s=1),u&&(a=a.bind(u));var c=!1,l=new Nt(o,function(){c||(c=!0,setTimeout(function(){c=!1,l.isDisposed||l.track(i)},s))});return l.schedule(),l.getDisposer()}function f(e,t,n,i,o,a){function s(){if(!_.isDisposed){var e=!1;_.track(function(){var t=b(_);e=gt(y,w,t),w=t}),m&&f&&l(w,_),m||e!==!0||l(w,_),m&&(m=!1)}}var u,c,l,f,p,h;"string"==typeof e?(u=e,c=t,l=n,f=i,p=o,h=a):(u=e.name||t.name||"Reaction@"+ft(),c=e,l=t,f=n,p=i,h=o),void 0===f&&(f=!1),void 0===p&&(p=0);var d=De(c,Gt.Reference),v=d[0],b=d[1],y=v===Gt.Structure;h&&(b=b.bind(h),l=r(u,l.bind(h)));var m=!0,g=!1,w=void 0,_=new Nt(u,function(){p<1?s():g||(g=!0,setTimeout(function(){g=!1,s()},p))});return _.schedule(),_.getDisposer()}function p(e,t,n,r){return"function"==typeof e&&arguments.length<3?"function"==typeof t?h(e,t,void 0):h(e,void 0,t):jt.apply(null,arguments)}function h(e,t,n){var r=De(e,Gt.Recursive),i=r[0],o=r[1];return new Vt(o,n,i===Gt.Structure,o.name,t)}function d(e,t){pt("function"==typeof e&&1===e.length,"createTransformer expects a function that accepts one argument");var n={},r=Ut.resetId,i=function(r){function i(t,n){r.call(this,function(){return e(n)},null,!1,"Transformer-"+e.name+"-"+t,void 0),this.sourceIdentifier=t,this.sourceObject=n}return Tt(i,r),i.prototype.onBecomeUnobserved=function(){var e=this.value;r.prototype.onBecomeUnobserved.call(this),delete n[this.sourceIdentifier],t&&t(e,this.sourceObject)},i}(Vt);return function(e){r!==Ut.resetId&&(n={},r=Ut.resetId);var t=v(e),o=n[t];return o?o.get():(o=n[t]=new i(t,e),o.get())}}function v(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=ft(),xt(e,"$transformId",t)),t}function b(e,t){return K()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),p(e,t).get()}function y(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return pt(arguments.length>=2,"extendObservable expected 2 or more arguments"),pt("object"==typeof e,"extendObservable expects an object as first argument"),pt(!(e instanceof tn),"extendObservable should not be used on maps, use map.merge instead"),t.forEach(function(t){pt("object"==typeof t,"all arguments of extendObservable should be objects"),m(e,t,Gt.Recursive,null)}),e}function m(e,t,n,r){var i=We(e,r,n);for(var o in t)if(wt(t,o)){if(e===t&&!St(e,o))continue;var a=Object.getOwnPropertyDescriptor(t,o);He(i,o,a)}return e}function g(e,t){return w(tt(e,t))}function w(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=vt(e.observing).map(w)),t}function _(e,t){return x(tt(e,t))}function x(e){var t={name:e.name};return re(e)&&(t.observers=ie(e).map(x)),t}function O(e,t,n){return"function"==typeof n?A(e,t,n):S(e,t)}function S(e,t){return yt(e)&&!et(e)?(ht("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),nt(T(e)).intercept(t)):nt(e).intercept(t)}function A(e,t,n){return yt(e)&&!et(e)?(ht("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),y(e,{property:e[t]}),A(e,t,n)):nt(e,t).intercept(n)}function R(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof tn||e instanceof Qt)throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(et(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof Ct||e instanceof Nt||e instanceof Vt}function k(e,t,n){return pt(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",t),At(e,t),pt(!n||!n.get,"@observable can not be used on getters, use @computed instead"),Et.apply(null,arguments)}function T(e,t){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return k.apply(null,arguments);if(pt(arguments.length<3,"observable expects zero, one or two arguments"),R(e))return e;var n=De(e,Gt.Recursive),r=n[0],i=n[1],o=r===Gt.Reference?Lt.Reference:I(i);switch(o){case Lt.Array:case Lt.PlainObject:return Ve(i,r);case Lt.Reference:case Lt.ComplexObject:return new sn(i,r);case Lt.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 Lt.ViewFunction:return ht("Use `computed(expr)` instead of `observable(expr)`"),p(e,t)}pt(!1,"Illegal State")}function I(e){return null===e||void 0===e?Lt.Reference:"function"==typeof e?e.length?Lt.ComplexFunction:Lt.ViewFunction:Array.isArray(e)||e instanceof Qt?Lt.Array:"object"==typeof e?yt(e)?Lt.PlainObject:Lt.ComplexObject:Lt.Reference}function j(e,t,n,r){return"function"==typeof n?L(e,t,n,r):E(e,t,n)}function E(e,t,n){return yt(e)&&!et(e)?(ht("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),nt(T(e)).observe(t,n)):nt(e).observe(t,n)}function L(e,t,n,r){return yt(e)&&!et(e)?(ht("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),y(e,{property:e[t]}),L(e,t,n,r)):nt(e,t).observe(n,r)}function C(e,t,n){function r(r){return t&&n.push([e,r]),r}if(void 0===t&&(t=!0),void 0===n&&(n=null),e instanceof Date||e instanceof RegExp)return e;if(t&&null===n&&(n=[]),t&&null!==e&&"object"==typeof e)for(var i=0,o=n.length;i<o;i++)if(n[i][0]===e)return n[i][1];if(!e)return e;if(Array.isArray(e)||e instanceof Qt){var a=r([]),s=e.map(function(e){return C(e,t,n)});a.length=s.length;for(var i=0,o=s.length;i<o;i++)a[i]=s[i];return a}if(e instanceof tn){var u=r({});return e.forEach(function(e,r){return u[r]=C(e,t,n)}),u}if(R(e)&&e.$mobx instanceof sn)return C(e(),t,n);if(e instanceof sn)return C(e.get(),t,n);if("object"==typeof e){var a=r({});for(var c in e)a[c]=C(e[c],t,n);return a}return e}function D(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n=null),ht("toJSON is deprecated. Use toJS instead"),C.apply(null,arguments)}function P(e){return console.log(e),e}function V(e,t){switch(arguments.length){case 0:if(e=Ut.trackingDerivation,!e)return P("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=tt(e,t)}return e=tt(e),e instanceof Vt?P(e.whyRun()):e instanceof Nt?P(e.whyRun()):void pt(!1,"whyRun can only be used on reactions and computed values")}function M(e,t){pt("function"==typeof t,"`action` can only be invoked on functions"),pt("string"==typeof e&&e.length>0,"actions should have valid names, got: '"+e+"'");var n=function(){return $(e,t,this,arguments)};return n.isMobxAction=!0,n}function $(e,t,n,r){pt(!(Ut.trackingDerivation instanceof Vt),"Computed values or transformers should not invoke actions or trigger other side effects");var i,o=ve();if(o){i=Date.now();var a=r&&r.length||0,s=new Array(a);if(a>0)for(var u=0;u<a;u++)s[u]=r[u];ye({type:"action",name:e,fn:t,target:n,arguments:s})}var c=Q();xe(e,n,!1);var l=z(!0);try{return t.apply(n,r)}finally{F(l),Oe(!1),Z(c),o&&me({time:Date.now()-i})}}function U(e){return 0===arguments.length?(ht("`useStrict` without arguments is deprecated, use `isStrictModeEnabled()` instead"),Ut.strictMode):(pt(null===Ut.trackingDerivation,"It is not allowed to set `useStrict` when a derivation is running"),Ut.strictMode=e,Ut.allowStateChanges=!e,void 0)}function N(){return Ut.strictMode}function B(e,t){var n=z(e),r=t();return F(n),r}function z(e){var t=Ut.allowStateChanges;return Ut.allowStateChanges=e,t}function F(e){Ut.allowStateChanges=e}function G(e){switch(e.dependenciesState){case Pt.UP_TO_DATE:return!1;case Pt.NOT_TRACKING:case Pt.STALE:return!0;case Pt.POSSIBLY_STALE:var t=!0,n=Q();try{for(var r=e.observing,i=r.length,o=0;o<i;o++){var a=r[o];if(a instanceof Vt&&(a.get(),e.dependenciesState===Pt.STALE))return t=!1,Z(n),!0}return t=!1,ee(e),Z(n),!1}finally{t&&ee(e)}}}function K(){return null!==Ut.trackingDerivation}function J(){Ut.allowStateChanges||pt(!1,Ut.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 W(e,t){ee(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++Ut.runId;var n=Ut.trackingDerivation;Ut.trackingDerivation=e;var r,i=!0;try{r=t.call(e),i=!1}finally{i?H(e):(Ut.trackingDerivation=n,X(e))}return r}function H(e){var t="[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+"'. ")+"For more details see https://github.com/mobxjs/mobx/issues/462";ve()&&be({type:"error",message:t}),console.warn(t),ee(e),e.newObserving=null,e.unboundDepsCount=0,e.recoverFromError(),ce(),ne()}function X(e){var t=e.observing,n=e.observing=e.newObserving;e.newObserving=null;for(var r=0,i=e.unboundDepsCount,o=0;o<i;o++){var a=n[o];0===a.diffValue&&(a.diffValue=1,r!==o&&(n[r]=a),r++)}for(n.length=r,i=t.length;i--;){var a=t[i];0===a.diffValue&&ae(a,e),a.diffValue=0}for(;r--;){var a=n[r];1===a.diffValue&&(a.diffValue=0,oe(a,e))}}function q(e){for(var t=e.observing,n=t.length;n--;)ae(t[n],e);e.dependenciesState=Pt.NOT_TRACKING,t.length=0}function Y(e){var t=Q(),n=e();return Z(t),n}function Q(){var e=Ut.trackingDerivation;return Ut.trackingDerivation=null,e}function Z(e){Ut.trackingDerivation=e}function ee(e){if(e.dependenciesState!==Pt.UP_TO_DATE){e.dependenciesState=Pt.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=Pt.UP_TO_DATE}}function te(){}function ne(){Ut.resetId++;var e=new $t;for(var t in e)Mt.indexOf(t)===-1&&(Ut[t]=e[t]);Ut.allowStateChanges=!Ut.strictMode}function re(e){return e.observers&&e.observers.length>0}function ie(e){return e.observers}function oe(e,t){var n=e.observers.length;n&&(e.observersIndexes[t.__mapid]=n),e.observers[n]=t,e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function ae(e,t){if(1===e.observers.length)e.observers.length=0,se(e);else{var n=e.observers,r=e.observersIndexes,i=n.pop();if(i!==t){var o=r[t.__mapid]||0;o?r[i.__mapid]=o:delete r[i.__mapid],n[o]=i}delete r[t.__mapid]}}function se(e){e.isPendingUnobservation||(e.isPendingUnobservation=!0,Ut.pendingUnobservations.push(e))}function ue(){Ut.inBatch++}function ce(){if(1===Ut.inBatch){for(var e=Ut.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers.length&&n.onBecomeUnobserved()}Ut.pendingUnobservations=[]}Ut.inBatch--}function le(e){var t=Ut.trackingDerivation;null!==t?t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e):0===e.observers.length&&se(e)}function fe(e){if(e.lowestObserverState!==Pt.STALE){e.lowestObserverState=Pt.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Pt.UP_TO_DATE&&r.onBecomeStale(),r.dependenciesState=Pt.STALE}}}function pe(e){if(e.lowestObserverState!==Pt.STALE){e.lowestObserverState=Pt.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Pt.POSSIBLY_STALE?r.dependenciesState=Pt.STALE:r.dependenciesState===Pt.UP_TO_DATE&&(e.lowestObserverState=Pt.UP_TO_DATE)}}}function he(e){if(e.lowestObserverState===Pt.UP_TO_DATE){e.lowestObserverState=Pt.POSSIBLY_STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Pt.UP_TO_DATE&&(r.dependenciesState=Pt.POSSIBLY_STALE,r.onBecomeStale())}}}function de(){if(!(Ut.isRunningReactions===!0||Ut.inTransaction>0)){Ut.isRunningReactions=!0;for(var e=Ut.pendingReactions,t=0;e.length>0;){if(++t===Bt)throw ne(),new Error("Reaction doesn't converge to a stable state after "+Bt+" iterations. Probably there is a cycle in the reactive function: "+e[0]);for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction()}Ut.isRunningReactions=!1}}function ve(){return zt}function be(e){if(!zt)return!1;for(var t=Ut.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function ye(e){var t=mt({},e,{spyReportStart:!0});be(t)}function me(e){be(e?mt({},e,Ft):Ft)}function ge(e){return Ut.spyListeners.push(e),zt=Ut.spyListeners.length>0,dt(function(){var t=Ut.spyListeners.indexOf(e);t!==-1&&Ut.spyListeners.splice(t,1),zt=Ut.spyListeners.length>0})}function we(e){return ht("trackTransitions is deprecated. Use mobx.spy instead"),"boolean"==typeof e&&(ht("trackTransitions only takes a single callback function. If you are using the mobx-react-devtools, please update them first"),e=arguments[1]),e?ge(e):(ht("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 _e(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),xe(e.name||"anonymous transaction",t,n);var r=e.call(t);return Oe(n),r}function xe(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),ue(),Ut.inTransaction+=1,n&&ve()&&ye({type:"transaction",target:t,name:e})}function Oe(e){void 0===e&&(e=!0),0===--Ut.inTransaction&&de(),e&&ve()&&me(),ce()}function Se(e){return e.interceptors&&e.interceptors.length>0}function Ae(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),dt(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function Re(e,t){for(var n=Q(),r=e.interceptors,i=0,o=r.length;i<o;i++)if(t=r[i](t),pt(!t||t.type,"Intercept handlers should return nothing or a change object"),!t)return null;return Z(n),t}function ke(e){return e.changeListeners&&e.changeListeners.length>0}function Te(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),dt(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function Ie(e,t){var n=Q(),r=e.changeListeners;if(r){r=r.slice();for(var i=0,o=r.length;i<o;i++)Array.isArray(t)?r[i].apply(null,t):r[i](t);Z(n)}}function je(e){return new Kt(e)}function Ee(e){return new Jt(e)}function Le(e){return new Wt(e)}function Ce(e,t){return Ke(e,t)}function De(e,t){return e instanceof Kt?[Gt.Reference,e.value]:e instanceof Jt?[Gt.Structure,e.value]:e instanceof Wt?[Gt.Flat,e.value]:[t,e]}function Pe(e){return e===je?Gt.Reference:e===Ee?Gt.Structure:e===Le?Gt.Flat:(pt(void 0===e,"Cannot determine value mode from function. Please pass in one of these: mobx.asReference, mobx.asStructure or mobx.asFlat, got: "+e),Gt.Recursive)}function Ve(e,t,n){var r;if(R(e))return e;switch(t){case Gt.Reference:return e;case Gt.Flat:Me(e,"Items inside 'asFlat' cannot have modifiers"),r=Gt.Reference;break;case Gt.Structure:Me(e,"Items inside 'asStructure' cannot have modifiers"),r=Gt.Structure;break;case Gt.Recursive:i=De(e,Gt.Recursive),r=i[0],e=i[1];break;default:pt(!1,"Illegal State")}return Array.isArray(e)?ze(e,r,n):yt(e)&&Object.isExtensible(e)?m(e,e,r,n):e;var i}function Me(e,t){if(e instanceof Kt||e instanceof Jt||e instanceof Wt)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function $e(e){var t=Ue(e),n=Ne(e);Object.defineProperty(Qt.prototype,""+e,{enumerable:!1,configurable:!0,set:t,get:n})}function Ue(e){return function(t){var n=this.$mobx,r=n.values;if(Me(t,"Modifiers cannot be used on array values. For non-reactive array values use makeReactive(asFlat(array))."),e<r.length){J();var i=r[e];if(Se(n)){var o=Re(n,{type:"update",object:n.array,index:e,newValue:t});if(!o)return;t=o.newValue}t=n.makeReactiveArrayItem(t);var a=n.mode===Gt.Structure?!kt(i,t):i!==t;a&&(r[e]=t,n.notifyArrayChildUpdate(e,t,i))}else{if(e!==r.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+r.length);n.spliceWithArray(e,0,[t])}}}function Ne(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 Be(e){for(var t=Xt;t<e;t++)$e(t);Xt=e}function ze(e,t,n){return new Qt(e,t,n)}function Fe(e){return ht("fastArray is deprecated. Please use `observable(asFlat([]))`"),ze(e,Gt.Flat,null)}function Ge(e){return e instanceof Qt}function Ke(e,t){return new tn(e,t)}function Je(e){return e instanceof tn}function We(e,t,n){if(void 0===n&&(n=Gt.Recursive),et(e))return e.$mobx;yt(e)||(t=e.constructor.name+"@"+ft()),t||(t="ObservableObject@"+ft());var r=new nn(e,t,n);return Ot(e,"$mobx",r),r}function He(e,t,n){e.values[t]?(pt("value"in n,"cannot redefine property "+t),e.target[t]=n.value):"value"in n?Xe(e,t,n.value,!0,void 0):Xe(e,t,n.get,!0,n.set)}function Xe(e,t,n,r,i){r&&At(e.target,t);var o,s=e.name+"."+t,u=!0;if(n instanceof sn)o=n,n.name=s,u=!1;else if(n instanceof Vt)o=n,n.name=s,n.scope||(n.scope=e.target);else if("function"!=typeof n||0!==n.length||a(n))if(n instanceof Jt&&"function"==typeof n.value&&0===n.value.length)o=new Vt(n.value,e.target,(!0),s,i);else{if(u=!1,Se(e)){var c=Re(e,{object:e.target,name:t,type:"add",newValue:n});if(!c)return;n=c.newValue}o=new sn(n,e.mode,s,(!1)),n=o.value}else o=new Vt(n,e.target,(!1),s,i);e.values[t]=o,r&&Object.defineProperty(e.target,t,u?Ye(t):qe(t)),u||Ze(e,e.target,t,n)}function qe(e){var t=rn[e];return t?t:rn[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){Qe(this,e,t)}}}function Ye(e){var t=on[e];return t?t:on[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:function(t){return this.$mobx.values[e].set(t)}}}function Qe(e,t,n){var r=e.$mobx,i=r.values[t];if(Se(r)){var o=Re(r,{type:"update",object:e,name:t,newValue:n});if(!o)return;n=o.newValue}if(n=i.prepareNewValue(n),n!==an){var a=ke(r),s=ve(),o=Ie||ke?{type:"update",object:e,oldValue:i.value,name:t,newValue:n}:null;s&&ye(o),i.setNewValue(n),a&&Ie(r,o),s&&me()}}function Ze(e,t,n,r){var i=ke(e),o=ve(),a=i||o?{type:"add",object:t,name:n,newValue:r}:null;o&&ye(a),i&&Ie(e,a),o&&me()}function et(e){return"object"==typeof e&&null!==e&&(at(e),e.$mobx instanceof nn)}function tt(e,t){if("object"==typeof e&&null!==e){if(Ge(e))return pt(void 0===t,"It is not possible to get index atoms from arrays"),e.$mobx.atom;if(Je(e)){if(void 0===t)return tt(e._keys);var n=e._data[t]||e._hasMap[t];return pt(!!n,"the entry '"+t+"' does not exist in the observable map '"+rt(e)+"'"),n}if(at(e),et(e)){pt(!!t,"please specify a property");var r=e.$mobx.values[t];return pt(!!r,"no observable property '"+t+"' found on the observable object '"+rt(e)+"'"),r}if(e instanceof Ct||e instanceof Vt||e instanceof Nt)return e}else if("function"==typeof e&&e.$mobx instanceof Nt)return e.$mobx;pt(!1,"Cannot obtain atom from "+e)}function nt(e,t){return pt(e,"Expection some object"),void 0!==t?nt(tt(e,t)):e instanceof Ct||e instanceof Vt||e instanceof Nt?e:Je(e)?e:(at(e),e.$mobx?e.$mobx:void pt(!1,"Cannot obtain administration from "+e))}function rt(e,t){var n;return n=void 0!==t?tt(e,t):et(e)||Je(e)?nt(e):tt(e),n.name}function it(e,t,n,r,i){function o(o,a,s,u){if(pt(i||st(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),s){wt(o,"__mobxLazyInitializers")||xt(o,"__mobxLazyInitializers",o.__mobxLazyInitializers&&o.__mobxLazyInitializers.slice()||[]);var c=s.value,l=s.initializer;return o.__mobxLazyInitializers.push(function(t){e(t,a,l?l.call(t):c,u,s)}),{enumerable:r,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&at(this),t.call(this,a)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&at(this),n.call(this,a,e)}}}var f={enumerable:r,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[a]===!0||ot(this,a,void 0,e,u,s),t.call(this,a)},set:function(t){this.__mobxInitializedProps&&this.__mobxInitializedProps[a]===!0?n.call(this,a,t):ot(this,a,t,e,u,s)}};return arguments.length<3&&Object.defineProperty(o,a,f),f}return i?function(){if(st(arguments))return o.apply(null,arguments);var e=arguments;return function(t,n,r){return o(t,n,r,e)}}:o}function ot(e,t,n,r,i,o){wt(e,"__mobxInitializedProps")||xt(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,i,o)}function at(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(xt(e,"__mobxDidRunLazyInitializers",!0),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function st(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}function ut(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function ct(e){pt(e[un]!==!0,"Illegal state: cannot recycle array as iterator"),Ot(e,un,!0);var t=-1;return Ot(e,"next",function(){return t++,{done:t>=this.length,value:t<this.length?this[t]:void 0}}),e}function lt(e,t){Ot(e,ut(),t)}function ft(){return++Ut.mobxGuid}function pt(e,t,n){if(!e)throw new Error("[mobx] Invariant failed: "+t+(n?" in '"+n+"'":""))}function ht(e){fn.indexOf(e)===-1&&(fn.push(e),console.error("[mobx] Deprecated: "+e))}function dt(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}function vt(e){var t=[];return e.forEach(function(e){t.indexOf(e)===-1&&t.push(e)}),t}function bt(e,t,n){if(void 0===t&&(t=100),void 0===n&&(n=" - "),!e)return"";var r=e.slice(0,t);return""+r.join(n)+(e.length>t?" (... and "+(e.length-t)+"more)":"")}function yt(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function mt(){for(var e=arguments[0],t=1,n=arguments.length;t<n;t++){var r=arguments[t];for(var i in r)wt(r,i)&&(e[i]=r[i])}return e}function gt(e,t,n){return e?!kt(t,n):t!==n}function wt(e,t){return hn.call(e,t)}function _t(e,t){for(var n=0;n<t.length;n++)xt(e,t[n],e[t[n]])}function xt(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Ot(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function St(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return!n||n.configurable!==!1&&n.writable!==!1}function At(e,t){pt(St(e,t),"Cannot make property '"+t+"' observable, it is not configurable and writable in the target object")}function Rt(e){var t=[];for(var n in e)t.push(n);return t}function kt(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var n=Array.isArray(e)||Ge(e);if(n!==(Array.isArray(t)||Ge(t)))return!1;if(n){if(e.length!==t.length)return!1;for(var r=e.length-1;r>=0;r--)if(!kt(e[r],t[r]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(Rt(e).length!==Rt(t).length)return!1;for(var i in e){if(!(i in t))return!1;if(!kt(e[i],t[i]))return!1}return!0}return e===t}var Tt=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)};te(),n.extras={allowStateChanges:B,getAtom:tt,getDebugName:rt,getDependencyTree:g,getObserverTree:_,isComputingDerivation:K,isSpyEnabled:ve,resetGlobalState:ne,spyReport:be,spyReportEnd:me,spyReportStart:ye,trackTransitions:we},n._={getAdministration:nt,resetGlobalState:ne},"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx(t.exports);var It=it(function(e,t,n,i,o){var a=i&&1===i.length?i[0]:n.name||t||"<unnamed action>",s=r(a,n);xt(e,t,s)},function(e){return this[e]},function(){pt(!1,"It is not allowed to assign new values to @action fields")},!1,!0);n.action=r,n.runInAction=o,n.isAction=a,n.autorun=s,n.when=u,n.autorunUntil=c,n.autorunAsync=l,n.reaction=f;var jt=it(function(e,t,n,r,i){pt("undefined"!=typeof i,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'. It looks like it was used on a property.");var o=i.get,a=i.set;pt("function"==typeof o,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'");var s=!1;r&&1===r.length&&r[0].asStructure===!0&&(s=!0);var u=We(e,void 0,Gt.Recursive);Xe(u,t,s?Ee(o):o,!1,a)},function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()},function(e,t){this.$mobx.values[e].set(t)},!1,!0);n.computed=p,n.createTransformer=d,n.expr=b,n.extendObservable=y,n.intercept=O,n.isObservable=R;var Et=it(function(e,t,n){var r=z(!0);"function"==typeof n&&(n=je(n));var i=We(e,void 0,Gt.Recursive);Xe(i,t,n,!0,void 0),F(r)},function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()},function(e,t){Qe(this,e,t)},!0,!1);n.observable=T;var Lt;!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"}(Lt||(Lt={})),n.observe=j,n.toJS=C,n.toJSON=D,n.whyRun=V,n.useStrict=U,n.isStrictModeEnabled=N;var Ct=function(){function e(e){void 0===e&&(e="Atom@"+ft()),this.name=e,this.isPendingUnobservation=!0,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Pt.NOT_TRACKING}return e.prototype.onBecomeUnobserved=function(){},e.prototype.reportObserved=function(){le(this)},e.prototype.reportChanged=function(){xe("propagatingAtomChange",null,!1),fe(this),Oe(!1)},e.prototype.toString=function(){return this.name},e}();n.BaseAtom=Ct;var Dt=function(e){function t(t,n,r){void 0===t&&(t="Atom@"+ft()),void 0===n&&(n=pn),void 0===r&&(r=pn),e.call(this,t),this.name=t,this.onBecomeObservedHandler=n,this.onBecomeUnobservedHandler=r,this.isPendingUnobservation=!1,this.isBeingTracked=!1}return Tt(t,e),t.prototype.reportObserved=function(){return ue(),e.prototype.reportObserved.call(this),this.isBeingTracked||(this.isBeingTracked=!0,this.onBecomeObservedHandler()),ce(),!!Ut.trackingDerivation},t.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},t}(Ct);n.Atom=Dt;var Pt,Vt=function(){function e(e,t,n,r,i){this.derivation=e,this.scope=t,this.compareStructural=n,this.dependenciesState=Pt.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=Pt.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+ft(),this.value=void 0,this.isComputing=!1,this.isRunningSetter=!1,this.name=r||"ComputedValue@"+ft(),i&&(this.setter=M(r+"-setter",i))}return e.prototype.peek=function(){this.isComputing=!0;var e=z(!1),t=this.derivation.call(this.scope);return F(e),this.isComputing=!1,t},e.prototype.peekUntracked=function(){var e=!0;try{var t=this.peek();return e=!1,t}finally{e&&H(this)}},e.prototype.onBecomeStale=function(){he(this)},e.prototype.onBecomeUnobserved=function(){pt(this.dependenciesState!==Pt.NOT_TRACKING,"INTERNAL ERROR only onBecomeUnobserved shouldn't be called twice in a row"),q(this),this.value=void 0},e.prototype.get=function(){pt(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),ue(),1===Ut.inBatch?G(this)&&(this.value=this.peekUntracked()):(le(this),G(this)&&this.trackAndCompute()&&pe(this));var e=this.value;return ce(),e},e.prototype.recoverFromError=function(){this.isComputing=!1},e.prototype.set=function(e){if(this.setter){pt(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else pt(!1,"[ComputedValue '"+this.name+"'] It is not possible to assign a new value to a computed value.")},e.prototype.trackAndCompute=function(){ve()&&be({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=W(this,this.peek);return gt(this.compareStructural,t,e)},e.prototype.observe=function(e,t){var n=this,r=!0,i=void 0;return s(function(){var o=n.get();if(!r||t){var a=Q();e(o,i),Z(a)}r=!1,i=o})},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.whyRun=function(){var e=Boolean(Ut.trackingDerivation),t=vt(this.isComputing?this.newObserving:this.observing).map(function(e){return e.name}),n=vt(ie(this).map(function(e){return e.name}));return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+(e?"[active] the value of this computation is needed by a reaction":this.isComputing?"[get] The value of this computed was requested outside a reaction":"[idle] not running at the moment")+"\n"+(this.dependenciesState===Pt.NOT_TRACKING?" * This computation is suspended (not in use by any reaction) and won't run automatically.\n\tDidn't expect this computation to be suspended at this point?\n\t 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n\t 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 "+bt(t)+"\n "+(this.isComputing&&e?" (... or any observable accessed during the remainder of the current run)":"")+"\n\tMissing items in this list?\n\t 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n\t 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 "+bt(n)+"\n");
},e}();!function(e){e[e.NOT_TRACKING=-1]="NOT_TRACKING",e[e.UP_TO_DATE=0]="UP_TO_DATE",e[e.POSSIBLY_STALE=1]="POSSIBLY_STALE",e[e.STALE=2]="STALE"}(Pt||(Pt={})),n.IDerivationState=Pt,n.untracked=Y;var Mt=["mobxGuid","resetId","spyListeners","strictMode","runId"],$t=function(){function e(){this.version=4,this.trackingDerivation=null,this.runId=0,this.mobxGuid=0,this.inTransaction=0,this.isRunningReactions=!1,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[]}return e}(),Ut=function(){var t=new $t;if(e.__mobservableTrackingStack||e.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(e.__mobxGlobal&&e.__mobxGlobal.version!==t.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");return e.__mobxGlobal?e.__mobxGlobal:e.__mobxGlobal=t}(),Nt=function(){function e(e,t){void 0===e&&(e="Reaction@"+ft()),this.name=e,this.onInvalidate=t,this.observing=[],this.newObserving=[],this.dependenciesState=Pt.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+ft(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Ut.pendingReactions.push(this),ue(),de(),ce())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,G(this)&&(this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&ve()&&be({object:this,type:"scheduled-reaction"})))},e.prototype.track=function(e){ue();var t,n=ve();n&&(t=Date.now(),ye({object:this,type:"reaction",fn:e})),this._isRunning=!0,W(this,e),this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&q(this),n&&me({time:Date.now()-t}),ce()},e.prototype.recoverFromError=function(){this._isRunning=!1,this._isTrackPending=!1},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(ue(),q(this),ce()))},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=vt(this._isRunning?this.newObserving: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 "+bt(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n\tMissing items in this list?\n\t 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n\t 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}();n.Reaction=Nt;var Bt=100,zt=!1,Ft={spyReportEnd:!0};n.spy=ge,n.transaction=_e;var Gt;!function(e){e[e.Recursive=0]="Recursive",e[e.Reference=1]="Reference",e[e.Structure=2]="Structure",e[e.Flat=3]="Flat"}(Gt||(Gt={})),n.asReference=je,n.asStructure=Ee,n.asFlat=Le;var Kt=function(){function e(e){this.value=e,Me(e,"Modifiers are not allowed to be nested")}return e}(),Jt=function(){function e(e){this.value=e,Me(e,"Modifiers are not allowed to be nested")}return e}(),Wt=function(){function e(e){this.value=e,Me(e,"Modifiers are not allowed to be nested")}return e}();n.asMap=Ce;var Ht=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),Xt=0,qt=function(){function e(){}return e}();qt.prototype=[];var Yt=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 Ct(e||"ObservableArray@"+ft())}return e.prototype.makeReactiveArrayItem=function(e){return Me(e,"Array values cannot have modifiers"),this.mode===Gt.Flat||this.mode===Gt.Reference?e:Ve(e,this.mode,this.atom.name+"[..]")},e.prototype.intercept=function(e){return Ae(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Te(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;e!==t&&(e>t?this.spliceWithArray(t,0,new Array(e-t)):this.spliceWithArray(e,t-e))},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=t,t>0&&e+t+1>Xt&&Be(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){J();var r=this.values.length;if(void 0===e?e=0:e>r?e=r:e<0&&(e=Math.max(0,r+e)),t=1===arguments.length?r-e:void 0===t||null===t?0:Math.max(0,Math.min(t,r-e)),void 0===n&&(n=[]),Se(this)){var i=Re(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!i)return ln;t=i.removedCount,n=i.added}n=n.map(this.makeReactiveArrayItem,this);var o=n.length-t;this.updateArrayLength(r,o);var a=(s=this.values).splice.apply(s,[e,t].concat(n));return 0===t&&0===n.length||this.notifyArraySplice(e,n,a),a;var s},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&ve(),i=ke(this),o=i||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&ye(o),this.atom.reportChanged(),i&&Ie(this,o),r&&me()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&ve(),i=ke(this),o=i||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&ye(o),this.atom.reportChanged(),i&&Ie(this,o),r&&me()},e}(),Qt=function(e){function t(t,n,r,i){void 0===i&&(i=!1),e.call(this);var o=new Yt(r,n,this,i);Ot(this,"$mobx",o),t&&t.length?(o.updateArrayLength(0,t.length),o.values=t.map(o.makeReactiveArrayItem,o),o.notifyArraySplice(0,o.values.slice(),ln)):o.values=[],Ht&&Object.defineProperty(o.array,"0",Zt)}return Tt(t,e),t.prototype.intercept=function(e){return this.$mobx.intercept(e)},t.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},t.prototype.clear=function(){return this.splice(0)},t.prototype.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.slice(),e.map(function(e){return Ge(e)?e.slice():e}))},t.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},t.prototype.toJS=function(){return this.slice()},t.prototype.toJSON=function(){return this.toJS()},t.prototype.peek=function(){return this.$mobx.values},t.prototype.find=function(e,t,n){void 0===n&&(n=0),this.$mobx.atom.reportObserved();for(var r=this.$mobx.values,i=r.length,o=n;o<i;o++)if(e.call(t,r[o],o,this))return r[o]},t.prototype.splice=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(e);case 2:return this.$mobx.spliceWithArray(e,t)}return this.$mobx.spliceWithArray(e,t,n)},t.prototype.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=this.$mobx;return n.spliceWithArray(n.values.length,0,e),n.values.length},t.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},t.prototype.shift=function(){return this.splice(0,1)[0]},t.prototype.unshift=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=this.$mobx;return n.spliceWithArray(0,0,e),n.values.length},t.prototype.reverse=function(){this.$mobx.atom.reportObserved();var e=this.slice();return e.reverse.apply(e,arguments)},t.prototype.sort=function(e){this.$mobx.atom.reportObserved();var t=this.slice();return t.sort.apply(t,arguments)},t.prototype.remove=function(e){var t=this.$mobx.values.indexOf(e);return t>-1&&(this.splice(t,1),!0)},t.prototype.toString=function(){return"[mobx.array] "+Array.prototype.toString.apply(this.$mobx.values,arguments)},t.prototype.toLocaleString=function(){return"[mobx.array] "+Array.prototype.toLocaleString.apply(this.$mobx.values,arguments)},t}(qt);lt(Qt.prototype,function(){return ct(this.slice())}),_t(Qt.prototype,["constructor","intercept","observe","clear","concat","replace","toJS","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(Qt.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];xt(Qt.prototype,e,function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)})});var Zt={configurable:!0,enumerable:!1,set:Ue(0),get:Ne(0)};Be(1e3),n.fastArray=Fe,n.isObservableArray=Ge;var en={},tn=function(){function e(e,t){var n=this;this.$mobx=en,this._data={},this._hasMap={},this.name="ObservableMap@"+ft(),this._keys=new Qt(null,Gt.Reference,this.name+".keys()",(!0)),this.interceptors=null,this.changeListeners=null,this._valueMode=Pe(t),this._valueMode===Gt.Flat&&(this._valueMode=Gt.Reference),B(!0,function(){yt(e)?n.merge(e):Array.isArray(e)&&e.forEach(function(e){var t=e[0],r=e[1];return n.set(t,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())},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(Me(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"),Se(this)){var r=Re(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,Se(this)){var n=Re(this,{type:"delete",object:this,name:e});if(!n)return!1}if(this._has(e)){var r=ve(),i=ke(this),n=i||r?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;return r&&ye(n),_e(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&&Ie(this,n),r&&me(),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap[e];return n?n.setNewValue(t):n=this._hasMap[e]=new sn(t,Gt.Reference,this.name+"."+e+"?",(!1)),n},e.prototype._updateValue=function(e,t){var n=this._data[e];if(t=n.prepareNewValue(t),t!==an){var r=ve(),i=ke(this),o=i||r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;r&&ye(o),n.setNewValue(t),i&&Ie(this,o),r&&me()}},e.prototype._addValue=function(e,t){var n=this;_e(function(){var r=n._data[e]=new sn(t,n._valueMode,n.name+"."+e,(!1));t=r.value,n._updateHasMapEntry(e,!0),n._keys.push(e)},void 0,!1);var r=ve(),i=ke(this),o=i||r?{type:"add",object:this,name:e,newValue:t}:null;r&&ye(o),i&&Ie(this,o),r&&me()},e.prototype.get=function(e){if(e=""+e,this.has(e))return this._data[e].get()},e.prototype.keys=function(){return ct(this._keys.slice())},e.prototype.values=function(){return ct(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return ct(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 _e(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;_e(function(){Y(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 e=this,t={};return this.keys().forEach(function(n){return t[n]=e.get(n)}),t},e.prototype.toJs=function(){return ht("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&&("string"==typeof e||"number"==typeof e||"boolean"==typeof e)},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 pt(t!==!0,"`observe` doesn't support the fire immediately property for observable maps."),Te(this,e)},e.prototype.intercept=function(e){return Ae(this,e)},e}();n.ObservableMap=tn,lt(tn.prototype,function(){return this.entries()}),n.map=Ke,n.isObservableMap=Je;var nn=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 pt(t!==!0,"`observe` doesn't support the fire immediately property for observable objects."),Te(this,e)},e.prototype.intercept=function(e){return Ae(this,e)},e}(),rn={},on={};n.isObservableObject=et;var an={},sn=function(e){function t(t,n,r,i){void 0===r&&(r="ObservableValue@"+ft()),void 0===i&&(i=!0),e.call(this,r),this.mode=n,this.hasUnreportedChange=!1,this.value=void 0;var o=De(t,Gt.Recursive),a=o[0],s=o[1];this.mode===Gt.Recursive&&(this.mode=a),this.value=Ve(s,this.mode,this.name),i&&ve()&&be({type:"create",object:this,newValue:this.value})}return Tt(t,e),t.prototype.set=function(e){var t=this.value;if(e=this.prepareNewValue(e),e!==an){var n=ve();n&&ye({type:"update",object:this,newValue:e,oldValue:t}),this.setNewValue(e),n&&me()}},t.prototype.prepareNewValue=function(e){if(Me(e,"Modifiers cannot be used on non-initial values."),J(),Se(this)){var t=Re(this,{object:this,type:"update",newValue:e});if(!t)return an;e=t.newValue}var n=gt(this.mode===Gt.Structure,this.value,e);return n?Ve(e,this.mode,this.name):an},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),ke(this)&&Ie(this,[e,t])},t.prototype.get=function(){return this.reportObserved(),this.value},t.prototype.intercept=function(e){return Ae(this,e)},t.prototype.observe=function(e,t){return t&&e(this.value,void 0),Te(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t}(Ct),un="__$$iterating",cn=function(){function e(){this.listeners=[],ht("extras.SimpleEventEmitter is deprecated and will be removed in the next major release")}return e.prototype.emit=function(){for(var e=this.listeners.slice(),t=0,n=e.length;t<n;t++)e[t].apply(null,arguments)},e.prototype.on=function(e){var t=this;return this.listeners.push(e),dt(function(){var n=t.listeners.indexOf(e);n!==-1&&t.listeners.splice(n,1)})},e.prototype.once=function(e){var t=this.on(function(){t(),e.apply(this,arguments)});return t},e}();n.SimpleEventEmitter=cn;var ln=[];Object.freeze(ln);var fn=[],pn=function(){},hn=Object.prototype.hasOwnProperty}).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.5.0",
"version": "2.5.1",
"description": "Simple, scalable state management.",

@@ -5,0 +5,0 @@ "main": "lib/mobx.js",

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

* Installation: `npm install mobx --save`. React bindings: `npm install mobx-react --save`. To enable ESNext decorators (optional), see below.
* CDN: https://unpkg.com/mobx/lib/mobx.umd.js
## Getting started
* [Ten minute, interactive MobX + React tutorial](https://mobxjs.github.io/mobx/getting-started.html)

@@ -21,7 +25,5 @@ * [Official documentation and API overview](https://mobxjs.github.io/mobx/refguide/api.html)

* [Screencast: intro to MobX](https://www.youtube.com/watch?v=K8dr8BMU7-8) - 8m
* [State Management Is Easy, React Amsterdam 2016 conf](https://www.youtube.com/watch?v=ApmSsu3qnf0&feature=youtu.be) ([slides](https://speakerdeck.com/mweststrate/state-management-is-easy-introduction-to-mobx))
* [Magix MobX, RuhrJS 2016](https://www.youtube.com/watch?v=TfxfRkNCnmk)
* [Transparent Reactive Programming and Mutable Data, Reactive2015 conf](https://www.youtube.com/watch?v=FEwLwiizlk0) ([slides](https://speakerdeck.com/mweststrate/react-transparent-reactive-programming-and-mutable-data-structures))
* [Talk: State Management Is Easy, React Amsterdam 2016 conf](https://www.youtube.com/watch?v=ApmSsu3qnf0&feature=youtu.be) ([slides](https://speakerdeck.com/mweststrate/state-management-is-easy-introduction-to-mobx))
* [Boilerplates and related projects](http://mobxjs.github.io/mobx/faq/boilerplates.html)
* More tutorials, blogs and videos can be found on the [MobX homepage](http://mobxjs.github.io/mobx/faq/blogs.html)
* [Boilerplates and related projects](http://mobxjs.github.io/mobx/faq/boilerplates.html)

@@ -50,33 +52,8 @@

MobX adds observable capabilities to existing data structures like objects, arrays and class instances. This can simply be done by annotating your class properties with the [@observable](http://mobxjs.github.io/mobx/refguide/observable-decorator.html) decorator (ES.Next), or by invoking the [`observable`](http://mobxjs.github.io/mobx/refguide/observable.html) or [`extendObservable`](http://mobxjs.github.io/mobx/refguide/extend-observable.html) functions (ES5). See [Language support](https://github.com/mobxjs/mobx/wiki/Language-Support) for language-specific examples.
MobX adds observable capabilities to existing data structures like objects, arrays and class instances.
This can simply be done by annotating your class properties with the [@observable](http://mobxjs.github.io/mobx/refguide/observable-decorator.html) decorator (ES.Next),
or by invoking the [`observable`](http://mobxjs.github.io/mobx/refguide/observable.html) or [`extendObservable`](http://mobxjs.github.io/mobx/refguide/extend-observable.html) functions (ES5).
Scroll down for more ES5 / ES6 and ES.next examples.
```javascript
// ESNext class example with decorators:
class Todo {
id = Math.random();
@observable title = "";
@observable finished = false;
}
// ES6 class without decorators:
class Todo {
constructor() {
this.id = Math.random()
extendObservable(this, {
title: "",
finished: false
})
}
}
// ES5 constructor function example:
function Todo() {
this.id = Math.random()
extendObservable(this, {
title: "",
finished: false
})
}
// ... or just create plain objects:
function createTodo() {

@@ -89,32 +66,28 @@ return observable({

}
```
Using `@observable` is like turning a value into a spreadsheet cell. But unlike spreadsheets, not only can these values be primitive values, but references, objects and arrays as well. You can even [define your own](http://mobxjs.github.io/mobx/refguide/extending.html) observable data sources.
Using `observable` is like turning the properties of an object into a spreadsheet cells.
But unlike spreadsheets, these values cannot just be primitive values, but also references, objects and arrays.
You can even [define your own](http://mobxjs.github.io/mobx/refguide/extending.html) observable data sources.
### Computed values
With MobX you can define values that will be derived automatically when relevant data is modified. By using the [`@computed`](http://mobxjs.github.io/mobx/refguide/computed-decorator.html) decorator or by using parameterless functions as property values in `extendObservable`.
With MobX you can define values that will be derived automatically when relevant data is modified.
By using the [`@computed`](http://mobxjs.github.io/mobx/refguide/computed-decorator.html) decorator or by using getter / setter functions when using `(extend)Observable`.
```javascript
// ESNext class example:
class TodoList {
@observable todos = [];
@computed get unfinishedTodoCount() {
return this.todos.filter(todo => !todo.finished).length;
}
constructor() {
extendObservable(this, {
todos: [],
get unfinishedTodoCount() {
return this.todos.filter(function (todo) {
return !todo.finished
}).length;
}
})
}
}
```
// ES5 constructor function example:
function TodoList() {
extendObservable(this, {
todos: [],
unfinishedTodoCount: function() {
return this.todos.filter(function (todo) {
return !todo.finished
}).length;
}
})
}
```
MobX will ensure that `unfinishedTodoCount` is updated automatically when a todo is added or when one of the `finished` properties is modified.

@@ -128,3 +101,3 @@ Computations like these can very well be compared with formulas in spreadsheet programs like MS Excel. They update automatically whenever, and only when, needed.

If you are using React, you can turn your (stateless function) components into reactive components by simply adding the [`@observer`](http://mobxjs.github.io/mobx/refguide/observer-component.html) decorator from the `mobx-react` package onto them.
If you are using React, you can turn your (stateless function) components into reactive components by simply adding the [`observer`](http://mobxjs.github.io/mobx/refguide/observer-component.html) function / decorator from the `mobx-react` package onto them.

@@ -136,5 +109,3 @@ ```javascript

// ESNext decorator / JSX
@observer
class TodoListView extends Component {
const TodoListView = observer(class extends Component {
render() {

@@ -150,3 +121,3 @@ return <div>

}
}
})

@@ -161,3 +132,3 @@ const TodoView = observer(({todo}) =>

</li>
);
)

@@ -168,17 +139,10 @@ const store = new TodoList();

In ES5 a component declaration looks like this:
```javascript
var TodoListView = observer(React.createClass({ /* etc */ }))
```
`observer` turns React (function) components into derivations of the data they render.
Also, reactions can be created using the [`autorun`](http://mobxjs.github.io/mobx/refguide/autorun.html), [`autorunAsync`](http://mobxjs.github.io/mobx/refguide/autorun-async.html) or [`when`](http://mobxjs.github.io/mobx/refguide/when.html) functions to fit your specific situations.
When using MobX there are no smart or dumb components.
All components render smartly but are defined in a dumb manner. MobX will simply make sure the components are always re-rendered whenever needed, but also no more than that. So the `onClick` handler in the above example will force the proper `TodoView` to render, and it will cause the `TodoListView` to render if the number of unfinished tasks has changed.
However, if you would remove the `Tasks left` line (or put it into a separate component), the `TodoListView` will no longer re-render when ticking a box. You can verify this yourself by changing the [JSFiddle](https://jsfiddle.net/mweststrate/wv3yopo0/).
Custom reactions can simply be created using the [`autorun`](http://mobxjs.github.io/mobx/refguide/autorun.html),
[`autorunAsync`](http://mobxjs.github.io/mobx/refguide/autorun-async.html) or [`when`](http://mobxjs.github.io/mobx/refguide/when.html) functions to fit your specific situations.
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)

@@ -211,2 +175,149 @@

## Using MobX in ES5, ES6 and ES.next environments
MobX runs on any ES5 environment. Depending on your project setup, you can leverage ES6 and even ES.next features like decorators to make
working with MobX a really joyful experience. Decorators can be transpiled by both TypeScript and Babel with a little configuration,
[see below](#enabling-decorators-optional)
### Creating observables
The simplest way to create an observable object in ES5 is by taking a plain object and turning it into an observable object using `observable`:
```javascript
var timer = observable({
// observables
start: Date.now(),
current: Date.now(),
// computed property
get elapsedTime() {
return (this.current - this.start) + "seconds"
},
// action
tick: action(function() {
this.current = Date.now()
})
})
```
Similarly, you can create a constructor function easily as well:
```javascript
function Timer() {
extendObservable(this, {
start: Date.now(),
current: Date.now(),
get elapsedTime() {
return (this.current - this.start) + "seconds"
}
})
}
Timer.prototype.tick = action(function() {
this.current = Date.now()
})
var timer = new Timer()
```
Using ES6 classes is quite similar:
```javascript
class Timer {
constructor() {
extendObservable(this, {
start: Date.now(),
current: Date.now(),
get elapsedTime() {
return (this.current - this.start) + "seconds"
}
})
}
}
Timer.prototype.tick = action(function() {
this.current = Date.now()
})
const timer = new Timer()
```
ES.next decorators in combination with field initializers can turn the above into some really nice declarative code:
```javascript
class Timer {
@observabe start = Date.now();
@observable current = Date.now();
@computed get elapsedTime() {
return (this.current - this.start) + "seconds"
}
@action tick() {
this.current = Date.now()
}
}
const timer = new Timer()
```
## Creating `observer` components
Similarly, the `observer` function / decorator from the `"mobx-react"` package can be applied in different ways.
With stateless function components `observer` should always be invoked as function:
```javascript
const Timer = observer(function(props) {
return React.createElement("div", {}, props.timer.elapsedTime)
})
```
Or, with ES6:
```javascript
const Timer = observer(({ timer }) =>
<div>{ props.timer.elapsedTime }</div>
)
```
Similarly, classes (either ES6 or created using `React.createClass` can be passed through `observer`:
```javascript
const Timer = observer(React.createClass({
/* ... */
}))
const Timer = observer(class Timer extends React.Component {
/* ... */
})
```
Finally, `@observer` can be used as decorator in ES.next / Typescript if decorators are enabled:
```javascript
@observer
class Timer extends React.Component {
/* ... */
}
```
### Enabling decorators (optional)
**TypeScript**
Enable the compiler option `experimentalDecorators` in `tsconfig.json` or pass it as flag `--experimentalDecorators` to the compiler.
**Babel:**
Install support for decorators: `npm i --save-dev babel-plugin-transform-decorators-legacy`. And enable it in your `.babelrc` file:
```
{
"presets": [
"es2015",
"stage-1"
],
"plugins": ["transform-decorators-legacy"]
}
```
Note that the order is important and `transform-decorators-legacy` should be listed *first*.
## MobX: Simple and scalable

@@ -296,23 +407,2 @@

## Enabling decorators (optional)
**TypeScript**
Enable the compiler option `experimentalDecorators` in `tsconfig.json` or pass it as flag `--experimentalDecorators` to the compiler.
**Babel:**
Install support for decorators: `npm i --save-dev babel-plugin-transform-decorators-legacy`. And enable it in your `babelrc` file:
```
{
"presets": [
"es2015",
"stage-1"
],
"plugins": ["transform-decorators-legacy"]
}
```
Probably you have more plugins and presets in your `.babelrc` already, note that the order is important and `transform-decorators-legacy` should come as first.
## Bower support

@@ -319,0 +409,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