mobx 5.15.0 → 5.15.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -2
- package/README.md +8 -5
- package/lib/api/action.d.ts +13 -25
- package/lib/api/actiondecorator.d.ts +27 -27
- package/lib/api/autorun.d.ts +24 -24
- package/lib/api/become-observed.d.ts +5 -5
- package/lib/api/computed.d.ts +14 -14
- package/lib/api/configure.d.ts +18 -18
- package/lib/api/decorate.d.ts +6 -6
- package/lib/api/extendobservable.d.ts +7 -7
- package/lib/api/extras.d.ts +10 -10
- package/lib/api/flow.d.ts +9 -8
- package/lib/api/intercept-read.d.ts +8 -8
- package/lib/api/intercept.d.ts +8 -8
- package/lib/api/iscomputed.d.ts +3 -3
- package/lib/api/isobservable.d.ts +2 -2
- package/lib/api/object-api.d.ts +34 -34
- package/lib/api/observable.d.ts +44 -44
- package/lib/api/observabledecorator.d.ts +6 -6
- package/lib/api/observe.d.ts +8 -8
- package/lib/api/tojs.d.ts +11 -11
- package/lib/api/trace.d.ts +3 -3
- package/lib/api/transaction.d.ts +8 -8
- package/lib/api/when.d.ts +15 -15
- package/lib/core/action.d.ts +22 -22
- package/lib/core/atom.d.ts +37 -37
- package/lib/core/computedvalue.d.ts +95 -95
- package/lib/core/derivation.d.ts +74 -74
- package/lib/core/globalstate.d.ts +107 -107
- package/lib/core/observable.d.ts +45 -45
- package/lib/core/reaction.d.ts +63 -63
- package/lib/core/spy.d.ts +6 -6
- package/lib/index.js +7 -0
- package/lib/internal.d.ts +45 -45
- package/lib/mobx.d.ts +18 -18
- package/lib/mobx.es6.js +4206 -4190
- package/lib/mobx.js +4344 -4377
- package/lib/mobx.js.flow +6 -4
- package/lib/mobx.min.js +1 -1
- package/lib/mobx.module.js +4393 -4379
- package/lib/mobx.umd.js +4393 -4377
- package/lib/mobx.umd.min.js +1 -1
- package/lib/types/dynamicobject.d.ts +1 -1
- package/lib/types/intercept-utils.d.ts +9 -9
- package/lib/types/listen-utils.d.ts +8 -8
- package/lib/types/modifiers.d.ts +7 -7
- package/lib/types/observablearray.d.ts +42 -42
- package/lib/types/observablemap.d.ts +83 -83
- package/lib/types/observableobject.d.ts +67 -67
- package/lib/types/observableset.d.ts +49 -49
- package/lib/types/observablevalue.d.ts +38 -38
- package/lib/types/type-utils.d.ts +4 -4
- package/lib/utils/comparer.d.ts +14 -14
- package/lib/utils/decorators.d.ts +9 -9
- package/lib/utils/eq.d.ts +1 -1
- package/lib/utils/iterable.d.ts +1 -1
- package/lib/utils/utils.d.ts +43 -43
- package/package.json +6 -91
package/lib/mobx.umd.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).mobx={})}(this,function(e){"use strict";var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,n)};function n(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function i(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function a(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e}var s="An invariant failed, however the error is obfuscated because this is an production build.",u=[];Object.freeze(u);var c={};function l(){return++Ce.mobxGuid}function f(e){throw h(!1,e),"X"}function h(e,t){if(!e)throw new Error("[mobx] "+(t||s))}Object.freeze(c);function p(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var d=function(){};function v(e){return null!==e&&"object"==typeof e}function y(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function b(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function g(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return v(e)&&!0===e[n]}}function m(e){return e instanceof Map}function w(e){return e instanceof Set}function O(e){var t=new Set;for(var n in e)t.add(n);return Object.getOwnPropertySymbols(e).forEach(function(n){Object.getOwnPropertyDescriptor(e,n).enumerable&&t.add(n)}),Array.from(t)}function S(e){return e&&e.toString?e.toString():new String(e).toString()}function A(e){return null===e?null:"object"==typeof e?""+e:e}var _=Symbol("mobx administration"),E=function(){function t(t){void 0===t&&(t="Atom@"+l()),this.name=t,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=e.IDerivationState.NOT_TRACKING}return t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},t.prototype.reportObserved=function(){return Ve(this)},t.prototype.reportChanged=function(){Pe(),function(t){if(t.lowestObserverState===e.IDerivationState.STALE)return;t.lowestObserverState=e.IDerivationState.STALE,t.observers.forEach(function(n){n.dependenciesState===e.IDerivationState.UP_TO_DATE&&(n.isTracing!==Y.NONE&&ke(n,t),n.onBecomeStale()),n.dependenciesState=e.IDerivationState.STALE})}(this),Ne()},t.prototype.toString=function(){return this.name},t}(),x=g("Atom",E);function D(e,t,n){void 0===t&&(t=d),void 0===n&&(n=d);var r=new E(e);return t!==d&&Ze(r,t),n!==d&&et(r,n),r}var j={identity:function(e,t){return e===t},structural:function(e,t){return tn(e,t)},default:function(e,t){return Object.is(e,t)},shallow:function(e,t){return tn(e,t,1)}},C=Symbol("mobx did run lazy initializers"),R=Symbol("mobx pending decorators"),T={},I={};function P(e){var t,n;if(!0!==e[C]){var r=e[R];if(r){b(e,C,!0);var o=a(Object.getOwnPropertySymbols(r),Object.keys(r));try{for(var s=i(o),u=s.next();!u.done;u=s.next()){var c=r[u.value];c.propertyCreator(e,c.prop,c.descriptor,c.decoratorTarget,c.decoratorArguments)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}}}}function N(e,t){return function(){var n,i,o=function(i,o,a,s){if(!0===s)return t(i,o,a,i,n),null;if(!Object.prototype.hasOwnProperty.call(i,R)){var u=i[R];b(i,R,r({},u))}return i[R][o]={prop:o,propertyCreator:t,descriptor:a,decoratorTarget:i,decoratorArguments:n},function(e,t){var n=t?T:I;return n[e]||(n[e]={configurable:!0,enumerable:t,get:function(){return P(this),this[e]},set:function(t){P(this),this[e]=t}})}(o,e)};return(2===(i=arguments).length||3===i.length)&&("string"==typeof i[1]||"symbol"==typeof i[1])||4===i.length&&!0===i[3]?(n=u,o.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),o)}}function V(e,t,n){return pt(e)?e:Array.isArray(e)?W.array(e,{name:n}):y(e)?W.object(e,void 0,{name:n}):m(e)?W.map(e,{name:n}):w(e)?W.set(e,{name:n}):e}function k(e){return e}function B(e){h(e);var t=N(!0,function(t,n,r,i,o){var a=r?r.initializer?r.initializer.call(t):r.value:void 0;Ht(t).addObservableProp(n,a,e)}),n=("undefined"!=typeof process&&process.env,t);return n.enhancer=e,n}var L={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function M(e){return null==e?L:"string"==typeof e?{name:e,deep:!0,proxy:!0}:e}Object.freeze(L);var U=B(V),G=B(function(e,t,n){return null==e?e:Ft(e)||kt(e)||Ut(e)||Kt(e)?e:Array.isArray(e)?W.array(e,{name:n,deep:!1}):y(e)?W.object(e,void 0,{name:n,deep:!1}):m(e)?W.map(e,{name:n,deep:!1}):w(e)?W.set(e,{name:n,deep:!1}):f(!1)}),q=B(k),K=B(function(e,t,n){return tn(e,t)?t:e});function z(e){return e.defaultDecorator?e.defaultDecorator.enhancer:!1===e.deep?k:V}var H={box:function(e,t){arguments.length>2&&J("box");var n=M(t);return new me(e,z(n),n.name,!0,n.equals)},array:function(e,t){arguments.length>2&&J("array");var n=M(t);return function(e,t,n,r){void 0===n&&(n="ObservableArray@"+l());void 0===r&&(r=!1);var i=new It(n,t,r);o=i.values,a=_,s=i,Object.defineProperty(o,a,{enumerable:!1,writable:!1,configurable:!0,value:s});var o,a,s;var u=new Proxy(i.values,Tt);if(i.proxy=u,e&&e.length){var c=be(!0);i.spliceWithArray(0,0,e),ge(c)}return u}(e,z(n),n.name)},map:function(e,t){arguments.length>2&&J("map");var n=M(t);return new Mt(e,z(n),n.name)},set:function(e,t){arguments.length>2&&J("set");var n=M(t);return new qt(e,z(n),n.name)},object:function(e,t,n){"string"==typeof arguments[1]&&J("object");var r=M(n);if(!1===r.proxy)return nt({},e,t,r);var i=rt(r),o=function(e){var t=new Proxy(e,_t);return e[_].proxy=t,t}(nt({},void 0,void 0,r));return it(o,e,t,i),o},ref:q,shallow:G,deep:U,struct:K},W=function(e,t,n){if("string"==typeof arguments[1]||"symbol"==typeof arguments[1])return U.apply(null,arguments);if(pt(e))return e;var r=y(e)?W.object(e,t,n):Array.isArray(e)?W.array(e,t):m(e)?W.map(e,t):w(e)?W.set(e,t):e;if(r!==e)return r;f(!1)};function J(e){f("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}Object.keys(H).forEach(function(e){return W[e]=H[e]});var X,Y,F=N(!1,function(e,t,n,i,o){var a=n.get,s=n.set,u=o[0]||{};Ht(e).addComputedProp(e,t,r({get:a,set:s,context:e},u))}),$=F({equals:j.structural}),Q=function(e,t,n){if("string"==typeof t)return F.apply(null,arguments);if(null!==e&&"object"==typeof e&&1===arguments.length)return F.apply(null,arguments);var r="object"==typeof t?t:{};return r.get=e,r.set="function"==typeof t?t:r.set,r.name=r.name||e.name||"",new Oe(r)};Q.struct=$,(X=e.IDerivationState||(e.IDerivationState={}))[X.NOT_TRACKING=-1]="NOT_TRACKING",X[X.UP_TO_DATE=0]="UP_TO_DATE",X[X.POSSIBLY_STALE=1]="POSSIBLY_STALE",X[X.STALE=2]="STALE",function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(Y||(Y={}));var Z=function(){return function(e){this.cause=e}}();function ee(e){return e instanceof Z}function te(t){switch(t.dependenciesState){case e.IDerivationState.UP_TO_DATE:return!1;case e.IDerivationState.NOT_TRACKING:case e.IDerivationState.STALE:return!0;case e.IDerivationState.POSSIBLY_STALE:for(var n=ae(),r=t.observing,i=r.length,o=0;o<i;o++){var a=r[o];if(Se(a)){if(Ce.disableErrorBoundaries)a.get();else try{a.get()}catch(e){return se(n),!0}if(t.dependenciesState===e.IDerivationState.STALE)return se(n),!0}}return le(t),se(n),!1}}function ne(e){var t=e.observers.size>0;Ce.computationDepth>0&&t&&f(!1),Ce.allowStateChanges||!t&&"strict"!==Ce.enforceActions||f(!1)}function re(t,n,r){var i=ue(!0);le(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++Ce.runId;var o,a=Ce.trackingDerivation;if(Ce.trackingDerivation=t,!0===Ce.disableErrorBoundaries)o=n.call(r);else try{o=n.call(r)}catch(e){o=new Z(e)}return Ce.trackingDerivation=a,function(t){for(var n=t.observing,r=t.observing=t.newObserving,i=e.IDerivationState.UP_TO_DATE,o=0,a=t.unboundDepsCount,s=0;s<a;s++){var u=r[s];0===u.diffValue&&(u.diffValue=1,o!==s&&(r[o]=u),o++),u.dependenciesState>i&&(i=u.dependenciesState)}r.length=o,t.newObserving=null,a=n.length;for(;a--;){var u=n[a];0===u.diffValue&&Te(u,t),u.diffValue=0}for(;o--;){var u=r[o];1===u.diffValue&&(u.diffValue=0,Re(u,t))}i!==e.IDerivationState.UP_TO_DATE&&(t.dependenciesState=i,t.onBecomeStale())}(t),ce(i),o}function ie(t){var n=t.observing;t.observing=[];for(var r=n.length;r--;)Te(n[r],t);t.dependenciesState=e.IDerivationState.NOT_TRACKING}function oe(e){var t=ae();try{return e()}finally{se(t)}}function ae(){var e=Ce.trackingDerivation;return Ce.trackingDerivation=null,e}function se(e){Ce.trackingDerivation=e}function ue(e){var t=Ce.allowStateReads;return Ce.allowStateReads=e,t}function ce(e){Ce.allowStateReads=e}function le(t){if(t.dependenciesState!==e.IDerivationState.UP_TO_DATE){t.dependenciesState=e.IDerivationState.UP_TO_DATE;for(var n=t.observing,r=n.length;r--;)n[r].lowestObserverState=e.IDerivationState.UP_TO_DATE}}var fe=0,he=1;function pe(e,t,n){var r=function(){return de(e,t,n||this,arguments)};return r.isMobxAction=!0,r}function de(e,t,n,r){var i=ve(e,n,r);try{return t.apply(n,r)}catch(e){throw i.error=e,e}finally{ye(i)}}function ve(e,t,n){var r=ze(),i=ae();Pe();var o={prevDerivation:i,prevAllowStateChanges:be(!0),prevAllowStateReads:ue(!0),notifySpy:r,startTime:0,actionId:he++,parentActionId:fe};return fe=o.actionId,o}function ye(e){fe!==e.actionId&&f("invalid action stack. did you forget to finish an action?"),fe=e.parentActionId,void 0!==e.error&&(Ce.suppressReactionErrors=!0),ge(e.prevAllowStateChanges),ce(e.prevAllowStateReads),Ne(),se(e.prevDerivation),e.notifySpy,Ce.suppressReactionErrors=!1}function be(e){var t=Ce.allowStateChanges;return Ce.allowStateChanges=e,t}function ge(e){Ce.allowStateChanges=e}var me=function(e){function t(t,n,r,i,o){void 0===r&&(r="ObservableValue@"+l()),void 0===i&&(i=!0),void 0===o&&(o=j.default);var a=e.call(this,r)||this;return a.enhancer=n,a.name=r,a.equals=o,a.hasUnreportedChange=!1,a.value=n(t,void 0,r),i&&ze(),a}return n(t,e),t.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.prototype.set=function(e){this.value;if((e=this.prepareNewValue(e))!==Ce.UNCHANGED){ze();0,this.setNewValue(e)}},t.prototype.prepareNewValue=function(e){if(ne(this),Et(this)){var t=Dt(this,{object:this,type:"update",newValue:e});if(!t)return Ce.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.equals(this.value,e)?Ce.UNCHANGED:e},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),jt(this)&&Rt(this,{type:"update",object:this,newValue:e,oldValue:t})},t.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},t.prototype.intercept=function(e){return xt(this,e)},t.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),Ct(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t.prototype.valueOf=function(){return A(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(E),we=g("ObservableValue",me),Oe=function(){function t(t){this.dependenciesState=e.IDerivationState.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=e.IDerivationState.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+l(),this.value=new Z(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=Y.NONE,this.derivation=t.get,this.name=t.name||"ComputedValue@"+l(),t.set&&(this.setter=pe(this.name+"-setter",t.set)),this.equals=t.equals||(t.compareStructural||t.struct?j.structural:j.default),this.scope=t.context,this.requiresReaction=!!t.requiresReaction,this.keepAlive=!!t.keepAlive}return t.prototype.onBecomeStale=function(){!function(t){if(t.lowestObserverState!==e.IDerivationState.UP_TO_DATE)return;t.lowestObserverState=e.IDerivationState.POSSIBLY_STALE,t.observers.forEach(function(n){n.dependenciesState===e.IDerivationState.UP_TO_DATE&&(n.dependenciesState=e.IDerivationState.POSSIBLY_STALE,n.isTracing!==Y.NONE&&ke(n,t),n.onBecomeStale())})}(this)},t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},t.prototype.get=function(){this.isComputing&&f("Cycle detected in computation "+this.name+": "+this.derivation),0!==Ce.inBatch||0!==this.observers.size||this.keepAlive?(Ve(this),te(this)&&this.trackAndCompute()&&function(t){if(t.lowestObserverState===e.IDerivationState.STALE)return;t.lowestObserverState=e.IDerivationState.STALE,t.observers.forEach(function(n){n.dependenciesState===e.IDerivationState.POSSIBLY_STALE?n.dependenciesState=e.IDerivationState.STALE:n.dependenciesState===e.IDerivationState.UP_TO_DATE&&(t.lowestObserverState=e.IDerivationState.UP_TO_DATE)})}(this)):te(this)&&(this.warnAboutUntrackedRead(),Pe(),this.value=this.computeValue(!1),Ne());var t=this.value;if(ee(t))throw t.cause;return t},t.prototype.peek=function(){var e=this.computeValue(!1);if(ee(e))throw e.cause;return e},t.prototype.set=function(e){if(this.setter){h(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else h(!1,!1)},t.prototype.trackAndCompute=function(){var t=this.value,n=this.dependenciesState===e.IDerivationState.NOT_TRACKING,r=this.computeValue(!0),i=n||ee(t)||ee(r)||!this.equals(t,r);return i&&(this.value=r),i},t.prototype.computeValue=function(e){var t;if(this.isComputing=!0,Ce.computationDepth++,e)t=re(this,this.derivation,this.scope);else if(!0===Ce.disableErrorBoundaries)t=this.derivation.call(this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new Z(e)}return Ce.computationDepth--,this.isComputing=!1,t},t.prototype.suspend=function(){this.keepAlive||(ie(this),this.value=void 0)},t.prototype.observe=function(e,t){var n=this,r=!0,i=void 0;return Fe(function(){var o=n.get();if(!r||t){var a=ae();e({type:"update",object:n,newValue:o,oldValue:i}),se(a)}r=!1,i=o})},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return A(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(),Se=g("ComputedValue",Oe),Ae=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED"],_e=function(){return function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}}(),Ee={};function xe(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:Ee}var De=!0,je=!1,Ce=function(){var e=xe();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(De=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new _e).version&&(De=!1),De?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new _e):(setTimeout(function(){je||f("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new _e)}();function Re(e,t){e.observers.add(t),e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function Te(e,t){e.observers.delete(t),0===e.observers.size&&Ie(e)}function Ie(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,Ce.pendingUnobservations.push(e))}function Pe(){Ce.inBatch++}function Ne(){if(0==--Ce.inBatch){Ue();for(var e=Ce.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers.size&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof Oe&&n.suspend())}Ce.pendingUnobservations=[]}}function Ve(e){var t=Ce.trackingDerivation;return null!==t?(t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e,e.isBeingObserved||(e.isBeingObserved=!0,e.onBecomeObserved())),!0):(0===e.observers.size&&Ce.inBatch>0&&Ie(e),!1)}function ke(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===Y.BREAK){var n=[];!function e(t,n,r){if(n.length>=1e3)return void n.push("(and many more)");n.push(""+new Array(r).join("\t")+t.name);t.dependencies&&t.dependencies.forEach(function(t){return e(t,n,r+1)})}(ot(e),n,1),new Function("debugger;\n/*\nTracing '"+e.name+"'\n\nYou are entering this break point because derivation '"+e.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof Oe?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}var Be=function(){function t(t,n,r,i){void 0===t&&(t="Reaction@"+l()),void 0===i&&(i=!1),this.name=t,this.onInvalidate=n,this.errorHandler=r,this.requiresObservable=i,this.observing=[],this.newObserving=[],this.dependenciesState=e.IDerivationState.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+l(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=Y.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Ce.pendingReactions.push(this),Ue())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(Pe(),this._isScheduled=!1,te(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&ze()}catch(e){this.reportExceptionInDerivation(e)}}Ne()}},t.prototype.track=function(e){if(!this.isDisposed){Pe(),this._isRunning=!0;var t=re(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&ie(this),ee(t)&&this.reportExceptionInDerivation(t.cause),Ne()}},t.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{if(Ce.disableErrorBoundaries)throw e;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";Ce.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,e),Ce.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Pe(),ie(this),Ne()))},t.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e[_]=this,e},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(e){void 0===e&&(e=!1),mt(this,e)},t}();var Le=100,Me=function(e){return e()};function Ue(){Ce.inBatch>0||Ce.isRunningReactions||Me(Ge)}function Ge(){Ce.isRunningReactions=!0;for(var e=Ce.pendingReactions,t=0;e.length>0;){++t===Le&&(console.error("Reaction doesn't converge to a stable state after "+Le+" iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction()}Ce.isRunningReactions=!1}var qe=g("Reaction",Be);function Ke(e){var t=Me;Me=function(n){return e(function(){return t(n)})}}function ze(){return!1}function He(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function We(){f(!1)}function Je(e){return function(t,n,r){if(r){if(r.value)return{value:pe(e,r.value),enumerable:!1,configurable:!0,writable:!0};var i=r.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return pe(e,i.call(this))}}}return function(e){return function(t,n,r){Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:function(){},set:function(t){b(this,n,Xe(e,t))}})}}(e).apply(this,arguments)}}var Xe=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?pe(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?pe(e,t):1===arguments.length&&"string"==typeof e?Je(e):!0!==r?Je(t).apply(null,arguments):void b(e,t,pe(e.name||t,n.value,this))};function Ye(e,t,n){b(e,t,pe(t,n.bind(e)))}function Fe(e,t){void 0===t&&(t=c);var n,r=t&&t.name||e.name||"Autorun@"+l();if(!t.scheduler&&!t.delay)n=new Be(r,function(){this.track(a)},t.onError,t.requiresObservable);else{var i=Qe(t),o=!1;n=new Be(r,function(){o||(o=!0,i(function(){o=!1,n.isDisposed||n.track(a)}))},t.onError,t.requiresObservable)}function a(){e(n)}return n.schedule(),n.getDisposer()}Xe.bound=function(e,t,n,r){return!0===r?(Ye(e,t,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return Ye(this,t,n.value||n.initializer.call(this)),this[t]},set:We}:{enumerable:!1,configurable:!0,set:function(e){Ye(this,t,e)},get:function(){}}};var $e=function(e){return e()};function Qe(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:$e}function Ze(e,t,n){return tt("onBecomeObserved",e,t,n)}function et(e,t,n){return tt("onBecomeUnobserved",e,t,n)}function tt(e,t,n,r){var i="function"==typeof r?$t(t,n):$t(t),o="function"==typeof r?r:n,a=e+"Listeners";return i[a]?i[a].add(o):i[a]=new Set([o]),"function"!=typeof i[e]?f(!1):function(){var e=i[a];e&&(e.delete(o),0===e.size&&delete i[a])}}function nt(e,t,n,r){var i=rt(r=M(r));return P(e),Ht(e,r.name,i.enhancer),t&&it(e,t,n,i),e}function rt(e){return e.defaultDecorator||(!1===e.deep?q:U)}function it(e,t,n,r){var o,a;Pe();try{var s=O(t);try{for(var u=i(s),c=u.next();!c.done;c=u.next()){var l=c.value,f=Object.getOwnPropertyDescriptor(t,l),h=(n&&l in n?n[l]:f.get?F:r)(e,l,f,!0);h&&Object.defineProperty(e,l,h)}}catch(e){o={error:e}}finally{try{c&&!c.done&&(a=u.return)&&a.call(u)}finally{if(o)throw o.error}}}finally{Ne()}}function ot(e,t){return at($t(e,t))}function at(e){var t,n,r={name:e.name};return e.observing&&e.observing.length>0&&(r.dependencies=(t=e.observing,n=[],t.forEach(function(e){-1===n.indexOf(e)&&n.push(e)}),n).map(at)),r}function st(e){var t,n={name:e.name};return(t=e).observers&&t.observers.size>0&&(n.observers=Array.from(function(e){return e.observers}(e)).map(st)),n}var ut=0,ct=function(e){function t(){return e.call(this,"FLOW_CANCELLED")||this}return n(t,e),t}(Error);function lt(e){"function"==typeof e.cancel&&e.cancel()}function ft(e,t){if(null==e)return!1;if(void 0!==t){if(!1===Ft(e))return!1;if(!e[_].values.has(t))return!1;var n=$t(e,t);return Se(n)}return Se(e)}function ht(e,t){return null!=e&&(void 0!==t?!!Ft(e)&&e[_].values.has(t):Ft(e)||!!e[_]||x(e)||qe(e)||Se(e))}function pt(e){return 1!==arguments.length&&f(!1),ht(e)}function dt(e){return Ft(e)?e[_].getKeys():Ut(e)?Array.from(e.keys()):Kt(e)?Array.from(e.keys()):kt(e)?e.map(function(e,t){return t}):f(!1)}function vt(e,t,n){if(2!==arguments.length||Kt(e))if(Ft(e)){var r=e[_];r.values.get(t)?r.write(t,n):r.addObservableProp(t,n,r.defaultEnhancer)}else if(Ut(e))e.set(t,n);else if(Kt(e))e.add(t);else{if(!kt(e))return f(!1);"number"!=typeof t&&(t=parseInt(t,10)),h(t>=0,"Not a valid index: '"+t+"'"),Pe(),t>=e.length&&(e.length=t+1),e[t]=n,Ne()}else{Pe();var i=t;try{for(var o in i)vt(e,o,i[o])}finally{Ne()}}}function yt(e,t){return Ft(e)?Qt(e).has(t):Ut(e)?e.has(t):Kt(e)?e.has(t):kt(e)?t>=0&&t<e.length:f(!1)}var bt={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function gt(e,t,n,r){return r.detectCycles&&e.set(t,n),n}function mt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!1;"boolean"==typeof e[e.length-1]&&(n=e.pop());var r=function(e){switch(e.length){case 0:return Ce.trackingDerivation;case 1:return $t(e[0]);case 2:return $t(e[0],e[1])}}(e);if(!r)return f(!1);r.isTracing===Y.NONE&&console.log("[mobx.trace] '"+r.name+"' tracing enabled"),r.isTracing=n?Y.BREAK:Y.LOG}function wt(e,t){void 0===t&&(t=void 0),Pe();try{return e.apply(t)}finally{Ne()}}function Ot(e,t,n){var r;"number"==typeof n.timeout&&(r=setTimeout(function(){if(!o[_].isDisposed){o();var e=new Error("WHEN_TIMEOUT");if(!n.onError)throw e;n.onError(e)}},n.timeout)),n.name=n.name||"When@"+l();var i=pe(n.name+"-effect",t),o=Fe(function(t){e()&&(t.dispose(),r&&clearTimeout(r),i())},n);return o}function St(e){return e[_]}function At(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e}var _t={has:function(e,t){if(t===_||"constructor"===t||t===C)return!0;var n=St(e);return At(t)?n.has(t):t in e},get:function(e,t){if(t===_||"constructor"===t||t===C)return e[t];var n=St(e),r=n.values.get(t);if(r instanceof E){var i=r.get();return void 0===i&&n.has(t),i}return At(t)&&n.has(t),e[t]},set:function(e,t,n){return!!At(t)&&(vt(e,t,n),!0)},deleteProperty:function(e,t){return!!At(t)&&(St(e).remove(t),!0)},ownKeys:function(e){return St(e).keysAtom.reportObserved(),Reflect.ownKeys(e)},preventExtensions:function(e){return f("Dynamic observable objects cannot be frozen"),!1}};function Et(e){return void 0!==e.interceptors&&e.interceptors.length>0}function xt(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),p(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Dt(e,t){var n=ae();try{for(var r=a(e.interceptors||[]),i=0,o=r.length;i<o&&(h(!(t=r[i](t))||t.type,"Intercept handlers should return nothing or a change object"),t);i++);return t}finally{se(n)}}function jt(e){return void 0!==e.changeListeners&&e.changeListeners.length>0}function Ct(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),p(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Rt(e,t){var n=ae(),r=e.changeListeners;if(r){for(var i=0,o=(r=r.slice()).length;i<o;i++)r[i](t);se(n)}}var Tt={get:function(e,t){return t===_?e[_]:"length"===t?e[_].getArrayLength():"number"==typeof t?Pt.get.call(e,t):"string"!=typeof t||isNaN(t)?Pt.hasOwnProperty(t)?Pt[t]:e[t]:Pt.get.call(e,parseInt(t))},set:function(e,t,n){return"length"===t&&e[_].setArrayLength(n),"number"==typeof t&&Pt.set.call(e,t,n),"symbol"==typeof t||isNaN(t)?e[t]=n:Pt.set.call(e,parseInt(t),n),!0},preventExtensions:function(e){return f("Observable arrays cannot be frozen"),!1}};var It=function(){function e(e,t,n){this.owned=n,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new E(e||"ObservableArray@"+l()),this.enhancer=function(n,r){return t(n,r,e+"[..]")}}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.dehanceValues=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},e.prototype.intercept=function(e){return xt(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Ct(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray(t,0,n)}else this.spliceWithArray(e,t-e)},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=t},e.prototype.spliceWithArray=function(e,t,n){var r=this;ne(this.atom);var i=this.values.length;if(void 0===e?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:null==t?0:Math.max(0,Math.min(t,i-e)),void 0===n&&(n=u),Et(this)){var o=Dt(this,{object:this.proxy,type:"splice",index:e,removedCount:t,added:n});if(!o)return u;t=o.removedCount,n=o.added}n=0===n.length?n:n.map(function(e){return r.enhancer(e,void 0)});var a=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,a),this.dehanceValues(a)},e.prototype.spliceItemsIntoValues=function(e,t,n){var r;if(n.length<1e4)return(r=this.values).splice.apply(r,a([e,t],n));var i=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(n,this.values.slice(e+t)),i},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&!1,i=jt(this),o=i||r?{object:this.proxy,type:"update",index:e,newValue:t,oldValue:n}:null;this.atom.reportChanged(),i&&Rt(this,o)},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&!1,i=jt(this),o=i||r?{object:this.proxy,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;this.atom.reportChanged(),i&&Rt(this,o)},e}(),Pt={intercept:function(e){return this[_].intercept(e)},observe:function(e,t){return void 0===t&&(t=!1),this[_].observe(e,t)},clear:function(){return this.splice(0)},replace:function(e){var t=this[_];return t.spliceWithArray(0,t.values.length,e)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=this[_];switch(arguments.length){case 0:return[];case 1:return i.spliceWithArray(e);case 2:return i.spliceWithArray(e,t)}return i.spliceWithArray(e,t,n)},spliceWithArray:function(e,t,n){return this[_].spliceWithArray(e,t,n)},push:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this[_];return n.spliceWithArray(n.values.length,0,e),n.values.length},pop:function(){return this.splice(Math.max(this[_].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this[_];return n.spliceWithArray(0,0,e),n.values.length},reverse:function(){var e=this.slice();return e.reverse.apply(e,arguments)},sort:function(e){var t=this.slice();return t.sort.apply(t,arguments)},remove:function(e){var t=this[_],n=t.dehanceValues(t.values).indexOf(e);return n>-1&&(this.splice(n,1),!0)},get:function(e){var t=this[_];if(t){if(e<t.values.length)return t.atom.reportObserved(),t.dehanceValue(t.values[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},set:function(e,t){var n=this[_],r=n.values;if(e<r.length){ne(n.atom);var i=r[e];if(Et(n)){var o=Dt(n,{type:"update",object:n.proxy,index:e,newValue:t});if(!o)return;t=o.newValue}(t=n.enhancer(t,i))!==i&&(r[e]=t,n.notifyArrayChildUpdate(e,t,i))}else{if(e!==r.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+r.length);n.spliceWithArray(e,0,[t])}}};["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach(function(e){Pt[e]=function(){var t=this[_];t.atom.reportObserved();var n=t.dehanceValues(t.values);return n[e].apply(n,arguments)}});var Nt,Vt=g("ObservableArrayAdministration",It);function kt(e){return v(e)&&Vt(e[_])}var Bt,Lt={},Mt=function(){function e(e,t,n){if(void 0===t&&(t=V),void 0===n&&(n="ObservableMap@"+l()),this.enhancer=t,this.name=n,this[Nt]=Lt,this._keysAtom=D(this.name+".keys()"),this[Symbol.toStringTag]="Map","function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(e)}return e.prototype._has=function(e){return this._data.has(e)},e.prototype.has=function(e){var t=this;if(!Ce.trackingDerivation)return this._has(e);var n=this._hasMap.get(e);if(!n){var r=n=new me(this._has(e),k,this.name+"."+S(e)+"?",!1);this._hasMap.set(e,r),et(r,function(){return t._hasMap.delete(e)})}return n.get()},e.prototype.set=function(e,t){var n=this._has(e);if(Et(this)){var r=Dt(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this._updateValue(e,t):this._addValue(e,t),this},e.prototype.delete=function(e){var t=this;if(Et(this)&&!(r=Dt(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var n=jt(this),r=n?{type:"delete",object:this,oldValue:this._data.get(e).value,name:e}:null;return wt(function(){t._keysAtom.reportChanged(),t._updateHasMapEntry(e,!1),t._data.get(e).setNewValue(void 0),t._data.delete(e)}),n&&Rt(this,r),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap.get(e);n&&n.setNewValue(t)},e.prototype._updateValue=function(e,t){var n=this._data.get(e);if((t=n.prepareNewValue(t))!==Ce.UNCHANGED){var r=jt(this),i=r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;0,n.setNewValue(t),r&&Rt(this,i)}},e.prototype._addValue=function(e,t){var n=this;ne(this._keysAtom),wt(function(){var r=new me(t,n.enhancer,n.name+"."+S(e),!1);n._data.set(e,r),t=r.value,n._updateHasMapEntry(e,!0),n._keysAtom.reportChanged()});var r=jt(this);r&&Rt(this,r?{type:"add",object:this,name:e,newValue:t}:null)},e.prototype.get=function(e){return this.has(e)?this.dehanceValue(this._data.get(e).get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},e.prototype.values=function(){var e=this,t=0,n=Array.from(this.keys());return on({next:function(){return t<n.length?{value:e.get(n[t++]),done:!1}:{done:!0}}})},e.prototype.entries=function(){var e=this,t=0,n=Array.from(this.keys());return on({next:function(){if(t<n.length){var r=n[t++];return{value:[r,e.get(r)],done:!1}}return{done:!0}}})},e.prototype[(Nt=_,Symbol.iterator)]=function(){return this.entries()},e.prototype.forEach=function(e,t){var n,r;try{for(var a=i(this),s=a.next();!s.done;s=a.next()){var u=o(s.value,2),c=u[0],l=u[1];e.call(t,l,c,this)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}},e.prototype.merge=function(e){var t=this;return Ut(e)&&(e=e.toJS()),wt(function(){y(e)?O(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=o(e,2),r=n[0],i=n[1];return t.set(r,i)}):m(e)?(e.constructor!==Map&&f("Cannot initialize from classes that inherit from Map: "+e.constructor.name),e.forEach(function(e,n){return t.set(n,e)})):null!=e&&f("Cannot initialize map from "+e)}),this},e.prototype.clear=function(){var e=this;wt(function(){oe(function(){var t,n;try{for(var r=i(e.keys()),o=r.next();!o.done;o=r.next()){var a=o.value;e.delete(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}})})},e.prototype.replace=function(e){var t=this;return wt(function(){var n,r=y(n=e)?Object.keys(n):Array.isArray(n)?n.map(function(e){return o(e,1)[0]}):m(n)||Ut(n)?Array.from(n.keys()):f("Cannot get keys from '"+n+"'");Array.from(t.keys()).filter(function(e){return-1===r.indexOf(e)}).forEach(function(e){return t.delete(e)}),t.merge(e)}),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.toPOJO=function(){var e,t,n={};try{for(var r=i(this),a=r.next();!a.done;a=r.next()){var s=o(a.value,2),u=s[0],c=s[1];n["symbol"==typeof u?u:S(u)]=c}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n},e.prototype.toJS=function(){return new Map(this)},e.prototype.toJSON=function(){return this.toPOJO()},e.prototype.toString=function(){var e=this;return this.name+"[{ "+Array.from(this.keys()).map(function(t){return S(t)+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return Ct(this,e)},e.prototype.intercept=function(e){return xt(this,e)},e}(),Ut=g("ObservableMap",Mt),Gt={},qt=function(){function e(e,t,n){if(void 0===t&&(t=V),void 0===n&&(n="ObservableSet@"+l()),this.name=n,this[Bt]=Gt,this._data=new Set,this._atom=D(this.name),this[Symbol.toStringTag]="Set","function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(e,r){return t(e,r,n)},e&&this.replace(e)}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.clear=function(){var e=this;wt(function(){oe(function(){var t,n;try{for(var r=i(e._data.values()),o=r.next();!o.done;o=r.next()){var a=o.value;e.delete(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}})})},e.prototype.forEach=function(e,t){var n,r;try{for(var o=i(this),a=o.next();!a.done;a=o.next()){var s=a.value;e.call(t,s,s,this)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this;if((ne(this._atom),Et(this))&&!(r=Dt(this,{type:"add",object:this,newValue:e})))return this;if(!this.has(e)){wt(function(){t._data.add(t.enhancer(e,void 0)),t._atom.reportChanged()});var n=jt(this),r=n?{type:"add",object:this,newValue:e}:null;0,n&&Rt(this,r)}return this},e.prototype.delete=function(e){var t=this;if(Et(this)&&!(r=Dt(this,{type:"delete",object:this,oldValue:e})))return!1;if(this.has(e)){var n=jt(this),r=n?{type:"delete",object:this,oldValue:e}:null;return wt(function(){t._atom.reportChanged(),t._data.delete(e)}),n&&Rt(this,r),!0}return!1},e.prototype.has=function(e){return this._atom.reportObserved(),this._data.has(this.dehanceValue(e))},e.prototype.entries=function(){var e=0,t=Array.from(this.keys()),n=Array.from(this.values());return on({next:function(){var r=e;return e+=1,r<n.length?{value:[t[r],n[r]],done:!1}:{done:!0}}})},e.prototype.keys=function(){return this.values()},e.prototype.values=function(){this._atom.reportObserved();var e=this,t=0,n=Array.from(this._data.values());return on({next:function(){return t<n.length?{value:e.dehanceValue(n[t++]),done:!1}:{done:!0}}})},e.prototype.replace=function(e){var t=this;return Kt(e)&&(e=e.toJS()),wt(function(){Array.isArray(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):w(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!=e&&f("Cannot initialize set from "+e)}),this},e.prototype.observe=function(e,t){return Ct(this,e)},e.prototype.intercept=function(e){return xt(this,e)},e.prototype.toJS=function(){return new Set(this)},e.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},e.prototype[(Bt=_,Symbol.iterator)]=function(){return this.values()},e}(),Kt=g("ObservableSet",qt),zt=function(){function e(e,t,n,r){void 0===t&&(t=new Map),this.target=e,this.values=t,this.name=n,this.defaultEnhancer=r,this.keysAtom=new E(n+".keys")}return e.prototype.read=function(e){return this.values.get(e).get()},e.prototype.write=function(e,t){var n=this.target,r=this.values.get(e);if(r instanceof Oe)r.set(t);else{if(Et(this)){if(!(o=Dt(this,{type:"update",object:this.proxy||n,name:e,newValue:t})))return;t=o.newValue}if((t=r.prepareNewValue(t))!==Ce.UNCHANGED){var i=jt(this),o=i?{type:"update",object:this.proxy||n,oldValue:r.value,name:e,newValue:t}:null;0,r.setNewValue(t),i&&Rt(this,o)}}},e.prototype.has=function(e){var t=this.pendingKeys||(this.pendingKeys=new Map),n=t.get(e);if(n)return n.get();var r=!!this.values.get(e);return n=new me(r,k,this.name+"."+S(e)+"?",!1),t.set(e,n),n.get()},e.prototype.addObservableProp=function(e,t,n){void 0===n&&(n=this.defaultEnhancer);var r=this.target;if(Et(this)){var i=Dt(this,{object:this.proxy||r,name:e,type:"add",newValue:t});if(!i)return;t=i.newValue}var o=new me(t,n,this.name+"."+S(e),!1);this.values.set(e,o),t=o.value,Object.defineProperty(r,e,function(e){return Wt[e]||(Wt[e]={configurable:!0,enumerable:!0,get:function(){return this[_].read(e)},set:function(t){this[_].write(e,t)}})}(e)),this.notifyPropertyAddition(e,t)},e.prototype.addComputedProp=function(e,t,n){var r,i,o,a=this.target;n.name=n.name||this.name+"."+S(t),this.values.set(t,new Oe(n)),(e===a||(r=e,i=t,!(o=Object.getOwnPropertyDescriptor(r,i))||!1!==o.configurable&&!1!==o.writable))&&Object.defineProperty(e,t,function(e){return Jt[e]||(Jt[e]={configurable:Ce.computedConfigurable,enumerable:!1,get:function(){return Xt(this).read(e)},set:function(t){Xt(this).write(e,t)}})}(t))},e.prototype.remove=function(e){if(this.values.has(e)){var t=this.target;if(Et(this))if(!(a=Dt(this,{object:this.proxy||t,name:e,type:"remove"})))return;try{Pe();var n=jt(this),r=this.values.get(e),i=r&&r.get();if(r&&r.set(void 0),this.keysAtom.reportChanged(),this.values.delete(e),this.pendingKeys){var o=this.pendingKeys.get(e);o&&o.set(!1)}delete this.target[e];var a=n?{type:"remove",object:this.proxy||t,oldValue:i,name:e}:null;0,n&&Rt(this,a)}finally{Ne()}}},e.prototype.illegalAccess=function(e,t){console.warn("Property '"+t+"' of '"+e+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},e.prototype.observe=function(e,t){return Ct(this,e)},e.prototype.intercept=function(e){return xt(this,e)},e.prototype.notifyPropertyAddition=function(e,t){var n=jt(this),r=n?{type:"add",object:this.proxy||this.target,name:e,newValue:t}:null;if(n&&Rt(this,r),this.pendingKeys){var i=this.pendingKeys.get(e);i&&i.set(!0)}this.keysAtom.reportChanged()},e.prototype.getKeys=function(){var e,t;this.keysAtom.reportObserved();var n=[];try{for(var r=i(this.values),a=r.next();!a.done;a=r.next()){var s=o(a.value,2),u=s[0];s[1]instanceof me&&n.push(u)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n},e}();function Ht(e,t,n){if(void 0===t&&(t=""),void 0===n&&(n=V),Object.prototype.hasOwnProperty.call(e,_))return e[_];y(e)||(t=(e.constructor.name||"ObservableObject")+"@"+l()),t||(t="ObservableObject@"+l());var r=new zt(e,new Map,S(t),n);return b(e,_,r),r}var Wt=Object.create(null),Jt=Object.create(null);function Xt(e){var t=e[_];return t||(P(e),e[_])}var Yt=g("ObservableObjectAdministration",zt);function Ft(e){return!!v(e)&&(P(e),Yt(e[_]))}function $t(e,t){if("object"==typeof e&&null!==e){if(kt(e))return void 0!==t&&f(!1),e[_].atom;if(Kt(e))return e[_];if(Ut(e)){var n=e;return void 0===t?n._keysAtom:((r=n._data.get(t)||n._hasMap.get(t))||f(!1),r)}var r;if(P(e),t&&!e[_]&&e[t],Ft(e))return t?((r=e[_].values.get(t))||f(!1),r):f(!1);if(x(e)||Se(e)||qe(e))return e}else if("function"==typeof e&&qe(e[_]))return e[_];return f(!1)}function Qt(e,t){return e||f("Expecting some object"),void 0!==t?Qt($t(e,t)):x(e)||Se(e)||qe(e)?e:Ut(e)||Kt(e)?e:(P(e),e[_]?e[_]:void f(!1))}function Zt(e,t){return(void 0!==t?$t(e,t):Ft(e)||Ut(e)||Kt(e)?Qt(e):$t(e)).name}var en=Object.prototype.toString;function tn(e,t,n){return void 0===n&&(n=-1),function e(t,n,r,i,o){if(t===n)return 0!==t||1/t==1/n;if(null==t||null==n)return!1;if(t!=t)return n!=n;var a=typeof t;if("function"!==a&&"object"!==a&&"object"!=typeof n)return!1;t=nn(t);n=nn(n);var s=en.call(t);if(s!==en.call(n))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+t==""+n;case"[object Number]":return+t!=+t?+n!=+n:0==+t?1/+t==1/n:+t==+n;case"[object Date]":case"[object Boolean]":return+t==+n;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(t)===Symbol.valueOf.call(n)}var u="[object Array]"===s;if(!u){if("object"!=typeof t||"object"!=typeof n)return!1;var c=t.constructor,l=n.constructor;if(c!==l&&!("function"==typeof c&&c instanceof c&&"function"==typeof l&&l instanceof l)&&"constructor"in t&&"constructor"in n)return!1}if(0===r)return!1;r<0&&(r=-1);i=i||[];o=o||[];var f=i.length;for(;f--;)if(i[f]===t)return o[f]===n;i.push(t);o.push(n);if(u){if((f=t.length)!==n.length)return!1;for(;f--;)if(!e(t[f],n[f],r-1,i,o))return!1}else{var h=Object.keys(t),p=void 0;if(f=h.length,Object.keys(n).length!==f)return!1;for(;f--;)if(p=h[f],!rn(n,p)||!e(t[p],n[p],r-1,i,o))return!1}i.pop();o.pop();return!0}(e,t,n)}function nn(e){return kt(e)?e.slice():m(e)||Ut(e)?Array.from(e.entries()):w(e)||Kt(e)?Array.from(e.entries()):e}function rn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function on(e){return e[Symbol.iterator]=an,e}function an(){return this}if("undefined"==typeof Proxy||"undefined"==typeof Symbol)throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:He,extras:{getDebugName:Zt},$mobx:_}),e.$mobx=_,e.FlowCancellationError=ct,e.ObservableMap=Mt,e.ObservableSet=qt,e.Reaction=Be,e._allowStateChanges=function(e,t){var n,r=be(e);try{n=t()}finally{ge(r)}return n},e._allowStateChangesInsideComputed=function(e){var t,n=Ce.computationDepth;Ce.computationDepth=0;try{t=e()}finally{Ce.computationDepth=n}return t},e._endAction=ye,e._getAdministration=Qt,e._getGlobalState=function(){return Ce},e._interceptReads=function(e,t,n){var r;if(Ut(e)||kt(e)||we(e))r=Qt(e);else{if(!Ft(e))return f(!1);if("string"!=typeof t)return f(!1);r=Qt(e,t)}return void 0!==r.dehancer?f(!1):(r.dehancer="function"==typeof t?t:n,function(){r.dehancer=void 0})},e._isComputingDerivation=function(){return null!==Ce.trackingDerivation},e._resetGlobalState=function(){var e=new _e;for(var t in e)-1===Ae.indexOf(t)&&(Ce[t]=e[t]);Ce.allowStateChanges=!Ce.enforceActions},e._startAction=ve,e.action=Xe,e.autorun=Fe,e.comparer=j,e.computed=Q,e.configure=function(e){var t=e.enforceActions,n=e.computedRequiresReaction,r=e.computedConfigurable,i=e.disableErrorBoundaries,o=e.reactionScheduler,a=e.reactionRequiresObservable,s=e.observableRequiresReaction;if(!0===e.isolateGlobalState&&((Ce.pendingReactions.length||Ce.inBatch||Ce.isRunningReactions)&&f("isolateGlobalState should be called before MobX is running any reactions"),je=!0,De&&(0==--xe().__mobxInstanceCount&&(xe().__mobxGlobals=void 0),Ce=new _e)),void 0!==t){var u=void 0;switch(t){case!0:case"observed":u=!0;break;case!1:case"never":u=!1;break;case"strict":case"always":u="strict";break;default:f("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}Ce.enforceActions=u,Ce.allowStateChanges=!0!==u&&"strict"!==u}void 0!==n&&(Ce.computedRequiresReaction=!!n),void 0!==a&&(Ce.reactionRequiresObservable=!!a),void 0!==s&&(Ce.observableRequiresReaction=!!s,Ce.allowStateReads=!Ce.observableRequiresReaction),void 0!==r&&(Ce.computedConfigurable=!!r),void 0!==i&&(!0===i&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),Ce.disableErrorBoundaries=!!i),o&&Ke(o)},e.createAtom=D,e.decorate=function(e,t){var n="function"==typeof e?e.prototype:e,r=function(e){var r=t[e];Array.isArray(r)||(r=[r]);var i=Object.getOwnPropertyDescriptor(n,e),o=r.reduce(function(t,r){return r(n,e,t)},i);o&&Object.defineProperty(n,e,o)};for(var i in t)r(i);return e},e.entries=function(e){return Ft(e)?dt(e).map(function(t){return[t,e[t]]}):Ut(e)?dt(e).map(function(t){return[t,e.get(t)]}):Kt(e)?Array.from(e.entries()):kt(e)?e.map(function(e,t){return[t,e]}):f(!1)},e.extendObservable=nt,e.flow=function(e){1!==arguments.length&&f("Flow expects 1 argument and cannot be used as decorator");var t=e.name||"<unnamed flow>";return function(){var n,r=arguments,i=++ut,o=Xe(t+" - runid: "+i+" - init",e).apply(this,r),a=void 0,s=new Promise(function(e,r){var s=0;function u(e){var n;a=void 0;try{n=Xe(t+" - runid: "+i+" - yield "+s++,o.next).call(o,e)}catch(e){return r(e)}l(n)}function c(e){var n;a=void 0;try{n=Xe(t+" - runid: "+i+" - yield "+s++,o.throw).call(o,e)}catch(e){return r(e)}l(n)}function l(t){if(!t||"function"!=typeof t.then)return t.done?e(t.value):(a=Promise.resolve(t.value)).then(u,c);t.then(l,r)}n=r,u(void 0)});return s.cancel=Xe(t+" - runid: "+i+" - cancel",function(){try{a&<(a);var e=o.return(void 0),t=Promise.resolve(e.value);t.then(d,d),lt(t),n(new ct)}catch(e){n(e)}}),s}},e.get=function(e,t){if(yt(e,t))return Ft(e)?e[t]:Ut(e)?e.get(t):kt(e)?e[t]:f(!1)},e.getAtom=$t,e.getDebugName=Zt,e.getDependencyTree=ot,e.getObserverTree=function(e,t){return st($t(e,t))},e.has=yt,e.intercept=function(e,t,n){return"function"==typeof n?function(e,t,n){return Qt(e,t).intercept(n)}(e,t,n):function(e,t){return Qt(e).intercept(t)}(e,t)},e.isAction=function(e){return"function"==typeof e&&!0===e.isMobxAction},e.isArrayLike=function(e){return Array.isArray(e)||kt(e)},e.isBoxedObservable=we,e.isComputed=function(e){return arguments.length>1?f(!1):ft(e)},e.isComputedProp=function(e,t){return"string"!=typeof t?f(!1):ft(e,t)},e.isFlowCancellationError=function(e){return e instanceof ct},e.isObservable=pt,e.isObservableArray=kt,e.isObservableMap=Ut,e.isObservableObject=Ft,e.isObservableProp=function(e,t){return"string"!=typeof t?f(!1):ht(e,t)},e.isObservableSet=Kt,e.keys=dt,e.observable=W,e.observe=function(e,t,n,r){return"function"==typeof n?function(e,t,n,r){return Qt(e,t).observe(n,r)}(e,t,n,r):function(e,t,n){return Qt(e).observe(t,n)}(e,t,n)},e.onBecomeObserved=Ze,e.onBecomeUnobserved=et,e.onReactionError=function(e){return Ce.globalReactionErrorHandlers.push(e),function(){var t=Ce.globalReactionErrorHandlers.indexOf(e);t>=0&&Ce.globalReactionErrorHandlers.splice(t,1)}},e.reaction=function(e,t,n){void 0===n&&(n=c);var r,i,o,a=n.name||"Reaction@"+l(),s=Xe(a,n.onError?(r=n.onError,i=t,function(){try{return i.apply(this,arguments)}catch(e){r.call(this,e)}}):t),u=!n.scheduler&&!n.delay,f=Qe(n),h=!0,p=!1,d=n.compareStructural?j.structural:n.equals||j.default,v=new Be(a,function(){h||u?y():p||(p=!0,f(y))},n.onError,n.requiresObservable);function y(){if(p=!1,!v.isDisposed){var t=!1;v.track(function(){var n=e(v);t=h||!d(o,n),o=n}),h&&n.fireImmediately&&s(o,v),h||!0!==t||s(o,v),h&&(h=!1)}}return v.schedule(),v.getDisposer()},e.remove=function(e,t){if(Ft(e))e[_].remove(t);else if(Ut(e))e.delete(t);else if(Kt(e))e.delete(t);else{if(!kt(e))return f(!1);"number"!=typeof t&&(t=parseInt(t,10)),h(t>=0,"Not a valid index: '"+t+"'"),e.splice(t,1)}},e.runInAction=function(e,t){return de("string"==typeof e?e:e.name||"<unnamed action>","function"==typeof e?e:t,this,void 0)},e.set=vt,e.spy=He,e.toJS=function(e,t){var n;return"boolean"==typeof t&&(t={detectCycles:t}),t||(t=bt),t.detectCycles=void 0===t.detectCycles?!0===t.recurseEverything:!0===t.detectCycles,t.detectCycles&&(n=new Map),function e(t,n,r){if(!n.recurseEverything&&!pt(t))return t;if("object"!=typeof t)return t;if(null===t)return null;if(t instanceof Date)return t;if(we(t))return e(t.get(),n,r);if(pt(t)&&dt(t),!0===n.detectCycles&&null!==t&&r.has(t))return r.get(t);if(kt(t)||Array.isArray(t)){var i=gt(r,t,[],n),o=t.map(function(t){return e(t,n,r)});i.length=o.length;for(var a=0,s=o.length;a<s;a++)i[a]=o[a];return i}if(Kt(t)||Object.getPrototypeOf(t)===Set.prototype){if(!1===n.exportMapsAsObjects){var u=gt(r,t,new Set,n);return t.forEach(function(t){u.add(e(t,n,r))}),u}var c=gt(r,t,[],n);return t.forEach(function(t){c.push(e(t,n,r))}),c}if(Ut(t)||Object.getPrototypeOf(t)===Map.prototype){if(!1===n.exportMapsAsObjects){var l=gt(r,t,new Map,n);return t.forEach(function(t,i){l.set(i,e(t,n,r))}),l}var f=gt(r,t,{},n);return t.forEach(function(t,i){f[i]=e(t,n,r)}),f}var h=gt(r,t,{},n);return O(t).forEach(function(i){h[i]=e(t[i],n,r)}),h}(e,t,n)},e.trace=mt,e.transaction=wt,e.untracked=oe,e.values=function(e){return Ft(e)?dt(e).map(function(t){return e[t]}):Ut(e)?dt(e).map(function(t){return e.get(t)}):Kt(e)?Array.from(e.values()):kt(e)?e.slice():f(!1)},e.when=function(e,t,n){return 1===arguments.length||t&&"object"==typeof t?function(e,t){var n,i=new Promise(function(i,o){var a=Ot(e,i,r(r({},t),{onError:o}));n=function(){a(),o("WHEN_CANCELLED")}});return i.cancel=n,i}(e,t):Ot(e,t,n||{})},Object.defineProperty(e,"__esModule",{value:!0})});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).mobx={})}(this,function(e){"use strict";var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,n)};var n=function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function r(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function i(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e}var a="An invariant failed, however the error is obfuscated because this is a production build.",s=[];Object.freeze(s);var u={};function c(){return++Ce.mobxGuid}function l(e){throw f(!1,e),"X"}function f(e,t){if(!e)throw new Error("[mobx] "+(t||a))}Object.freeze(u);function h(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var p=function(){};function d(e){return null!==e&&"object"==typeof e}function v(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function y(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function b(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return d(e)&&!0===e[n]}}function g(e){return e instanceof Map}function m(e){return e instanceof Set}function w(e){var t=new Set;for(var n in e)t.add(n);return Object.getOwnPropertySymbols(e).forEach(function(n){Object.getOwnPropertyDescriptor(e,n).enumerable&&t.add(n)}),Array.from(t)}function O(e){return e&&e.toString?e.toString():new String(e).toString()}function S(e){return null===e?null:"object"==typeof e?""+e:e}var A=Symbol("mobx administration"),_=function(){function t(t){void 0===t&&(t="Atom@"+c()),this.name=t,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=e.IDerivationState.NOT_TRACKING}return t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},t.prototype.reportObserved=function(){return Ve(this)},t.prototype.reportChanged=function(){Pe(),function(t){if(t.lowestObserverState===e.IDerivationState.STALE)return;t.lowestObserverState=e.IDerivationState.STALE,t.observers.forEach(function(n){n.dependenciesState===e.IDerivationState.UP_TO_DATE&&(n.isTracing!==X.NONE&&ke(n,t),n.onBecomeStale()),n.dependenciesState=e.IDerivationState.STALE})}(this),Ne()},t.prototype.toString=function(){return this.name},t}(),E=b("Atom",_);function x(e,t,n){void 0===t&&(t=p),void 0===n&&(n=p);var r=new _(e);return t!==p&&Ze(r,t),n!==p&&et(r,n),r}var D={identity:function(e,t){return e===t},structural:function(e,t){return tn(e,t)},default:function(e,t){return Object.is(e,t)},shallow:function(e,t){return tn(e,t,1)}},j=Symbol("mobx did run lazy initializers"),C=Symbol("mobx pending decorators"),R={},T={};function I(e){var t,n;if(!0!==e[j]){var o=e[C];if(o){y(e,j,!0);var a=i(Object.getOwnPropertySymbols(o),Object.keys(o));try{for(var s=r(a),u=s.next();!u.done;u=s.next()){var c=o[u.value];c.propertyCreator(e,c.prop,c.descriptor,c.decoratorTarget,c.decoratorArguments)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}}}}function P(e,t){return function(){var r,o,i=function(o,i,a,s){if(!0===s)return t(o,i,a,o,r),null;if(!Object.prototype.hasOwnProperty.call(o,C)){var u=o[C];y(o,C,n({},u))}return o[C][i]={prop:i,propertyCreator:t,descriptor:a,decoratorTarget:o,decoratorArguments:r},function(e,t){var n=t?R:T;return n[e]||(n[e]={configurable:!0,enumerable:t,get:function(){return I(this),this[e]},set:function(t){I(this),this[e]=t}})}(i,e)};return(2===(o=arguments).length||3===o.length)&&("string"==typeof o[1]||"symbol"==typeof o[1])||4===o.length&&!0===o[3]?(r=s,i.apply(null,arguments)):(r=Array.prototype.slice.call(arguments),i)}}function N(e,t,n){return pt(e)?e:Array.isArray(e)?H.array(e,{name:n}):v(e)?H.object(e,void 0,{name:n}):g(e)?H.map(e,{name:n}):m(e)?H.set(e,{name:n}):e}function V(e){return e}function k(e){f(e);var t=P(!0,function(t,n,r,o,i){var a=r?r.initializer?r.initializer.call(t):r.value:void 0;Ht(t).addObservableProp(n,a,e)}),n=("undefined"!=typeof process&&process.env,t);return n.enhancer=e,n}var B={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function L(e){return null==e?B:"string"==typeof e?{name:e,deep:!0,proxy:!0}:e}Object.freeze(B);var M=k(N),U=k(function(e,t,n){return null==e?e:Ft(e)||kt(e)||Ut(e)||Kt(e)?e:Array.isArray(e)?H.array(e,{name:n,deep:!1}):v(e)?H.object(e,void 0,{name:n,deep:!1}):g(e)?H.map(e,{name:n,deep:!1}):m(e)?H.set(e,{name:n,deep:!1}):l(!1)}),G=k(V),q=k(function(e,t,n){return tn(e,t)?t:e});function K(e){return e.defaultDecorator?e.defaultDecorator.enhancer:!1===e.deep?V:N}var z={box:function(e,t){arguments.length>2&&W("box");var n=L(t);return new me(e,K(n),n.name,!0,n.equals)},array:function(e,t){arguments.length>2&&W("array");var n=L(t);return function(e,t,n,r){void 0===n&&(n="ObservableArray@"+c());void 0===r&&(r=!1);var o=new It(n,t,r);i=o.values,a=A,s=o,Object.defineProperty(i,a,{enumerable:!1,writable:!1,configurable:!0,value:s});var i,a,s;var u=new Proxy(o.values,Tt);if(o.proxy=u,e&&e.length){var l=be(!0);o.spliceWithArray(0,0,e),ge(l)}return u}(e,K(n),n.name)},map:function(e,t){arguments.length>2&&W("map");var n=L(t);return new Mt(e,K(n),n.name)},set:function(e,t){arguments.length>2&&W("set");var n=L(t);return new qt(e,K(n),n.name)},object:function(e,t,n){"string"==typeof arguments[1]&&W("object");var r=L(n);if(!1===r.proxy)return nt({},e,t,r);var o=rt(r),i=function(e){var t=new Proxy(e,_t);return e[A].proxy=t,t}(nt({},void 0,void 0,r));return ot(i,e,t,o),i},ref:G,shallow:U,deep:M,struct:q},H=function(e,t,n){if("string"==typeof arguments[1]||"symbol"==typeof arguments[1])return M.apply(null,arguments);if(pt(e))return e;var r=v(e)?H.object(e,t,n):Array.isArray(e)?H.array(e,t):g(e)?H.map(e,t):m(e)?H.set(e,t):e;if(r!==e)return r;l(!1)};function W(e){l("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}Object.keys(z).forEach(function(e){return H[e]=z[e]});var J,X,Y=P(!1,function(e,t,r,o,i){var a=r.get,s=r.set,u=i[0]||{};Ht(e).addComputedProp(e,t,n({get:a,set:s,context:e},u))}),F=Y({equals:D.structural}),$=function(e,t,n){if("string"==typeof t)return Y.apply(null,arguments);if(null!==e&&"object"==typeof e&&1===arguments.length)return Y.apply(null,arguments);var r="object"==typeof t?t:{};return r.get=e,r.set="function"==typeof t?t:r.set,r.name=r.name||e.name||"",new Oe(r)};$.struct=F,(J=e.IDerivationState||(e.IDerivationState={}))[J.NOT_TRACKING=-1]="NOT_TRACKING",J[J.UP_TO_DATE=0]="UP_TO_DATE",J[J.POSSIBLY_STALE=1]="POSSIBLY_STALE",J[J.STALE=2]="STALE",function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(X||(X={}));var Q=function(){return function(e){this.cause=e}}();function Z(e){return e instanceof Q}function ee(t){switch(t.dependenciesState){case e.IDerivationState.UP_TO_DATE:return!1;case e.IDerivationState.NOT_TRACKING:case e.IDerivationState.STALE:return!0;case e.IDerivationState.POSSIBLY_STALE:for(var n=se(!0),r=ie(),o=t.observing,i=o.length,a=0;a<i;a++){var s=o[a];if(Se(s)){if(Ce.disableErrorBoundaries)s.get();else try{s.get()}catch(e){return ae(r),ue(n),!0}if(t.dependenciesState===e.IDerivationState.STALE)return ae(r),ue(n),!0}}return ce(t),ae(r),ue(n),!1}}function te(e){var t=e.observers.size>0;Ce.computationDepth>0&&t&&l(!1),Ce.allowStateChanges||!t&&"strict"!==Ce.enforceActions||l(!1)}function ne(t,n,r){var o=se(!0);ce(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++Ce.runId;var i,a=Ce.trackingDerivation;if(Ce.trackingDerivation=t,!0===Ce.disableErrorBoundaries)i=n.call(r);else try{i=n.call(r)}catch(e){i=new Q(e)}return Ce.trackingDerivation=a,function(t){for(var n=t.observing,r=t.observing=t.newObserving,o=e.IDerivationState.UP_TO_DATE,i=0,a=t.unboundDepsCount,s=0;s<a;s++){var u=r[s];0===u.diffValue&&(u.diffValue=1,i!==s&&(r[i]=u),i++),u.dependenciesState>o&&(o=u.dependenciesState)}r.length=i,t.newObserving=null,a=n.length;for(;a--;){var u=n[a];0===u.diffValue&&Te(u,t),u.diffValue=0}for(;i--;){var u=r[i];1===u.diffValue&&(u.diffValue=0,Re(u,t))}o!==e.IDerivationState.UP_TO_DATE&&(t.dependenciesState=o,t.onBecomeStale())}(t),ue(o),i}function re(t){var n=t.observing;t.observing=[];for(var r=n.length;r--;)Te(n[r],t);t.dependenciesState=e.IDerivationState.NOT_TRACKING}function oe(e){var t=ie();try{return e()}finally{ae(t)}}function ie(){var e=Ce.trackingDerivation;return Ce.trackingDerivation=null,e}function ae(e){Ce.trackingDerivation=e}function se(e){var t=Ce.allowStateReads;return Ce.allowStateReads=e,t}function ue(e){Ce.allowStateReads=e}function ce(t){if(t.dependenciesState!==e.IDerivationState.UP_TO_DATE){t.dependenciesState=e.IDerivationState.UP_TO_DATE;for(var n=t.observing,r=n.length;r--;)n[r].lowestObserverState=e.IDerivationState.UP_TO_DATE}}var le=0,fe=1,he=Object.getOwnPropertyDescriptor(function(){},"name");he&&he.configurable;function pe(e,t,n){var r=function(){return de(e,t,n||this,arguments)};return r.isMobxAction=!0,r}function de(e,t,n,r){var o=ve(e,n,r);try{return t.apply(n,r)}catch(e){throw o.error=e,e}finally{ye(o)}}function ve(e,t,n){var r=ze(),o=ie();Pe();var i={prevDerivation:o,prevAllowStateChanges:be(!0),prevAllowStateReads:se(!0),notifySpy:r,startTime:0,actionId:fe++,parentActionId:le};return le=i.actionId,i}function ye(e){le!==e.actionId&&l("invalid action stack. did you forget to finish an action?"),le=e.parentActionId,void 0!==e.error&&(Ce.suppressReactionErrors=!0),ge(e.prevAllowStateChanges),ue(e.prevAllowStateReads),Ne(),ae(e.prevDerivation),e.notifySpy,Ce.suppressReactionErrors=!1}function be(e){var t=Ce.allowStateChanges;return Ce.allowStateChanges=e,t}function ge(e){Ce.allowStateChanges=e}var me=function(e){function n(t,n,r,o,i){void 0===r&&(r="ObservableValue@"+c()),void 0===o&&(o=!0),void 0===i&&(i=D.default);var a=e.call(this,r)||this;return a.enhancer=n,a.name=r,a.equals=i,a.hasUnreportedChange=!1,a.value=n(t,void 0,r),o&&ze(),a}return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,e),n.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},n.prototype.set=function(e){this.value;if((e=this.prepareNewValue(e))!==Ce.UNCHANGED){ze();0,this.setNewValue(e)}},n.prototype.prepareNewValue=function(e){if(te(this),Et(this)){var t=Dt(this,{object:this,type:"update",newValue:e});if(!t)return Ce.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.equals(this.value,e)?Ce.UNCHANGED:e},n.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),jt(this)&&Rt(this,{type:"update",object:this,newValue:e,oldValue:t})},n.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},n.prototype.intercept=function(e){return xt(this,e)},n.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),Ct(this,e)},n.prototype.toJSON=function(){return this.get()},n.prototype.toString=function(){return this.name+"["+this.value+"]"},n.prototype.valueOf=function(){return S(this.get())},n.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},n}(_),we=b("ObservableValue",me),Oe=function(){function t(t){this.dependenciesState=e.IDerivationState.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=e.IDerivationState.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+c(),this.value=new Q(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=X.NONE,f(t.get,"missing option for computed: get"),this.derivation=t.get,this.name=t.name||"ComputedValue@"+c(),t.set&&(this.setter=pe(this.name+"-setter",t.set)),this.equals=t.equals||(t.compareStructural||t.struct?D.structural:D.default),this.scope=t.context,this.requiresReaction=!!t.requiresReaction,this.keepAlive=!!t.keepAlive}return t.prototype.onBecomeStale=function(){!function(t){if(t.lowestObserverState!==e.IDerivationState.UP_TO_DATE)return;t.lowestObserverState=e.IDerivationState.POSSIBLY_STALE,t.observers.forEach(function(n){n.dependenciesState===e.IDerivationState.UP_TO_DATE&&(n.dependenciesState=e.IDerivationState.POSSIBLY_STALE,n.isTracing!==X.NONE&&ke(n,t),n.onBecomeStale())})}(this)},t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},t.prototype.get=function(){this.isComputing&&l("Cycle detected in computation "+this.name+": "+this.derivation),0!==Ce.inBatch||0!==this.observers.size||this.keepAlive?(Ve(this),ee(this)&&this.trackAndCompute()&&function(t){if(t.lowestObserverState===e.IDerivationState.STALE)return;t.lowestObserverState=e.IDerivationState.STALE,t.observers.forEach(function(n){n.dependenciesState===e.IDerivationState.POSSIBLY_STALE?n.dependenciesState=e.IDerivationState.STALE:n.dependenciesState===e.IDerivationState.UP_TO_DATE&&(t.lowestObserverState=e.IDerivationState.UP_TO_DATE)})}(this)):ee(this)&&(this.warnAboutUntrackedRead(),Pe(),this.value=this.computeValue(!1),Ne());var t=this.value;if(Z(t))throw t.cause;return t},t.prototype.peek=function(){var e=this.computeValue(!1);if(Z(e))throw e.cause;return e},t.prototype.set=function(e){if(this.setter){f(!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 f(!1,!1)},t.prototype.trackAndCompute=function(){var t=this.value,n=this.dependenciesState===e.IDerivationState.NOT_TRACKING,r=this.computeValue(!0),o=n||Z(t)||Z(r)||!this.equals(t,r);return o&&(this.value=r),o},t.prototype.computeValue=function(e){var t;if(this.isComputing=!0,Ce.computationDepth++,e)t=ne(this,this.derivation,this.scope);else if(!0===Ce.disableErrorBoundaries)t=this.derivation.call(this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new Q(e)}return Ce.computationDepth--,this.isComputing=!1,t},t.prototype.suspend=function(){this.keepAlive||(re(this),this.value=void 0)},t.prototype.observe=function(e,t){var n=this,r=!0,o=void 0;return Fe(function(){var i=n.get();if(!r||t){var a=ie();e({type:"update",object:n,newValue:i,oldValue:o}),ae(a)}r=!1,o=i})},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return S(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(),Se=b("ComputedValue",Oe),Ae=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED"],_e=function(){return function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}}(),Ee={};function xe(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:Ee}var De=!0,je=!1,Ce=function(){var e=xe();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(De=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new _e).version&&(De=!1),De?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new _e):(setTimeout(function(){je||l("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new _e)}();function Re(e,t){e.observers.add(t),e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function Te(e,t){e.observers.delete(t),0===e.observers.size&&Ie(e)}function Ie(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,Ce.pendingUnobservations.push(e))}function Pe(){Ce.inBatch++}function Ne(){if(0==--Ce.inBatch){Ue();for(var e=Ce.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers.size&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof Oe&&n.suspend())}Ce.pendingUnobservations=[]}}function Ve(e){var t=Ce.trackingDerivation;return null!==t?(t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e,e.isBeingObserved||(e.isBeingObserved=!0,e.onBecomeObserved())),!0):(0===e.observers.size&&Ce.inBatch>0&&Ie(e),!1)}function ke(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===X.BREAK){var n=[];!function e(t,n,r){if(n.length>=1e3)return void n.push("(and many more)");n.push(""+new Array(r).join("\t")+t.name);t.dependencies&&t.dependencies.forEach(function(t){return e(t,n,r+1)})}(it(e),n,1),new Function("debugger;\n/*\nTracing '"+e.name+"'\n\nYou are entering this break point because derivation '"+e.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof Oe?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}var Be=function(){function t(t,n,r,o){void 0===t&&(t="Reaction@"+c()),void 0===o&&(o=!1),this.name=t,this.onInvalidate=n,this.errorHandler=r,this.requiresObservable=o,this.observing=[],this.newObserving=[],this.dependenciesState=e.IDerivationState.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+c(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=X.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Ce.pendingReactions.push(this),Ue())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(Pe(),this._isScheduled=!1,ee(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&ze()}catch(e){this.reportExceptionInDerivation(e)}}Ne()}},t.prototype.track=function(e){if(!this.isDisposed){Pe(),this._isRunning=!0;var t=ne(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&re(this),Z(t)&&this.reportExceptionInDerivation(t.cause),Ne()}},t.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{if(Ce.disableErrorBoundaries)throw e;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";Ce.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,e),Ce.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Pe(),re(this),Ne()))},t.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e[A]=this,e},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(e){void 0===e&&(e=!1),mt(this,e)},t}();var Le=100,Me=function(e){return e()};function Ue(){Ce.inBatch>0||Ce.isRunningReactions||Me(Ge)}function Ge(){Ce.isRunningReactions=!0;for(var e=Ce.pendingReactions,t=0;e.length>0;){++t===Le&&(console.error("Reaction doesn't converge to a stable state after "+Le+" iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,o=n.length;r<o;r++)n[r].runReaction()}Ce.isRunningReactions=!1}var qe=b("Reaction",Be);function Ke(e){var t=Me;Me=function(n){return e(function(){return t(n)})}}function ze(){return!1}function He(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function We(){l(!1)}function Je(e){return function(t,n,r){if(r){if(r.value)return{value:pe(e,r.value),enumerable:!1,configurable:!0,writable:!0};var o=r.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return pe(e,o.call(this))}}}return function(e){return function(t,n,r){Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:function(){},set:function(t){y(this,n,Xe(e,t))}})}}(e).apply(this,arguments)}}var Xe=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?pe(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?pe(e,t):1===arguments.length&&"string"==typeof e?Je(e):!0!==r?Je(t).apply(null,arguments):void y(e,t,pe(e.name||t,n.value,this))};function Ye(e,t,n){y(e,t,pe(t,n.bind(e)))}function Fe(e,t){void 0===t&&(t=u);var n,r=t&&t.name||e.name||"Autorun@"+c();if(!t.scheduler&&!t.delay)n=new Be(r,function(){this.track(a)},t.onError,t.requiresObservable);else{var o=Qe(t),i=!1;n=new Be(r,function(){i||(i=!0,o(function(){i=!1,n.isDisposed||n.track(a)}))},t.onError,t.requiresObservable)}function a(){e(n)}return n.schedule(),n.getDisposer()}Xe.bound=function(e,t,n,r){return!0===r?(Ye(e,t,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return Ye(this,t,n.value||n.initializer.call(this)),this[t]},set:We}:{enumerable:!1,configurable:!0,set:function(e){Ye(this,t,e)},get:function(){}}};var $e=function(e){return e()};function Qe(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:$e}function Ze(e,t,n){return tt("onBecomeObserved",e,t,n)}function et(e,t,n){return tt("onBecomeUnobserved",e,t,n)}function tt(e,t,n,r){var o="function"==typeof r?$t(t,n):$t(t),i="function"==typeof r?r:n,a=e+"Listeners";return o[a]?o[a].add(i):o[a]=new Set([i]),"function"!=typeof o[e]?l(!1):function(){var e=o[a];e&&(e.delete(i),0===e.size&&delete o[a])}}function nt(e,t,n,r){var o=rt(r=L(r));return I(e),Ht(e,r.name,o.enhancer),t&&ot(e,t,n,o),e}function rt(e){return e.defaultDecorator||(!1===e.deep?G:M)}function ot(e,t,n,o){var i,a;Pe();try{var s=w(t);try{for(var u=r(s),c=u.next();!c.done;c=u.next()){var l=c.value,f=Object.getOwnPropertyDescriptor(t,l),h=(n&&l in n?n[l]:f.get?Y:o)(e,l,f,!0);h&&Object.defineProperty(e,l,h)}}catch(e){i={error:e}}finally{try{c&&!c.done&&(a=u.return)&&a.call(u)}finally{if(i)throw i.error}}}finally{Ne()}}function it(e,t){return at($t(e,t))}function at(e){var t,n,r={name:e.name};return e.observing&&e.observing.length>0&&(r.dependencies=(t=e.observing,n=[],t.forEach(function(e){-1===n.indexOf(e)&&n.push(e)}),n).map(at)),r}function st(e){var t,n={name:e.name};return(t=e).observers&&t.observers.size>0&&(n.observers=Array.from(function(e){return e.observers}(e)).map(st)),n}var ut=0;function ct(){this.message="FLOW_CANCELLED"}function lt(e){"function"==typeof e.cancel&&e.cancel()}function ft(e,t){if(null==e)return!1;if(void 0!==t){if(!1===Ft(e))return!1;if(!e[A].values.has(t))return!1;var n=$t(e,t);return Se(n)}return Se(e)}function ht(e,t){return null!=e&&(void 0!==t?!!Ft(e)&&e[A].values.has(t):Ft(e)||!!e[A]||E(e)||qe(e)||Se(e))}function pt(e){return 1!==arguments.length&&l(!1),ht(e)}function dt(e){return Ft(e)?e[A].getKeys():Ut(e)?Array.from(e.keys()):Kt(e)?Array.from(e.keys()):kt(e)?e.map(function(e,t){return t}):l(!1)}function vt(e,t,n){if(2!==arguments.length||Kt(e))if(Ft(e)){var r=e[A];r.values.get(t)?r.write(t,n):r.addObservableProp(t,n,r.defaultEnhancer)}else if(Ut(e))e.set(t,n);else if(Kt(e))e.add(t);else{if(!kt(e))return l(!1);"number"!=typeof t&&(t=parseInt(t,10)),f(t>=0,"Not a valid index: '"+t+"'"),Pe(),t>=e.length&&(e.length=t+1),e[t]=n,Ne()}else{Pe();var o=t;try{for(var i in o)vt(e,i,o[i])}finally{Ne()}}}function yt(e,t){return Ft(e)?Qt(e).has(t):Ut(e)?e.has(t):Kt(e)?e.has(t):kt(e)?t>=0&&t<e.length:l(!1)}ct.prototype=Object.create(Error.prototype);var bt={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function gt(e,t,n,r){return r.detectCycles&&e.set(t,n),n}function mt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!1;"boolean"==typeof e[e.length-1]&&(n=e.pop());var r=function(e){switch(e.length){case 0:return Ce.trackingDerivation;case 1:return $t(e[0]);case 2:return $t(e[0],e[1])}}(e);if(!r)return l(!1);r.isTracing===X.NONE&&console.log("[mobx.trace] '"+r.name+"' tracing enabled"),r.isTracing=n?X.BREAK:X.LOG}function wt(e,t){void 0===t&&(t=void 0),Pe();try{return e.apply(t)}finally{Ne()}}function Ot(e,t,n){var r;"number"==typeof n.timeout&&(r=setTimeout(function(){if(!i[A].isDisposed){i();var e=new Error("WHEN_TIMEOUT");if(!n.onError)throw e;n.onError(e)}},n.timeout)),n.name=n.name||"When@"+c();var o=pe(n.name+"-effect",t),i=Fe(function(t){e()&&(t.dispose(),r&&clearTimeout(r),o())},n);return i}function St(e){return e[A]}function At(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e}var _t={has:function(e,t){if(t===A||"constructor"===t||t===j)return!0;var n=St(e);return At(t)?n.has(t):t in e},get:function(e,t){if(t===A||"constructor"===t||t===j)return e[t];var n=St(e),r=n.values.get(t);if(r instanceof _){var o=r.get();return void 0===o&&n.has(t),o}return At(t)&&n.has(t),e[t]},set:function(e,t,n){return!!At(t)&&(vt(e,t,n),!0)},deleteProperty:function(e,t){return!!At(t)&&(St(e).remove(t),!0)},ownKeys:function(e){return St(e).keysAtom.reportObserved(),Reflect.ownKeys(e)},preventExtensions:function(e){return l("Dynamic observable objects cannot be frozen"),!1}};function Et(e){return void 0!==e.interceptors&&e.interceptors.length>0}function xt(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),h(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Dt(e,t){var n=ie();try{for(var r=i(e.interceptors||[]),o=0,a=r.length;o<a&&(f(!(t=r[o](t))||t.type,"Intercept handlers should return nothing or a change object"),t);o++);return t}finally{ae(n)}}function jt(e){return void 0!==e.changeListeners&&e.changeListeners.length>0}function Ct(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),h(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Rt(e,t){var n=ie(),r=e.changeListeners;if(r){for(var o=0,i=(r=r.slice()).length;o<i;o++)r[o](t);ae(n)}}var Tt={get:function(e,t){return t===A?e[A]:"length"===t?e[A].getArrayLength():"number"==typeof t?Pt.get.call(e,t):"string"!=typeof t||isNaN(t)?Pt.hasOwnProperty(t)?Pt[t]:e[t]:Pt.get.call(e,parseInt(t))},set:function(e,t,n){return"length"===t&&e[A].setArrayLength(n),"number"==typeof t&&Pt.set.call(e,t,n),"symbol"==typeof t||isNaN(t)?e[t]=n:Pt.set.call(e,parseInt(t),n),!0},preventExtensions:function(e){return l("Observable arrays cannot be frozen"),!1}};var It=function(){function e(e,t,n){this.owned=n,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new _(e||"ObservableArray@"+c()),this.enhancer=function(n,r){return t(n,r,e+"[..]")}}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.dehanceValues=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},e.prototype.intercept=function(e){return xt(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Ct(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray(t,0,n)}else this.spliceWithArray(e,t-e)},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=t},e.prototype.spliceWithArray=function(e,t,n){var r=this;te(this.atom);var o=this.values.length;if(void 0===e?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),t=1===arguments.length?o-e:null==t?0:Math.max(0,Math.min(t,o-e)),void 0===n&&(n=s),Et(this)){var i=Dt(this,{object:this.proxy,type:"splice",index:e,removedCount:t,added:n});if(!i)return s;t=i.removedCount,n=i.added}n=0===n.length?n:n.map(function(e){return r.enhancer(e,void 0)});var a=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,a),this.dehanceValues(a)},e.prototype.spliceItemsIntoValues=function(e,t,n){var r;if(n.length<1e4)return(r=this.values).splice.apply(r,i([e,t],n));var o=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(n,this.values.slice(e+t)),o},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&!1,o=jt(this),i=o||r?{object:this.proxy,type:"update",index:e,newValue:t,oldValue:n}:null;this.atom.reportChanged(),o&&Rt(this,i)},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&!1,o=jt(this),i=o||r?{object:this.proxy,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;this.atom.reportChanged(),o&&Rt(this,i)},e}(),Pt={intercept:function(e){return this[A].intercept(e)},observe:function(e,t){return void 0===t&&(t=!1),this[A].observe(e,t)},clear:function(){return this.splice(0)},replace:function(e){var t=this[A];return t.spliceWithArray(0,t.values.length,e)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=this[A];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray(e);case 2:return o.spliceWithArray(e,t)}return o.spliceWithArray(e,t,n)},spliceWithArray:function(e,t,n){return this[A].spliceWithArray(e,t,n)},push:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this[A];return n.spliceWithArray(n.values.length,0,e),n.values.length},pop:function(){return this.splice(Math.max(this[A].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this[A];return n.spliceWithArray(0,0,e),n.values.length},reverse:function(){var e=this.slice();return e.reverse.apply(e,arguments)},sort:function(e){var t=this.slice();return t.sort.apply(t,arguments)},remove:function(e){var t=this[A],n=t.dehanceValues(t.values).indexOf(e);return n>-1&&(this.splice(n,1),!0)},get:function(e){var t=this[A];if(t){if(e<t.values.length)return t.atom.reportObserved(),t.dehanceValue(t.values[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},set:function(e,t){var n=this[A],r=n.values;if(e<r.length){te(n.atom);var o=r[e];if(Et(n)){var i=Dt(n,{type:"update",object:n.proxy,index:e,newValue:t});if(!i)return;t=i.newValue}(t=n.enhancer(t,o))!==o&&(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])}}};["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach(function(e){Pt[e]=function(){var t=this[A];t.atom.reportObserved();var n=t.dehanceValues(t.values);return n[e].apply(n,arguments)}});var Nt,Vt=b("ObservableArrayAdministration",It);function kt(e){return d(e)&&Vt(e[A])}var Bt,Lt={},Mt=function(){function e(e,t,n){if(void 0===t&&(t=N),void 0===n&&(n="ObservableMap@"+c()),this.enhancer=t,this.name=n,this[Nt]=Lt,this._keysAtom=x(this.name+".keys()"),this[Symbol.toStringTag]="Map","function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(e)}return e.prototype._has=function(e){return this._data.has(e)},e.prototype.has=function(e){var t=this;if(!Ce.trackingDerivation)return this._has(e);var n=this._hasMap.get(e);if(!n){var r=n=new me(this._has(e),V,this.name+"."+O(e)+"?",!1);this._hasMap.set(e,r),et(r,function(){return t._hasMap.delete(e)})}return n.get()},e.prototype.set=function(e,t){var n=this._has(e);if(Et(this)){var r=Dt(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this._updateValue(e,t):this._addValue(e,t),this},e.prototype.delete=function(e){var t=this;if(Et(this)&&!(r=Dt(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var n=jt(this),r=n?{type:"delete",object:this,oldValue:this._data.get(e).value,name:e}:null;return wt(function(){t._keysAtom.reportChanged(),t._updateHasMapEntry(e,!1),t._data.get(e).setNewValue(void 0),t._data.delete(e)}),n&&Rt(this,r),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap.get(e);n&&n.setNewValue(t)},e.prototype._updateValue=function(e,t){var n=this._data.get(e);if((t=n.prepareNewValue(t))!==Ce.UNCHANGED){var r=jt(this),o=r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;0,n.setNewValue(t),r&&Rt(this,o)}},e.prototype._addValue=function(e,t){var n=this;te(this._keysAtom),wt(function(){var r=new me(t,n.enhancer,n.name+"."+O(e),!1);n._data.set(e,r),t=r.value,n._updateHasMapEntry(e,!0),n._keysAtom.reportChanged()});var r=jt(this);r&&Rt(this,r?{type:"add",object:this,name:e,newValue:t}:null)},e.prototype.get=function(e){return this.has(e)?this.dehanceValue(this._data.get(e).get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},e.prototype.values=function(){var e=this,t=0,n=Array.from(this.keys());return on({next:function(){return t<n.length?{value:e.get(n[t++]),done:!1}:{done:!0}}})},e.prototype.entries=function(){var e=this,t=0,n=Array.from(this.keys());return on({next:function(){if(t<n.length){var r=n[t++];return{value:[r,e.get(r)],done:!1}}return{done:!0}}})},e.prototype[(Nt=A,Symbol.iterator)]=function(){return this.entries()},e.prototype.forEach=function(e,t){var n,i;try{for(var a=r(this),s=a.next();!s.done;s=a.next()){var u=o(s.value,2),c=u[0],l=u[1];e.call(t,l,c,this)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}},e.prototype.merge=function(e){var t=this;return Ut(e)&&(e=e.toJS()),wt(function(){v(e)?w(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=o(e,2),r=n[0],i=n[1];return t.set(r,i)}):g(e)?(e.constructor!==Map&&l("Cannot initialize from classes that inherit from Map: "+e.constructor.name),e.forEach(function(e,n){return t.set(n,e)})):null!=e&&l("Cannot initialize map from "+e)}),this},e.prototype.clear=function(){var e=this;wt(function(){oe(function(){var t,n;try{for(var o=r(e.keys()),i=o.next();!i.done;i=o.next()){var a=i.value;e.delete(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}})})},e.prototype.replace=function(e){var t=this;return wt(function(){var n,r=v(n=e)?Object.keys(n):Array.isArray(n)?n.map(function(e){return o(e,1)[0]}):g(n)||Ut(n)?Array.from(n.keys()):l("Cannot get keys from '"+n+"'");Array.from(t.keys()).filter(function(e){return-1===r.indexOf(e)}).forEach(function(e){return t.delete(e)}),t.merge(e)}),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.toPOJO=function(){var e,t,n={};try{for(var i=r(this),a=i.next();!a.done;a=i.next()){var s=o(a.value,2),u=s[0],c=s[1];n["symbol"==typeof u?u:O(u)]=c}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return n},e.prototype.toJS=function(){return new Map(this)},e.prototype.toJSON=function(){return this.toPOJO()},e.prototype.toString=function(){var e=this;return this.name+"[{ "+Array.from(this.keys()).map(function(t){return O(t)+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return Ct(this,e)},e.prototype.intercept=function(e){return xt(this,e)},e}(),Ut=b("ObservableMap",Mt),Gt={},qt=function(){function e(e,t,n){if(void 0===t&&(t=N),void 0===n&&(n="ObservableSet@"+c()),this.name=n,this[Bt]=Gt,this._data=new Set,this._atom=x(this.name),this[Symbol.toStringTag]="Set","function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(e,r){return t(e,r,n)},e&&this.replace(e)}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.clear=function(){var e=this;wt(function(){oe(function(){var t,n;try{for(var o=r(e._data.values()),i=o.next();!i.done;i=o.next()){var a=i.value;e.delete(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}})})},e.prototype.forEach=function(e,t){var n,o;try{for(var i=r(this),a=i.next();!a.done;a=i.next()){var s=a.value;e.call(t,s,s,this)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this;if((te(this._atom),Et(this))&&!(r=Dt(this,{type:"add",object:this,newValue:e})))return this;if(!this.has(e)){wt(function(){t._data.add(t.enhancer(e,void 0)),t._atom.reportChanged()});var n=jt(this),r=n?{type:"add",object:this,newValue:e}:null;0,n&&Rt(this,r)}return this},e.prototype.delete=function(e){var t=this;if(Et(this)&&!(r=Dt(this,{type:"delete",object:this,oldValue:e})))return!1;if(this.has(e)){var n=jt(this),r=n?{type:"delete",object:this,oldValue:e}:null;return wt(function(){t._atom.reportChanged(),t._data.delete(e)}),n&&Rt(this,r),!0}return!1},e.prototype.has=function(e){return this._atom.reportObserved(),this._data.has(this.dehanceValue(e))},e.prototype.entries=function(){var e=0,t=Array.from(this.keys()),n=Array.from(this.values());return on({next:function(){var r=e;return e+=1,r<n.length?{value:[t[r],n[r]],done:!1}:{done:!0}}})},e.prototype.keys=function(){return this.values()},e.prototype.values=function(){this._atom.reportObserved();var e=this,t=0,n=Array.from(this._data.values());return on({next:function(){return t<n.length?{value:e.dehanceValue(n[t++]),done:!1}:{done:!0}}})},e.prototype.replace=function(e){var t=this;return Kt(e)&&(e=e.toJS()),wt(function(){Array.isArray(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):m(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!=e&&l("Cannot initialize set from "+e)}),this},e.prototype.observe=function(e,t){return Ct(this,e)},e.prototype.intercept=function(e){return xt(this,e)},e.prototype.toJS=function(){return new Set(this)},e.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},e.prototype[(Bt=A,Symbol.iterator)]=function(){return this.values()},e}(),Kt=b("ObservableSet",qt),zt=function(){function e(e,t,n,r){void 0===t&&(t=new Map),this.target=e,this.values=t,this.name=n,this.defaultEnhancer=r,this.keysAtom=new _(n+".keys")}return e.prototype.read=function(e){return this.values.get(e).get()},e.prototype.write=function(e,t){var n=this.target,r=this.values.get(e);if(r instanceof Oe)r.set(t);else{if(Et(this)){if(!(i=Dt(this,{type:"update",object:this.proxy||n,name:e,newValue:t})))return;t=i.newValue}if((t=r.prepareNewValue(t))!==Ce.UNCHANGED){var o=jt(this),i=o?{type:"update",object:this.proxy||n,oldValue:r.value,name:e,newValue:t}:null;0,r.setNewValue(t),o&&Rt(this,i)}}},e.prototype.has=function(e){var t=this.pendingKeys||(this.pendingKeys=new Map),n=t.get(e);if(n)return n.get();var r=!!this.values.get(e);return n=new me(r,V,this.name+"."+O(e)+"?",!1),t.set(e,n),n.get()},e.prototype.addObservableProp=function(e,t,n){void 0===n&&(n=this.defaultEnhancer);var r=this.target;if(Et(this)){var o=Dt(this,{object:this.proxy||r,name:e,type:"add",newValue:t});if(!o)return;t=o.newValue}var i=new me(t,n,this.name+"."+O(e),!1);this.values.set(e,i),t=i.value,Object.defineProperty(r,e,function(e){return Wt[e]||(Wt[e]={configurable:!0,enumerable:!0,get:function(){return this[A].read(e)},set:function(t){this[A].write(e,t)}})}(e)),this.notifyPropertyAddition(e,t)},e.prototype.addComputedProp=function(e,t,n){var r,o,i,a=this.target;n.name=n.name||this.name+"."+O(t),this.values.set(t,new Oe(n)),(e===a||(r=e,o=t,!(i=Object.getOwnPropertyDescriptor(r,o))||!1!==i.configurable&&!1!==i.writable))&&Object.defineProperty(e,t,function(e){return Jt[e]||(Jt[e]={configurable:Ce.computedConfigurable,enumerable:!1,get:function(){return Xt(this).read(e)},set:function(t){Xt(this).write(e,t)}})}(t))},e.prototype.remove=function(e){if(this.values.has(e)){var t=this.target;if(Et(this))if(!(a=Dt(this,{object:this.proxy||t,name:e,type:"remove"})))return;try{Pe();var n=jt(this),r=this.values.get(e),o=r&&r.get();if(r&&r.set(void 0),this.keysAtom.reportChanged(),this.values.delete(e),this.pendingKeys){var i=this.pendingKeys.get(e);i&&i.set(!1)}delete this.target[e];var a=n?{type:"remove",object:this.proxy||t,oldValue:o,name:e}:null;0,n&&Rt(this,a)}finally{Ne()}}},e.prototype.illegalAccess=function(e,t){console.warn("Property '"+t+"' of '"+e+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},e.prototype.observe=function(e,t){return Ct(this,e)},e.prototype.intercept=function(e){return xt(this,e)},e.prototype.notifyPropertyAddition=function(e,t){var n=jt(this),r=n?{type:"add",object:this.proxy||this.target,name:e,newValue:t}:null;if(n&&Rt(this,r),this.pendingKeys){var o=this.pendingKeys.get(e);o&&o.set(!0)}this.keysAtom.reportChanged()},e.prototype.getKeys=function(){var e,t;this.keysAtom.reportObserved();var n=[];try{for(var i=r(this.values),a=i.next();!a.done;a=i.next()){var s=o(a.value,2),u=s[0];s[1]instanceof me&&n.push(u)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return n},e}();function Ht(e,t,n){if(void 0===t&&(t=""),void 0===n&&(n=N),Object.prototype.hasOwnProperty.call(e,A))return e[A];v(e)||(t=(e.constructor.name||"ObservableObject")+"@"+c()),t||(t="ObservableObject@"+c());var r=new zt(e,new Map,O(t),n);return y(e,A,r),r}var Wt=Object.create(null),Jt=Object.create(null);function Xt(e){var t=e[A];return t||(I(e),e[A])}var Yt=b("ObservableObjectAdministration",zt);function Ft(e){return!!d(e)&&(I(e),Yt(e[A]))}function $t(e,t){if("object"==typeof e&&null!==e){if(kt(e))return void 0!==t&&l(!1),e[A].atom;if(Kt(e))return e[A];if(Ut(e)){var n=e;return void 0===t?n._keysAtom:((r=n._data.get(t)||n._hasMap.get(t))||l(!1),r)}var r;if(I(e),t&&!e[A]&&e[t],Ft(e))return t?((r=e[A].values.get(t))||l(!1),r):l(!1);if(E(e)||Se(e)||qe(e))return e}else if("function"==typeof e&&qe(e[A]))return e[A];return l(!1)}function Qt(e,t){return e||l("Expecting some object"),void 0!==t?Qt($t(e,t)):E(e)||Se(e)||qe(e)?e:Ut(e)||Kt(e)?e:(I(e),e[A]?e[A]:void l(!1))}function Zt(e,t){return(void 0!==t?$t(e,t):Ft(e)||Ut(e)||Kt(e)?Qt(e):$t(e)).name}var en=Object.prototype.toString;function tn(e,t,n){return void 0===n&&(n=-1),function e(t,n,r,o,i){if(t===n)return 0!==t||1/t==1/n;if(null==t||null==n)return!1;if(t!=t)return n!=n;var a=typeof t;if("function"!==a&&"object"!==a&&"object"!=typeof n)return!1;var s=en.call(t);if(s!==en.call(n))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+t==""+n;case"[object Number]":return+t!=+t?+n!=+n:0==+t?1/+t==1/n:+t==+n;case"[object Date]":case"[object Boolean]":return+t==+n;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(t)===Symbol.valueOf.call(n);case"[object Map]":case"[object Set]":r>=0&&r++}t=nn(t);n=nn(n);var u="[object Array]"===s;if(!u){if("object"!=typeof t||"object"!=typeof n)return!1;var c=t.constructor,l=n.constructor;if(c!==l&&!("function"==typeof c&&c instanceof c&&"function"==typeof l&&l instanceof l)&&"constructor"in t&&"constructor"in n)return!1}if(0===r)return!1;r<0&&(r=-1);o=o||[];i=i||[];var f=o.length;for(;f--;)if(o[f]===t)return i[f]===n;o.push(t);i.push(n);if(u){if((f=t.length)!==n.length)return!1;for(;f--;)if(!e(t[f],n[f],r-1,o,i))return!1}else{var h=Object.keys(t),p=void 0;if(f=h.length,Object.keys(n).length!==f)return!1;for(;f--;)if(p=h[f],!rn(n,p)||!e(t[p],n[p],r-1,o,i))return!1}o.pop();i.pop();return!0}(e,t,n)}function nn(e){return kt(e)?e.slice():g(e)||Ut(e)?Array.from(e.entries()):m(e)||Kt(e)?Array.from(e.entries()):e}function rn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function on(e){return e[Symbol.iterator]=an,e}function an(){return this}if("undefined"==typeof Proxy||"undefined"==typeof Symbol)throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:He,extras:{getDebugName:Zt},$mobx:A}),e.$mobx=A,e.FlowCancellationError=ct,e.ObservableMap=Mt,e.ObservableSet=qt,e.Reaction=Be,e._allowStateChanges=function(e,t){var n,r=be(e);try{n=t()}finally{ge(r)}return n},e._allowStateChangesInsideComputed=function(e){var t,n=Ce.computationDepth;Ce.computationDepth=0;try{t=e()}finally{Ce.computationDepth=n}return t},e._allowStateReadsEnd=ue,e._allowStateReadsStart=se,e._endAction=ye,e._getAdministration=Qt,e._getGlobalState=function(){return Ce},e._interceptReads=function(e,t,n){var r;if(Ut(e)||kt(e)||we(e))r=Qt(e);else{if(!Ft(e))return l(!1);if("string"!=typeof t)return l(!1);r=Qt(e,t)}return void 0!==r.dehancer?l(!1):(r.dehancer="function"==typeof t?t:n,function(){r.dehancer=void 0})},e._isComputingDerivation=function(){return null!==Ce.trackingDerivation},e._resetGlobalState=function(){var e=new _e;for(var t in e)-1===Ae.indexOf(t)&&(Ce[t]=e[t]);Ce.allowStateChanges=!Ce.enforceActions},e._startAction=ve,e.action=Xe,e.autorun=Fe,e.comparer=D,e.computed=$,e.configure=function(e){var t=e.enforceActions,n=e.computedRequiresReaction,r=e.computedConfigurable,o=e.disableErrorBoundaries,i=e.reactionScheduler,a=e.reactionRequiresObservable,s=e.observableRequiresReaction;if(!0===e.isolateGlobalState&&((Ce.pendingReactions.length||Ce.inBatch||Ce.isRunningReactions)&&l("isolateGlobalState should be called before MobX is running any reactions"),je=!0,De&&(0==--xe().__mobxInstanceCount&&(xe().__mobxGlobals=void 0),Ce=new _e)),void 0!==t){var u=void 0;switch(t){case!0:case"observed":u=!0;break;case!1:case"never":u=!1;break;case"strict":case"always":u="strict";break;default:l("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}Ce.enforceActions=u,Ce.allowStateChanges=!0!==u&&"strict"!==u}void 0!==n&&(Ce.computedRequiresReaction=!!n),void 0!==a&&(Ce.reactionRequiresObservable=!!a),void 0!==s&&(Ce.observableRequiresReaction=!!s,Ce.allowStateReads=!Ce.observableRequiresReaction),void 0!==r&&(Ce.computedConfigurable=!!r),void 0!==o&&(!0===o&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),Ce.disableErrorBoundaries=!!o),i&&Ke(i)},e.createAtom=x,e.decorate=function(e,t){var n="function"==typeof e?e.prototype:e,r=function(e){var r=t[e];Array.isArray(r)||(r=[r]);var o=Object.getOwnPropertyDescriptor(n,e),i=r.reduce(function(t,r){return r(n,e,t)},o);i&&Object.defineProperty(n,e,i)};for(var o in t)r(o);return e},e.entries=function(e){return Ft(e)?dt(e).map(function(t){return[t,e[t]]}):Ut(e)?dt(e).map(function(t){return[t,e.get(t)]}):Kt(e)?Array.from(e.entries()):kt(e)?e.map(function(e,t){return[t,e]}):l(!1)},e.extendObservable=nt,e.flow=function(e){1!==arguments.length&&l("Flow expects 1 argument and cannot be used as decorator");var t=e.name||"<unnamed flow>";return function(){var n,r=arguments,o=++ut,i=Xe(t+" - runid: "+o+" - init",e).apply(this,r),a=void 0,s=new Promise(function(e,r){var s=0;function u(e){var n;a=void 0;try{n=Xe(t+" - runid: "+o+" - yield "+s++,i.next).call(i,e)}catch(e){return r(e)}l(n)}function c(e){var n;a=void 0;try{n=Xe(t+" - runid: "+o+" - yield "+s++,i.throw).call(i,e)}catch(e){return r(e)}l(n)}function l(t){if(!t||"function"!=typeof t.then)return t.done?e(t.value):(a=Promise.resolve(t.value)).then(u,c);t.then(l,r)}n=r,u(void 0)});return s.cancel=Xe(t+" - runid: "+o+" - cancel",function(){try{a&<(a);var e=i.return(void 0),t=Promise.resolve(e.value);t.then(p,p),lt(t),n(new ct)}catch(e){n(e)}}),s}},e.get=function(e,t){if(yt(e,t))return Ft(e)?e[t]:Ut(e)?e.get(t):kt(e)?e[t]:l(!1)},e.getAtom=$t,e.getDebugName=Zt,e.getDependencyTree=it,e.getObserverTree=function(e,t){return st($t(e,t))},e.has=yt,e.intercept=function(e,t,n){return"function"==typeof n?function(e,t,n){return Qt(e,t).intercept(n)}(e,t,n):function(e,t){return Qt(e).intercept(t)}(e,t)},e.isAction=function(e){return"function"==typeof e&&!0===e.isMobxAction},e.isArrayLike=function(e){return Array.isArray(e)||kt(e)},e.isBoxedObservable=we,e.isComputed=function(e){return arguments.length>1?l(!1):ft(e)},e.isComputedProp=function(e,t){return"string"!=typeof t?l(!1):ft(e,t)},e.isFlowCancellationError=function(e){return e instanceof ct},e.isObservable=pt,e.isObservableArray=kt,e.isObservableMap=Ut,e.isObservableObject=Ft,e.isObservableProp=function(e,t){return"string"!=typeof t?l(!1):ht(e,t)},e.isObservableSet=Kt,e.keys=dt,e.observable=H,e.observe=function(e,t,n,r){return"function"==typeof n?function(e,t,n,r){return Qt(e,t).observe(n,r)}(e,t,n,r):function(e,t,n){return Qt(e).observe(t,n)}(e,t,n)},e.onBecomeObserved=Ze,e.onBecomeUnobserved=et,e.onReactionError=function(e){return Ce.globalReactionErrorHandlers.push(e),function(){var t=Ce.globalReactionErrorHandlers.indexOf(e);t>=0&&Ce.globalReactionErrorHandlers.splice(t,1)}},e.reaction=function(e,t,n){void 0===n&&(n=u);var r,o,i,a=n.name||"Reaction@"+c(),s=Xe(a,n.onError?(r=n.onError,o=t,function(){try{return o.apply(this,arguments)}catch(e){r.call(this,e)}}):t),l=!n.scheduler&&!n.delay,f=Qe(n),h=!0,p=!1,d=n.compareStructural?D.structural:n.equals||D.default,v=new Be(a,function(){h||l?y():p||(p=!0,f(y))},n.onError,n.requiresObservable);function y(){if(p=!1,!v.isDisposed){var t=!1;v.track(function(){var n=e(v);t=h||!d(i,n),i=n}),h&&n.fireImmediately&&s(i,v),h||!0!==t||s(i,v),h&&(h=!1)}}return v.schedule(),v.getDisposer()},e.remove=function(e,t){if(Ft(e))e[A].remove(t);else if(Ut(e))e.delete(t);else if(Kt(e))e.delete(t);else{if(!kt(e))return l(!1);"number"!=typeof t&&(t=parseInt(t,10)),f(t>=0,"Not a valid index: '"+t+"'"),e.splice(t,1)}},e.runInAction=function(e,t){return de("string"==typeof e?e:e.name||"<unnamed action>","function"==typeof e?e:t,this,void 0)},e.set=vt,e.spy=He,e.toJS=function(e,t){var n;return"boolean"==typeof t&&(t={detectCycles:t}),t||(t=bt),t.detectCycles=void 0===t.detectCycles?!0===t.recurseEverything:!0===t.detectCycles,t.detectCycles&&(n=new Map),function e(t,n,r){if(!n.recurseEverything&&!pt(t))return t;if("object"!=typeof t)return t;if(null===t)return null;if(t instanceof Date)return t;if(we(t))return e(t.get(),n,r);if(pt(t)&&dt(t),!0===n.detectCycles&&null!==t&&r.has(t))return r.get(t);if(kt(t)||Array.isArray(t)){var o=gt(r,t,[],n),i=t.map(function(t){return e(t,n,r)});o.length=i.length;for(var a=0,s=i.length;a<s;a++)o[a]=i[a];return o}if(Kt(t)||Object.getPrototypeOf(t)===Set.prototype){if(!1===n.exportMapsAsObjects){var u=gt(r,t,new Set,n);return t.forEach(function(t){u.add(e(t,n,r))}),u}var c=gt(r,t,[],n);return t.forEach(function(t){c.push(e(t,n,r))}),c}if(Ut(t)||Object.getPrototypeOf(t)===Map.prototype){if(!1===n.exportMapsAsObjects){var l=gt(r,t,new Map,n);return t.forEach(function(t,o){l.set(o,e(t,n,r))}),l}var f=gt(r,t,{},n);return t.forEach(function(t,o){f[o]=e(t,n,r)}),f}var h=gt(r,t,{},n);return w(t).forEach(function(o){h[o]=e(t[o],n,r)}),h}(e,t,n)},e.trace=mt,e.transaction=wt,e.untracked=oe,e.values=function(e){return Ft(e)?dt(e).map(function(t){return e[t]}):Ut(e)?dt(e).map(function(t){return e.get(t)}):Kt(e)?Array.from(e.values()):kt(e)?e.slice():l(!1)},e.when=function(e,t,r){return 1===arguments.length||t&&"object"==typeof t?function(e,t){var r,o=new Promise(function(o,i){var a=Ot(e,o,n(n({},t),{onError:i}));r=function(){a(),i("WHEN_CANCELLED")}});return o.cancel=r,o}(e,t):Ot(e,t,r||{})},Object.defineProperty(e,"__esModule",{value:!0})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function createDynamicObservableObject(base: any): any;
|
|
1
|
+
export declare function createDynamicObservableObject(base: any): any;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Lambda } from "../internal";
|
|
2
|
-
export declare type IInterceptor<T> = (change: T) => T | null;
|
|
3
|
-
export interface IInterceptable<T> {
|
|
4
|
-
interceptors: IInterceptor<T>[] | undefined;
|
|
5
|
-
intercept(handler: IInterceptor<T>): Lambda;
|
|
6
|
-
}
|
|
7
|
-
export declare function hasInterceptors(interceptable: IInterceptable<any>): boolean;
|
|
8
|
-
export declare function registerInterceptor<T>(interceptable: IInterceptable<T>, handler: IInterceptor<T>): Lambda;
|
|
9
|
-
export declare function interceptChange<T>(interceptable: IInterceptable<T | null>, change: T | null): T | null;
|
|
1
|
+
import { Lambda } from "../internal";
|
|
2
|
+
export declare type IInterceptor<T> = (change: T) => T | null;
|
|
3
|
+
export interface IInterceptable<T> {
|
|
4
|
+
interceptors: IInterceptor<T>[] | undefined;
|
|
5
|
+
intercept(handler: IInterceptor<T>): Lambda;
|
|
6
|
+
}
|
|
7
|
+
export declare function hasInterceptors(interceptable: IInterceptable<any>): boolean;
|
|
8
|
+
export declare function registerInterceptor<T>(interceptable: IInterceptable<T>, handler: IInterceptor<T>): Lambda;
|
|
9
|
+
export declare function interceptChange<T>(interceptable: IInterceptable<T | null>, change: T | null): T | null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Lambda } from "../internal";
|
|
2
|
-
export interface IListenable {
|
|
3
|
-
changeListeners: Function[] | undefined;
|
|
4
|
-
observe(handler: (change: any, oldValue?: any) => void, fireImmediately?: boolean): Lambda;
|
|
5
|
-
}
|
|
6
|
-
export declare function hasListeners(listenable: IListenable): boolean;
|
|
7
|
-
export declare function registerListener(listenable: IListenable, handler: Function): Lambda;
|
|
8
|
-
export declare function notifyListeners<T>(listenable: IListenable, change: T): void;
|
|
1
|
+
import { Lambda } from "../internal";
|
|
2
|
+
export interface IListenable {
|
|
3
|
+
changeListeners: Function[] | undefined;
|
|
4
|
+
observe(handler: (change: any, oldValue?: any) => void, fireImmediately?: boolean): Lambda;
|
|
5
|
+
}
|
|
6
|
+
export declare function hasListeners(listenable: IListenable): boolean;
|
|
7
|
+
export declare function registerListener(listenable: IListenable, handler: Function): Lambda;
|
|
8
|
+
export declare function notifyListeners<T>(listenable: IListenable, change: T): void;
|
package/lib/types/modifiers.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export interface IEnhancer<T> {
|
|
2
|
-
(newValue: T, oldValue: T | undefined, name: string): T;
|
|
3
|
-
}
|
|
4
|
-
export declare function deepEnhancer(v: any, _: any, name: any): any;
|
|
5
|
-
export declare function shallowEnhancer(v: any, _: any, name: any): any;
|
|
6
|
-
export declare function referenceEnhancer(newValue?: any): any;
|
|
7
|
-
export declare function refStructEnhancer(v: any, oldValue: any, name: any): any;
|
|
1
|
+
export interface IEnhancer<T> {
|
|
2
|
+
(newValue: T, oldValue: T | undefined, name: string): T;
|
|
3
|
+
}
|
|
4
|
+
export declare function deepEnhancer(v: any, _: any, name: any): any;
|
|
5
|
+
export declare function shallowEnhancer(v: any, _: any, name: any): any;
|
|
6
|
+
export declare function referenceEnhancer(newValue?: any): any;
|
|
7
|
+
export declare function refStructEnhancer(v: any, oldValue: any, name: any): any;
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { IEnhancer, IInterceptor, Lambda } from "../internal";
|
|
2
|
-
export interface IObservableArray<T = any> extends Array<T> {
|
|
3
|
-
spliceWithArray(index: number, deleteCount?: number, newItems?: T[]): T[];
|
|
4
|
-
observe(listener: (changeData: IArrayChange<T> | IArraySplice<T>) => void, fireImmediately?: boolean): Lambda;
|
|
5
|
-
intercept(handler: IInterceptor<IArrayWillChange<T> | IArrayWillSplice<T>>): Lambda;
|
|
6
|
-
clear(): T[];
|
|
7
|
-
replace(newItems: T[]): T[];
|
|
8
|
-
remove(value: T): boolean;
|
|
9
|
-
toJS(): T[];
|
|
10
|
-
toJSON(): T[];
|
|
11
|
-
}
|
|
12
|
-
export interface IArrayChange<T = any> {
|
|
13
|
-
type: "update";
|
|
14
|
-
object: IObservableArray<T>;
|
|
15
|
-
index: number;
|
|
16
|
-
newValue: T;
|
|
17
|
-
oldValue: T;
|
|
18
|
-
}
|
|
19
|
-
export interface IArraySplice<T = any> {
|
|
20
|
-
type: "splice";
|
|
21
|
-
object: IObservableArray<T>;
|
|
22
|
-
index: number;
|
|
23
|
-
added: T[];
|
|
24
|
-
addedCount: number;
|
|
25
|
-
removed: T[];
|
|
26
|
-
removedCount: number;
|
|
27
|
-
}
|
|
28
|
-
export interface IArrayWillChange<T = any> {
|
|
29
|
-
type: "update";
|
|
30
|
-
object: IObservableArray<T>;
|
|
31
|
-
index: number;
|
|
32
|
-
newValue: T;
|
|
33
|
-
}
|
|
34
|
-
export interface IArrayWillSplice<T = any> {
|
|
35
|
-
type: "splice";
|
|
36
|
-
object: IObservableArray<T>;
|
|
37
|
-
index: number;
|
|
38
|
-
added: T[];
|
|
39
|
-
removedCount: number;
|
|
40
|
-
}
|
|
41
|
-
export declare function createObservableArray<T>(initialValues: any[] | undefined, enhancer: IEnhancer<T>, name?: string, owned?: boolean): IObservableArray<T>;
|
|
42
|
-
export declare function isObservableArray(thing: any): thing is IObservableArray<any>;
|
|
1
|
+
import { IEnhancer, IInterceptor, Lambda } from "../internal";
|
|
2
|
+
export interface IObservableArray<T = any> extends Array<T> {
|
|
3
|
+
spliceWithArray(index: number, deleteCount?: number, newItems?: T[]): T[];
|
|
4
|
+
observe(listener: (changeData: IArrayChange<T> | IArraySplice<T>) => void, fireImmediately?: boolean): Lambda;
|
|
5
|
+
intercept(handler: IInterceptor<IArrayWillChange<T> | IArrayWillSplice<T>>): Lambda;
|
|
6
|
+
clear(): T[];
|
|
7
|
+
replace(newItems: T[]): T[];
|
|
8
|
+
remove(value: T): boolean;
|
|
9
|
+
toJS(): T[];
|
|
10
|
+
toJSON(): T[];
|
|
11
|
+
}
|
|
12
|
+
export interface IArrayChange<T = any> {
|
|
13
|
+
type: "update";
|
|
14
|
+
object: IObservableArray<T>;
|
|
15
|
+
index: number;
|
|
16
|
+
newValue: T;
|
|
17
|
+
oldValue: T;
|
|
18
|
+
}
|
|
19
|
+
export interface IArraySplice<T = any> {
|
|
20
|
+
type: "splice";
|
|
21
|
+
object: IObservableArray<T>;
|
|
22
|
+
index: number;
|
|
23
|
+
added: T[];
|
|
24
|
+
addedCount: number;
|
|
25
|
+
removed: T[];
|
|
26
|
+
removedCount: number;
|
|
27
|
+
}
|
|
28
|
+
export interface IArrayWillChange<T = any> {
|
|
29
|
+
type: "update";
|
|
30
|
+
object: IObservableArray<T>;
|
|
31
|
+
index: number;
|
|
32
|
+
newValue: T;
|
|
33
|
+
}
|
|
34
|
+
export interface IArrayWillSplice<T = any> {
|
|
35
|
+
type: "splice";
|
|
36
|
+
object: IObservableArray<T>;
|
|
37
|
+
index: number;
|
|
38
|
+
added: T[];
|
|
39
|
+
removedCount: number;
|
|
40
|
+
}
|
|
41
|
+
export declare function createObservableArray<T>(initialValues: any[] | undefined, enhancer: IEnhancer<T>, name?: string, owned?: boolean): IObservableArray<T>;
|
|
42
|
+
export declare function isObservableArray(thing: any): thing is IObservableArray<any>;
|
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
import { $mobx, IEnhancer, IInterceptable, IInterceptor, IListenable, Lambda } from "../internal";
|
|
2
|
-
export interface IKeyValueMap<V = any> {
|
|
3
|
-
[key: string]: V;
|
|
4
|
-
}
|
|
5
|
-
export declare type IMapEntry<K = any, V = any> = [K, V];
|
|
6
|
-
export declare type IMapEntries<K = any, V = any> = IMapEntry<K, V>[];
|
|
7
|
-
export declare type IMapDidChange<K = any, V = any> = {
|
|
8
|
-
object: ObservableMap<K, V>;
|
|
9
|
-
name: K;
|
|
10
|
-
type: "update";
|
|
11
|
-
newValue: V;
|
|
12
|
-
oldValue: V;
|
|
13
|
-
} | {
|
|
14
|
-
object: ObservableMap<K, V>;
|
|
15
|
-
name: K;
|
|
16
|
-
type: "add";
|
|
17
|
-
newValue: V;
|
|
18
|
-
} | {
|
|
19
|
-
object: ObservableMap<K, V>;
|
|
20
|
-
name: K;
|
|
21
|
-
type: "delete";
|
|
22
|
-
oldValue: V;
|
|
23
|
-
};
|
|
24
|
-
export interface IMapWillChange<K = any, V = any> {
|
|
25
|
-
object: ObservableMap<K, V>;
|
|
26
|
-
type: "update" | "add" | "delete";
|
|
27
|
-
name: K;
|
|
28
|
-
newValue?: V;
|
|
29
|
-
}
|
|
30
|
-
export declare type IObservableMapInitialValues<K = any, V = any> = IMapEntries<K, V> | IKeyValueMap<V> | Map<K, V>;
|
|
31
|
-
export declare class ObservableMap<K = any, V = any> implements Map<K, V>, IInterceptable<IMapWillChange<K, V>>, IListenable {
|
|
32
|
-
enhancer: IEnhancer<V>;
|
|
33
|
-
name: string;
|
|
34
|
-
[$mobx]: {};
|
|
35
|
-
private _data;
|
|
36
|
-
private _hasMap;
|
|
37
|
-
private _keysAtom;
|
|
38
|
-
interceptors: any;
|
|
39
|
-
changeListeners: any;
|
|
40
|
-
dehancer: any;
|
|
41
|
-
constructor(initialData?: IObservableMapInitialValues<K, V>, enhancer?: IEnhancer<V>, name?: string);
|
|
42
|
-
private _has;
|
|
43
|
-
has(key: K): boolean;
|
|
44
|
-
set(key: K, value: V): this;
|
|
45
|
-
delete(key: K): boolean;
|
|
46
|
-
private _updateHasMapEntry;
|
|
47
|
-
private _updateValue;
|
|
48
|
-
private _addValue;
|
|
49
|
-
get(key: K): V | undefined;
|
|
50
|
-
private dehanceValue;
|
|
51
|
-
keys(): IterableIterator<K>;
|
|
52
|
-
values(): IterableIterator<V>;
|
|
53
|
-
entries(): IterableIterator<IMapEntry<K, V>>;
|
|
54
|
-
[Symbol.iterator](): IterableIterator<[K, V]>;
|
|
55
|
-
forEach(callback: (value: V, key: K, object: Map<K, V>) => void, thisArg?: any): void;
|
|
56
|
-
/** Merge another object into this object, returns this. */
|
|
57
|
-
merge(other: ObservableMap<K, V> | IKeyValueMap<V> | any): ObservableMap<K, V>;
|
|
58
|
-
clear(): void;
|
|
59
|
-
replace(values: ObservableMap<K, V> | IKeyValueMap<V> | any): ObservableMap<K, V>;
|
|
60
|
-
readonly size: number;
|
|
61
|
-
/**
|
|
62
|
-
* Returns a plain object that represents this map.
|
|
63
|
-
* Note that all the keys being stringified.
|
|
64
|
-
* If there are duplicating keys after converting them to strings, behaviour is undetermined.
|
|
65
|
-
*/
|
|
66
|
-
toPOJO(): IKeyValueMap<V>;
|
|
67
|
-
/**
|
|
68
|
-
* Returns a shallow non observable object clone of this map.
|
|
69
|
-
* Note that the values migth still be observable. For a deep clone use mobx.toJS.
|
|
70
|
-
*/
|
|
71
|
-
toJS(): Map<K, V>;
|
|
72
|
-
toJSON(): IKeyValueMap<V>;
|
|
73
|
-
toString(): string;
|
|
74
|
-
[Symbol.toStringTag]: "Map";
|
|
75
|
-
/**
|
|
76
|
-
* Observes this object. Triggers for the events 'add', 'update' and 'delete'.
|
|
77
|
-
* See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe
|
|
78
|
-
* for callback details
|
|
79
|
-
*/
|
|
80
|
-
observe(listener: (changes: IMapDidChange<K, V>) => void, fireImmediately?: boolean): Lambda;
|
|
81
|
-
intercept(handler: IInterceptor<IMapWillChange<K, V>>): Lambda;
|
|
82
|
-
}
|
|
83
|
-
export declare const isObservableMap: (thing: any) => thing is ObservableMap<any, any>;
|
|
1
|
+
import { $mobx, IEnhancer, IInterceptable, IInterceptor, IListenable, Lambda } from "../internal";
|
|
2
|
+
export interface IKeyValueMap<V = any> {
|
|
3
|
+
[key: string]: V;
|
|
4
|
+
}
|
|
5
|
+
export declare type IMapEntry<K = any, V = any> = [K, V];
|
|
6
|
+
export declare type IMapEntries<K = any, V = any> = IMapEntry<K, V>[];
|
|
7
|
+
export declare type IMapDidChange<K = any, V = any> = {
|
|
8
|
+
object: ObservableMap<K, V>;
|
|
9
|
+
name: K;
|
|
10
|
+
type: "update";
|
|
11
|
+
newValue: V;
|
|
12
|
+
oldValue: V;
|
|
13
|
+
} | {
|
|
14
|
+
object: ObservableMap<K, V>;
|
|
15
|
+
name: K;
|
|
16
|
+
type: "add";
|
|
17
|
+
newValue: V;
|
|
18
|
+
} | {
|
|
19
|
+
object: ObservableMap<K, V>;
|
|
20
|
+
name: K;
|
|
21
|
+
type: "delete";
|
|
22
|
+
oldValue: V;
|
|
23
|
+
};
|
|
24
|
+
export interface IMapWillChange<K = any, V = any> {
|
|
25
|
+
object: ObservableMap<K, V>;
|
|
26
|
+
type: "update" | "add" | "delete";
|
|
27
|
+
name: K;
|
|
28
|
+
newValue?: V;
|
|
29
|
+
}
|
|
30
|
+
export declare type IObservableMapInitialValues<K = any, V = any> = IMapEntries<K, V> | IKeyValueMap<V> | Map<K, V>;
|
|
31
|
+
export declare class ObservableMap<K = any, V = any> implements Map<K, V>, IInterceptable<IMapWillChange<K, V>>, IListenable {
|
|
32
|
+
enhancer: IEnhancer<V>;
|
|
33
|
+
name: string;
|
|
34
|
+
[$mobx]: {};
|
|
35
|
+
private _data;
|
|
36
|
+
private _hasMap;
|
|
37
|
+
private _keysAtom;
|
|
38
|
+
interceptors: any;
|
|
39
|
+
changeListeners: any;
|
|
40
|
+
dehancer: any;
|
|
41
|
+
constructor(initialData?: IObservableMapInitialValues<K, V>, enhancer?: IEnhancer<V>, name?: string);
|
|
42
|
+
private _has;
|
|
43
|
+
has(key: K): boolean;
|
|
44
|
+
set(key: K, value: V): this;
|
|
45
|
+
delete(key: K): boolean;
|
|
46
|
+
private _updateHasMapEntry;
|
|
47
|
+
private _updateValue;
|
|
48
|
+
private _addValue;
|
|
49
|
+
get(key: K): V | undefined;
|
|
50
|
+
private dehanceValue;
|
|
51
|
+
keys(): IterableIterator<K>;
|
|
52
|
+
values(): IterableIterator<V>;
|
|
53
|
+
entries(): IterableIterator<IMapEntry<K, V>>;
|
|
54
|
+
[Symbol.iterator](): IterableIterator<[K, V]>;
|
|
55
|
+
forEach(callback: (value: V, key: K, object: Map<K, V>) => void, thisArg?: any): void;
|
|
56
|
+
/** Merge another object into this object, returns this. */
|
|
57
|
+
merge(other: ObservableMap<K, V> | IKeyValueMap<V> | any): ObservableMap<K, V>;
|
|
58
|
+
clear(): void;
|
|
59
|
+
replace(values: ObservableMap<K, V> | IKeyValueMap<V> | any): ObservableMap<K, V>;
|
|
60
|
+
readonly size: number;
|
|
61
|
+
/**
|
|
62
|
+
* Returns a plain object that represents this map.
|
|
63
|
+
* Note that all the keys being stringified.
|
|
64
|
+
* If there are duplicating keys after converting them to strings, behaviour is undetermined.
|
|
65
|
+
*/
|
|
66
|
+
toPOJO(): IKeyValueMap<V>;
|
|
67
|
+
/**
|
|
68
|
+
* Returns a shallow non observable object clone of this map.
|
|
69
|
+
* Note that the values migth still be observable. For a deep clone use mobx.toJS.
|
|
70
|
+
*/
|
|
71
|
+
toJS(): Map<K, V>;
|
|
72
|
+
toJSON(): IKeyValueMap<V>;
|
|
73
|
+
toString(): string;
|
|
74
|
+
[Symbol.toStringTag]: "Map";
|
|
75
|
+
/**
|
|
76
|
+
* Observes this object. Triggers for the events 'add', 'update' and 'delete'.
|
|
77
|
+
* See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe
|
|
78
|
+
* for callback details
|
|
79
|
+
*/
|
|
80
|
+
observe(listener: (changes: IMapDidChange<K, V>) => void, fireImmediately?: boolean): Lambda;
|
|
81
|
+
intercept(handler: IInterceptor<IMapWillChange<K, V>>): Lambda;
|
|
82
|
+
}
|
|
83
|
+
export declare const isObservableMap: (thing: any) => thing is ObservableMap<any, any>;
|