UNPKG

mobx

Version:

Simple, scalable state management.

1 lines 55.6 kB
function t(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];throw new Error("number"==typeof t?"[MobX] minified error nr: "+t+(i.length?" "+i.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+t)}function n(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:Nn}function i(){Kn||t("Proxy not available")}function r(t){var n=!1;return function(){if(!n)return n=!0,t.apply(this,arguments)}}function e(t){return"function"==typeof t}function u(t){switch(typeof t){case"string":case"symbol":case"number":return!0}return!1}function o(t){return null!==t&&"object"==typeof t}function s(t){if(!o(t))return!1;var n=Object.getPrototypeOf(t);if(null==n)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return"function"==typeof i&&i.toString()===Bn}function f(t){var n=null==t?void 0:t.constructor;return!!n&&("GeneratorFunction"===n.name||"GeneratorFunction"===n.displayName)}function c(t,n,i){In(t,n,{enumerable:!1,writable:!0,configurable:!0,value:i})}function a(t,n,i){In(t,n,{enumerable:!1,writable:!1,configurable:!0,value:i})}function h(t,n){var i="isMobX"+t;return n.prototype[i]=!0,function(t){return o(t)&&!0===t[i]}}function v(t){return null!=t&&"[object Map]"===Object.prototype.toString.call(t)}function l(t){return null!=t&&"[object Set]"===Object.prototype.toString.call(t)}function d(t){return null===t?null:"object"==typeof t?""+t:t}function b(t,n){return Ln.hasOwnProperty.call(t,n)}function p(t,n){return!!(t&n)}function y(t,n,i){return i?t|=n:t&=~n,t}function m(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,r=Array(n);i<n;i++)r[i]=t[i];return r}function j(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,_(r.key),r)}}function w(t,n,i){return n&&j(t.prototype,n),i&&j(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function O(t,n){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(i)return(i=i.call(t)).next.bind(i);if(Array.isArray(t)||(i=function(t,n){if(t){if("string"==typeof t)return m(t,n);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?m(t,n):void 0}}(t))||n&&t&&"number"==typeof t.length){i&&(t=i);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x(){return(x=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var r in i)({}).hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t}).apply(null,arguments)}function g(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,function(t,n){(Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t})(t,n)}(t,n)}function _(t){var n=function(t){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof n?n:n+""}function S(t){return Object.assign((function(n,i){if(k(i))return t.t(n,i);A(n,i,t)}),t)}function A(t,n,i){b(t,Hn)||c(t,Hn,x({},t[Hn])),function(t){return"override"===t.i}(i)||(t[Hn][n]=i)}function k(t){return"object"==typeof t&&"string"==typeof t.kind}function M(t,n,i){void 0===n&&(n=Dn),void 0===i&&(i=Dn);var r=new Xn(t);return n!==Dn&&It(r,n),i!==Dn&&Lt(r,i),r}function V(t,n,i){return Ut(t)?t:Array.isArray(t)?ui.array(t,{name:i}):s(t)?ui.object(t,void 0,{name:i}):v(t)?ui.map(t,{name:i}):l(t)?ui.set(t,{name:i}):"function"!=typeof t||Nt(t)||qt(t)?t:f(t)?Ki(t):Ti(i,t)}function E(t){return t}function N(t,n){return{i:t,u:n,o:R,s:T,t:I}}function R(t,n,i,r){var e;if(null!=(e=this.u)&&e.bound)return null===this.s(t,n,i,!1)?0:1;if(r===t.h)return null===this.s(t,n,i,!1)?0:2;if(Nt(i.value))return 1;var u=L(t,this,n,i,!1);return In(r,n,u),2}function T(t,n,i,r){var e=L(t,this,n,i);return t.v(n,e,r)}function I(n,i){var r,e=i.kind,u=i.name,o=i.addInitializer,s=this,f=function(t){var n,i,r,e;return it(null!=(n=null==(i=s.u)?void 0:i.name)?n:u.toString(),t,null!=(r=null==(e=s.u)?void 0:e.autoAction)&&r)};return"field"==e?function(t){var n,i=t;return Nt(i)||(i=f(i)),null!=(n=s.u)&&n.bound&&((i=i.bind(this)).isMobxAction=!0),i}:"method"==e?(Nt(n)||(n=f(n)),null!=(r=this.u)&&r.bound&&o((function(){var t=this[u].bind(this);t.isMobxAction=!0,this[u]=t})),n):void t("Cannot apply '"+s.i+"' to '"+String(u)+"' (kind: "+e+"):\n'"+s.i+"' can only be used on properties with a function value.")}function L(t,n,i,r,e){var u,o,s,f,c,a,h;void 0===e&&(e=_i.safeDescriptors);var v,l=r.value;return null!=(u=n.u)&&u.bound&&(l=l.bind(null!=(v=t.l)?v:t.h)),{value:it(null!=(o=null==(s=n.u)?void 0:s.name)?o:i.toString(),l,null!=(f=null==(c=n.u)?void 0:c.autoAction)&&f,null!=(a=n.u)&&a.bound?null!=(h=t.l)?h:t.h:void 0),configurable:!e||t.p,enumerable:!1,writable:!e}}function C(t,n){return{i:t,u:n,o:P,s:K,t:B}}function P(t,n,i,r){var e;if(r===t.h)return null===this.s(t,n,i,!1)?0:2;if(null!=(e=this.u)&&e.bound&&(!b(t.h,n)||!qt(t.h[n]))&&null===this.s(t,n,i,!1))return 0;if(qt(i.value))return 1;var u=D(t,0,0,i,!1,!1);return In(r,n,u),2}function K(t,n,i,r){var e,u=D(t,0,0,i,null==(e=this.u)?void 0:e.bound);return t.v(n,u,r)}function B(t,n){var i,r=n.name,e=n.addInitializer;return qt(t)||(t=Ki(t)),null!=(i=this.u)&&i.bound&&e((function(){var t=this[r].bind(this);t.isMobXFlow=!0,this[r]=t})),t}function D(t,n,i,r,e,u){void 0===u&&(u=_i.safeDescriptors);var o,s=r.value;return qt(s)||(s=Ki(s)),e&&((s=s.bind(null!=(o=t.l)?o:t.h)).isMobXFlow=!0),{value:s,configurable:!u||t.p,enumerable:!1,writable:!u}}function W(t,n){return{i:t,u:n,o:q,s:G,t:H}}function q(t,n,i){return null===this.s(t,n,i,!1)?0:1}function G(t,n,i,r){return t.m(n,x({},this.u,{get:i.get,set:i.set}),r)}function H(t,n){var i=this,r=n.name;return(0,n.addInitializer)((function(){var n=bn(this)[Un],e=x({},i.u,{get:t,context:this});e.name||(e.name="ObservableObject."+r.toString()),n.j.set(r,new bi(e))})),function(){return this[Un].O(r)}}function U(t,n){return{i:t,u:n,o:X,s:F,t:z}}function X(t,n,i){return null===this.s(t,n,i,!1)?0:1}function F(t,n,i,r){var e,u;return t.g(n,i.value,null!=(e=null==(u=this.u)?void 0:u.enhancer)?e:V,r)}function z(t,n){function i(t,n){var i,e,s=bn(t)[Un],f=new li(n,null!=(i=null==(e=r.u)?void 0:e.enhancer)?i:V,"ObservableObject."+u.toString(),!1);s.j.set(u,f),o.add(t)}var r=this,e=n.kind,u=n.name,o=new WeakSet;if("accessor"==e)return{get:function(){return o.has(this)||i(this,t.get.call(this)),this[Un].O(u)},set:function(t){return o.has(this)||i(this,t),this[Un]._(u,t)},init:function(t){return o.has(this)||i(this,t),t}}}function $(t){return{i:"true",u:t,o:J,s:Y,t:Q}}function J(t,n,i,r){var e,u,o,s;if(i.get)return fi.o(t,n,i,r);if(i.set){var c=it(n.toString(),i.set);return r===t.h?null===t.v(n,{configurable:!_i.safeDescriptors||t.p,set:c})?0:2:(In(r,n,{configurable:!0,set:c}),2)}if(r!==t.h&&"function"==typeof i.value)return f(i.value)?(null!=(s=this.u)&&s.autoBind?Ki.bound:Ki).o(t,n,i,r):(null!=(o=this.u)&&o.autoBind?Ti.bound:Ti).o(t,n,i,r);var a,h=!1===(null==(e=this.u)?void 0:e.deep)?ui.ref:ui;return"function"==typeof i.value&&null!=(u=this.u)&&u.autoBind&&(i.value=i.value.bind(null!=(a=t.l)?a:t.h)),h.o(t,n,i,r)}function Y(t,n,i,r){var e,u,o;return i.get?fi.s(t,n,i,r):i.set?t.v(n,{configurable:!_i.safeDescriptors||t.p,set:it(n.toString(),i.set)},r):("function"==typeof i.value&&null!=(e=this.u)&&e.autoBind&&(i.value=i.value.bind(null!=(o=t.l)?o:t.h)),(!1===(null==(u=this.u)?void 0:u.deep)?ui.ref:ui).s(t,n,i,r))}function Q(){t("'"+this.i+"' cannot be used as a decorator")}function Z(t){return t||Yn}function tt(t){return!0===t.deep?V:!1===t.deep?E:(n=t.defaultDecorator)&&null!=(i=null==(r=n.u)?void 0:r.enhancer)?i:V;var n,i,r}function nt(t,n,i){return k(n)?Qn.t(t,n):u(n)?void A(t,n,Qn):Ut(t)?t:s(t)?ui.object(t,n,i):Array.isArray(t)?ui.array(t,n):v(t)?ui.map(t,n):l(t)?ui.set(t,n):"object"==typeof t&&null!==t?t:ui.box(t,n)}function it(t,n,i,r){function e(){return rt(0,i,n,r||this,arguments)}return void 0===i&&(i=!1),e.isMobxAction=!0,e.toString=function(){return n.toString()},hi&&(vi.value=t,In(e,"name",vi)),e}function rt(t,n,i,r,e){var u=et(0,n);try{return i.apply(r,e)}catch(t){throw u.S=t,t}finally{ut(u)}}function et(t,n){var i=_i.trackingDerivation,r=!n||!i;xt();var e=_i.allowStateChanges;r&&(dt(),e=st(!0));var u={A:r,k:i,M:e,V:pt(!0),N:!1,R:0,T:ai++,I:ci};return ci=u.T,u}function ut(n){ci!==n.T&&t(30),ci=n.I,void 0!==n.S&&(_i.suppressReactionErrors=!0),ft(n.M),yt(n.V),gt(),n.A&&bt(n.k),_i.suppressReactionErrors=!1}function ot(t,n){var i=st(t);try{return n()}finally{ft(i)}}function st(t){var n=_i.allowStateChanges;return _i.allowStateChanges=t,n}function ft(t){_i.allowStateChanges=t}function ct(t){return t instanceof ji}function at(t){switch(t.L){case pi.C:return!1;case pi.P:case pi.K:return!0;case pi.B:for(var n=pt(!0),i=dt(),r=t.D,e=r.length,u=0;u<e;u++){var o=r[u];if(mi(o)){if(_i.disableErrorBoundaries)o.get();else try{o.get()}catch(t){return bt(i),yt(n),!0}if(t.L===pi.K)return bt(i),yt(n),!0}}return mt(t),bt(i),yt(n),!1}}function ht(t,n,i){var r=pt(!0);mt(t),t.W=new Array(0===t.q?100:t.D.length),t.G=0,t.q=++_i.runId;var e,u=_i.trackingDerivation;if(_i.trackingDerivation=t,_i.inBatch++,!0===_i.disableErrorBoundaries)e=n.call(i);else try{e=n.call(i)}catch(t){e=new ji(t)}return _i.inBatch--,_i.trackingDerivation=u,function(t){for(var n=t.D,i=t.D=t.W,r=pi.C,e=0,u=t.G,o=0;o<u;o++){var s=i[o];0===s.diffValue&&(s.diffValue=1,e!==o&&(i[e]=s),e++),s.L>r&&(r=s.L)}for(i.length=e,t.W=null,u=n.length;u--;){var f=n[u];0===f.diffValue&&wt(f,t),f.diffValue=0}for(;e--;){var c=i[e];1===c.diffValue&&(c.diffValue=0,jt(c,t))}r!==pi.C&&(t.L=r,t.H())}(t),yt(r),e}function vt(t){var n=t.D;t.D=[];for(var i=n.length;i--;)wt(n[i],t);t.L=pi.P}function lt(t){var n=dt();try{return t()}finally{bt(n)}}function dt(){var t=_i.trackingDerivation;return _i.trackingDerivation=null,t}function bt(t){_i.trackingDerivation=t}function pt(t){var n=_i.allowStateReads;return _i.allowStateReads=t,n}function yt(t){_i.allowStateReads=t}function mt(t){if(t.L!==pi.C){t.L=pi.C;for(var n=t.D,i=n.length;i--;)n[i].U=pi.C}}function jt(t,n){t.X.add(n),t.U>n.L&&(t.U=n.L)}function wt(t,n){t.X.delete(n),0===t.X.size&&Ot(t)}function Ot(t){!1===t.isPendingUnobservation&&(t.isPendingUnobservation=!0,_i.pendingUnobservations.push(t))}function xt(){_i.inBatch++}function gt(){if(0==--_i.inBatch){At();for(var t=_i.pendingUnobservations,n=0;n<t.length;n++){var i=t[n];i.isPendingUnobservation=!1,0===i.X.size&&(i.isBeingObserved&&(i.isBeingObserved=!1,i.onBUO()),i instanceof bi&&i.F())}_i.pendingUnobservations=[]}}function _t(t){var n=_i.trackingDerivation;return null!==n?(n.q!==t.$&&(t.$=n.q,n.W[n.G++]=t,!t.isBeingObserved&&_i.trackingContext&&(t.isBeingObserved=!0,t.onBO())),t.isBeingObserved):(0===t.X.size&&_i.inBatch>0&&Ot(t),!1)}function St(t){t.U!==pi.K&&(t.U=pi.K,t.X.forEach((function(t){t.L===pi.C&&t.H(),t.L=pi.K})))}function At(){_i.inBatch>0||_i.isRunningReactions||Ai(kt)}function kt(){_i.isRunningReactions=!0;for(var t=_i.pendingReactions,n=0;t.length>0;){100==++n&&(console.error("[mobx] cycle in reaction: "+t[0]),t.splice(0));for(var i=t.splice(0),r=0,e=i.length;r<e;r++)i[r].J()}_i.isRunningReactions=!1}function Mt(){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function Vt(t){return function(n,i){return e(n)?it(n.name||"<unnamed action>",n,t):e(i)?it(n,i,t):k(i)?(t?Ei:Mi).t(n,i):u(i)?A(n,i,t?Ei:Mi):u(n)?S(N(t?"autoAction":"action",{name:n,autoAction:t})):void 0}}function Et(t){return rt(0,!1,t,this,void 0)}function Nt(t){return e(t)&&!0===t.isMobxAction}function Rt(t,n){function i(){t(s)}var r,e,u,o;void 0===n&&(n=Pn);var s,f=null!=(r=null==(e=n)?void 0:e.name)?r:"Autorun";if(n.scheduler||n.delay){var c=Tt(n),a=!1;s=new Si(f,(function(){a||(a=!0,c((function(){a=!1,s.isDisposed||s.track(i)})))}),n.onError,n.requiresObservable)}else s=new Si(f,(function(){this.track(i)}),n.onError,n.requiresObservable);return null!=(u=n)&&null!=(u=u.signal)&&u.aborted||s.Y(),s.Z(null==(o=n)?void 0:o.signal)}function Tt(t){return t.scheduler?t.scheduler:t.delay?function(n){return setTimeout(n,t.delay)}:Ii}function It(t,n,i){return Ct("onBO",t,n,i)}function Lt(t,n,i){return Ct("onBUO",t,n,i)}function Ct(t,n,i,r){var u="function"==typeof r?gn(n,i):gn(n),o=e(r)?r:i,s=t+"L";return u[s]?u[s].add(o):u[s]=new Set([o]),function(){var t=u[s];t&&(t.delete(o),0===t.size&&delete u[s])}}function Pt(t,n,i,r){var e=Gn(n);return An((function(){var n=bn(t,r)[Un];qn(e).forEach((function(t){n.s(t,e[t],!i||!(t in i)||i[t])}))})),t}function Kt(t){var n,i={name:t.tt};return t.D&&t.D.length>0&&(i.dependencies=(n=t.D,Array.from(new Set(n))).map(Kt)),i}function Bt(t){var n={name:t.tt};return function(t){return t.X&&t.X.size>0}(t)&&(n.observers=Array.from(function(t){return t.X}(t)).map(Bt)),n}function Dt(){this.message="FLOW_CANCELLED"}function Wt(t){e(t.cancel)&&t.cancel()}function qt(t){return!0===(null==t?void 0:t.isMobXFlow)}function Gt(t,n){if(void 0===n)return mi(t);if(!1===yn(t))return!1;if(!t[Un].j.has(n))return!1;var i=gn(t,n);return mi(i)}function Ht(t,n){return!!t&&(void 0!==n?!!yn(t)&&t[Un].j.has(n):yn(t)||!!t[Un]||Fn(t)||ki(t)||mi(t))}function Ut(t){return Ht(t)}function Xt(n){return yn(n)?n[Un].nt():Yi(n)||tr(n)?Array.from(n.keys()):vn(n)?n.map((function(t,n){return n})):void t(5)}function Ft(n,i){return yn(n)?n[Un].it(i):Yi(n)||tr(n)?n.has(i):vn(n)?i>=0&&i<n.length:void t(10)}function zt(n){if(yn(n))return n[Un].rt();t(38)}function $t(t,n,i){return t.set(n,i),i}function Jt(t,n){void 0===n&&(n=void 0),xt();try{return t.apply(n)}finally{gt()}}function Yt(t,n,i){var r;if("number"==typeof i.timeout){var e=new Error("WHEN_TIMEOUT");r=setTimeout((function(){if(!o[Un].isDisposed){if(o(),!i.onError)throw e;i.onError(e)}}),i.timeout)}i.name="When";var u=it("When-effect",n),o=Rt((function(n){ot(!1,t)&&(n.dispose(),r&&clearTimeout(r),u())}),i);return o}function Qt(t,n){var i,r,e;if(null!=n&&null!=(i=n.signal)&&i.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var u=new Promise((function(i,u){var o,s=Yt(t,i,x({},n,{onError:u}));r=function(){s(),u(new Error("WHEN_CANCELLED"))},e=function(){s(),u(new Error("WHEN_ABORTED"))},null==n||null==(o=n.signal)||null==o.addEventListener||o.addEventListener("abort",e)})).finally((function(){var t;return null==n||null==(t=n.signal)||null==t.removeEventListener?void 0:t.removeEventListener("abort",e)}));return u.cancel=r,u}function Zt(t){return t[Un]}function tn(t){return void 0!==t.et&&t.et.length>0}function nn(t,n){var i=t.et||(t.et=[]);return i.push(n),r((function(){var t=i.indexOf(n);-1!==t&&i.splice(t,1)}))}function rn(n,i){var r=dt();try{for(var e=[].concat(n.et||[]),u=0,o=e.length;u<o&&((i=e[u](i))&&!i.type&&t(14),i);u++);return i}finally{bt(r)}}function en(t){return void 0!==t.ut&&t.ut.length>0}function un(t,n){var i=t.ut||(t.ut=[]);return i.push(n),r((function(){var t=i.indexOf(n);-1!==t&&i.splice(t,1)}))}function on(t,n){var i=dt(),r=t.ut;if(r){for(var e=0,u=(r=r.slice()).length;e<u;e++)r[e](n);bt(i)}}function sn(t,n,r,e){return void 0===r&&(r="ObservableArray"),void 0===e&&(e=!1),i(),An((function(){var i=new Gi(r,n,e,!1);a(i.j,Un,i);var u=new Proxy(i.j,qi);return i.l=u,t&&t.length&&i.ot(0,0,t),u}))}function fn(t,n){"function"==typeof Array.prototype[t]&&(Hi[t]=n(t))}function cn(t){return function(){var n=this[Un];n.st.reportObserved();var i=n.ft(n.j);return i[t].apply(i,arguments)}}function an(t){return function(n,i){var r=this,e=this[Un];return e.st.reportObserved(),e.ft(e.j)[t]((function(t,e){return n.call(i,t,e,r)}))}}function hn(t){return function(){var n=this,i=this[Un];i.st.reportObserved();var r=i.ft(i.j),e=arguments[0];return arguments[0]=function(t,i,r){return e(t,i,r,n)},r[t].apply(r,arguments)}}function vn(t){return o(t)&&Fi(t[Un])}function ln(t){return t[Symbol.toStringTag]="MapIterator",Vn(t)}function dn(t){return t[Symbol.toStringTag]="SetIterator",Vn(t)}function bn(t,n){var i;if(b(t,Un))return t;var r=null!=(i=null==n?void 0:n.name)?i:"ObservableObject",e=new ir(t,new Map,String(r),function(t){var n;return t?null!=(n=t.defaultDecorator)?n:$(t):void 0}(n));return c(t,Un,e),t}function pn(t){return nr[t]||(nr[t]={get:function(){return this[Un].O(t)},set:function(n){return this[Un]._(t,n)}})}function yn(t){return!!o(t)&&rr(t[Un])}function mn(t,n,i){var r;null==(r=t.h[Hn])||delete r[i]}function jn(t){return{enumerable:!1,configurable:!0,get:function(){return this[Un].ct(t)},set:function(n){this[Un].ht(t,n)}}}function wn(t){In(fr.prototype,""+t,jn(t))}function On(t){if(t>or){for(var n=or;n<t+100;n++)wn(n);or=t}}function xn(t,n,i){return new fr(t,n,i)}function gn(n,i){if("object"==typeof n&&null!==n){if(vn(n))return void 0!==i&&t(23),n[Un].st;if(tr(n))return n.st;if(Yi(n)){if(void 0===i)return n.vt;var r=n.lt.get(i)||n.dt.get(i);return r||t(25,i,Sn(n)),r}if(yn(n)){if(!i)return t(26);var u=n[Un].j.get(i);return u||t(27,i,Sn(n)),u}if(Fn(n)||mi(n)||ki(n))return n}else if(e(n)&&ki(n[Un]))return n[Un];t(28)}function _n(n,i){return n||t(29),void 0!==i?_n(gn(n,i)):Fn(n)||mi(n)||ki(n)||Yi(n)||tr(n)?n:n[Un]?n[Un]:void t(24,n)}function Sn(t,n){var i;if(void 0!==n)i=gn(t,n);else{if(Nt(t))return t.name;i=yn(t)||Yi(t)||tr(t)?_n(t):gn(t)}return i.tt}function An(t){var n=dt(),i=st(!0);xt();try{return t()}finally{gt(),ft(i),bt(n)}}function kn(t,n,i){return void 0===i&&(i=-1),function t(n,i,r,u,o){if(n===i)return 0!==n||1/n==1/i;if(null==n||null==i)return!1;if(n!=n)return i!=i;var s=typeof n;if("function"!==s&&"object"!==s&&"object"!=typeof i)return!1;var f=ar.call(n);if(f!==ar.call(i))return!1;switch(f){case"[object RegExp]":case"[object String]":return""+n==""+i;case"[object Number]":return+n!=+n?+i!=+i:0==+n?1/+n==1/i:+n==+i;case"[object Date]":case"[object Boolean]":return+n==+i;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(n)===Symbol.valueOf.call(i);case"[object Map]":case"[object Set]":r>=0&&r++}n=Mn(n),i=Mn(i);var c="[object Array]"===f;if(!c){if("object"!=typeof n||"object"!=typeof i)return!1;var a=n.constructor,h=i.constructor;if(a!==h&&!(e(a)&&a instanceof a&&e(h)&&h instanceof h)&&"constructor"in n&&"constructor"in i)return!1}if(0===r)return!1;r<0&&(r=-1),o=o||[];for(var v=(u=u||[]).length;v--;)if(u[v]===n)return o[v]===i;if(u.push(n),o.push(i),c){if((v=n.length)!==i.length)return!1;for(;v--;)if(!t(n[v],i[v],r-1,u,o))return!1}else{var l=Object.keys(n),d=l.length;if(Object.keys(i).length!==d)return!1;for(var p=0;p<d;p++){var y=l[p];if(!b(i,y)||!t(n[y],i[y],r-1,u,o))return!1}}return u.pop(),o.pop(),!0}(t,n,i)}function Mn(t){return vn(t)?t.slice():v(t)||Yi(t)||l(t)||tr(t)?Array.from(t.entries()):t}function Vn(t){return t[Symbol.iterator]=En,Object.assign(Object.create(hr),t)}function En(){return this}Object.defineProperty(exports,"__esModule",{value:!0});var Nn={},Rn=Object.assign,Tn=Object.getOwnPropertyDescriptor,In=Object.defineProperty,Ln=Object.prototype,Cn=[];Object.freeze(Cn);var Pn={};Object.freeze(Pn);var Kn="undefined"!=typeof Proxy,Bn=Object.toString(),Dn=function(){},Wn=void 0!==Object.getOwnPropertySymbols,qn="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:Wn?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Gn=Object.getOwnPropertyDescriptors||function(t){var n={};return qn(t).forEach((function(i){n[i]=Tn(t,i)})),n},Hn=Symbol("mobx-stored-annotations"),Un=Symbol("mobx administration"),Xn=function(){function t(t){void 0===t&&(t="Atom"),this.tt=void 0,this.bt=0,this.X=new Set,this.$=0,this.U=pi.P,this.onBOL=void 0,this.onBUOL=void 0,this.tt=t}var n=t.prototype;return n.onBO=function(){this.onBOL&&this.onBOL.forEach((function(t){return t()}))},n.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(t){return t()}))},n.reportObserved=function(){return _t(this)},n.reportChanged=function(){xt(),St(this),gt()},n.toString=function(){return this.tt},w(t,[{key:"isBeingObserved",get:function(){return p(this.bt,t.pt)},set:function(n){this.bt=y(this.bt,t.pt,n)}},{key:"isPendingUnobservation",get:function(){return p(this.bt,t.yt)},set:function(n){this.bt=y(this.bt,t.yt,n)}},{key:"diffValue",get:function(){return p(this.bt,t.jt)?1:0},set:function(n){this.bt=y(this.bt,t.jt,1===n)}}])}();Xn.pt=1,Xn.yt=2,Xn.jt=4;var Fn=h("Atom",Xn),zn={identity:function(t,n){return t===n},structural:function(t,n){return kn(t,n)},default:function(t,n){return Object.is?Object.is(t,n):t===n?0!==t||1/t==1/n:t!=t&&n!=n},shallow:function(t,n){return kn(t,n,1)}},$n=S({i:"override",o:function(){return 0},s:function(){t("'"+this.i+"' can only be used with 'makeObservable'")},t:function(){console.warn("'"+this.i+"' cannot be used with decorators - this is a no-op")}}),Jn=$(),Yn={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(Yn);var Qn=U("observable"),Zn=U("observable.ref",{enhancer:E}),ti=U("observable.shallow",{enhancer:function(t,n,i){return null==t||yn(t)||vn(t)||Yi(t)||tr(t)?t:Array.isArray(t)?ui.array(t,{name:i,deep:!1}):s(t)?ui.object(t,void 0,{name:i,deep:!1}):v(t)?ui.map(t,{name:i,deep:!1}):l(t)?ui.set(t,{name:i,deep:!1}):void 0}}),ni=U("observable.struct",{enhancer:function(t,n){return kn(t,n)?n:t}}),ii=S(Qn);Rn(nt,ii);var ri,ei,ui=Rn(nt,{box:function(t,n){var i=Z(n);return new li(t,tt(i),i.name,!0,i.equals)},array:function(t,n){var i=Z(n);return(!1===_i.useProxies||!1===i.proxy?xn:sn)(t,tt(i),i.name)},map:function(t,n){var i=Z(n);return new Ji(t,tt(i),i.name)},set:function(t,n){var i=Z(n);return new Zi(t,tt(i),i.name)},object:function(t,n,r){return An((function(){return Pt(!1===_i.useProxies||!1===(null==r?void 0:r.proxy)?bn({},r):function(t,n){var r,e;return i(),null!=(e=(r=(t=bn(t,n))[Un]).l)?e:r.l=new Proxy(t,Bi)}({},r),t,n)}))},ref:S(Zn),shallow:S(ti),deep:ii,struct:S(ni)}),oi=W("computed"),si=W("computed.struct",{equals:zn.structural}),fi=function(t,n){if(k(n))return oi.t(t,n);if(u(n))return A(t,n,oi);if(s(t))return S(W("computed",t));var i=s(n)?n:{};return i.get=t,i.name||(i.name=t.name||""),new bi(i)};Object.assign(fi,oi),fi.struct=S(si);var ci=0,ai=1,hi=null!=(ri=null==(ei=Tn((function(){}),"name"))?void 0:ei.configurable)&&ri,vi={value:"action",configurable:!0,writable:!1,enumerable:!1},li=function(t){function n(n,i,r,e,u){var o;return void 0===r&&(r="ObservableValue"),void 0===u&&(u=zn.default),(o=t.call(this,r)||this).enhancer=void 0,o.tt=void 0,o.equals=void 0,o.wt=!1,o.et=void 0,o.ut=void 0,o.Ot=void 0,o.dehancer=void 0,o.enhancer=i,o.tt=r,o.equals=u,o.Ot=i(n,void 0,r),o}g(n,t);var i=n.prototype;return i.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},i.set=function(t){(t=this.xt(t))!==_i.UNCHANGED&&this.gt(t)},i.xt=function(t){if(tn(this)){var n=rn(this,{object:this,type:Wi,newValue:t});if(!n)return _i.UNCHANGED;t=n.newValue}return t=this.enhancer(t,this.Ot,this.tt),this.equals(this.Ot,t)?_i.UNCHANGED:t},i.gt=function(t){var n=this.Ot;this.Ot=t,this.reportChanged(),en(this)&&on(this,{type:Wi,object:this,newValue:t,oldValue:n})},i.get=function(){return this.reportObserved(),this.dehanceValue(this.Ot)},i._t=function(t){return nn(this,t)},i.St=function(t,n){return n&&t({observableKind:"value",debugObjectName:this.tt,object:this,type:Wi,newValue:this.Ot,oldValue:void 0}),un(this,t)},i.raw=function(){return this.Ot},i.toJSON=function(){return this.get()},i.toString=function(){return this.tt+"["+this.Ot+"]"},i.valueOf=function(){return d(this.get())},i[Symbol.toPrimitive]=function(){return this.valueOf()},n}(Xn),di=h("ObservableValue",li),bi=function(){function n(n){this.L=pi.P,this.D=[],this.W=null,this.X=new Set,this.q=0,this.$=0,this.U=pi.C,this.G=0,this.Ot=new ji(null),this.tt=void 0,this.At=void 0,this.bt=0,this.derivation=void 0,this.kt=void 0,this.Mt=yi.NONE,this.Vt=void 0,this.Et=void 0,this.Nt=void 0,this.Rt=void 0,this.onBOL=void 0,this.onBUOL=void 0,n.get||t(31),this.derivation=n.get,this.tt=n.name||"ComputedValue",n.set&&(this.kt=it("ComputedValue-setter",n.set)),this.Et=n.equals||(n.compareStructural||n.struct?zn.structural:zn.default),this.Vt=n.context,this.Nt=n.requiresReaction,this.Rt=!!n.keepAlive}var i=n.prototype;return i.H=function(){!function(t){t.U===pi.C&&(t.U=pi.B,t.X.forEach((function(t){t.L===pi.C&&(t.L=pi.B,t.H())})))}(this)},i.onBO=function(){this.onBOL&&this.onBOL.forEach((function(t){return t()}))},i.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(t){return t()}))},i.get=function(){if(this.isComputing&&t(32,this.tt,this.derivation),0!==_i.inBatch||0!==this.X.size||this.Rt){if(_t(this),at(this)){var n=_i.trackingContext;this.Rt&&!n&&(_i.trackingContext=this),this.trackAndCompute()&&function(t){t.U!==pi.K&&(t.U=pi.K,t.X.forEach((function(n){n.L===pi.B?n.L=pi.K:n.L===pi.C&&(t.U=pi.C)})))}(this),_i.trackingContext=n}}else at(this)&&(this.Tt(),xt(),this.Ot=this.It(!1),gt());var i=this.Ot;if(ct(i))throw i.cause;return i},i.set=function(n){if(this.kt){this.isRunningSetter&&t(33,this.tt),this.isRunningSetter=!0;try{this.kt.call(this.Vt,n)}finally{this.isRunningSetter=!1}}else t(34,this.tt)},i.trackAndCompute=function(){var t=this.Ot,n=this.L===pi.P,i=this.It(!0),r=n||ct(t)||ct(i)||!this.Et(t,i);return r&&(this.Ot=i),r},i.It=function(t){this.isComputing=!0;var n,i=st(!1);if(t)n=ht(this,this.derivation,this.Vt);else if(!0===_i.disableErrorBoundaries)n=this.derivation.call(this.Vt);else try{n=this.derivation.call(this.Vt)}catch(t){n=new ji(t)}return ft(i),this.isComputing=!1,n},i.F=function(){this.Rt||(vt(this),this.Ot=void 0)},i.St=function(t,n){var i=this,r=!0,e=void 0;return Rt((function(){var u=i.get();if(!r||n){var o=dt();t({observableKind:"computed",debugObjectName:i.tt,type:Wi,object:i,newValue:u,oldValue:e}),bt(o)}r=!1,e=u}))},i.Tt=function(){},i.toString=function(){return this.tt+"["+this.derivation.toString()+"]"},i.valueOf=function(){return d(this.get())},i[Symbol.toPrimitive]=function(){return this.valueOf()},w(n,[{key:"isComputing",get:function(){return p(this.bt,n.Lt)},set:function(t){this.bt=y(this.bt,n.Lt,t)}},{key:"isRunningSetter",get:function(){return p(this.bt,n.Ct)},set:function(t){this.bt=y(this.bt,n.Ct,t)}},{key:"isBeingObserved",get:function(){return p(this.bt,n.pt)},set:function(t){this.bt=y(this.bt,n.pt,t)}},{key:"isPendingUnobservation",get:function(){return p(this.bt,n.yt)},set:function(t){this.bt=y(this.bt,n.yt,t)}},{key:"diffValue",get:function(){return p(this.bt,n.jt)?1:0},set:function(t){this.bt=y(this.bt,n.jt,1===t)}}])}();bi.Lt=1,bi.Ct=2,bi.pt=4,bi.yt=8,bi.jt=16;var pi,yi,mi=h("ComputedValue",bi);!function(t){t[t.P=-1]="NOT_TRACKING_",t[t.C=0]="UP_TO_DATE_",t[t.B=1]="POSSIBLY_STALE_",t[t.K=2]="STALE_"}(pi||(pi={})),function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"}(yi||(yi={}));var ji=function(t){this.cause=void 0,this.cause=t},wi=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED","useProxies"],Oi=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},xi=!0,gi=!1,_i=function(){var i=n();return i.__mobxInstanceCount>0&&!i.__mobxGlobals&&(xi=!1),i.__mobxGlobals&&i.__mobxGlobals.version!==(new Oi).version&&(xi=!1),xi?i.__mobxGlobals?(i.__mobxInstanceCount+=1,i.__mobxGlobals.UNCHANGED||(i.__mobxGlobals.UNCHANGED={}),i.__mobxGlobals):(i.__mobxInstanceCount=1,i.__mobxGlobals=new Oi):(setTimeout((function(){gi||t(35)}),1),new Oi)}(),Si=function(){function t(t,n,i,r){void 0===t&&(t="Reaction"),this.tt=void 0,this.Pt=void 0,this.Kt=void 0,this.Bt=void 0,this.D=[],this.W=[],this.L=pi.P,this.q=0,this.G=0,this.bt=0,this.Mt=yi.NONE,this.tt=t,this.Pt=n,this.Kt=i,this.Bt=r}var n=t.prototype;return n.H=function(){this.Y()},n.Y=function(){this.isScheduled||(this.isScheduled=!0,_i.pendingReactions.push(this),At())},n.J=function(){if(!this.isDisposed){xt(),this.isScheduled=!1;var t=_i.trackingContext;if(_i.trackingContext=this,at(this)){this.isTrackPending=!0;try{this.Pt()}catch(t){this.Dt(t)}}_i.trackingContext=t,gt()}},n.track=function(t){if(!this.isDisposed){xt(),this.isRunning=!0;var n=_i.trackingContext;_i.trackingContext=this;var i=ht(this,t,void 0);_i.trackingContext=n,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&vt(this),ct(i)&&this.Dt(i.cause),gt()}},n.Dt=function(t){var n=this;if(this.Kt)this.Kt(t,this);else{if(_i.disableErrorBoundaries)throw t;_i.suppressReactionErrors||console.error("[mobx] uncaught error in '"+this+"'",t),_i.globalReactionErrorHandlers.forEach((function(i){return i(t,n)}))}},n.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(xt(),vt(this),gt()))},n.Z=function(t){var n=this,i=function i(){n.dispose(),null==t||null==t.removeEventListener||t.removeEventListener("abort",i)};return null==t||null==t.addEventListener||t.addEventListener("abort",i),i[Un]=this,i},n.toString=function(){return"Reaction["+this.tt+"]"},n.trace=function(){},w(t,[{key:"isDisposed",get:function(){return p(this.bt,t.Wt)},set:function(n){this.bt=y(this.bt,t.Wt,n)}},{key:"isScheduled",get:function(){return p(this.bt,t.qt)},set:function(n){this.bt=y(this.bt,t.qt,n)}},{key:"isTrackPending",get:function(){return p(this.bt,t.Gt)},set:function(n){this.bt=y(this.bt,t.Gt,n)}},{key:"isRunning",get:function(){return p(this.bt,t.Ht)},set:function(n){this.bt=y(this.bt,t.Ht,n)}},{key:"diffValue",get:function(){return p(this.bt,t.jt)?1:0},set:function(n){this.bt=y(this.bt,t.jt,1===n)}}])}();Si.Wt=1,Si.qt=2,Si.Gt=4,Si.Ht=8,Si.jt=16;var Ai=function(t){return t()},ki=h("Reaction",Si),Mi=N("action"),Vi=N("action.bound",{bound:!0}),Ei=N("autoAction",{autoAction:!0}),Ni=N("autoAction.bound",{autoAction:!0,bound:!0}),Ri=Vt(!1);Object.assign(Ri,Mi);var Ti=Vt(!0);Object.assign(Ti,Ei),Ri.bound=S(Vi),Ti.bound=S(Ni);var Ii=function(t){return t()},Li=0;Dt.prototype=Object.create(Error.prototype);var Ci=C("flow"),Pi=C("flow.bound",{bound:!0}),Ki=Object.assign((function(t,n){if(k(n))return Ci.t(t,n);if(u(n))return A(t,n,Ci);var i=t,r=i.name||"<unnamed flow>",o=function(){var t,n=this,u=arguments,o=++Li,s=Ri(r+" - runid: "+o+" - init",i).apply(n,u),f=void 0,c=new Promise((function(n,i){function u(t){var n;f=void 0;try{n=Ri(r+" - runid: "+o+" - yield "+h++,s.next).call(s,t)}catch(t){return i(t)}a(n)}function c(t){var n;f=void 0;try{n=Ri(r+" - runid: "+o+" - yield "+h++,s.throw).call(s,t)}catch(t){return i(t)}a(n)}function a(t){if(!e(null==t?void 0:t.then))return t.done?n(t.value):(f=Promise.resolve(t.value)).then(u,c);t.then(a,i)}var h=0;t=i,u(void 0)}));return c.cancel=Ri(r+" - runid: "+o+" - cancel",(function(){try{f&&Wt(f);var n=s.return(void 0),i=Promise.resolve(n.value);i.then(Dn,Dn),Wt(i),t(new Dt)}catch(n){t(n)}})),c};return o.isMobXFlow=!0,o}),Ci);Ki.bound=S(Pi);var Bi={has:function(t,n){return Zt(t).it(n)},get:function(t,n){return Zt(t).ct(n)},set:function(t,n,i){var r;return!!u(n)&&(null==(r=Zt(t).ht(n,i,!0))||r)},deleteProperty:function(t,n){var i;return!!u(n)&&(null==(i=Zt(t).Ut(n,!0))||i)},defineProperty:function(t,n,i){var r;return null==(r=Zt(t).v(n,i))||r},ownKeys:function(t){return Zt(t).rt()},preventExtensions:function(){t(13)}},Di=Symbol("mobx-keys"),Wi="update",qi={get:function(t,n){var i=t[Un];return n===Un?i:"length"===n?i.Xt():"string"!=typeof n||isNaN(n)?b(Hi,n)?Hi[n]:t[n]:i.ct(parseInt(n))},set:function(t,n,i){var r=t[Un];return"length"===n&&r.Ft(i),"symbol"==typeof n||isNaN(n)?t[n]=i:r.ht(parseInt(n),i),!0},preventExtensions:function(){t(15)}},Gi=function(){function n(t,n,i,r){void 0===t&&(t="ObservableArray"),this.zt=void 0,this.$t=void 0,this.st=void 0,this.j=[],this.et=void 0,this.ut=void 0,this.Jt=void 0,this.dehancer=void 0,this.l=void 0,this.Yt=0,this.zt=i,this.$t=r,this.st=new Xn(t),this.Jt=function(t,i){return n(t,i,"ObservableArray[..]")}}var i=n.prototype;return i.Qt=function(t){return void 0!==this.dehancer?this.dehancer(t):t},i.ft=function(t){return void 0!==this.dehancer&&t.length>0?t.map(this.dehancer):t},i._t=function(t){return nn(this,t)},i.St=function(t,n){return void 0===n&&(n=!1),n&&t({observableKind:"array",object:this.l,debugObjectName:this.st.tt,type:"splice",index:0,added:this.j.slice(),addedCount:this.j.length,removed:[],removedCount:0}),un(this,t)},i.Xt=function(){return this.st.reportObserved(),this.j.length},i.Ft=function(n){("number"!=typeof n||isNaN(n)||n<0)&&t("Out of range: "+n);var i=this.j.length;if(n!==i)if(n>i){for(var r=new Array(n-i),e=0;e<n-i;e++)r[e]=void 0;this.ot(i,0,r)}else this.ot(n,i-n)},i.Zt=function(n,i){n!==this.Yt&&t(16),this.Yt+=i,this.$t&&i>0&&On(n+i+1)},i.ot=function(t,n,i){var r=this,e=this.j.length;if(void 0===t?t=0:t>e?t=e:t<0&&(t=Math.max(0,e+t)),n=1===arguments.length?e-t:null==n?0:Math.max(0,Math.min(n,e-t)),void 0===i&&(i=Cn),tn(this)){var u=rn(this,{object:this.l,type:"splice",index:t,removedCount:n,added:i});if(!u)return Cn;n=u.removedCount,i=u.added}if(i=0===i.length?i:i.map((function(t){return r.Jt(t,void 0)})),this.$t){var o=i.length-n;this.Zt(e,o)}var s=this.tn(t,n,i);return 0===n&&0===i.length||this.nn(t,i,s),this.ft(s)},i.tn=function(t,n,i){var r;if(i.length<1e4)return(r=this.j).splice.apply(r,[t,n].concat(i));var e=this.j.slice(t,t+n),u=this.j.slice(t+n);this.j.length+=i.length-n;for(var o=0;o<i.length;o++)this.j[t+o]=i[o];for(var s=0;s<u.length;s++)this.j[t+i.length+s]=u[s];return e},i.in=function(t,n,i){var r=!this.zt&&!1,e=en(this),u=e||r?{observableKind:"array",object:this.l,type:Wi,debugObjectName:this.st.tt,index:t,newValue:n,oldValue:i}:null;this.st.reportChanged(),e&&on(this,u)},i.nn=function(t,n,i){var r=!this.zt&&!1,e=en(this),u=e||r?{observableKind:"array",object:this.l,debugObjectName:this.st.tt,type:"splice",index:t,removed:i,added:n,removedCount:i.length,addedCount:n.length}:null;this.st.reportChanged(),e&&on(this,u)},i.ct=function(t){if(!(this.$t&&t>=this.j.length))return this.st.reportObserved(),this.Qt(this.j[t]);console.warn("[mobx] Out of bounds read: "+t)},i.ht=function(n,i){var r=this.j;if(this.$t&&n>r.length&&t(17,n,r.length),n<r.length){var e=r[n];if(tn(this)){var u=rn(this,{type:Wi,object:this.l,index:n,newValue:i});if(!u)return;i=u.newValue}(i=this.Jt(i,e))!==e&&(r[n]=i,this.in(n,i,e))}else{for(var o=new Array(n+1-r.length),s=0;s<o.length-1;s++)o[s]=void 0;o[o.length-1]=i,this.ot(r.length,0,o)}},n}(),Hi={clear:function(){return this.splice(0)},replace:function(t){var n=this[Un];return n.ot(0,n.j.length,t)},toJSON:function(){return this.slice()},splice:function(t,n){for(var i=arguments.length,r=new Array(i>2?i-2:0),e=2;e<i;e++)r[e-2]=arguments[e];var u=this[Un];switch(arguments.length){case 0:return[];case 1:return u.ot(t);case 2:return u.ot(t,n)}return u.ot(t,n,r)},spliceWithArray:function(t,n,i){return this[Un].ot(t,n,i)},push:function(){for(var t=this[Un],n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return t.ot(t.j.length,0,i),t.j.length},pop:function(){return this.splice(Math.max(this[Un].j.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=this[Un],n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return t.ot(0,0,i),t.j.length},reverse:function(){return _i.trackingDerivation&&t(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){_i.trackingDerivation&&t(37,"sort");var n=this.slice();return n.sort.apply(n,arguments),this.replace(n),this},remove:function(t){var n=this[Un],i=n.ft(n.j).indexOf(t);return i>-1&&(this.splice(i,1),!0)}};fn("at",cn),fn("concat",cn),fn("flat",cn),fn("includes",cn),fn("indexOf",cn),fn("join",cn),fn("lastIndexOf",cn),fn("slice",cn),fn("toString",cn),fn("toLocaleString",cn),fn("toSorted",cn),fn("toSpliced",cn),fn("with",cn),fn("every",an),fn("filter",an),fn("find",an),fn("findIndex",an),fn("findLast",an),fn("findLastIndex",an),fn("flatMap",an),fn("forEach",an),fn("map",an),fn("some",an),fn("toReversed",an),fn("reduce",hn),fn("reduceRight",hn);var Ui,Xi,Fi=h("ObservableArrayAdministration",Gi),zi={},$i="add",Ji=function(){function n(n,i,r){var u=this;void 0===i&&(i=V),void 0===r&&(r="ObservableMap"),this.Jt=void 0,this.tt=void 0,this[Un]=zi,this.lt=void 0,this.dt=void 0,this.vt=void 0,this.et=void 0,this.ut=void 0,this.dehancer=void 0,this.Jt=i,this.tt=r,e(Map)||t(18),An((function(){u.vt=M("ObservableMap.keys()"),u.lt=new Map,u.dt=new Map,n&&u.merge(n)}))}var i=n.prototype;return i.it=function(t){return this.lt.has(t)},i.has=function(t){var n=this;if(!_i.trackingDerivation)return this.it(t);var i=this.dt.get(t);if(!i){var r=i=new li(this.it(t),E,"ObservableMap.key?",!1);this.dt.set(t,r),Lt(r,(function(){return n.dt.delete(t)}))}return i.get()},i.set=function(t,n){var i=this.it(t);if(tn(this)){var r=rn(this,{type:i?Wi:$i,object:this,newValue:n,name:t});if(!r)return this;n=r.newValue}return i?this.rn(t,n):this.en(t,n),this},i.delete=function(t){var n=this;if(tn(this)&&!rn(this,{type:"delete",object:this,name:t}))return!1;if(this.it(t)){var i=en(this),r=i?{observableKind:"map",debugObjectName:this.tt,type:"delete",object:this,oldValue:this.lt.get(t).Ot,name:t}:null;return Jt((function(){var i;n.vt.reportChanged(),null==(i=n.dt.get(t))||i.gt(!1),n.lt.get(t).gt(void 0),n.lt.delete(t)})),i&&on(this,r),!0}return!1},i.rn=function(t,n){var i=this.lt.get(t);if((n=i.xt(n))!==_i.UNCHANGED){var r=en(this),e=r?{observableKind:"map",debugObjectName:this.tt,type:Wi,object:this,oldValue:i.Ot,name:t,newValue:n}:null;i.gt(n),r&&on(this,e)}},i.en=function(t,n){var i=this;Jt((function(){var r,e=new li(n,i.Jt,"ObservableMap.key",!1);i.lt.set(t,e),n=e.Ot,null==(r=i.dt.get(t))||r.gt(!0),i.vt.reportChanged()}));var r=en(this);r&&on(this,r?{observableKind:"map",debugObjectName:this.tt,type:$i,object:this,name:t,newValue:n}:null)},i.get=function(t){return this.has(t)?this.Qt(this.lt.get(t).get()):this.Qt(void 0)},i.Qt=function(t){return void 0!==this.dehancer?this.dehancer(t):t},i.keys=function(){return this.vt.reportObserved(),this.lt.keys()},i.values=function(){var t=this,n=this.keys();return ln({next:function(){var i=n.next(),r=i.done;return{done:r,value:r?void 0:t.get(i.value)}}})},i.entries=function(){var t=this,n=this.keys();return ln({next:function(){var i=n.next(),r=i.done,e=i.value;return{done:r,value:r?void 0:[e,t.get(e)]}}})},i[Symbol.iterator]=function(){return this.entries()},i.forEach=function(t,n){for(var i,r=O(this);!(i=r()).done;){var e=i.value;t.call(n,e[1],e[0],this)}},i.merge=function(n){var i=this;return Yi(n)&&(n=new Map(n)),Jt((function(){var r,e;s(n)?function(t){var n=Object.keys(t);if(!Wn)return n;var i=Object.getOwnPropertySymbols(t);return i.length?[].concat(n,i.filter((function(n){return Ln.propertyIsEnumerable.call(t,n)}))):n}(n).forEach((function(t){return i.set(t,n[t])})):Array.isArray(n)?n.forEach((function(t){return i.set(t[0],t[1])})):v(n)?(r=Object.getPrototypeOf(n),e=Object.getPrototypeOf(r),null!==Object.getPrototypeOf(e)&&t(19,n),n.forEach((function(t,n){return i.set(n,t)}))):null!=n&&t(20,n)})),this},i.clear=function(){var t=this;Jt((function(){lt((function(){for(var n,i=O(t.keys());!(n=i()).done;)t.delete(n.value)}))}))},i.replace=function(n){var i=this;return Jt((function(){for(var r,e=function(n){if(v(n)||Yi(n))return n;if(Array.isArray(n))return new Map(n);if(s(n)){var i=new Map;for(var r in n)i.set(r,n[r]);return i}return t(21,n)}(n),u=new Map,o=!1,f=O(i.lt.keys());!(r=f()).done;){var c=r.value;if(!e.has(c))if(i.delete(c))o=!0;else{var a=i.lt.get(c);u.set(c,a)}}for(var h,l=O(e.entries());!(h=l()).done;){var d=h.value,b=d[0],p=d[1],y=i.lt.has(b);if(i.set(b,p),i.lt.has(b)){var m=i.lt.get(b);u.set(b,m),y||(o=!0)}}if(!o)if(i.lt.size!==u.size)i.vt.reportChanged();else for(var j=i.lt.keys(),w=u.keys(),x=j.next(),g=w.next();!x.done;){if(x.value!==g.value){i.vt.reportChanged();break}x=j.next(),g=w.next()}i.lt=u})),this},i.toString=function(){return"[object ObservableMap]"},i.toJSON=function(){return Array.from(this)},i.St=function(t){return un(this,t)},i._t=function(t){return nn(this,t)},w(n,[{key:"size",get:function(){return this.vt.reportObserved(),this.lt.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),Yi=h("ObservableMap",Ji),Qi={},Zi=function(){function n(n,i,r){var u=this;void 0===i&&(i=V),void 0===r&&(r="ObservableSet"),this.tt=void 0,this[Un]=Qi,this.lt=new Set,this.st=void 0,this.ut=void 0,this.et=void 0,this.dehancer=void 0,this.Jt=void 0,this.tt=r,e(Set)||t(22),this.Jt=function(t,n){return i(t,n,r)},An((function(){u.st=M(u.tt),n&&u.replace(n)}))}var i=n.prototype;return i.Qt=function(t){return void 0!==this.dehancer?this.dehancer(t):t},i.clear=function(){var t=this;Jt((function(){lt((function(){for(var n,i=O(t.lt.values());!(n=i()).done;)t.delete(n.value)}))}))},i.forEach=function(t,n){for(var i,r=O(this);!(i=r()).done;){var e=i.value;t.call(n,e,e,this)}},i.add=function(t){var n=this;if(tn(this)){var i=rn(this,{type:$i,object:this,newValue:t});if(!i)return this;t=i.newValue}if(!this.has(t)){Jt((function(){n.lt.add(n.Jt(t,void 0)),n.st.reportChanged()}));var r=en(this);r&&on(this,r?{observableKind:"set",debugObjectName:this.tt,type:$i,object:this,newValue:t}:null)}return this},i.delete=function(t){var n=this;if(tn(this)&&!rn(this,{type:"delete",object:this,oldValue:t}))return!1;if(this.has(t)){var i=en(this),r=i?{observableKind:"set",debugObjectName:this.tt,type:"delete",object:this,oldValue:t}:null;return Jt((function(){n.st.reportChanged(),n.lt.delete(t)})),i&&on(this,r),!0}return!1},i.has=function(t){return this.st.reportObserved(),this.lt.has(this.Qt(t))},i.entries=function(){var t=this.values();return dn({next:function(){var n=t.next(),i=n.value,r=n.done;return r?{value:void 0,done:r}:{value:[i,i],done:r}}})},i.keys=function(){return this.values()},i.values=function(){this.st.reportObserved();var t=this,n=this.lt.values();return dn({next:function(){var i=n.next(),r=i.done;return r?{value:void 0,done:r}:{value:t.Qt(i.value),done:r}}})},i.intersection=function(t){return l(t)&&!tr(t)?t.intersection(this):new Set(this).intersection(t)},i.union=function(t){return l(t)&&!tr(t)?t.union(this):new Set(this).union(t)},i.difference=function(t){return new Set(this).difference(t)},i.symmetricDifference=function(t){return l(t)&&!tr(t)?t.symmetricDifference(this):new Set(this).symmetricDifference(t)},i.isSubsetOf=function(t){return new Set(this).isSubsetOf(t)},i.isSupersetOf=function(t){return new Set(this).isSupersetOf(t)},i.isDisjointFrom=function(t){return l(t)&&!tr(t)?t.isDisjointFrom(this):new Set(this).isDisjointFrom(t)},i.replace=function(n){var i=this;return tr(n)&&(n=new Set(n)),Jt((function(){Array.isArray(n)||l(n)?(i.clear(),n.forEach((function(t){return i.add(t)}))):null!=n&&t("Cannot initialize set from "+n)})),this},i.St=function(t){return un(this,t)},i._t=function(t){return nn(this,t)},i.toJSON=function(){return Array.from(this)},i.toString=function(){return"[object ObservableSet]"},i[Symbol.iterator]=function(){return this.values()},w(n,[{key:"size",get:function(){return this.st.reportObserved(),this.lt.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),tr=h("ObservableSet",Zi),nr=Object.create(null),ir=function(){function n(t,n,i,r){void 0===n&&(n=new Map),void 0===r&&(r=Jn),this.h=void 0,this.j=void 0,this.tt=void 0,this.un=void 0,this.vt=void 0,this.ut=void 0,this.et=void 0,this.l=void 0,this.p=void 0,this.on=void 0,this.sn=void 0,this.h=t,this.j=n,this.tt=i,this.un=r,this.vt=new Xn("ObservableObject.keys"),this.p=s(this.h)}var i=n.prototype;return i.O=function(t){return this.j.get(t).get()},i._=function(t,n){var i=this.j.get(t);if(i instanceof bi)return i.set(n),!0;if(tn(this)){var r=rn(this,{type:Wi,object:this.l||this.h,name:t,newValue:n});if(!r)return null;n=r.newValue}if((n=i.xt(n))!==_i.UNCHANGED){var e=en(this),u=e?{type:Wi,observableKind:"object",debugObjectName:this.tt,object:this.l||this.h,oldValue:i.Ot,name:t,newValue:n}:null;i.gt(n),e&&on(this,u)}return!0},i.ct=function(t){return _i.trackingDerivation&&!b(this.h,t)&&this.it(t),this.h[t]},i.ht=function(t,n,i){return void 0===i&&(i=!1),b(this.h,t)?this.j.has(t)?this._(t,n):i?Reflect.set(this.h,t,n):(this.h[t]=n,!0):this.s(t,{value:n,enumerable:!0,writable:!0,configurable:!0},this.un,i)},i.it=function(t){if(!_i.trackingDerivation)return t in this.h;this.sn||(this.sn=new Map);var n=this.sn.get(t);return n||(n=new li(t in this.h,E,"ObservableObject.key?",!1),this.sn.set(t,n)),n.get()},i.o=function(n,i){if(!0===i&&(i=this.un),!1!==i){if(!(n in this.h)){var r;if(null!=(r=this.h[Hn])&&r[n])return;t(1,i.i,this.tt+"."+n.toString())}for(var e=this.h;e&&e!==Ln;){var u=Tn(e,n);if(u){var o=i.o(this,n,u,e);if(0===o)return;if(1===o)break}e=Object.getPrototypeOf(e)}mn(this,0,n)}},i.s=function(t,n,i,r){if(void 0===r&&(r=!1),!0===i&&(i=this.un),!1===i)return this.v(t,n,r);var e=i.s(this,t,n,r);return e&&mn(this,0,t),e},i.v=function(t,n,i){void 0===i&&(i=!1);try{xt();var r=this.Ut(t);if(!r)return r;if(tn(this)){var e=rn(this,{object:this.l||this.h,name:t,type:$i,newValue:n.value});if(!e)return null;var u=e.newValue;n.value!==u&&(n=x({},n,{value:u}))}if(i){if(!Reflect.defineProperty(this.h,t,n))return!1}else In(this.h,t,n);this.fn(t,n.value)}finally{gt()}return!0},i.g=function(t,n,i,r){void 0===r&&(r=!1);try{xt();var e=this.Ut(t);if(!e)return e;if(tn(this)){var u=rn(this,{object:this.l||this.h,name:t,type:$i,newValue:n});if(!u)return null;n=u.newValue}var o=pn(t),s={configurable:!_i.safeDescriptors||this.p,enumerable:!0,get:o.get,set:o.set};if(r){if(!Reflect.defineProperty(this.h,t,s))return!1}else In(this.h,t,s);var f=new li(n,i,"ObservableObject.key",!1);this.j.set(t,f),this.fn(t,f.Ot)}finally{gt()}return!0},i.m=function(t,n,i){void 0===i&&(i=!1);try{xt();var r=this.Ut(t);if(!r)return r;if(tn(this)&&!rn(this,{object:this.l||this.h,name:t,type:$i,newValue:void 0}))return null;n.name||(n.name="ObservableObject.key"),n.context=this.l||this.h;var e=pn(t),u={configurable:!_i.safeDescriptors||this.p,enumerable:!1,get:e.get,set:e.set};if(i){if(!Reflect.defineProperty(this.h,t,u))return!1}else In(this.h,t,u);this.j.set(t,new bi(n)),this.fn(t,void 0)}finally{gt()}return!0},i.Ut=function(t,n){if(void 0===n&&(n=!1),!b(this.h,t))return!0;if(tn(this)&&!rn(this,{object:this.l||this.h,name:t,type:"remove"}))return null;try{var i;xt();var r,e=en(this),u=this.j.get(t),o=void 0;if(!u&&e&&(o=null==(r=Tn(this.h,t))?void 0:r.value),n){if(!Reflect.deleteProperty(this.h,t))return!1}else delete this.h[t];u&&(this.j.delete(t),u instanceof li&&(o=u.Ot),St(u)),this.vt.reportChanged(),null==(i=this.sn)||null==(i=i.get(t))||i.set(t in this.h),e&&e&&on(this,{type:"remove",observableKind:"object",object:this.l||this.h,debugObjectName:this.tt,oldValue:o,name:t})}finally{gt()}return!0},i.St=function(t){return un(this,t)},i._t=function(t){return nn(this,t)},i.fn=function(t,n){var i,r=en(this);r&&r&&on(this,r?{type:$i,observableKind:"object",debugObjectName:this.tt,object:this.l||this.h,name:t,newValue:n}:null),null==(i=this.sn)||null==(i=i.get(t))||i.set(!0),this.vt.reportChanged()},i.rt=function(){return this.vt.reportObserved(),qn(this.h)},i.nt=function(){return this.vt.reportObserved(),Object.keys(this.h)},n}(),rr=h("ObservableObjectAdministration",ir),er=jn(0),ur=function(){var t=!1,n={};return Object.defineProperty(n,"0",{set:function(){t=!0}}),Object.create(n)[0]=1,!1===t}(),or=0,sr=function(){};Ui=sr,Xi=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(Ui.prototype,Xi):void 0!==Ui.prototype.__proto__?Ui.prototype.__proto__=Xi:Ui.prototype=Xi;var fr=function(t){function n(n,i,r,e){var u;return void 0===r&&(r="ObservableArray"),void 0===e&&(e=!1),u=t.call(this)||this,An((function(){var t=new Gi(r,i,e,!0);t.l=u,a(u,Un,t),n&&n.length&&u.spliceWithArray(0,0,n),ur&&Object.defineProperty(u,"0",er)})),u}g(n,t);var i=n.prototype;return i.concat=function(){this[Un].st.reportObserved();for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return Array.prototype.concat.apply(this.slice(),n.map((function(t){return vn(t)?t.slice():t})))},i[Symbol.iterator]=function(){var t=this,n=0;return Vn({next:function(){return n<t.length?{value:t[n++],done:!1}:{done:!0,value:void 0}}})},w(n,[{key:"length",get:function(){return this[Un].Xt()},set:function(t){this[Un].Ft(t)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(sr);Object.entries(Hi).forEach((function(t){var n=t[0];"concat"!==n&&c(fr.prototype,n,t[1])})),On(1e3);var cr,ar=Ln.toString,hr=(null==(cr=n().Iterator)?void 0:cr.prototype)||{};["Symbol","Map","Set"].forEach((function(i){void 0===n()[i]&&t("MobX requires global '"+i+"' to be available or polyfilled")})),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Mt,extras:{getDebugName:Sn},$mobx:Un}),exports.$mobx=Un,exports.FlowCancellationError=Dt,exports.ObservableMap=Ji,exports.ObservableSet=Zi,exports.Reaction=Si,exports._allowStateChanges=ot,exports._allowStateChangesInsideComputed=Et,exports._allowStateReadsEnd=yt,exports._allowStateReadsStart=pt,exports._autoAction=Ti,exports._endAction=ut,exports._getAdministration=_n,exports._getGlobalState=function(){return _i},exports._interceptReads=func