photoeditorsdk
Version:
The most comprehensive photo editor SDK for HTML5
1 lines • 1.49 MB
JavaScript
var eJ=Object.create;var Bu=Object.defineProperty;var ID=Object.getOwnPropertyDescriptor;var iJ=Object.getOwnPropertyNames;var rJ=Object.getPrototypeOf;var oJ=Object.prototype.hasOwnProperty;var nJ=(i,t,e)=>t in i?Bu(i,t,{enumerable:true,configurable:true,writable:true,value:e}):i[t]=e;var DD=i=>Bu(i,"__esModule",{value:true});var d=(i,t)=>()=>(i&&(t=i(i=0)),t);var Wt=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports);var ue=(i,t)=>{for(var e in t)Bu(i,e,{get:t[e],enumerable:true})};var ED=(i,t,e,r)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of iJ(t))if(!oJ.call(i,o)&&(e||o!=="default"))Bu(i,o,{get:()=>t[o],enumerable:!(r=ID(t,o))||r.enumerable})}return i};var y=(i,t)=>{return ED(DD(Bu(i!=null?eJ(rJ(i)):{},"default",!t&&i&&i.__esModule?{get:()=>i.default,enumerable:true}:{value:i,enumerable:true})),i)};var Mi=(i=>{return(t,e)=>{return i&&i.get(t)||(e=ED(DD({}),t,1),i&&i.set(t,e),e)}})(typeof WeakMap!=="undefined"?new WeakMap:0);var f=(i,t,e,r)=>{var o=r>1?void 0:r?ID(t,e):t;for(var n=i.length-1,s;n>=0;n--)if(s=i[n])o=(r?s(t,e,o):s(o))||o;if(r&&o)Bu(t,e,o);return o};var X=(i,t,e)=>{nJ(i,typeof t!=="symbol"?t+"":t,e);return e};function Hm(){if(typeof window!=="undefined"){return window}if(typeof global!=="undefined"){return global}if(typeof self!=="undefined"){return self}return aJ}function vr(){return++at.mobxGuid}function de(i){ma(false,i);throw"X"}function ma(i,t){if(!i)throw new Error("[mobx] "+(t||sJ))}function es(i,t){if(true)return false;if(t){return es("'"+i+"', use '"+t+"' instead.")}if(FD.indexOf(i)!==-1)return false;FD.push(i);console.error("[mobx] Deprecated: "+i);return true}function T0(i){var t=false;return function(){if(t)return;t=true;return i.apply(this,arguments)}}function lJ(i){var t=[];i.forEach(function(e){if(t.indexOf(e)===-1)t.push(e)});return t}function k0(i){return i!==null&&typeof i==="object"}function zu(i){if(i===null||typeof i!=="object")return false;var t=Object.getPrototypeOf(i);return t===Object.prototype||t===null}function cJ(i){if(Uu(i)||nn(i)){return i}else if(Array.isArray(i)){return new Map(i)}else if(zu(i)){var t=new Map;for(var e in i){t.set(e,i[e])}return t}else{return de("Cannot convert to map from '"+i+"'")}}function uJ(i,t){for(var e=0;e<t.length;e++){ss(i,t[e],i[t[e]])}}function ss(i,t,e){Object.defineProperty(i,t,{enumerable:false,writable:true,configurable:true,value:e})}function Gm(i,t,e){Object.defineProperty(i,t,{enumerable:false,writable:false,configurable:true,value:e})}function dJ(i,t){if(false)de("Cannot make property '"+t+"' observable, it is not configurable and writable in the target object")}function ya(i,t){var e="isMobX"+i;t.prototype[e]=true;return function(r){return k0(r)&&r[e]===true}}function mJ(i,t){return typeof i==="number"&&typeof t==="number"&&isNaN(i)&&isNaN(t)}function Uu(i){if(Hm().Map!==void 0&&i instanceof Hm().Map)return true;return false}function Vm(i){return i instanceof Set}function is(i){var t=[];while(true){var e=i.next();if(e.done)break;t.push(e.value)}return t}function GD(){return typeof Symbol==="function"&&Symbol.toPrimitive||"@@toPrimitive"}function VD(i){return i===null?null:typeof i==="object"?""+i:i}function OD(i,t){var e=i.next();while(!e.done){t(e.value);e=i.next()}}function jD(){return typeof Symbol==="function"&&Symbol.iterator||"@@iterator"}function I0(i,t){Gm(i,jD(),t)}function Wm(i){i[jD()]=pJ;return i}function D0(){return typeof Symbol==="function"&&Symbol.toStringTag||"@@toStringTag"}function pJ(){return this}function _g(i,t,e){if(t===void 0){t=RD}if(e===void 0){e=RD}var r=new yg(i);qJ(r,t);lE(r,e);return r}function $D(i,t){return i===t}function hJ(i,t){return L0(i,t)}function fJ(i,t){return L0(i,t,1)}function gJ(i,t){return mJ(i,t)||$D(i,t)}function KD(i,t){b0(i,t);function e(){this.constructor=i}i.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function y0(i,t){var e=typeof Symbol==="function"&&i[Symbol.iterator];if(!e)return i;var r=e.call(i),o,n=[],s;try{while((t===void 0||t-- >0)&&!(o=r.next()).done)n.push(o.value)}catch(a){s={error:a}}finally{try{if(o&&!o.done&&(e=r["return"]))e.call(r)}finally{if(s)throw s.error}}return n}function _0(){for(var i=[],t=0;t<arguments.length;t++)i=i.concat(y0(arguments[t]));return i}function _J(i,t){var e=t?bJ:yJ;return e[i]||(e[i]={configurable:true,enumerable:t,get:function(){Al(this);return this[i]},set:function(r){Al(this);this[i]=r}})}function Al(i){if(i.__mobxDidRunLazyInitializers===true)return;var t=i.__mobxDecorators;if(t){ss(i,"__mobxDidRunLazyInitializers",true);for(var e in t){var r=t[e];r.propertyCreator(i,r.prop,r.descriptor,r.decoratorTarget,r.decoratorArguments)}}}function XD(i,t){return function e(){var r;var o=function n(s,a,l,c){if(c===true){t(s,a,l,s,r);return null}if(false)de("This function is a decorator, but it wasn't invoked like a decorator");if(!Object.prototype.hasOwnProperty.call(s,"__mobxDecorators")){var u=s.__mobxDecorators;ss(s,"__mobxDecorators",Ee({},u))}s.__mobxDecorators[a]={prop:a,propertyCreator:t,descriptor:l,decoratorTarget:s,decoratorArguments:r};return _J(a,i)};if(xJ(arguments)){r=dg;return o.apply(null,arguments)}else{r=Array.prototype.slice.call(arguments);return o}}}function xJ(i){return(i.length===2||i.length===3)&&typeof i[1]==="string"||i.length===4&&i[3]===true}function jm(i,t,e){if(bg(i))return i;if(Array.isArray(i))return Z.array(i,{name:e});if(zu(i))return Z.object(i,void 0,{name:e});if(Uu(i))return Z.map(i,{name:e});if(Vm(i))return Z.set(i,{name:e});return i}function vJ(i,t,e){if(i===void 0||i===null)return i;if(Pl(i)||Ll(i)||nn(i)||_a(i))return i;if(Array.isArray(i))return Z.array(i,{name:e,deep:false});if(zu(i))return Z.object(i,void 0,{name:e,deep:false});if(Uu(i))return Z.map(i,{name:e,deep:false});if(Vm(i))return Z.set(i,{name:e,deep:false});return de(false)}function xg(i){return i}function CJ(i,t,e){if(false)throw"observable.struct should not be used with observable values";if(L0(i,t))return t;return i}function vg(i){ma(i);var t=XD(true,function(r,o,n,s,a){if(false){ma(!n||!n.get,'@observable cannot be used on getter (property "'+o+'"), use @computed instead.')}var l=n?n.initializer?n.initializer.call(r):n.value:void 0;dZ(r,o,l,i)});var e=typeof process!=="undefined"&&process.env&&false?function r(){if(arguments.length<2)return de("Incorrect decorator invocation. @observable decorator doesn't expect any arguments");return t.apply(null,arguments)}:t;e.enhancer=i;return e}function Mu(i){if(i===null||i===void 0)return qD;if(typeof i==="string")return{name:i,deep:true};if(false){if(typeof i!=="object")return de("expected options object");Object.keys(i).forEach(assertValidOption)}return i}function ag(i){return i.defaultDecorator?i.defaultDecorator.enhancer:i.deep===false?xg:jm}function kJ(i,t,e){if(typeof arguments[1]==="string"){return F0.apply(null,arguments)}if(bg(i))return i;var r=zu(i)?Z.object(i,t,e):Array.isArray(i)?Z.array(i,t):Uu(i)?Z.map(i,t):Vm(i)?Z.set(i,t):i;if(r!==i)return r;de(false)}function ts(i){de("Expected one or two arguments to observable."+i+". Did you accidentally try to use observable."+i+" as decorator?")}function Nm(i){return i instanceof hg}function x0(i){switch(i.dependenciesState){case qt.UP_TO_DATE:return false;case qt.NOT_TRACKING:case qt.STALE:return true;case qt.POSSIBLY_STALE:{var t=Ml(true);var e=Nu();var r=i.observing,o=r.length;for(var n=0;n<o;n++){var s=r[n];if(Cg(s)){if(at.disableErrorBoundaries){s.get()}else{try{s.get()}catch(a){pa(e);rs(t);return true}}if(i.dependenciesState===qt.STALE){pa(e);rs(t);return true}}}ZD(i);pa(e);rs(t);return false}}}function Lu(i){var t=i.observers.length>0;if(at.computationDepth>0&&t)de(false);if(!at.allowStateChanges&&(t||at.enforceActions==="strict"))de(false)}function DJ(i){if(false){console.warn("[mobx] Observable "+i.name+" being read outside a reactive context")}}function JD(i,t,e){var r=Ml(true);ZD(i);i.newObserving=new Array(i.observing.length+100);i.unboundDepsCount=0;i.runId=++at.runId;var o=at.trackingDerivation;at.trackingDerivation=i;var n;if(at.disableErrorBoundaries===true){n=t.call(e)}else{try{n=t.call(e)}catch(s){n=new hg(s)}}at.trackingDerivation=o;FJ(i);if(i.observing.length===0){EJ(i)}rs(r);return n}function EJ(i){if(true)return;if(at.reactionRequiresObservable||i.requiresObservable){console.warn("[mobx] Derivation "+i.name+" is created/updated without reading any observable value")}}function FJ(i){var t=i.observing;var e=i.observing=i.newObserving;var r=qt.UP_TO_DATE;var o=0,n=i.unboundDepsCount;for(var s=0;s<n;s++){var a=e[s];if(a.diffValue===0){a.diffValue=1;if(o!==s)e[o]=a;o++}if(a.dependenciesState>r){r=a.dependenciesState}}e.length=o;i.newObserving=null;n=t.length;while(n--){var a=t[n];if(a.diffValue===0){iE(a,i)}a.diffValue=0}while(o--){var a=e[o];if(a.diffValue===1){a.diffValue=0;MJ(a,i)}}if(r!==qt.UP_TO_DATE){i.dependenciesState=r;i.onBecomeStale()}}function v0(i){var t=i.observing;i.observing=[];var e=t.length;while(e--)iE(t[e],i);i.dependenciesState=qt.NOT_TRACKING}function R0(i){var t=Nu();var e=i();pa(t);return e}function Nu(){var i=at.trackingDerivation;at.trackingDerivation=null;return i}function pa(i){at.trackingDerivation=i}function Ml(i){var t=at.allowStateReads;at.allowStateReads=i;return t}function rs(i){at.allowStateReads=i}function ZD(i){if(i.dependenciesState===qt.UP_TO_DATE)return;i.dependenciesState=qt.UP_TO_DATE;var t=i.observing;var e=t.length;while(e--)t[e].lowestObserverState=qt.UP_TO_DATE}function Ol(i,t){if(false){ma(typeof t==="function","`action` can only be invoked on functions");if(typeof i!=="string"||!i)de("actions should have valid names, got: '"+i+"'")}var e=function(){return QD(i,t,this,arguments)};if(false){if(ypt){Object.defineProperty(e,"name",{value:i})}}e.isMobxAction=true;return e}function QD(i,t,e,r){var o=OJ(i,e,r);try{return t.apply(e,r)}catch(n){o.error=n;throw n}finally{AJ(o)}}function OJ(i,t,e){var r=gi()&&!!i;var o=0;if(r){o=Date.now();var n=e&&e.length||0;var s=new Array(n);if(n>0)for(var a=0;a<n;a++)s[a]=e[a];xo({type:"action",name:i,object:t,arguments:s})}var l=Nu();os();var c=$m(true);var u=Ml(true);var m={prevDerivation:l,prevAllowStateChanges:c,prevAllowStateReads:u,notifySpy:r,startTime:o,actionId:RJ++,parentActionId:fg};fg=m.actionId;return m}function AJ(i){if(fg!==i.actionId){de("invalid action stack. did you forget to finish an action?")}fg=i.parentActionId;if(i.error!==void 0){at.suppressReactionErrors=true}Km(i.prevAllowStateChanges);rs(i.prevAllowStateReads);ns();pa(i.prevDerivation);if(i.notifySpy){vo({time:Date.now()-i.startTime})}at.suppressReactionErrors=false}function tE(i,t){var e=$m(i);var r;try{r=t()}finally{Km(e)}return r}function $m(i){var t=at.allowStateChanges;at.allowStateChanges=i;return t}function Km(i){at.allowStateChanges=i}function PJ(){if(at.pendingReactions.length||at.inBatch||at.isRunningReactions)de("isolateGlobalState should be called before MobX is running any reactions");eE=true;if(ug){if(--Hm().__mobxInstanceCount===0)Hm().__mobxGlobals=void 0;at=new cg}}function MJ(i,t){var e=i.observers.length;if(e){i.observersIndexes[t.__mapid]=e}i.observers[e]=t;if(i.lowestObserverState>t.dependenciesState)i.lowestObserverState=t.dependenciesState}function iE(i,t){if(i.observers.length===1){i.observers.length=0;rE(i)}else{var e=i.observers;var r=i.observersIndexes;var o=e.pop();if(o!==t){var n=r[t.__mapid]||0;if(n){r[o.__mapid]=n}else{delete r[o.__mapid]}e[n]=o}delete r[t.__mapid]}}function rE(i){if(i.isPendingUnobservation===false){i.isPendingUnobservation=true;at.pendingUnobservations.push(i)}}function os(){at.inBatch++}function ns(){if(--at.inBatch===0){aE();var i=at.pendingUnobservations;for(var t=0;t<i.length;t++){var e=i[t];e.isPendingUnobservation=false;if(e.observers.length===0){if(e.isBeingObserved){e.isBeingObserved=false;e.onBecomeUnobserved()}if(e instanceof fa){e.suspend()}}}at.pendingUnobservations=[]}}function oE(i){DJ(i);var t=at.trackingDerivation;if(t!==null){if(t.runId!==i.lastAccessedBy){i.lastAccessedBy=t.runId;t.newObserving[t.unboundDepsCount++]=i;if(!i.isBeingObserved){i.isBeingObserved=true;i.onBecomeObserved()}}return true}else if(i.observers.length===0&&at.inBatch>0){rE(i)}return false}function LJ(i){if(i.lowestObserverState===qt.STALE)return;i.lowestObserverState=qt.STALE;var t=i.observers;var e=t.length;while(e--){var r=t[e];if(r.dependenciesState===qt.UP_TO_DATE){if(r.isTracing!==_o.NONE){nE(r,i)}r.onBecomeStale()}r.dependenciesState=qt.STALE}}function zJ(i){if(i.lowestObserverState===qt.STALE)return;i.lowestObserverState=qt.STALE;var t=i.observers;var e=t.length;while(e--){var r=t[e];if(r.dependenciesState===qt.POSSIBLY_STALE)r.dependenciesState=qt.STALE;else if(r.dependenciesState===qt.UP_TO_DATE)i.lowestObserverState=qt.UP_TO_DATE}}function UJ(i){if(i.lowestObserverState!==qt.UP_TO_DATE)return;i.lowestObserverState=qt.POSSIBLY_STALE;var t=i.observers;var e=t.length;while(e--){var r=t[e];if(r.dependenciesState===qt.UP_TO_DATE){r.dependenciesState=qt.POSSIBLY_STALE;if(r.isTracing!==_o.NONE){nE(r,i)}r.onBecomeStale()}}}function nE(i,t){console.log("[mobx.trace] '"+i.name+"' is invalidated due to a change in: '"+t.name+"'");if(i.isTracing===_o.BREAK){var e=[];sE(A0(i),e,1);new Function("debugger;\n/*\nTracing '"+i.name+"'\n\nYou are entering this break point because derivation '"+i.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"+(i instanceof fa?i.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+e.join("\n")+"\n*/\n ")()}}function sE(i,t,e){if(t.length>=1e3){t.push("(and many more)");return}t.push(""+new Array(e).join(" ")+i.name);if(i.dependencies)i.dependencies.forEach(function(r){return sE(r,t,e+1)})}function aE(){if(at.inBatch>0||at.isRunningReactions)return;C0(NJ)}function NJ(){at.isRunningReactions=true;var i=at.pendingReactions;var t=0;while(i.length>0){if(++t===PD){console.error("Reaction doesn't converge to a stable state after "+PD+" iterations."+(" Probably there is a cycle in the reactive function: "+i[0]));i.splice(0)}var e=i.splice(0);for(var r=0,o=e.length;r<o;r++)e[r].runReaction()}at.isRunningReactions=false}function HJ(i){var t=C0;C0=function(e){return i(function(){return t(e)})}}function gi(){return!!at.spyListeners.length}function Bl(i){if(!at.spyListeners.length)return;var t=at.spyListeners;for(var e=0,r=t.length;e<r;e++)t[e](i)}function xo(i){var t=Ee(Ee({},i),{spyReportStart:true});Bl(t)}function vo(i){if(i)Bl(Ee(Ee({},i),{spyReportEnd:true}));else Bl(WJ)}function O0(i){at.spyListeners.push(i);return T0(function(){at.spyListeners=at.spyListeners.filter(function(t){return t!==i})})}function GJ(){de(false)}function MD(i){return function(t,e,r){if(r){if(false){return de("@action cannot be used with getters")}if(r.value){return{value:Ol(i,r.value),enumerable:false,configurable:true,writable:true}}var o=r.initializer;return{enumerable:false,configurable:true,writable:true,initializer:function(){return Ol(i,o.call(this))}}}return VJ(i).apply(this,arguments)}}function VJ(i){return function(t,e,r){Object.defineProperty(t,e,{configurable:true,enumerable:false,get:function(){return void 0},set:function(o){ss(this,e,v(i,o))}})}}function jJ(i,t,e,r){if(r===true){g0(i,t,e.value);return null}if(e){return{configurable:true,enumerable:false,get:function(){g0(this,t,e.value||e.initializer.call(this));return this[t]},set:GJ}}return{enumerable:false,configurable:true,set:function(o){g0(this,t,o)},get:function(){return void 0}}}function Ge(i,t){var e=typeof i==="string"?i:i.name||"<unnamed action>";var r=typeof i==="function"?i:t;if(false){ma(typeof r==="function"&&r.length===0,"`runInAction` expects a function without arguments");if(typeof e!=="string"||!e)de("actions should have valid names, got: '"+e+"'")}return QD(e,r,this,void 0)}function g0(i,t,e){ss(i,t,Ol(t,e.bind(i)))}function $J(i,t){if(t===void 0){t=WD}if(false){ma(typeof i==="function","Autorun expects a function as first argument");ma(isAction(i)===false,"Autorun does not accept actions since actions are untrackable")}var e=t&&t.name||i.name||"Autorun@"+vr();var r=!t.scheduler&&!t.delay;var o;if(r){o=new ga(e,function(){this.track(a)},t.onError,t.requiresObservable)}else{var n=XJ(t);var s=false;o=new ga(e,function(){if(!s){s=true;n(function(){s=false;if(!o.isDisposed)o.track(a)})}},t.onError,t.requiresObservable)}function a(){i(o)}o.schedule();return o.getDisposer()}function XJ(i){return i.scheduler?i.scheduler:i.delay?function(t){return setTimeout(t,i.delay)}:KJ}function qJ(i,t,e){return cE("onBecomeObserved",i,t,e)}function lE(i,t,e){return cE("onBecomeUnobserved",i,t,e)}function cE(i,t,e,r){var o=typeof r==="function"?ba(t,e):ba(t);var n=typeof r==="function"?r:e;var s=o[i];if(typeof s!=="function")return de(false);o[i]=function(){s.call(this);n.call(this)};return function(){o[i]=s}}function Sg(i){var t=i.enforceActions,e=i.computedRequiresReaction,r=i.computedConfigurable,o=i.disableErrorBoundaries,n=i.arrayBuffer,s=i.reactionScheduler,a=i.reactionRequiresObservable,l=i.observableRequiresReaction;if(i.isolateGlobalState===true){PJ()}if(t!==void 0){if(typeof t==="boolean"||t==="strict")es(`Deprecated value for 'enforceActions', use 'false' => '"never"', 'true' => '"observed"', '"strict"' => "'always'" instead`);var c=void 0;switch(t){case true:case"observed":c=true;break;case false:case"never":c=false;break;case"strict":case"always":c="strict";break;default:de("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}at.enforceActions=c;at.allowStateChanges=c===true||c==="strict"?false:true}if(e!==void 0){at.computedRequiresReaction=!!e}if(a!==void 0){at.reactionRequiresObservable=!!a}if(l!==void 0){at.observableRequiresReaction=!!l;at.allowStateReads=!at.observableRequiresReaction}if(r!==void 0){at.computedConfigurable=!!r}if(o!==void 0){if(o===true)console.warn("WARNING: Debug feature only. MobX will NOT recover from errors if this is on.");at.disableErrorBoundaries=!!o}if(typeof n==="number"){P0(n)}if(s){HJ(s)}}function YJ(i,t,e,r){if(false){ma(arguments.length>=2&&arguments.length<=4,"'extendObservable' expected 2-4 arguments");ma(typeof i==="object","'extendObservable' expects an object as first argument");ma(!nn(i),"'extendObservable' should not be used on maps, use map.merge instead");ma(!bg(t),"Extending an object with another observable (object) is not supported. Please construct an explicit propertymap, using `toJS` if need. See issue #540");if(e){for(var o in e)if(!(o in t))de("Trying to declare a decorator for unspecified property '"+o+"'")}}r=Mu(r);var n=r.defaultDecorator||(r.deep===false?YD:F0);Al(i);M0(i,r.name,n.enhancer);os();try{var s=Object.getOwnPropertyNames(t);for(var a=0,l=s.length;a<l;a++){var o=s[a];var c=Object.getOwnPropertyDescriptor(t,o);if(false){if(isComputed(c.value))de("Passing a 'computed' as initial property value is no longer supported by extendObservable. Use a getter or decorator instead")}var u=e&&o in e?e[o]:c.get?pg:n;if(false)return de("Not a valid decorator for '"+o+"', got: "+u);var m=u(i,o,c,true);if(m)Object.defineProperty(i,o,m)}}finally{ns()}return i}function A0(i,t){return uE(ba(i,t))}function uE(i){var t={name:i.name};if(i.observing&&i.observing.length>0)t.dependencies=lJ(i.observing).map(uE);return t}function JJ(){this.message="FLOW_CANCELLED"}function ZJ(i,t){if(i===null||i===void 0)return false;if(t!==void 0){if(false)return de("isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(Pl(i)){var e=i.$mobx;return e.values&&!!e.values[t]}return false}return Pl(i)||!!i.$mobx||E0(i)||gg(i)||Cg(i)}function bg(i){if(arguments.length!==1)de(false);return ZJ(i)}function QJ(i){if(Pl(i)){return i.$mobx.getKeys()}if(nn(i)){return is(i.keys())}if(_a(i)){return is(i.keys())}if(Ll(i)){return i.map(function(t,e){return e})}return de(false)}function Pu(i,t,e,r){if(r.detectCycles)i.set(t,e);return e}function da(i,t,e){if(!t.recurseEverything&&!bg(i))return i;if(typeof i!=="object")return i;if(i===null)return null;if(i instanceof Date)return i;if(BJ(i))return da(i.get(),t,e);if(bg(i))QJ(i);var r=t.detectCycles===true;if(r&&i!==null&&e.has(i)){return e.get(i)}if(Ll(i)||Array.isArray(i)){var o=Pu(e,i,[],t);var n=i.map(function(g){return da(g,t,e)});o.length=n.length;for(var s=0,a=n.length;s<a;s++)o[s]=n[s];return o}if(_a(i)||Object.getPrototypeOf(i)===Set.prototype){if(t.exportMapsAsObjects===false){var l=Pu(e,i,new Set,t);i.forEach(function(g){l.add(da(g,t,e))});return l}else{var c=Pu(e,i,[],t);i.forEach(function(g){c.push(da(g,t,e))});return c}}if(nn(i)||Object.getPrototypeOf(i)===Map.prototype){if(t.exportMapsAsObjects===false){var u=Pu(e,i,new Map,t);i.forEach(function(g,_){u.set(_,da(g,t,e))});return u}else{var m=Pu(e,i,{},t);i.forEach(function(g,_){m[_]=da(g,t,e)});return m}}var p=Pu(e,i,{},t);for(var h in i){p[h]=da(i[h],t,e)}return p}function lt(i,t){if(typeof t==="boolean")t={detectCycles:t};if(!t)t=tZ;t.detectCycles=t.detectCycles===void 0?t.recurseEverything===true:t.detectCycles===true;var e;if(t.detectCycles)e=new Map;return da(i,t,e)}function eZ(){var i=[];for(var t=0;t<arguments.length;t++){i[t]=arguments[t]}var e=false;if(typeof i[i.length-1]==="boolean")e=i.pop();var r=iZ(i);if(!r){return de(false)}if(r.isTracing===_o.NONE){console.log("[mobx.trace] '"+r.name+"' tracing enabled")}r.isTracing=e?_o.BREAK:_o.LOG}function iZ(i){switch(i.length){case 0:return at.trackingDerivation;case 1:return ba(i[0]);case 2:return ba(i[0],i[1])}}function tn(i,t){if(t===void 0){t=void 0}os();try{return i.apply(t)}finally{ns()}}function en(i){return i.interceptors!==void 0&&i.interceptors.length>0}function Xm(i,t){var e=i.interceptors||(i.interceptors=[]);e.push(t);return T0(function(){var r=e.indexOf(t);if(r!==-1)e.splice(r,1)})}function rn(i,t){var e=Nu();try{var r=i.interceptors;if(r)for(var o=0,n=r.length;o<n;o++){t=r[o](t);ma(!t||t.type,"Intercept handlers should return nothing or a change object");if(!t)break}return t}finally{pa(e)}}function Co(i){return i.changeListeners!==void 0&&i.changeListeners.length>0}function qm(i,t){var e=i.changeListeners||(i.changeListeners=[]);e.push(t);return T0(function(){var r=e.indexOf(t);if(r!==-1)e.splice(r,1)})}function So(i,t){var e=Nu();var r=i.changeListeners;if(!r)return;r=r.slice();for(var o=0,n=r.length;o<n;o++){r[o](t)}pa(e)}function nZ(i,t){if(typeof Object["setPrototypeOf"]!=="undefined"){Object["setPrototypeOf"](i.prototype,t)}else if(typeof i.prototype.__proto__!=="undefined"){i.prototype.__proto__=t}else{i["prototype"]=t}}function mE(i){return{enumerable:false,configurable:false,get:function(){return this.get(i)},set:function(t){this.set(i,t)}}}function aZ(i){Object.defineProperty(on.prototype,""+i,mE(i))}function P0(i){for(var t=S0;t<i;t++)aZ(t);S0=i}function Ll(i){return k0(i)&&lZ(i.$mobx)}function lg(i){if(i&&i.toString)return i.toString();else return new String(i).toString()}function M0(i,t,e){if(t===void 0){t=""}if(e===void 0){e=jm}var r=i.$mobx;if(r)return r;if(!zu(i))t=(i.constructor.name||"ObservableObject")+"@"+vr();if(!t)t="ObservableObject@"+vr();r=new pE(i,t,e);Gm(i,"$mobx",r);return r}function dZ(i,t,e,r){var o=M0(i);dJ(i,t);if(en(o)){var n=rn(o,{object:i,name:t,type:"add",newValue:e});if(!n)return;e=n.newValue}var s=o.values[t]=new ha(e,r,o.name+"."+t,false);e=s.value;Object.defineProperty(i,t,pZ(t));if(o.keys)o.keys.push(t);fZ(o,i,t,e)}function mZ(i,t,e){var r=M0(i);e.name=r.name+"."+t;e.context=i;r.values[t]=new fa(e);Object.defineProperty(i,t,hZ(t))}function pZ(i){return LD[i]||(LD[i]={configurable:true,enumerable:true,get:function(){return this.$mobx.read(this,i)},set:function(t){this.$mobx.write(this,i,t)}})}function UD(i){var t=i.$mobx;if(!t){Al(i);return i.$mobx}return t}function hZ(i){return zD[i]||(zD[i]={configurable:at.computedConfigurable,enumerable:false,get:function(){return UD(this).read(this,i)},set:function(t){UD(this).write(this,i,t)}})}function fZ(i,t,e,r){var o=Co(i);var n=gi();var s=o||n?{type:"add",object:t,name:e,newValue:r}:null;if(n)xo(Ee(Ee({},s),{name:i.name,key:e}));if(o)So(i,s);if(n)vo()}function Pl(i){if(k0(i)){Al(i);return gZ(i.$mobx)}return false}function ba(i,t){if(typeof i==="object"&&i!==null){if(Ll(i)){if(t!==void 0)de(false);return i.$mobx.atom}if(_a(i)){return i.$mobx}if(nn(i)){var e=i;if(t===void 0)return e._keysAtom;var r=e._data.get(t)||e._hasMap.get(t);if(!r)de(false);return r}Al(i);if(t&&!i.$mobx)i[t];if(Pl(i)){if(!t)return de(false);var r=i.$mobx.values[t];if(!r)de(false);return r}if(E0(i)||Cg(i)||gg(i)){return i}}else if(typeof i==="function"){if(gg(i.$mobx)){return i.$mobx}}return de(false)}function hE(i,t){if(!i)de("Expecting some object");if(t!==void 0)return hE(ba(i,t));if(E0(i)||Cg(i)||gg(i))return i;if(nn(i)||_a(i))return i;Al(i);if(i.$mobx)return i.$mobx;de(false)}function bZ(i,t){var e;if(t!==void 0)e=ba(i,t);else if(Pl(i)||nn(i)||_a(i))e=hE(i);else e=ba(i);return e.name}function L0(i,t,e){if(e===void 0){e=-1}return w0(i,t,e)}function w0(i,t,e,r,o){if(i===t)return i!==0||1/i===1/t;if(i==null||t==null)return false;if(i!==i)return t!==t;var n=typeof i;if(n!=="function"&&n!=="object"&&typeof t!="object")return false;i=HD(i);t=HD(t);var s=ND.call(i);if(s!==ND.call(t))return false;switch(s){case"[object RegExp]":case"[object String]":return""+i===""+t;case"[object Number]":if(+i!==+i)return+t!==+t;return+i===0?1/+i===1/t:+i===+t;case"[object Date]":case"[object Boolean]":return+i===+t;case"[object Symbol]":return typeof Symbol!=="undefined"&&Symbol.valueOf.call(i)===Symbol.valueOf.call(t)}var a=s==="[object Array]";if(!a){if(typeof i!="object"||typeof t!="object")return false;var l=i.constructor,c=t.constructor;if(l!==c&&!(typeof l==="function"&&l instanceof l&&typeof c==="function"&&c instanceof c)&&("constructor"in i&&"constructor"in t)){return false}}if(e===0){return false}else if(e<0){e=-1}r=r||[];o=o||[];var u=r.length;while(u--){if(r[u]===i)return o[u]===t}r.push(i);o.push(t);if(a){u=i.length;if(u!==t.length)return false;while(u--){if(!w0(i[u],t[u],e-1,r,o))return false}}else{var m=Object.keys(i);var p=void 0;u=m.length;if(Object.keys(t).length!==u)return false;while(u--){p=m[u];if(!(yZ(t,p)&&w0(i[p],t[p],e-1,r,o)))return false}}r.pop();o.pop();return true}function HD(i){if(Ll(i))return i.peek();if(Uu(i)||nn(i))return is(i.entries());if(Vm(i)||_a(i))return is(i.entries());return i}function yZ(i,t){return Object.prototype.hasOwnProperty.call(i,t)}var sJ,dg,WD,aJ,FD,RD,yg,E0,mg,b0,Ee,bJ,yJ,qD,SJ,F0,wJ,YD,TJ,AD,Z,pg,IJ,C,qt,_o,hg,fg,RJ,BD,ypt,ha,BJ,fa,Cg,cg,ug,eE,at,ga,PD,C0,gg,WJ,v,KJ,tZ,rZ,oZ,S0,B0,dE,on,sZ,lZ,cZ,wg,nn,uZ,Tg,_a,pE,LD,zD,gZ,ND,z0,_pt;var wt=d(()=>{sJ="An invariant failed, however the error is obfuscated because this is an production build.";dg=[];Object.freeze(dg);WD={};Object.freeze(WD);aJ={};FD=[];RD=function(){};yg=function(){function i(t){if(t===void 0){t="Atom@"+vr()}this.name=t;this.isPendingUnobservation=false;this.isBeingObserved=false;this.observers=[];this.observersIndexes={};this.diffValue=0;this.lastAccessedBy=0;this.lowestObserverState=qt.NOT_TRACKING}i.prototype.onBecomeUnobserved=function(){};i.prototype.onBecomeObserved=function(){};i.prototype.reportObserved=function(){return oE(this)};i.prototype.reportChanged=function(){os();LJ(this);ns()};i.prototype.toString=function(){return this.name};return i}();E0=ya("Atom",yg);mg={identity:$D,structural:hJ,default:gJ,shallow:fJ};b0=function(i,t){b0=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)if(r.hasOwnProperty(o))e[o]=r[o]};return b0(i,t)};Ee=function(){Ee=Object.assign||function i(t){for(var e,r=1,o=arguments.length;r<o;r++){e=arguments[r];for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))t[n]=e[n]}return t};return Ee.apply(this,arguments)};bJ={};yJ={};qD={deep:true,name:void 0,defaultDecorator:void 0};SJ={deep:false,name:void 0,defaultDecorator:void 0};Object.freeze(qD);Object.freeze(SJ);F0=vg(jm);wJ=vg(vJ);YD=vg(xg);TJ=vg(CJ);AD={box:function(i,t){if(arguments.length>2)ts("box");var e=Mu(t);return new ha(i,ag(e),e.name,true,e.equals)},shallowBox:function(i,t){if(arguments.length>2)ts("shallowBox");es("observable.shallowBox","observable.box(value, { deep: false })");return Z.box(i,{name:t,deep:false})},array:function(i,t){if(arguments.length>2)ts("array");var e=Mu(t);return new on(i,ag(e),e.name)},shallowArray:function(i,t){if(arguments.length>2)ts("shallowArray");es("observable.shallowArray","observable.array(values, { deep: false })");return Z.array(i,{name:t,deep:false})},map:function(i,t){if(arguments.length>2)ts("map");var e=Mu(t);return new wg(i,ag(e),e.name)},shallowMap:function(i,t){if(arguments.length>2)ts("shallowMap");es("observable.shallowMap","observable.map(values, { deep: false })");return Z.map(i,{name:t,deep:false})},set:function(i,t){if(arguments.length>2)ts("set");var e=Mu(t);return new Tg(i,ag(e),e.name)},object:function(i,t,e){if(typeof arguments[1]==="string")ts("object");var r=Mu(e);return YJ({},i,t,r)},shallowObject:function(i,t){if(typeof arguments[1]==="string")ts("shallowObject");es("observable.shallowObject","observable.object(values, {}, { deep: false })");return Z.object(i,{},{name:t,deep:false})},ref:YD,shallow:wJ,deep:F0,struct:TJ};Z=kJ;Object.keys(AD).forEach(function(i){return Z[i]=AD[i]});pg=XD(false,function(i,t,e,r,o){if(false){ma(e&&e.get,"Trying to declare a computed value for unspecified getter '"+t+"'")}var n=e.get,s=e.set;var a=o[0]||{};mZ(i,t,Ee({get:n,set:s},a))});IJ=pg({equals:mg.structural});C=function i(t,e,r){if(typeof e==="string"){return pg.apply(null,arguments)}if(t!==null&&typeof t==="object"&&arguments.length===1){return pg.apply(null,arguments)}if(false){ma(typeof t==="function","First argument to `computed` should be an expression.");ma(arguments.length<3,"Computed takes one or two arguments if used as function")}var o=typeof e==="object"?e:{};o.get=t;o.set=typeof e==="function"?e:o.set;o.name=o.name||t.name||"";return new fa(o)};C.struct=IJ;(function(i){i[i["NOT_TRACKING"]=-1]="NOT_TRACKING";i[i["UP_TO_DATE"]=0]="UP_TO_DATE";i[i["POSSIBLY_STALE"]=1]="POSSIBLY_STALE";i[i["STALE"]=2]="STALE"})(qt||(qt={}));(function(i){i[i["NONE"]=0]="NONE";i[i["LOG"]=1]="LOG";i[i["BREAK"]=2]="BREAK"})(_o||(_o={}));hg=function(){function i(t){this.cause=t}return i}();fg=0;RJ=1;BD=Object.getOwnPropertyDescriptor(function(){},"name");ypt=BD&&BD.configurable;ha=function(i){KD(t,i);function t(e,r,o,n,s){if(o===void 0){o="ObservableValue@"+vr()}if(n===void 0){n=true}if(s===void 0){s=mg.default}var a=i.call(this,o)||this;a.enhancer=r;a.name=o;a.equals=s;a.hasUnreportedChange=false;a.value=r(e,void 0,o);if(n&&gi()){Bl({type:"create",name:a.name,newValue:""+a.value})}return a}t.prototype.dehanceValue=function(e){if(this.dehancer!==void 0)return this.dehancer(e);return e};t.prototype.set=function(e){var r=this.value;e=this.prepareNewValue(e);if(e!==at.UNCHANGED){var o=gi();if(o){xo({type:"update",name:this.name,newValue:e,oldValue:r})}this.setNewValue(e);if(o)vo()}};t.prototype.prepareNewValue=function(e){Lu(this);if(en(this)){var r=rn(this,{object:this,type:"update",newValue:e});if(!r)return at.UNCHANGED;e=r.newValue}e=this.enhancer(e,this.value,this.name);return this.equals(this.value,e)?at.UNCHANGED:e};t.prototype.setNewValue=function(e){var r=this.value;this.value=e;this.reportChanged();if(Co(this)){So(this,{type:"update",object:this,newValue:e,oldValue:r})}};t.prototype.get=function(){this.reportObserved();return this.dehanceValue(this.value)};t.prototype.intercept=function(e){return Xm(this,e)};t.prototype.observe=function(e,r){if(r)e({object:this,type:"update",newValue:this.value,oldValue:void 0});return qm(this,e)};t.prototype.toJSON=function(){return this.get()};t.prototype.toString=function(){return this.name+"["+this.value+"]"};t.prototype.valueOf=function(){return VD(this.get())};return t}(yg);ha.prototype[GD()]=ha.prototype.valueOf;BJ=ya("ObservableValue",ha);fa=function(){function i(t){this.dependenciesState=qt.NOT_TRACKING;this.observing=[];this.newObserving=null;this.isBeingObserved=false;this.isPendingUnobservation=false;this.observers=[];this.observersIndexes={};this.diffValue=0;this.runId=0;this.lastAccessedBy=0;this.lowestObserverState=qt.UP_TO_DATE;this.unboundDepsCount=0;this.__mapid="#"+vr();this.value=new hg(null);this.isComputing=false;this.isRunningSetter=false;this.isTracing=_o.NONE;ma(t.get,"missing option for computed: get");this.derivation=t.get;this.name=t.name||"ComputedValue@"+vr();if(t.set)this.setter=Ol(this.name+"-setter",t.set);this.equals=t.equals||(t.compareStructural||t.struct?mg.structural:mg.default);this.scope=t.context;this.requiresReaction=!!t.requiresReaction;this.keepAlive=!!t.keepAlive}i.prototype.onBecomeStale=function(){UJ(this)};i.prototype.onBecomeUnobserved=function(){};i.prototype.onBecomeObserved=function(){};i.prototype.get=function(){if(this.isComputing)de("Cycle detected in computation "+this.name+": "+this.derivation);if(at.inBatch===0&&this.observers.length===0&&!this.keepAlive){if(x0(this)){this.warnAboutUntrackedRead();os();this.value=this.computeValue(false);ns()}}else{oE(this);if(x0(this)){if(this.trackAndCompute())zJ(this)}}var t=this.value;if(Nm(t))throw t.cause;return t};i.prototype.peek=function(){var t=this.computeValue(false);if(Nm(t))throw t.cause;return t};i.prototype.set=function(t){if(this.setter){ma(!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=true;try{this.setter.call(this.scope,t)}finally{this.isRunningSetter=false}}else ma(false,false)};i.prototype.trackAndCompute=function(){if(gi()){Bl({object:this.scope,type:"compute",name:this.name})}var t=this.value;var e=this.dependenciesState===qt.NOT_TRACKING;var r=this.computeValue(true);var o=e||Nm(t)||Nm(r)||!this.equals(t,r);if(o){this.value=r}return o};i.prototype.computeValue=function(t){this.isComputing=true;at.computationDepth++;var e;if(t){e=JD(this,this.derivation,this.scope)}else{if(at.disableErrorBoundaries===true){e=this.derivation.call(this.scope)}else{try{e=this.derivation.call(this.scope)}catch(r){e=new hg(r)}}}at.computationDepth--;this.isComputing=false;return e};i.prototype.suspend=function(){if(!this.keepAlive){v0(this);this.value=void 0}};i.prototype.observe=function(t,e){var r=this;var o=true;var n=void 0;return $J(function(){var s=r.get();if(!o||e){var a=Nu();t({type:"update",object:r,newValue:s,oldValue:n});pa(a)}o=false;n=s})};i.prototype.warnAboutUntrackedRead=function(){if(true)return;if(this.requiresReaction===true){de("[mobx] Computed value "+this.name+" is read outside a reactive context")}if(this.isTracing!==_o.NONE){console.log("[mobx.trace] '"+this.name+"' is being read outside a reactive context. Doing a full recompute")}if(at.computedRequiresReaction){console.warn("[mobx] Computed value "+this.name+" is being read outside a reactive context. Doing a full recompute")}};i.prototype.toJSON=function(){return this.get()};i.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"};i.prototype.valueOf=function(){return VD(this.get())};return i}();fa.prototype[GD()]=fa.prototype.valueOf;Cg=ya("ComputedValue",fa);cg=function(){function i(){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=false;this.allowStateChanges=true;this.allowStateReads=true;this.enforceActions=false;this.spyListeners=[];this.globalReactionErrorHandlers=[];this.computedRequiresReaction=false;this.reactionRequiresObservable=false;this.observableRequiresReaction=false;this.computedConfigurable=false;this.disableErrorBoundaries=false;this.suppressReactionErrors=false}return i}();ug=true;eE=false;at=function(){var i=Hm();if(i.__mobxInstanceCount>0&&!i.__mobxGlobals)ug=false;if(i.__mobxGlobals&&i.__mobxGlobals.version!==new cg().version)ug=false;if(!ug){setTimeout(function(){if(!eE){de("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")}},1);return new cg}else if(i.__mobxGlobals){i.__mobxInstanceCount+=1;if(!i.__mobxGlobals.UNCHANGED)i.__mobxGlobals.UNCHANGED={};return i.__mobxGlobals}else{i.__mobxInstanceCount=1;return i.__mobxGlobals=new cg}}();ga=function(){function i(t,e,r,o){if(t===void 0){t="Reaction@"+vr()}if(o===void 0){o=false}this.name=t;this.onInvalidate=e;this.errorHandler=r;this.requiresObservable=o;this.observing=[];this.newObserving=[];this.dependenciesState=qt.NOT_TRACKING;this.diffValue=0;this.runId=0;this.unboundDepsCount=0;this.__mapid="#"+vr();this.isDisposed=false;this._isScheduled=false;this._isTrackPending=false;this._isRunning=false;this.isTracing=_o.NONE}i.prototype.onBecomeStale=function(){this.schedule()};i.prototype.schedule=function(){if(!this._isScheduled){this._isScheduled=true;at.pendingReactions.push(this);aE()}};i.prototype.isScheduled=function(){return this._isScheduled};i.prototype.runReaction=function(){if(!this.isDisposed){os();this._isScheduled=false;if(x0(this)){this._isTrackPending=true;try{this.onInvalidate();if(this._isTrackPending&&gi()){Bl({name:this.name,type:"scheduled-reaction"})}}catch(t){this.reportExceptionInDerivation(t)}}ns()}};i.prototype.track=function(t){os();var e=gi();var r;if(e){r=Date.now();xo({name:this.name,type:"reaction"})}this._isRunning=true;var o=JD(this,t,void 0);this._isRunning=false;this._isTrackPending=false;if(this.isDisposed){v0(this)}if(Nm(o))this.reportExceptionInDerivation(o.cause);if(e){vo({time:Date.now()-r})}ns()};i.prototype.reportExceptionInDerivation=function(t){var e=this;if(this.errorHandler){this.errorHandler(t,this);return}if(at.disableErrorBoundaries)throw t;var r="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";if(at.suppressReactionErrors){console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)")}else{console.error(r,t)}if(gi()){Bl({type:"error",name:this.name,message:r,error:""+t})}at.globalReactionErrorHandlers.forEach(function(o){return o(t,e)})};i.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=true;if(!this._isRunning){os();v0(this);ns()}}};i.prototype.getDisposer=function(){var t=this.dispose.bind(this);t.$mobx=this;return t};i.prototype.toString=function(){return"Reaction["+this.name+"]"};i.prototype.trace=function(t){if(t===void 0){t=false}eZ(this,t)};return i}();PD=100;C0=function(i){return i()};gg=ya("Reaction",ga);WJ={spyReportEnd:true};v=function i(t,e,r,o){if(arguments.length===1&&typeof t==="function")return Ol(t.name||"<unnamed action>",t);if(arguments.length===2&&typeof e==="function")return Ol(t,e);if(arguments.length===1&&typeof t==="string")return MD(t);if(o===true){t[e]=Ol(t.name||e,r.value)}else{return MD(e).apply(null,arguments)}};v.bound=jJ;KJ=function(i){return i()};JJ.prototype=Object.create(Error.prototype);tZ={detectCycles:true,exportMapsAsObjects:true,recurseEverything:false};rZ=1e4;oZ=function(){var i=false;var t={};Object.defineProperty(t,"0",{set:function(){i=true}});Object.create(t)["0"]=1;return i===false}();S0=0;B0=function(){function i(){}return i}();nZ(B0,Array.prototype);if(Object.isFrozen(Array)){["constructor","push","shift","concat","pop","unshift","replace","find","findIndex","splice","reverse","sort"].forEach(function(i){Object.defineProperty(B0.prototype,i,{configurable:true,writable:true,value:Array.prototype[i]})})}dE=function(){function i(t,e,r,o){this.array=r;this.owned=o;this.values=[];this.lastKnownLength=0;this.atom=new yg(t||"ObservableArray@"+vr());this.enhancer=function(n,s){return e(n,s,t+"[..]")}}i.prototype.dehanceValue=function(t){if(this.dehancer!==void 0)return this.dehancer(t);return t};i.prototype.dehanceValues=function(t){if(this.dehancer!==void 0&&t.length>0)return t.map(this.dehancer);return t};i.prototype.intercept=function(t){return Xm(this,t)};i.prototype.observe=function(t,e){if(e===void 0){e=false}if(e){t({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0})}return qm(this,t)};i.prototype.getArrayLength=function(){this.atom.reportObserved();return this.values.length};i.prototype.setArrayLength=function(t){if(typeof t!=="number"||t<0)throw new Error("[mobx.array] Out of range: "+t);var e=this.values.length;if(t===e)return;else if(t>e){var r=new Array(t-e);for(var o=0;o<t-e;o++)r[o]=void 0;this.spliceWithArray(e,0,r)}else this.spliceWithArray(t,e-t)};i.prototype.updateArrayLength=function(t,e){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=e;if(e>0&&t+e+1>S0)P0(t+e+1)};i.prototype.spliceWithArray=function(t,e,r){var o=this;Lu(this.atom);var n=this.values.length;if(t===void 0)t=0;else if(t>n)t=n;else if(t<0)t=Math.max(0,n+t);if(arguments.length===1)e=n-t;else if(e===void 0||e===null)e=0;else e=Math.max(0,Math.min(e,n-t));if(r===void 0)r=dg;if(en(this)){var s=rn(this,{object:this.array,type:"splice",index:t,removedCount:e,added:r});if(!s)return dg;e=s.removedCount;r=s.added}r=r.length===0?r:r.map(function(c){return o.enhancer(c,void 0)});var a=r.length-e;this.updateArrayLength(n,a);var l=this.spliceItemsIntoValues(t,e,r);if(e!==0||r.length!==0)this.notifyArraySplice(t,r,l);return this.dehanceValues(l)};i.prototype.spliceItemsIntoValues=function(t,e,r){var o;if(r.length<rZ){return(o=this.values).splice.apply(o,_0([t,e],r))}else{var n=this.values.slice(t,t+e);this.values=this.values.slice(0,t).concat(r,this.values.slice(t+e));return n}};i.prototype.notifyArrayChildUpdate=function(t,e,r){var o=!this.owned&&gi();var n=Co(this);var s=n||o?{object:this.array,type:"update",index:t,newValue:e,oldValue:r}:null;if(o)xo(Ee(Ee({},s),{name:this.atom.name}));this.atom.reportChanged();if(n)So(this,s);if(o)vo()};i.prototype.notifyArraySplice=function(t,e,r){var o=!this.owned&&gi();var n=Co(this);var s=n||o?{object:this.array,type:"splice",index:t,removed:r,added:e,removedCount:r.length,addedCount:e.length}:null;if(o)xo(Ee(Ee({},s),{name:this.atom.name}));this.atom.reportChanged();if(n)So(this,s);if(o)vo()};return i}();on=function(i){KD(t,i);function t(e,r,o,n){if(o===void 0){o="ObservableArray@"+vr()}if(n===void 0){n=false}var s=i.call(this)||this;var a=new dE(o,r,s,n);Gm(s,"$mobx",a);if(e&&e.length){var l=$m(true);s.spliceWithArray(0,0,e);Km(l)}if(oZ){Object.defineProperty(a.array,"0",sZ)}return s}t.prototype.intercept=function(e){return this.$mobx.intercept(e)};t.prototype.observe=function(e,r){if(r===void 0){r=false}return this.$mobx.observe(e,r)};t.prototype.clear=function(){return this.splice(0)};t.prototype.concat=function(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}this.$mobx.atom.reportObserved();return Array.prototype.concat.apply(this.peek(),e.map(function(o){return Ll(o)?o.peek():o}))};t.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)};t.prototype.toJS=function(){return this.slice()};t.prototype.toJSON=function(){return this.toJS()};t.prototype.peek=function(){this.$mobx.atom.reportObserved();return this.$mobx.dehanceValues(this.$mobx.values)};t.prototype.find=function(e,r,o){if(o===void 0){o=0}if(arguments.length===3)es("The array.find fromIndex argument to find will not be supported anymore in the next major");var n=this.findIndex.apply(this,arguments);return n===-1?void 0:this.get(n)};t.prototype.findIndex=function(e,r,o){if(o===void 0){o=0}if(arguments.length===3)es("The array.findIndex fromIndex argument to find will not be supported anymore in the next major");var n=this.peek(),s=n.length;for(var a=o;a<s;a++)if(e.call(r,n[a],a,this))return a;return-1};t.prototype.splice=function(e,r){var o=[];for(var n=2;n<arguments.length;n++){o[n-2]=arguments[n]}switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(e);case 2:return this.$mobx.spliceWithArray(e,r)}return this.$mobx.spliceWithArray(e,r,o)};t.prototype.spliceWithArray=function(e,r,o){return this.$mobx.spliceWithArray(e,r,o)};t.prototype.push=function(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}var o=this.$mobx;o.spliceWithArray(o.values.length,0,e);return o.values.length};t.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]};t.prototype.shift=function(){return this.splice(0,1)[0]};t.prototype.unshift=function(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}var o=this.$mobx;o.spliceWithArray(0,0,e);return o.values.length};t.prototype.reverse=function(){var e=this.slice();return e.reverse.apply(e,arguments)};t.prototype.sort=function(e){var r=this.slice();return r.sort.apply(r,arguments)};t.prototype.remove=function(e){var r=this.$mobx.dehanceValues(this.$mobx.values).indexOf(e);if(r>-1){this.splice(r,1);return true}return false};t.prototype.move=function(e,r){es("observableArray.move is deprecated, use .slice() & .replace() instead");function o(a){if(a<0){throw new Error("[mobx.array] Index out of bounds: "+a+" is negative")}var l=this.$mobx.values.length;if(a>=l){throw new Error("[mobx.array] Index out of bounds: "+a+" is not smaller than "+l)}}o.call(this,e);o.call(this,r);if(e===r){return}var n=this.$mobx.values;var s;if(e<r){s=_0(n.slice(0,e),n.slice(e+1,r+1),[n[e]],n.slice(r+1))}else{s=_0(n.slice(0,r),[n[e]],n.slice(r,e),n.slice(e+1))}this.replace(s)};t.prototype.get=function(e){var r=this.$mobx;if(r){if(e<r.values.length){r.atom.reportObserved();return r.dehanceValue(r.values[e])}console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+r.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}return void 0};t.prototype.set=function(e,r){var o=this.$mobx;var n=o.values;if(e<n.length){Lu(o.atom);var s=n[e];if(en(o)){var a=rn(o,{type:"update",object:this,index:e,newValue:r});if(!a)return;r=a.newValue}r=o.enhancer(r,s);var l=r!==s;if(l){n[e]=r;o.notifyArrayChildUpdate(e,r,s)}}else if(e===n.length){o.spliceWithArray(e,0,[r])}else{throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+n.length)}};return t}(B0);I0(on.prototype,function(){this.$mobx.atom.reportObserved();var i=this;var t=0;return Wm({next:function(){return t<i.length?{value:i[t++],done:false}:{done:true,value:void 0}}})});Object.defineProperty(on.prototype,"length",{enumerable:false,configurable:true,get:function(){return this.$mobx.getArrayLength()},set:function(i){this.$mobx.setArrayLength(i)}});ss(on.prototype,D0(),"Array");["indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach(function(i){var t=Array.prototype[i];ma(typeof t==="function","Base function not defined on Array prototype: '"+i+"'");ss(on.prototype,i,function(){return t.apply(this.peek(),arguments)})});["every","filter","forEach","map","some"].forEach(function(i){var t=Array.prototype[i];ma(typeof t==="function","Base function not defined on Array prototype: '"+i+"'");ss(on.prototype,i,function(e,r){var o=this;var n=this.$mobx;n.atom.reportObserved();var s=n.dehanceValues(n.values);return s[i](function(a,l){return e.call(r,a,l,o)},r)})});["reduce","reduceRight"].forEach(function(i){ss(on.prototype,i,function(){var t=this;var e=this.$mobx;e.atom.reportObserved();var r=arguments[0];arguments[0]=function(o,n,s){n=e.dehanceValue(n);return r(o,n,s,t)};return e.values[i].apply(e.values,arguments)})});uJ(on.prototype,["constructor","intercept","observe","clear","concat","get","replace","toJS","toJSON","peek","find","findIndex","splice","spliceWithArray","push","pop","set","shift","unshift","reverse","sort","remove","move","toString","toLocaleString"]);sZ=mE(0);P0(1e3);lZ=ya("ObservableArrayAdministration",dE);cZ={};wg=function(){function i(t,e,r){if(e===void 0){e=jm}if(r===void 0){r="ObservableMap@"+vr()}this.enhancer=e;this.name=r;this.$mobx=cZ;this._keysAtom=_g(this.name+".keys()");if(typeof Map!=="function"){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(t)}i.prototype._has=function(t){return this._data.has(t)};i.prototype.has=function(t){var e=this;if(!at.trackingDerivation)return this._has(t);var r=this._hasMap.get(t);if(!r){var o=r=new ha(this._has(t),xg,this.name+"."+lg(t)+"?",false);this._hasMap.set(t,o);lE(o,function(){return e._hasMap.delete(t)})}return r.get()};i.prototype.set=function(t,e){var r=this._has(t);if(en(this)){var o=rn(this,{type:r?"update":"add",object:this,newValue:e,name:t});if(!o)return this;e=o.newValue}if(r){this._updateValue(t,e)}else{this._addValue(t,e)}return this};i.prototype.delete=function(t){var e=this;Lu(this._keysAtom);if(en(this)){var r=rn(this,{type:"delete",object:this,name:t});if(!r)return false}if(this._has(t)){var o=gi();var n=Co(this);var r=n||o?{type:"delete",object:this,oldValue:this._data.get(t).value,name:t}:null;if(o)xo(Ee(Ee({},r),{name:this.name,key:t}));tn(function(){e._keysAtom.reportChanged();e._updateHasMapEntry(t,false);var a=e._data.get(t);a.setNewValue(void 0);e._data.delete(t)});if(n)So(this,r);if(o)vo();return true}return false};i.prototype._updateHasMapEntry=function(t,e){var r=this._hasMap.get(t);if(r){r.setNewValue(e)}};i.prototype._updateValue=function(t,e){var r=this._data.get(t);e=r.prepareNewValue(e);if(e!==at.UNCHANGED){var o=gi();var n=Co(this);var s=n||o?{type:"update",object:this,oldValue:r.value,name:t,newValue:e}:null;if(o)xo(Ee(Ee({},s),{name:this.name,key:t}));r.setNewValue(e);if(n)So(this,s);if(o)vo()}};i.prototype._addValue=function(t,e){var r=this;Lu(this._keysAtom);tn(functio