-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
1 lines (1 loc) · 96.9 KB
/
Copy pathmain.js
File metadata and controls
1 lines (1 loc) · 96.9 KB
1
(()=>{"use strict";var e={};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();function t(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];throw new Error("number"==typeof e?"[MobX] minified error nr: "+e+(i.length?" "+i.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var i={};function n(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e.g?e.g:"undefined"!=typeof self?self:i}var r=Object.assign,o=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=Object.prototype,l=[];Object.freeze(l);var u={};Object.freeze(u);var c="undefined"!=typeof Proxy,h=Object.toString();function d(){c||t("Proxy not available")}function f(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var p=function(){};function v(e){return"function"==typeof e}function g(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function m(e){return null!==e&&"object"==typeof e}function y(e){if(!m(e))return!1;var t=Object.getPrototypeOf(e);if(null==t)return!0;var i=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i.toString()===h}function b(e){var t=null==e?void 0:e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName)}function _(e,t,i){a(e,t,{enumerable:!1,writable:!0,configurable:!0,value:i})}function w(e,t,i){a(e,t,{enumerable:!1,writable:!1,configurable:!0,value:i})}function x(e,t){var i="isMobX"+e;return t.prototype[i]=!0,function(e){return m(e)&&!0===e[i]}}function O(e){return e instanceof Map}function k(e){return e instanceof Set}var A=void 0!==Object.getOwnPropertySymbols;var S="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:A?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function T(e){return null===e?null:"object"==typeof e?""+e:e}function C(e,t){return s.hasOwnProperty.call(e,t)}var I=Object.getOwnPropertyDescriptors||function(e){var t={};return S(e).forEach((function(i){t[i]=o(e,i)})),t};function j(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(r=n.key,o=void 0,"symbol"==typeof(o=function(e,t){if("object"!=typeof e||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(r,"string"))?o:String(o)),n)}var r,o}function P(e,t,i){return t&&j(e.prototype,t),i&&j(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},L.apply(this,arguments)}function E(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,B(e,t)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B(e,t)}function M(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function N(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return R(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?R(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var z=Symbol("mobx-stored-annotations");function V(e){return Object.assign((function(t,i){if(U(i))return e.decorate_20223_(t,i);D(t,i,e)}),e)}function D(e,t,i){C(e,z)||_(e,z,L({},e[z])),function(e){return e.annotationType_===F}(i)||(e[z][t]=i)}function U(e){return"object"==typeof e&&"string"==typeof e.kind}var W=Symbol("mobx administration"),$=function(){function e(e){void 0===e&&(e="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Fe.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach((function(e){return e()}))},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(e){return e()}))},t.reportObserved=function(){return _t(this)},t.reportChanged=function(){yt(),wt(this),bt()},t.toString=function(){return this.name_},e}(),q=x("Atom",$);function H(e,t,i){void 0===t&&(t=p),void 0===i&&(i=p);var n,r=new $(e);return t!==p&&Ht(Wt,r,t,n),i!==p&&qt(r,i),r}var G={identity:function(e,t){return e===t},structural:function(e,t){return hn(e,t)},default:function(e,t){return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t},shallow:function(e,t){return hn(e,t,1)}};function K(e,t,i){return ii(e)?e:Array.isArray(e)?Pe.array(e,{name:i}):y(e)?Pe.object(e,void 0,{name:i}):O(e)?Pe.map(e,{name:i}):k(e)?Pe.set(e,{name:i}):"function"!=typeof e||zt(e)||ei(e)?e:b(e)?Zt(e):Nt(i,e)}function Y(e){return e}var F="override";function X(e,t){return{annotationType_:e,options_:t,make_:J,extend_:Z,decorate_20223_:Q}}function J(e,t,i,n){var r;if(null!=(r=this.options_)&&r.bound)return null===this.extend_(e,t,i,!1)?0:1;if(n===e.target_)return null===this.extend_(e,t,i,!1)?0:2;if(zt(i.value))return 1;var o=ee(e,this,t,i,!1);return a(n,t,o),2}function Z(e,t,i,n){var r=ee(e,this,t,i);return e.defineProperty_(t,r,n)}function Q(e,i){var n=i.kind,r=i.name,o=i.addInitializer,a=this;if("field"!=n){var s,l,u,c,h,d;if("method"==n)return zt(e)||(l=e,e=Ue(null!=(u=null==(c=a.options_)?void 0:c.name)?u:r.toString(),l,null!=(h=null==(d=a.options_)?void 0:d.autoAction)&&h)),null!=(s=this.options_)&&s.bound&&o((function(){var e=this,t=e[r].bind(e);t.isMobxAction=!0,e[r]=t})),e;t("Cannot apply '"+a.annotationType_+"' to '"+String(r)+"' (kind: "+n+"):\n'"+a.annotationType_+"' can only be used on properties with a function value.")}else o((function(){D(this,r,a)}))}function ee(e,t,i,n,r){var o,a,s,l,u,c,h,d;void 0===r&&(r=pt.safeDescriptors),d=n,t.annotationType_,d.value;var f,p=n.value;null!=(o=t.options_)&&o.bound&&(p=p.bind(null!=(f=e.proxy_)?f:e.target_));return{value:Ue(null!=(a=null==(s=t.options_)?void 0:s.name)?a:i.toString(),p,null!=(l=null==(u=t.options_)?void 0:u.autoAction)&&l,null!=(c=t.options_)&&c.bound?null!=(h=e.proxy_)?h:e.target_:void 0),configurable:!r||e.isPlainObject_,enumerable:!1,writable:!r}}function te(e,t){return{annotationType_:e,options_:t,make_:ie,extend_:ne,decorate_20223_:re}}function ie(e,t,i,n){var r;if(n===e.target_)return null===this.extend_(e,t,i,!1)?0:2;if(null!=(r=this.options_)&&r.bound&&(!C(e.target_,t)||!ei(e.target_[t]))&&null===this.extend_(e,t,i,!1))return 0;if(ei(i.value))return 1;var o=oe(e,this,t,i,!1,!1);return a(n,t,o),2}function ne(e,t,i,n){var r,o=oe(e,this,t,i,null==(r=this.options_)?void 0:r.bound);return e.defineProperty_(t,o,n)}function re(e,t){var i;var n=t.name,r=t.addInitializer;return ei(e)||(e=Zt(e)),null!=(i=this.options_)&&i.bound&&r((function(){var e=this,t=e[n].bind(e);t.isMobXFlow=!0,e[n]=t})),e}function oe(e,t,i,n,r,o){var a;void 0===o&&(o=pt.safeDescriptors),a=n,t.annotationType_,a.value;var s,l=n.value;(ei(l)||(l=Zt(l)),r)&&((l=l.bind(null!=(s=e.proxy_)?s:e.target_)).isMobXFlow=!0);return{value:l,configurable:!o||e.isPlainObject_,enumerable:!1,writable:!o}}function ae(e,t){return{annotationType_:e,options_:t,make_:se,extend_:le,decorate_20223_:ue}}function se(e,t,i){return null===this.extend_(e,t,i,!1)?0:1}function le(e,t,i,n){return function(e,t,i,n){t.annotationType_,n.get;0}(0,this,0,i),e.defineComputedProperty_(t,L({},this.options_,{get:i.get,set:i.set}),n)}function ue(e,t){var i=this,n=t.name;return(0,t.addInitializer)((function(){var t=Wi(this)[W],r=L({},i.options_,{get:e,context:this});r.name||(r.name="ObservableObject."+n.toString()),t.values_.set(n,new Je(r))})),function(){return this[W].getObservablePropValue_(n)}}function ce(e,t){return{annotationType_:e,options_:t,make_:he,extend_:de,decorate_20223_:fe}}function he(e,t,i){return null===this.extend_(e,t,i,!1)?0:1}function de(e,t,i,n){var r,o;return function(e,t,i,n){t.annotationType_;0}(0,this),e.defineObservableProperty_(t,i.value,null!=(r=null==(o=this.options_)?void 0:o.enhancer)?r:K,n)}function fe(e,t){var i=this,n=t.kind,r=t.name,o=new WeakSet;function a(e,t){var n,a,s=Wi(e)[W],l=new Ke(t,null!=(n=null==(a=i.options_)?void 0:a.enhancer)?n:K,"ObservableObject."+r.toString(),!1);s.values_.set(r,l),o.add(e)}if("accessor"==n)return{get:function(){return o.has(this)||a(this,e.get.call(this)),this[W].getObservablePropValue_(r)},set:function(e){return o.has(this)||a(this,e),this[W].setObservablePropValue_(r,e)},init:function(e){return o.has(this)||a(this,e),e}}}var pe="true",ve=ge();function ge(e){return{annotationType_:pe,options_:e,make_:me,extend_:ye,decorate_20223_:be}}function me(e,t,i,n){var r,o,s,l;if(i.get)return Me.make_(e,t,i,n);if(i.set){var u=Ue(t.toString(),i.set);return n===e.target_?null===e.defineProperty_(t,{configurable:!pt.safeDescriptors||e.isPlainObject_,set:u})?0:2:(a(n,t,{configurable:!0,set:u}),2)}if(n!==e.target_&&"function"==typeof i.value)return b(i.value)?(null!=(l=this.options_)&&l.autoBind?Zt.bound:Zt).make_(e,t,i,n):(null!=(s=this.options_)&&s.autoBind?Nt.bound:Nt).make_(e,t,i,n);var c,h=!1===(null==(r=this.options_)?void 0:r.deep)?Pe.ref:Pe;"function"==typeof i.value&&null!=(o=this.options_)&&o.autoBind&&(i.value=i.value.bind(null!=(c=e.proxy_)?c:e.target_));return h.make_(e,t,i,n)}function ye(e,t,i,n){var r,o,a;if(i.get)return Me.extend_(e,t,i,n);if(i.set)return e.defineProperty_(t,{configurable:!pt.safeDescriptors||e.isPlainObject_,set:Ue(t.toString(),i.set)},n);"function"==typeof i.value&&null!=(r=this.options_)&&r.autoBind&&(i.value=i.value.bind(null!=(a=e.proxy_)?a:e.target_));return(!1===(null==(o=this.options_)?void 0:o.deep)?Pe.ref:Pe).extend_(e,t,i,n)}function be(e,i){t("'"+this.annotationType_+"' cannot be used as a decorator")}var _e={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function we(e){return e||_e}Object.freeze(_e);var xe=ce("observable"),Oe=ce("observable.ref",{enhancer:Y}),ke=ce("observable.shallow",{enhancer:function(e,t,i){return null==e||Hi(e)||Ci(e)||Mi(e)||zi(e)?e:Array.isArray(e)?Pe.array(e,{name:i,deep:!1}):y(e)?Pe.object(e,void 0,{name:i,deep:!1}):O(e)?Pe.map(e,{name:i,deep:!1}):k(e)?Pe.set(e,{name:i,deep:!1}):void 0}}),Ae=ce("observable.struct",{enhancer:function(e,t){return hn(e,t)?t:e}}),Se=V(xe);function Te(e){return!0===e.deep?K:!1===e.deep?Y:(t=e.defaultDecorator)&&null!=(i=null==(n=t.options_)?void 0:n.enhancer)?i:K;var t,i,n}function Ce(e,t,i){return U(t)?xe.decorate_20223_(e,t):g(t)?void D(e,t,xe):ii(e)?e:y(e)?Pe.object(e,t,i):Array.isArray(e)?Pe.array(e,t):O(e)?Pe.map(e,t):k(e)?Pe.set(e,t):"object"==typeof e&&null!==e?e:Pe.box(e,t)}r(Ce,Se);var Ie,je,Pe=r(Ce,{box:function(e,t){var i=we(t);return new Ke(e,Te(i),i.name,!0,i.equals)},array:function(e,t){var i=we(t);return(!1===pt.useProxies||!1===i.proxy?on:bi)(e,Te(i),i.name)},map:function(e,t){var i=we(t);return new Bi(e,Te(i),i.name)},set:function(e,t){var i=we(t);return new Ni(e,Te(i),i.name)},object:function(e,t,i){return un((function(){return Kt(!1===pt.useProxies||!1===(null==i?void 0:i.proxy)?Wi({},i):function(e,t){var i,n;return d(),e=Wi(e,t),null!=(n=(i=e[W]).proxy_)?n:i.proxy_=new Proxy(e,si)}({},i),e,t)}))},ref:V(Oe),shallow:V(ke),deep:Se,struct:V(Ae)}),Le="computed",Ee=ae(Le),Be=ae("computed.struct",{equals:G.structural}),Me=function(e,t){if(U(t))return Ee.decorate_20223_(e,t);if(g(t))return D(e,t,Ee);if(y(e))return V(ae(Le,e));var i=y(t)?t:{};return i.get=e,i.name||(i.name=e.name||""),new Je(i)};Object.assign(Me,Ee),Me.struct=V(Be);var Re,Ne=0,ze=1,Ve=null!=(Ie=null==(je=o((function(){}),"name"))?void 0:je.configurable)&&Ie,De={value:"action",configurable:!0,writable:!1,enumerable:!1};function Ue(e,t,i,n){function r(){return We(e,i,t,n||this,arguments)}return void 0===i&&(i=!1),r.isMobxAction=!0,r.toString=function(){return t.toString()},Ve&&(De.value=e,a(r,"name",De)),r}function We(e,i,n,r,o){var a=function(e,t,i,n){var r=!1,o=0;0;var a=pt.trackingDerivation,s=!t||!a;yt();var l=pt.allowStateChanges;s&&(at(),l=qe(!0));var u=lt(!0),c={runAsAction_:s,prevDerivation_:a,prevAllowStateChanges_:l,prevAllowStateReads_:u,notifySpy_:r,startTime_:o,actionId_:ze++,parentActionId_:Ne};return Ne=c.actionId_,c}(0,i);try{return n.apply(r,o)}catch(e){throw a.error_=e,e}finally{!function(e){Ne!==e.actionId_&&t(30);Ne=e.parentActionId_,void 0!==e.error_&&(pt.suppressReactionErrors=!0);He(e.prevAllowStateChanges_),ut(e.prevAllowStateReads_),bt(),e.runAsAction_&&st(e.prevDerivation_);0;pt.suppressReactionErrors=!1}(a)}}function $e(e,t){var i=qe(e);try{return t()}finally{He(i)}}function qe(e){var t=pt.allowStateChanges;return pt.allowStateChanges=e,t}function He(e){pt.allowStateChanges=e}Re=Symbol.toPrimitive;var Ge,Ke=function(e){function t(t,i,n,r,o){var a;return void 0===n&&(n="ObservableValue"),void 0===r&&(r=!0),void 0===o&&(o=G.default),(a=e.call(this,n)||this).enhancer=void 0,a.name_=void 0,a.equals=void 0,a.hasUnreportedChange_=!1,a.interceptors_=void 0,a.changeListeners_=void 0,a.value_=void 0,a.dehancer=void 0,a.enhancer=i,a.name_=n,a.equals=o,a.value_=i(t,void 0,n),a}E(t,e);var i=t.prototype;return i.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},i.set=function(e){this.value_;if((e=this.prepareNewValue_(e))!==pt.UNCHANGED){0,this.setNewValue_(e)}},i.prepareNewValue_=function(e){if(it(this),li(this)){var t=ci(this,{object:this,type:gi,newValue:e});if(!t)return pt.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?pt.UNCHANGED:e},i.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),hi(this)&&fi(this,{type:gi,object:this,newValue:e,oldValue:t})},i.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},i.intercept_=function(e){return ui(this,e)},i.observe_=function(e,t){return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:gi,newValue:this.value_,oldValue:void 0}),di(this,e)},i.raw=function(){return this.value_},i.toJSON=function(){return this.get()},i.toString=function(){return this.name_+"["+this.value_+"]"},i.valueOf=function(){return T(this.get())},i[Re]=function(){return this.valueOf()},t}($),Ye=x("ObservableValue",Ke);Ge=Symbol.toPrimitive;var Fe,Xe,Je=function(){function e(e){this.dependenciesState_=Fe.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.isBeingObserved_=!1,this.isPendingUnobservation_=!1,this.observers_=new Set,this.diffValue_=0,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Fe.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Qe(null),this.name_=void 0,this.triggeredBy_=void 0,this.isComputing_=!1,this.isRunningSetter_=!1,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Xe.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||t(31),this.derivation=e.get,this.name_=e.name||"ComputedValue",e.set&&(this.setter_=Ue("ComputedValue-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?G.structural:G.default),this.scope_=e.context,this.requiresReaction_=e.requiresReaction,this.keepAlive_=!!e.keepAlive}var i=e.prototype;return i.onBecomeStale_=function(){!function(e){if(e.lowestObserverState_!==Fe.UP_TO_DATE_)return;e.lowestObserverState_=Fe.POSSIBLY_STALE_,e.observers_.forEach((function(e){e.dependenciesState_===Fe.UP_TO_DATE_&&(e.dependenciesState_=Fe.POSSIBLY_STALE_,e.onBecomeStale_())}))}(this)},i.onBO=function(){this.onBOL&&this.onBOL.forEach((function(e){return e()}))},i.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(e){return e()}))},i.get=function(){if(this.isComputing_&&t(32,this.name_,this.derivation),0!==pt.inBatch||0!==this.observers_.size||this.keepAlive_){if(_t(this),tt(this)){var e=pt.trackingContext;this.keepAlive_&&!e&&(pt.trackingContext=this),this.trackAndCompute()&&function(e){if(e.lowestObserverState_===Fe.STALE_)return;e.lowestObserverState_=Fe.STALE_,e.observers_.forEach((function(t){t.dependenciesState_===Fe.POSSIBLY_STALE_?t.dependenciesState_=Fe.STALE_:t.dependenciesState_===Fe.UP_TO_DATE_&&(e.lowestObserverState_=Fe.UP_TO_DATE_)}))}(this),pt.trackingContext=e}}else tt(this)&&(this.warnAboutUntrackedRead_(),yt(),this.value_=this.computeValue_(!1),bt());var i=this.value_;if(et(i))throw i.cause;return i},i.set=function(e){if(this.setter_){this.isRunningSetter_&&t(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter_=!1}}else t(34,this.name_)},i.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===Fe.NOT_TRACKING_,i=this.computeValue_(!0),n=t||et(e)||et(i)||!this.equals_(e,i);return n&&(this.value_=i),n},i.computeValue_=function(e){this.isComputing_=!0;var t,i=qe(!1);if(e)t=nt(this,this.derivation,this.scope_);else if(!0===pt.disableErrorBoundaries)t=this.derivation.call(this.scope_);else try{t=this.derivation.call(this.scope_)}catch(e){t=new Qe(e)}return He(i),this.isComputing_=!1,t},i.suspend_=function(){this.keepAlive_||(rt(this),this.value_=void 0)},i.observe_=function(e,t){var i=this,n=!0,r=void 0;return Vt((function(){var o=i.get();if(!n||t){var a=at();e({observableKind:"computed",debugObjectName:i.name_,type:gi,object:i,newValue:o,oldValue:r}),st(a)}n=!1,r=o}))},i.warnAboutUntrackedRead_=function(){},i.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},i.valueOf=function(){return T(this.get())},i[Ge]=function(){return this.valueOf()},e}(),Ze=x("ComputedValue",Je);!function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"}(Fe||(Fe={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(Xe||(Xe={}));var Qe=function(e){this.cause=void 0,this.cause=e};function et(e){return e instanceof Qe}function tt(e){switch(e.dependenciesState_){case Fe.UP_TO_DATE_:return!1;case Fe.NOT_TRACKING_:case Fe.STALE_:return!0;case Fe.POSSIBLY_STALE_:for(var t=lt(!0),i=at(),n=e.observing_,r=n.length,o=0;o<r;o++){var a=n[o];if(Ze(a)){if(pt.disableErrorBoundaries)a.get();else try{a.get()}catch(e){return st(i),ut(t),!0}if(e.dependenciesState_===Fe.STALE_)return st(i),ut(t),!0}}return ct(e),st(i),ut(t),!1}}function it(e){}function nt(e,t,i){var n=lt(!0);ct(e),e.newObserving_=new Array(e.observing_.length+100),e.unboundDepsCount_=0,e.runId_=++pt.runId;var r,o=pt.trackingDerivation;if(pt.trackingDerivation=e,pt.inBatch++,!0===pt.disableErrorBoundaries)r=t.call(i);else try{r=t.call(i)}catch(e){r=new Qe(e)}return pt.inBatch--,pt.trackingDerivation=o,function(e){for(var t=e.observing_,i=e.observing_=e.newObserving_,n=Fe.UP_TO_DATE_,r=0,o=e.unboundDepsCount_,a=0;a<o;a++){var s=i[a];0===s.diffValue_&&(s.diffValue_=1,r!==a&&(i[r]=s),r++),s.dependenciesState_>n&&(n=s.dependenciesState_)}i.length=r,e.newObserving_=null,o=t.length;for(;o--;){var l=t[o];0===l.diffValue_&>(l,e),l.diffValue_=0}for(;r--;){var u=i[r];1===u.diffValue_&&(u.diffValue_=0,vt(u,e))}n!==Fe.UP_TO_DATE_&&(e.dependenciesState_=n,e.onBecomeStale_())}(e),ut(n),r}function rt(e){var t=e.observing_;e.observing_=[];for(var i=t.length;i--;)gt(t[i],e);e.dependenciesState_=Fe.NOT_TRACKING_}function ot(e){var t=at();try{return e()}finally{st(t)}}function at(){var e=pt.trackingDerivation;return pt.trackingDerivation=null,e}function st(e){pt.trackingDerivation=e}function lt(e){var t=pt.allowStateReads;return pt.allowStateReads=e,t}function ut(e){pt.allowStateReads=e}function ct(e){if(e.dependenciesState_!==Fe.UP_TO_DATE_){e.dependenciesState_=Fe.UP_TO_DATE_;for(var t=e.observing_,i=t.length;i--;)t[i].lowestObserverState_=Fe.UP_TO_DATE_}}var ht=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},dt=!0,ft=!1,pt=function(){var e=n();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(dt=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new ht).version&&(dt=!1),dt?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new ht):(setTimeout((function(){ft||t(35)}),1),new ht)}();function vt(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function gt(e,t){e.observers_.delete(t),0===e.observers_.size&&mt(e)}function mt(e){!1===e.isPendingUnobservation_&&(e.isPendingUnobservation_=!0,pt.pendingUnobservations.push(e))}function yt(){pt.inBatch++}function bt(){if(0==--pt.inBatch){At();for(var e=pt.pendingUnobservations,t=0;t<e.length;t++){var i=e[t];i.isPendingUnobservation_=!1,0===i.observers_.size&&(i.isBeingObserved_&&(i.isBeingObserved_=!1,i.onBUO()),i instanceof Je&&i.suspend_())}pt.pendingUnobservations=[]}}function _t(e){var t=pt.trackingDerivation;return null!==t?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved_&&pt.trackingContext&&(e.isBeingObserved_=!0,e.onBO())),e.isBeingObserved_):(0===e.observers_.size&&pt.inBatch>0&&mt(e),!1)}function wt(e){e.lowestObserverState_!==Fe.STALE_&&(e.lowestObserverState_=Fe.STALE_,e.observers_.forEach((function(e){e.dependenciesState_===Fe.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=Fe.STALE_})))}var xt=function(){function e(e,t,i,n){void 0===e&&(e="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Fe.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=Xe.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=i,this.requiresObservable_=n}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,pt.pendingReactions.push(this),At())},t.isScheduled=function(){return this.isScheduled_},t.runReaction_=function(){if(!this.isDisposed_){yt(),this.isScheduled_=!1;var e=pt.trackingContext;if(pt.trackingContext=this,tt(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(e){this.reportExceptionInDerivation_(e)}}pt.trackingContext=e,bt()}},t.track=function(e){if(!this.isDisposed_){yt();0,this.isRunning_=!0;var t=pt.trackingContext;pt.trackingContext=this;var i=nt(this,e,void 0);pt.trackingContext=t,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&rt(this),et(i)&&this.reportExceptionInDerivation_(i.cause),bt()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(pt.disableErrorBoundaries)throw e;var i="[mobx] uncaught error in '"+this+"'";pt.suppressReactionErrors||console.error(i,e),pt.globalReactionErrorHandlers.forEach((function(i){return i(e,t)}))}},t.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(yt(),rt(this),bt()))},t.getDisposer_=function(e){var t=this,i=function i(){t.dispose(),null==e||null==e.removeEventListener||e.removeEventListener("abort",i)};return null==e||null==e.addEventListener||e.addEventListener("abort",i),i[W]=this,i},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(e){void 0===e&&(e=!1)},e}();var Ot=100,kt=function(e){return e()};function At(){pt.inBatch>0||pt.isRunningReactions||kt(St)}function St(){pt.isRunningReactions=!0;for(var e=pt.pendingReactions,t=0;e.length>0;){++t===Ot&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var i=e.splice(0),n=0,r=i.length;n<r;n++)i[n].runReaction_()}pt.isRunningReactions=!1}var Tt=x("Reaction",xt);var Ct="action",It="autoAction",jt="<unnamed action>",Pt=X(Ct),Lt=X("action.bound",{bound:!0}),Et=X(It,{autoAction:!0}),Bt=X("autoAction.bound",{autoAction:!0,bound:!0});function Mt(e){return function(t,i){return v(t)?Ue(t.name||jt,t,e):v(i)?Ue(t,i,e):U(i)?(e?Et:Pt).decorate_20223_(t,i):g(i)?D(t,i,e?Et:Pt):g(t)?V(X(e?It:Ct,{name:t,autoAction:e})):void 0}}var Rt=Mt(!1);Object.assign(Rt,Pt);var Nt=Mt(!0);function zt(e){return v(e)&&!0===e.isMobxAction}function Vt(e,t){var i,n,r,o,a;void 0===t&&(t=u);var s,l=null!=(i=null==(n=t)?void 0:n.name)?i:"Autorun";if(!t.scheduler&&!t.delay)s=new xt(l,(function(){this.track(d)}),t.onError,t.requiresObservable);else{var c=Ut(t),h=!1;s=new xt(l,(function(){h||(h=!0,c((function(){h=!1,s.isDisposed_||s.track(d)})))}),t.onError,t.requiresObservable)}function d(){e(s)}return null!=(r=t)&&null!=(o=r.signal)&&o.aborted||s.schedule_(),s.getDisposer_(null==(a=t)?void 0:a.signal)}Object.assign(Nt,Et),Rt.bound=V(Lt),Nt.bound=V(Bt);var Dt=function(e){return e()};function Ut(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Dt}var Wt="onBO",$t="onBUO";function qt(e,t,i){return Ht($t,e,t,i)}function Ht(e,t,i,n){var r="function"==typeof n?an(t,i):an(t),o=v(n)?n:i,a=e+"L";return r[a]?r[a].add(o):r[a]=new Set([o]),function(){var e=r[a];e&&(e.delete(o),0===e.size&&delete r[a])}}var Gt="always";function Kt(e,t,i,n){var r=I(t);return un((function(){var t=Wi(e,n)[W];S(r).forEach((function(e){t.extend_(e,r[e],!i||(!(e in i)||i[e]))}))})),e}var Yt=0;function Ft(){this.message="FLOW_CANCELLED"}Ft.prototype=Object.create(Error.prototype);var Xt=te("flow"),Jt=te("flow.bound",{bound:!0}),Zt=Object.assign((function(e,t){if(U(t))return Xt.decorate_20223_(e,t);if(g(t))return D(e,t,Xt);var i=e,n=i.name||"<unnamed flow>",r=function(){var e,t=arguments,r=++Yt,o=Rt(n+" - runid: "+r+" - init",i).apply(this,t),a=void 0,s=new Promise((function(t,i){var s=0;function l(e){var t;a=void 0;try{t=Rt(n+" - runid: "+r+" - yield "+s++,o.next).call(o,e)}catch(e){return i(e)}c(t)}function u(e){var t;a=void 0;try{t=Rt(n+" - runid: "+r+" - yield "+s++,o.throw).call(o,e)}catch(e){return i(e)}c(t)}function c(e){if(!v(null==e?void 0:e.then))return e.done?t(e.value):(a=Promise.resolve(e.value)).then(l,u);e.then(c,i)}e=i,l(void 0)}));return s.cancel=Rt(n+" - runid: "+r+" - cancel",(function(){try{a&&Qt(a);var t=o.return(void 0),i=Promise.resolve(t.value);i.then(p,p),Qt(i),e(new Ft)}catch(t){e(t)}})),s};return r.isMobXFlow=!0,r}),Xt);function Qt(e){v(e.cancel)&&e.cancel()}function ei(e){return!0===(null==e?void 0:e.isMobXFlow)}function ti(e,t){return!!e&&(void 0!==t?!!Hi(e)&&e[W].values_.has(t):Hi(e)||!!e[W]||q(e)||Tt(e)||Ze(e))}function ii(e){return ti(e)}function ni(e,t,i){return e.set(t,i),i}function ri(e,i){if(null==e||"object"!=typeof e||e instanceof Date||!ii(e))return e;if(Ye(e)||Ze(e))return ri(e.get(),i);if(i.has(e))return i.get(e);if(Ci(e)){var n=ni(i,e,new Array(e.length));return e.forEach((function(e,t){n[t]=ri(e,i)})),n}if(zi(e)){var r=ni(i,e,new Set);return e.forEach((function(e){r.add(ri(e,i))})),r}if(Mi(e)){var o=ni(i,e,new Map);return e.forEach((function(e,t){o.set(t,ri(e,i))})),o}var a=ni(i,e,{});return function(e){if(Hi(e))return e[W].ownKeys_();t(38)}(e).forEach((function(t){s.propertyIsEnumerable.call(e,t)&&(a[t]=ri(e[t],i))})),a}function oi(e,t){void 0===t&&(t=void 0),yt();try{return e.apply(t)}finally{bt()}}function ai(e){return e[W]}Zt.bound=V(Jt);var si={has:function(e,t){return ai(e).has_(t)},get:function(e,t){return ai(e).get_(t)},set:function(e,t,i){var n;return!!g(t)&&(null==(n=ai(e).set_(t,i,!0))||n)},deleteProperty:function(e,t){var i;return!!g(t)&&(null==(i=ai(e).delete_(t,!0))||i)},defineProperty:function(e,t,i){var n;return null==(n=ai(e).defineProperty_(t,i))||n},ownKeys:function(e){return ai(e).ownKeys_()},preventExtensions:function(e){t(13)}};function li(e){return void 0!==e.interceptors_&&e.interceptors_.length>0}function ui(e,t){var i=e.interceptors_||(e.interceptors_=[]);return i.push(t),f((function(){var e=i.indexOf(t);-1!==e&&i.splice(e,1)}))}function ci(e,i){var n=at();try{for(var r=[].concat(e.interceptors_||[]),o=0,a=r.length;o<a&&((i=r[o](i))&&!i.type&&t(14),i);o++);return i}finally{st(n)}}function hi(e){return void 0!==e.changeListeners_&&e.changeListeners_.length>0}function di(e,t){var i=e.changeListeners_||(e.changeListeners_=[]);return i.push(t),f((function(){var e=i.indexOf(t);-1!==e&&i.splice(e,1)}))}function fi(e,t){var i=at(),n=e.changeListeners_;if(n){for(var r=0,o=(n=n.slice()).length;r<o;r++)n[r](t);st(i)}}function pi(e,t,i){return un((function(){var n=Wi(e,i)[W];null!=t||(t=function(e){return C(e,z)||_(e,z,L({},e[z])),e[z]}(e)),S(t).forEach((function(e){return n.make_(e,t[e])}))})),e}var vi="splice",gi="update",mi={get:function(e,t){var i=e[W];return t===W?i:"length"===t?i.getArrayLength_():"string"!=typeof t||isNaN(t)?C(_i,t)?_i[t]:e[t]:i.get_(parseInt(t))},set:function(e,t,i){var n=e[W];return"length"===t&&n.setArrayLength_(i),"symbol"==typeof t||isNaN(t)?e[t]=i:n.set_(parseInt(t),i),!0},preventExtensions:function(){t(15)}},yi=function(){function e(e,t,i,n){void 0===e&&(e="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=i,this.legacyMode_=n,this.atom_=new $(e),this.enhancer_=function(e,i){return t(e,i,"ObservableArray[..]")}}var i=e.prototype;return i.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},i.dehanceValues_=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},i.intercept_=function(e){return ui(this,e)},i.observe_=function(e,t){return void 0===t&&(t=!1),t&&e({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),di(this,e)},i.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},i.setArrayLength_=function(e){("number"!=typeof e||isNaN(e)||e<0)&&t("Out of range: "+e);var i=this.values_.length;if(e!==i)if(e>i){for(var n=new Array(e-i),r=0;r<e-i;r++)n[r]=void 0;this.spliceWithArray_(i,0,n)}else this.spliceWithArray_(e,i-e)},i.updateArrayLength_=function(e,i){e!==this.lastKnownLength_&&t(16),this.lastKnownLength_+=i,this.legacyMode_&&i>0&&rn(e+i+1)},i.spliceWithArray_=function(e,t,i){var n=this;this.atom_;var r=this.values_.length;if(void 0===e?e=0:e>r?e=r:e<0&&(e=Math.max(0,r+e)),t=1===arguments.length?r-e:null==t?0:Math.max(0,Math.min(t,r-e)),void 0===i&&(i=l),li(this)){var o=ci(this,{object:this.proxy_,type:vi,index:e,removedCount:t,added:i});if(!o)return l;t=o.removedCount,i=o.added}if(i=0===i.length?i:i.map((function(e){return n.enhancer_(e,void 0)})),this.legacyMode_){var a=i.length-t;this.updateArrayLength_(r,a)}var s=this.spliceItemsIntoValues_(e,t,i);return 0===t&&0===i.length||this.notifyArraySplice_(e,i,s),this.dehanceValues_(s)},i.spliceItemsIntoValues_=function(e,t,i){var n;if(i.length<1e4)return(n=this.values_).splice.apply(n,[e,t].concat(i));var r=this.values_.slice(e,e+t),o=this.values_.slice(e+t);this.values_.length+=i.length-t;for(var a=0;a<i.length;a++)this.values_[e+a]=i[a];for(var s=0;s<o.length;s++)this.values_[e+i.length+s]=o[s];return r},i.notifyArrayChildUpdate_=function(e,t,i){var n=!this.owned_&&!1,r=hi(this),o=r||n?{observableKind:"array",object:this.proxy_,type:gi,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:i}:null;this.atom_.reportChanged(),r&&fi(this,o)},i.notifyArraySplice_=function(e,t,i){var n=!this.owned_&&!1,r=hi(this),o=r||n?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:vi,index:e,removed:i,added:t,removedCount:i.length,addedCount:t.length}:null;this.atom_.reportChanged(),r&&fi(this,o)},i.get_=function(e){if(!(this.legacyMode_&&e>=this.values_.length))return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("[mobx] Out of bounds read: "+e)},i.set_=function(e,i){var n=this.values_;if(this.legacyMode_&&e>n.length&&t(17,e,n.length),e<n.length){this.atom_;var r=n[e];if(li(this)){var o=ci(this,{type:gi,object:this.proxy_,index:e,newValue:i});if(!o)return;i=o.newValue}(i=this.enhancer_(i,r))!==r&&(n[e]=i,this.notifyArrayChildUpdate_(e,i,r))}else{for(var a=new Array(e+1-n.length),s=0;s<a.length-1;s++)a[s]=void 0;a[a.length-1]=i,this.spliceWithArray_(n.length,0,a)}},e}();function bi(e,t,i,n){return void 0===i&&(i="ObservableArray"),void 0===n&&(n=!1),d(),un((function(){var r=new yi(i,t,n,!1);w(r.values_,W,r);var o=new Proxy(r.values_,mi);return r.proxy_=o,e&&e.length&&r.spliceWithArray_(0,0,e),o}))}var _i={clear:function(){return this.splice(0)},replace:function(e){var t=this[W];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){for(var i=arguments.length,n=new Array(i>2?i-2:0),r=2;r<i;r++)n[r-2]=arguments[r];var o=this[W];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(e);case 2:return o.spliceWithArray_(e,t)}return o.spliceWithArray_(e,t,n)},spliceWithArray:function(e,t,i){return this[W].spliceWithArray_(e,t,i)},push:function(){for(var e=this[W],t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return e.spliceWithArray_(e.values_.length,0,i),e.values_.length},pop:function(){return this.splice(Math.max(this[W].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[W],t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return e.spliceWithArray_(0,0,i),e.values_.length},reverse:function(){return pt.trackingDerivation&&t(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){pt.trackingDerivation&&t(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[W],i=t.dehanceValues_(t.values_).indexOf(e);return i>-1&&(this.splice(i,1),!0)}};function wi(e,t){"function"==typeof Array.prototype[e]&&(_i[e]=t(e))}function xi(e){return function(){var t=this[W];t.atom_.reportObserved();var i=t.dehanceValues_(t.values_);return i[e].apply(i,arguments)}}function Oi(e){return function(t,i){var n=this,r=this[W];return r.atom_.reportObserved(),r.dehanceValues_(r.values_)[e]((function(e,r){return t.call(i,e,r,n)}))}}function ki(e){return function(){var t=this,i=this[W];i.atom_.reportObserved();var n=i.dehanceValues_(i.values_),r=arguments[0];return arguments[0]=function(e,i,n){return r(e,i,n,t)},n[e].apply(n,arguments)}}wi("at",xi),wi("concat",xi),wi("flat",xi),wi("includes",xi),wi("indexOf",xi),wi("join",xi),wi("lastIndexOf",xi),wi("slice",xi),wi("toString",xi),wi("toLocaleString",xi),wi("toSorted",xi),wi("toSpliced",xi),wi("with",xi),wi("every",Oi),wi("filter",Oi),wi("find",Oi),wi("findIndex",Oi),wi("findLast",Oi),wi("findLastIndex",Oi),wi("flatMap",Oi),wi("forEach",Oi),wi("map",Oi),wi("some",Oi),wi("toReversed",Oi),wi("reduce",ki),wi("reduceRight",ki);var Ai,Si,Ti=x("ObservableArrayAdministration",yi);function Ci(e){return m(e)&&Ti(e[W])}var Ii={},ji="add",Pi="delete";Ai=Symbol.iterator,Si=Symbol.toStringTag;var Li,Ei,Bi=function(){function e(e,i,n){var r=this;void 0===i&&(i=K),void 0===n&&(n="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[W]=Ii,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=i,this.name_=n,v(Map)||t(18),un((function(){r.keysAtom_=H("ObservableMap.keys()"),r.data_=new Map,r.hasMap_=new Map,e&&r.merge(e)}))}var i=e.prototype;return i.has_=function(e){return this.data_.has(e)},i.has=function(e){var t=this;if(!pt.trackingDerivation)return this.has_(e);var i=this.hasMap_.get(e);if(!i){var n=i=new Ke(this.has_(e),Y,"ObservableMap.key?",!1);this.hasMap_.set(e,n),qt(n,(function(){return t.hasMap_.delete(e)}))}return i.get()},i.set=function(e,t){var i=this.has_(e);if(li(this)){var n=ci(this,{type:i?gi:ji,object:this,newValue:t,name:e});if(!n)return this;t=n.newValue}return i?this.updateValue_(e,t):this.addValue_(e,t),this},i.delete=function(e){var t=this;if((this.keysAtom_,li(this))&&!ci(this,{type:Pi,object:this,name:e}))return!1;if(this.has_(e)){var i=hi(this),n=i?{observableKind:"map",debugObjectName:this.name_,type:Pi,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return oi((function(){var i;t.keysAtom_.reportChanged(),null==(i=t.hasMap_.get(e))||i.setNewValue_(!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)})),i&&fi(this,n),!0}return!1},i.updateValue_=function(e,t){var i=this.data_.get(e);if((t=i.prepareNewValue_(t))!==pt.UNCHANGED){var n=hi(this),r=n?{observableKind:"map",debugObjectName:this.name_,type:gi,object:this,oldValue:i.value_,name:e,newValue:t}:null;0,i.setNewValue_(t),n&&fi(this,r)}},i.addValue_=function(e,t){var i=this;this.keysAtom_,oi((function(){var n,r=new Ke(t,i.enhancer_,"ObservableMap.key",!1);i.data_.set(e,r),t=r.value_,null==(n=i.hasMap_.get(e))||n.setNewValue_(!0),i.keysAtom_.reportChanged()}));var n=hi(this),r=n?{observableKind:"map",debugObjectName:this.name_,type:ji,object:this,name:e,newValue:t}:null;n&&fi(this,r)},i.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},i.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},i.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},i.values=function(){var e=this,t=this.keys();return pn({next:function(){var i=t.next(),n=i.done,r=i.value;return{done:n,value:n?void 0:e.get(r)}}})},i.entries=function(){var e=this,t=this.keys();return pn({next:function(){var i=t.next(),n=i.done,r=i.value;return{done:n,value:n?void 0:[r,e.get(r)]}}})},i[Ai]=function(){return this.entries()},i.forEach=function(e,t){for(var i,n=N(this);!(i=n()).done;){var r=i.value,o=r[0],a=r[1];e.call(t,a,o,this)}},i.merge=function(e){var i=this;return Mi(e)&&(e=new Map(e)),oi((function(){y(e)?function(e){var t=Object.keys(e);if(!A)return t;var i=Object.getOwnPropertySymbols(e);return i.length?[].concat(t,i.filter((function(t){return s.propertyIsEnumerable.call(e,t)}))):t}(e).forEach((function(t){return i.set(t,e[t])})):Array.isArray(e)?e.forEach((function(e){var t=e[0],n=e[1];return i.set(t,n)})):O(e)?(e.constructor!==Map&&t(19,e),e.forEach((function(e,t){return i.set(t,e)}))):null!=e&&t(20,e)})),this},i.clear=function(){var e=this;oi((function(){ot((function(){for(var t,i=N(e.keys());!(t=i()).done;){var n=t.value;e.delete(n)}}))}))},i.replace=function(e){var i=this;return oi((function(){for(var n,r=function(e){if(O(e)||Mi(e))return e;if(Array.isArray(e))return new Map(e);if(y(e)){var i=new Map;for(var n in e)i.set(n,e[n]);return i}return t(21,e)}(e),o=new Map,a=!1,s=N(i.data_.keys());!(n=s()).done;){var l=n.value;if(!r.has(l))if(i.delete(l))a=!0;else{var u=i.data_.get(l);o.set(l,u)}}for(var c,h=N(r.entries());!(c=h()).done;){var d=c.value,f=d[0],p=d[1],v=i.data_.has(f);if(i.set(f,p),i.data_.has(f)){var g=i.data_.get(f);o.set(f,g),v||(a=!0)}}if(!a)if(i.data_.size!==o.size)i.keysAtom_.reportChanged();else for(var m=i.data_.keys(),b=o.keys(),_=m.next(),w=b.next();!_.done;){if(_.value!==w.value){i.keysAtom_.reportChanged();break}_=m.next(),w=b.next()}i.data_=o})),this},i.toString=function(){return"[object ObservableMap]"},i.toJSON=function(){return Array.from(this)},i.observe_=function(e,t){return di(this,e)},i.intercept_=function(e){return ui(this,e)},P(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Si,get:function(){return"Map"}}]),e}(),Mi=x("ObservableMap",Bi);var Ri={};Li=Symbol.iterator,Ei=Symbol.toStringTag;var Ni=function(){function e(e,i,n){var r=this;void 0===i&&(i=K),void 0===n&&(n="ObservableSet"),this.name_=void 0,this[W]=Ri,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,v(Set)||t(22),this.enhancer_=function(e,t){return i(e,t,n)},un((function(){r.atom_=H(r.name_),e&&r.replace(e)}))}var i=e.prototype;return i.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},i.clear=function(){var e=this;oi((function(){ot((function(){for(var t,i=N(e.data_.values());!(t=i()).done;){var n=t.value;e.delete(n)}}))}))},i.forEach=function(e,t){for(var i,n=N(this);!(i=n()).done;){var r=i.value;e.call(t,r,r,this)}},i.add=function(e){var t=this;if((this.atom_,li(this))&&!ci(this,{type:ji,object:this,newValue:e}))return this;if(!this.has(e)){oi((function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()}));var i=!1,n=hi(this),r=n?{observableKind:"set",debugObjectName:this.name_,type:ji,object:this,newValue:e}:null;i,n&&fi(this,r)}return this},i.delete=function(e){var t=this;if(li(this)&&!ci(this,{type:Pi,object:this,oldValue:e}))return!1;if(this.has(e)){var i=hi(this),n=i?{observableKind:"set",debugObjectName:this.name_,type:Pi,object:this,oldValue:e}:null;return oi((function(){t.atom_.reportChanged(),t.data_.delete(e)})),i&&fi(this,n),!0}return!1},i.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},i.entries=function(){var e=0,t=Array.from(this.keys()),i=Array.from(this.values());return pn({next:function(){var n=e;return e+=1,n<i.length?{value:[t[n],i[n]],done:!1}:{done:!0}}})},i.keys=function(){return this.values()},i.values=function(){this.atom_.reportObserved();var e=this,t=0,i=Array.from(this.data_.values());return pn({next:function(){return t<i.length?{value:e.dehanceValue_(i[t++]),done:!1}:{done:!0}}})},i.replace=function(e){var i=this;return zi(e)&&(e=new Set(e)),oi((function(){Array.isArray(e)||k(e)?(i.clear(),e.forEach((function(e){return i.add(e)}))):null!=e&&t("Cannot initialize set from "+e)})),this},i.observe_=function(e,t){return di(this,e)},i.intercept_=function(e){return ui(this,e)},i.toJSON=function(){return Array.from(this)},i.toString=function(){return"[object ObservableSet]"},i[Li]=function(){return this.values()},P(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Ei,get:function(){return"Set"}}]),e}(),zi=x("ObservableSet",Ni),Vi=Object.create(null),Di="remove",Ui=function(){function e(e,t,i,n){void 0===t&&(t=new Map),void 0===n&&(n=ve),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=i,this.defaultAnnotation_=n,this.keysAtom_=new $("ObservableObject.keys"),this.isPlainObject_=y(this.target_)}var i=e.prototype;return i.getObservablePropValue_=function(e){return this.values_.get(e).get()},i.setObservablePropValue_=function(e,t){var i=this.values_.get(e);if(i instanceof Je)return i.set(t),!0;if(li(this)){var n=ci(this,{type:gi,object:this.proxy_||this.target_,name:e,newValue:t});if(!n)return null;t=n.newValue}if((t=i.prepareNewValue_(t))!==pt.UNCHANGED){var r=hi(this),o=r?{type:gi,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:i.value_,name:e,newValue:t}:null;0,i.setNewValue_(t),r&&fi(this,o)}return!0},i.get_=function(e){return pt.trackingDerivation&&!C(this.target_,e)&&this.has_(e),this.target_[e]},i.set_=function(e,t,i){return void 0===i&&(i=!1),C(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):i?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,i)},i.has_=function(e){if(!pt.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var t=this.pendingKeys_.get(e);return t||(t=new Ke(e in this.target_,Y,"ObservableObject.key?",!1),this.pendingKeys_.set(e,t)),t.get()},i.make_=function(e,i){if(!0===i&&(i=this.defaultAnnotation_),!1!==i){if(Ki(this,i,e),!(e in this.target_)){var n;if(null!=(n=this.target_[z])&&n[e])return;t(1,i.annotationType_,this.name_+"."+e.toString())}for(var r=this.target_;r&&r!==s;){var a=o(r,e);if(a){var l=i.make_(this,e,a,r);if(0===l)return;if(1===l)break}r=Object.getPrototypeOf(r)}Gi(this,i,e)}},i.extend_=function(e,t,i,n){if(void 0===n&&(n=!1),!0===i&&(i=this.defaultAnnotation_),!1===i)return this.defineProperty_(e,t,n);Ki(this,i,e);var r=i.extend_(this,e,t,n);return r&&Gi(this,i,e),r},i.defineProperty_=function(e,t,i){void 0===i&&(i=!1),this.keysAtom_;try{yt();var n=this.delete_(e);if(!n)return n;if(li(this)){var r=ci(this,{object:this.proxy_||this.target_,name:e,type:ji,newValue:t.value});if(!r)return null;var o=r.newValue;t.value!==o&&(t=L({},t,{value:o}))}if(i){if(!Reflect.defineProperty(this.target_,e,t))return!1}else a(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{bt()}return!0},i.defineObservableProperty_=function(e,t,i,n){void 0===n&&(n=!1),this.keysAtom_;try{yt();var r=this.delete_(e);if(!r)return r;if(li(this)){var o=ci(this,{object:this.proxy_||this.target_,name:e,type:ji,newValue:t});if(!o)return null;t=o.newValue}var s=qi(e),l={configurable:!pt.safeDescriptors||this.isPlainObject_,enumerable:!0,get:s.get,set:s.set};if(n){if(!Reflect.defineProperty(this.target_,e,l))return!1}else a(this.target_,e,l);var u=new Ke(t,i,"ObservableObject.key",!1);this.values_.set(e,u),this.notifyPropertyAddition_(e,u.value_)}finally{bt()}return!0},i.defineComputedProperty_=function(e,t,i){void 0===i&&(i=!1),this.keysAtom_;try{yt();var n=this.delete_(e);if(!n)return n;if(li(this))if(!ci(this,{object:this.proxy_||this.target_,name:e,type:ji,newValue:void 0}))return null;t.name||(t.name="ObservableObject.key"),t.context=this.proxy_||this.target_;var r=qi(e),o={configurable:!pt.safeDescriptors||this.isPlainObject_,enumerable:!1,get:r.get,set:r.set};if(i){if(!Reflect.defineProperty(this.target_,e,o))return!1}else a(this.target_,e,o);this.values_.set(e,new Je(t)),this.notifyPropertyAddition_(e,void 0)}finally{bt()}return!0},i.delete_=function(e,t){if(void 0===t&&(t=!1),this.keysAtom_,!C(this.target_,e))return!0;if(li(this)&&!ci(this,{object:this.proxy_||this.target_,name:e,type:Di}))return null;try{var i,n;yt();var r,a=hi(this),s=this.values_.get(e),l=void 0;if(!s&&a)l=null==(r=o(this.target_,e))?void 0:r.value;if(t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if(s&&(this.values_.delete(e),s instanceof Ke&&(l=s.value_),wt(s)),this.keysAtom_.reportChanged(),null==(i=this.pendingKeys_)||null==(n=i.get(e))||n.set(e in this.target_),a){var u={type:Di,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:l,name:e};0,a&&fi(this,u)}}finally{bt()}return!0},i.observe_=function(e,t){return di(this,e)},i.intercept_=function(e){return ui(this,e)},i.notifyPropertyAddition_=function(e,t){var i,n,r=hi(this);if(r){var o=r?{type:ji,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;0,r&&fi(this,o)}null==(i=this.pendingKeys_)||null==(n=i.get(e))||n.set(!0),this.keysAtom_.reportChanged()},i.ownKeys_=function(){return this.keysAtom_.reportObserved(),S(this.target_)},i.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function Wi(e,t){var i;if(C(e,W))return e;var n=null!=(i=null==t?void 0:t.name)?i:"ObservableObject",r=new Ui(e,new Map,String(n),function(e){var t;return e?null!=(t=e.defaultDecorator)?t:ge(e):void 0}(t));return _(e,W,r),e}var $i=x("ObservableObjectAdministration",Ui);function qi(e){return Vi[e]||(Vi[e]={get:function(){return this[W].getObservablePropValue_(e)},set:function(t){return this[W].setObservablePropValue_(e,t)}})}function Hi(e){return!!m(e)&&$i(e[W])}function Gi(e,t,i){var n;null==(n=e.target_[z])||delete n[i]}function Ki(e,t,i){}var Yi,Fi,Xi=tn(0),Ji=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,!1===e}(),Zi=0,Qi=function(){};Yi=Qi,Fi=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(Yi.prototype,Fi):void 0!==Yi.prototype.__proto__?Yi.prototype.__proto__=Fi:Yi.prototype=Fi;var en=function(e,t,i){function n(t,i,n,r){var o;return void 0===n&&(n="ObservableArray"),void 0===r&&(r=!1),o=e.call(this)||this,un((function(){var e=new yi(n,i,r,!0);e.proxy_=M(o),w(M(o),W,e),t&&t.length&&o.spliceWithArray(0,0,t),Ji&&Object.defineProperty(M(o),"0",Xi)})),o}E(n,e);var r=n.prototype;return r.concat=function(){this[W].atom_.reportObserved();for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Array.prototype.concat.apply(this.slice(),t.map((function(e){return Ci(e)?e.slice():e})))},r[i]=function(){var e=this,t=0;return pn({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},P(n,[{key:"length",get:function(){return this[W].getArrayLength_()},set:function(e){this[W].setArrayLength_(e)}},{key:t,get:function(){return"Array"}}]),n}(Qi,Symbol.toStringTag,Symbol.iterator);function tn(e){return{enumerable:!1,configurable:!0,get:function(){return this[W].get_(e)},set:function(t){this[W].set_(e,t)}}}function nn(e){a(en.prototype,""+e,tn(e))}function rn(e){if(e>Zi){for(var t=Zi;t<e+100;t++)nn(t);Zi=e}}function on(e,t,i){return new en(e,t,i)}function an(e,i){if("object"==typeof e&&null!==e){if(Ci(e))return void 0!==i&&t(23),e[W].atom_;if(zi(e))return e.atom_;if(Mi(e)){if(void 0===i)return e.keysAtom_;var n=e.data_.get(i)||e.hasMap_.get(i);return n||t(25,i,ln(e)),n}if(Hi(e)){if(!i)return t(26);var r=e[W].values_.get(i);return r||t(27,i,ln(e)),r}if(q(e)||Ze(e)||Tt(e))return e}else if(v(e)&&Tt(e[W]))return e[W];t(28)}function sn(e,i){return e||t(29),void 0!==i?sn(an(e,i)):q(e)||Ze(e)||Tt(e)||Mi(e)||zi(e)?e:e[W]?e[W]:void t(24,e)}function ln(e,t){var i;if(void 0!==t)i=an(e,t);else{if(zt(e))return e.name;i=Hi(e)||Mi(e)||zi(e)?sn(e):an(e)}return i.name_}function un(e){var t=at(),i=qe(!0);yt();try{return e()}finally{bt(),He(i),st(t)}}Object.entries(_i).forEach((function(e){var t=e[0],i=e[1];"concat"!==t&&_(en.prototype,t,i)})),rn(1e3);var cn=s.toString;function hn(e,t,i){return void 0===i&&(i=-1),dn(e,t,i)}function dn(e,t,i,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var o=typeof e;if("function"!==o&&"object"!==o&&"object"!=typeof t)return!1;var a=cn.call(e);if(a!==cn.call(t))return!1;switch(a){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":i>=0&&i++}e=fn(e),t=fn(t);var s="[object Array]"===a;if(!s){if("object"!=typeof e||"object"!=typeof t)return!1;var l=e.constructor,u=t.constructor;if(l!==u&&!(v(l)&&l instanceof l&&v(u)&&u instanceof u)&&"constructor"in e&&"constructor"in t)return!1}if(0===i)return!1;i<0&&(i=-1),r=r||[];for(var c=(n=n||[]).length;c--;)if(n[c]===e)return r[c]===t;if(n.push(e),r.push(t),s){if((c=e.length)!==t.length)return!1;for(;c--;)if(!dn(e[c],t[c],i-1,n,r))return!1}else{var h,d=Object.keys(e);if(c=d.length,Object.keys(t).length!==c)return!1;for(;c--;)if(!C(t,h=d[c])||!dn(e[h],t[h],i-1,n,r))return!1}return n.pop(),r.pop(),!0}function fn(e){return Ci(e)?e.slice():O(e)||Mi(e)||k(e)||zi(e)?Array.from(e.entries()):e}function pn(e){return e[Symbol.iterator]=vn,e}function vn(){return this}["Symbol","Map","Set"].forEach((function(e){void 0===n()[e]&&t("MobX requires global '"+e+"' to be available or polyfilled")})),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}},extras:{getDebugName:ln},$mobx:W});const gn=Symbol("annotationCache"),mn=Object.prototype;class yn{static reactivity=!0;static makeObservable(e){this.reactivity&&pi(e)}static observableClass(e,t){if(this.reactivity){this.makeAutoObservable(e);const i=Object.getOwnPropertyDescriptor(e,"dataStore");if(void 0!==t&&i?.get){const i=`sid-${t}`,n=localStorage.getItem(i);if(n){const t=JSON.parse(n,((e,t)=>"undefined"===t?void 0:t));e.dataStore=t}setTimeout((()=>{Vt((()=>{localStorage.setItem(i,JSON.stringify(ri(e.dataStore,new Map),((e,t)=>void 0===t?"undefined":t)))}))}),1)}}}static makeAutoObservable(e){if(this.reactivity){if(ii(e))throw new Error("Target must not be observable");let t=e[gn];if(!t){t={};const i=Object.getPrototypeOf(e);let n=e;for(;n&&n!==mn;)Reflect.ownKeys(n).forEach((e=>{e!==W&&"constructor"!==e&&"toString"!==e&&(t[e]=!0)})),n=Object.getPrototypeOf(n);i&&i!==mn&&Object.defineProperty(i,gn,{value:t})}pi(e,t,{autoBind:!0})}}}class bn{get layout(){return{}}static create(...e){const t=new this(...e);return yn.observableClass(t,this.name),t.init(),t}static layout(e,t,...i){return bn.create.call(this,e,t,...i).layout}init(){}}class _n extends bn{height=0;width=0;constructor(){super(),window.addEventListener("resize",(()=>this.handleResize())),this.handleResize()}get bounds(){return{width:this.width,height:this.height}}handleResize(){this.width=window.innerWidth,this.height=window.innerHeight}}var wn,xn,On,kn,An,Sn,Tn;!function(e){e.Top="top",e.Middle="middle",e.Bottom="bottom",e.Left="left",e.Center="center",e.Right="right",e.TopLeft="left top",e.TopCenter="center top",e.TopRight="right top",e.MiddleLeft="left center",e.MiddleCenter="center center",e.MiddleRight="right center",e.BottomLeft="left bottom",e.BottomCenter="center bottom",e.BottomRight="right bottom"}(wn||(wn={})),function(e){e.Alias="alias",e.AllScroll="all-scroll",e.Auto="auto",e.Cell="cell",e.ContextMenu="context-menu",e.Copy="copy",e.CrossHair="crosshair",e.Default="default",e.Grab="grab",e.Grabbing="grabbing",e.Help="help",e.Move="move",e.NoDrop="no-drop",e.None="none",e.NotAllowed="not-allowed",e.Pointer="pointer",e.Progress="progress",e.ResizeCol="col-resize",e.ResizeE="e-resize",e.ResizeEW="ew-resize",e.ResizeN="n-resize",e.ResizeNE="ne-resize",e.ResizeNESW="nesw-resize",e.ResizeNS="ns-resize",e.ResizeNW="nw-resize",e.ResizeNWSE="nwse-resize",e.ResizeRow="row-resize",e.ResizeS="s-resize",e.ResizeSE="se-resize",e.ResizeSW="sw-resize",e.ResizeW="w-resize",e.Text="text",e.VerticalText="vertical-text",e.Wait="wait",e.ZoomIn="zoom-in",e.ZoomOut="zoom-out"}(xn||(xn={})),function(e){e.Repeat="repeat",e.RepeatX="repeat-x",e.RepeatY="repeat-y",e.NoRepeat="no-repeat"}(On||(On={})),function(e){e.Auto="auto",e.Cover="cover",e.Contain="contain"}(kn||(kn={})),function(e){e.Visible="visible",e.Hidden="hidden",e.Clip="clip",e.Scroll="scroll",e.Auto="auto"}(An||(An={})),function(e){e.Center="center",e.Start="start",e.End="end",e.Left="left",e.Right="right"}(Sn||(Sn={}));class Cn extends bn{resizer;constructor(){super(),this.resizer=_n.create()}get bounds(){return this.resizer.bounds}get imageScale(){return Math.min(1,(this.bounds.width-80)/1120)}get layout(){return{height:this.bounds.height,width:this.bounds.width,background:"#111",image:"images/gui/altBack.png",imageSize:kn.Auto,imagePosition:wn.MiddleCenter,column:[{height:this.bounds.height,width:this.bounds.width,background:"linear-gradient(90deg, #000a 0%, #0002 25%, #0002 75%, #000a 100%)",align:wn.TopCenter,overflow:An.Scroll,row:[{grow:1,width:0,maxWidth:1200,margin:{bottom:100},align:wn.MiddleCenter,column:[{align:wn.MiddleCenter,width:"100%",column:[{text:"The Making of a custom Spirit Island client",color:"rgb(255, 230, 192)",textAlign:Sn.Center,shadow:!0,size:22,bold:!0},{text:"as featured in",size:20,color:"#b9a587",shadow:!0},{row:[{image:"images/gui/youtube.png",width:30,height:30,margin:{bottom:4},shadow:!0},{width:10},{text:"Spirit Island with Jonathan",color:"rgb(217, 220, 255)",size:20,className:"link",cursor:xn.Pointer,shadow:!0,onClick:()=>{window.location.href="https://www.youtube.com/channel/UCGkWmm9cDw2edNysDSxrh_A"}}]}],height:80,margin:{top:60,bottom:60}},{width:"100%",background:"#313031",shadow:!0,padding:{left:10,right:10,bottom:10},column:[{width:"100%",minHeight:40,align:wn.MiddleLeft,row:[{color:"#ffffe7",text:"A live status document of the project. Last modified 2024-03-16",margin:{left:5}}]},{width:"100%",height:"100%",background:"#414040",shadow:!0,padding:20,column:[this.textBlock("First things first: No you can't download it. However, I will share with you the story behind it."),this.textBlock("Next, since I'm going to dip my toes into the territory of custom game elements: Eric, if you happen to be reading this, rest assured that I wholeheartedly adhere to"),{text:"the terms for creating Spirit Island game elements set forth in the FAQ.",color:"rgb(217, 220, 255)",size:16,className:"link",cursor:xn.Pointer,onClick:()=>{window.location.href="https://querki.net/u/darker/spirit-island-faq/#!.9v5ka4u"}},this.separator,this.textBlock("With that out of the way, let's talk about how this project came to be. Upon experimenting with several digital adaptations of Spirit Island, it became evident that existing options lacked the flexibility needed to effectively showcase the intricate gameplay of Spirit Island. In particular, none of these platforms included all expansions while simultanously managed to show all game elements on a single screen. Faced with this gap, the logical solution was to embark on the journey of creating my own custom client. And embark I did."),this.extraLine,this.textBlock("The guiding principle behind this endeavor was clear: to develop a modern, simple, yet potent, uncluttered, and viewer-friendly user interface. The overarching goal was to ensure that crucial information remained effortlessly visible on the screen at all times. This article aims to shed light on the standout features and pivotal design choices that define this custom client, born out of the necessity for a more versatile and engaging Spirit Island digital experience."),this.extraLine,this.textBlock("This became the end result."),this.image("images/screens/memoryThematic.png",1140,641),this.separator,this.header("Customizable Game Setup"),this.textBlock("But first let's go back to the basics. The first task was to make a customizable setup where I could configure the boards, the locations of spirit but also toggle on and off all the various play modes such as an extra empty board, double adversaries and thematic boards. I settled on a simple interface where one could drag boards around and assign Spirits/Aspects."),this.image("images/screens/setup.png",1140,641),this.separator,this.textBlock("The logical follow-up was then to also include randomization options. I added separate options to randomize each part of the setup as well as a lets-see-what-happens button to get a complete random setup of the current difficulty. One of the more fun sub-projects was to implement the official layouts as well as a complete random generator that also included archipelagos."),this.video("videos/island.mp4",1140,790),this.separator,this.header("Thematic Board Overhaul"),this.textBlock("Upon assessing the thematic board, it became apparent that enhancements were essential. The existing setup limited its use to a single configuration, and the intentionally textured design, while purposeful, resulted in a somewhat cluttered appearance. Additionally, the small lands with meandering borders proved impractical when accommodating an increasing number of tokens."),this.extraLine,this.textBlock("To address these issues, I initiated several changes to refine the thematic board in comparison to its cardboard counterpart. Firstly, I modified the textures to create a clearer distinction between lands. Secondly, I made adjustments to the edge borders and coast to allow for any layout configuration, including the circular board showcased below. Lastly, I slightly straightened the inner borders to counteract the smaller land sizes, providing more space for tokens. These alterations aimed to optimize the thematic board for a more enjoyable gaming experience, and I eagerly anticipated the prospect of playing on the revamped boards."),this.image("images/screens/thematic.png",1140,1035),this.textBlock("After setup was taken care of came a much tougher problem to tackle..."),this.separator,this.header("Following the Rules"),this.textBlock("Initially, the client was a simple sandbox, allowing me to add and remove tokens in various lands. However, it became apparent that a significant amount of time was dedicated to ensuring rule adherence. Balancing this with the challenge of articulating something resembling intelligent commentary for my modest YouTube audience placed a considerable strain on my cognitive resources. Recognizing the need for improvement, a pivotal shift was imperative."),this.extraLine,this.textBlock("Engaging in months of meticulous work within the official FAQ (Querki) and the in-depth-rules channel of the official Discord server - harrassing the rule lawyers there with one weird corner case after another - I finally got something that started to look like rules that followed the official way of playing."),this.extraLine,this.textBlock("And so it came to be that the client now incorporates the complete ruleset of all published expansions, encompassing all spirits, aspects, scenarios, adversaries, powers, events, etc."),this.image("images/screens/sets.png",1140,295),this.separator,this.header("Streamlined Gameplay Clarity"),this.textBlock("When coming to actually presenting the game state I knew I had to invest effort into making everything as clear as possible. One of the greatest challenges was how to present what to do next in any given moment while simultanously present the most vital game elements such as the island boards, the invader board, the spirit boards and the power cards. What I end up with was an always visible invader board collapsed into a side bar, an always visible query box that always tell us what to do next, and then a scrollable and zoomable island taking up most of the space."),this.image("images/screens/options.png",1140,641),this.separator,this.header("Focused Spirit Management"),this.textBlock("The lower section of the screen was then exclusively dedicated to the selected Spirit accompanied by a designated area for its power cards. The primary goal was to focus attention on only one Spirit at a time. Trying to squeeze in multiple spirits proved counter-productive to the goal of an uncluttered interface. Additionally, this design allowed a richer, closer-to-cardboard experience with full-sized Spirit Boards and Power Cards."),this.extraLine,this.textBlock("The key to achieving this design was letting go of attempts to create different zones for played, discarded, or in-hand cards and transferring them among these zones. Instead, the approach embraced the use of symbols to denote each card's status, enhancing clarity and minimizing visual clutter. While this playing style might have felt unfamiliar initially, I soon realized its value in prominently displaying cards in discard and other zones. Having the full picture made it significantly easier to plan innate abilities and make decisions about when to reclaim or not. This design was a keeper for sure."),this.image("images/screens/cards.png",1140,417),this.separator,this.header("In-Game Card Catalog"),this.textBlock("After establishing the foundational elements, it became evident that crucial components were still missing. An early realization struck me when I consistently found myself navigating to a card catalog website to reference available cards. One of the problems here was that I frequently kept stumbling on the query structure and syntax, having to relearn it every now and then."),this.extraLine,this.textBlock("Frustrated by this, I decided to take matters into my own hands and implemented a personalized solution. While it may not be as sophisticated, it proved to be far more comprehensible for me. To illustrate its functionality, here's an example search of the ten fast major powers with fire elements that cost 2-4 energy."),this.image("images/screens/catalog.png",1140,641),this.separator,this.header("Convenient Reminders & Ongoing Effects"),this.textBlock("In the intricate landscape of Spirit Island gameplay, the multitude of simultaneous effects can pose a challenge in keeping track of every factor influencing decisions. To tackle this issue, I incorporated reminders, both global and local, for every lingering effect. Yellow reminders mark effects persisting until the end of the turn, while pink reminders mark permanent effects."),this.video("videos/reminders.mp4",1140,348),this.separator,this.header("Full History & Undo Features"),this.textBlock("When it came to testing if the implemented rules were spot on, a new challenge emerged: understanding what exactly transpired and why. To tackle this, I initially introduced a log that documented everything into a text file. However, it soon became apparent that having this information directly within the client would be more practical. Thus, the inception of a comprehensive in-client game log."),this.extraLine,this.textBlock("Initially faced with the dilemma of where to place the log, I eventually settled on positioning it directly below the query box while making the latter collapsible. This design choice ensured that the most critical part of the log was consistently visible at the bottom, without sacrificing valuable screen space."),this.extraLine,this.textBlock("As a finishing touch, I incorporated right-pointing arrows next to each entry, enabling me to seamlessly jump to specific points in the game's history. Additionally, certain log elements, such as cards and lands, became hoverable, providing the convenience of highlighting specific cards or lands."),this.video("videos/history.mp4",1140,1140),this.separator,this.header("Flexible Move Modification"),this.textBlock("As a natural consequence of enabling flexible navigation through the game's history, a new necessity gradually emerged. In the physical realm of cardboard play, it's common to desire adjustments to decisions made in earlier phases, such as subtly altering the placement of a presence for targeting purposes. In a digital context, making such changes often involves undoing multiple moves, altering the specific move, and then re-entering all subsequent moves. While this process is not too big of a problem for solo play, it becomes quite the nuisance when multiple spirits are involved, perhaps in the midst of a fast phase."),this.extraLine,this.textBlock("To address this challenge, the 'Manage Move Divergence' dialog was conceived. This feature automatically appears when a move is altered in the past. With this dialog, I gained the flexibility to effortlessly jump back to the desired point, modify the intended move, and return. Should this modification impact other moves and render them illegal, the client then protests and provides an opportunity to make additional adjustments as needed. Exploring the intricacies of this system left me pondering a question: why aren't more digital adaptations of board games incorporating similar features? In my experience, altering moves in the past is a common occurrence during board game sessions, and having a tool like this proves to be incredibly valuable."),this.image("images/screens/move_divergence.png",507,557),this.separator,this.header("Admin Mode Access"),this.textBlock("The aforementioned approach proved effective when ensuring the game adhered to the rules, but there were instances where I simply wanted to test scenarios, set up specific positions, or engage in experimentation – something previously was easily achievable when everything was manual. To accommodate these needs, I introduced an admin mode to override the enforced rules. Now, if I ever noticed a rule implementation error but am unwilling to backtrack and fix it, I could effortlessly invoke this mode to address the issue swiftly."),this.image("images/screens/admin_mode.png",771,756),this.separator,this.header("Bells and whistles"),this.textBlock("With the core functionalities in place, the final touch was to elevate the overall experience and make it more immersive. I introduced some simple animations, incorporated dynamic music that changes based on the situation, included an announcement voice for phases and invader actions, and added suitable sound effects including unique sound effects that vary from one spirit to another. The culmination of these efforts breathed life into the client, transforming it into a more dynamic and vibrant experience."),this.video("videos/flip.mp4",1140,500),this.separator,this.header("What about Multiplayer?"),this.textBlock("Given the cooperative nature of Spirit Island, implementing multiplayer support was a natural extension. However, the initial attempt to integrate this feature proved disastrous. The game consistently fell out of sync, and peculiar issues arose during undoing or jumping in history. To rectify this, I decided to start from scratch, ensuring that communication worked on a more solid foundation. The paramount consideration was to guarantee the stability of the game state at all times. The result of this overhaul is a system where it's now virtually impossible for clients to find themselves in a state that is out of sync."),this.extraLine,this.textBlock("Briefly entertaining the idea of adding voice communication support, I swiftly recognized that other existing services handled this aspect far more efficiently. As a result, the current multiplayer implementation is designed to be used in conjunction with an external voice chat applications, such as Discord, providing a more streamlined and effective communication experience."),this.extraLine,this.textBlock("So how did multiplayer end up working in this client? Well. Joining a game is a straightforward process—simply enter the join code found in any ongoing game. With every action performed by a player, the game state is automatically updated for all connected clients. The guiding principle in multiplayer is akin to a physical board setting, where every player can perform any action. The decision-making process is left entirely to the players, allowing them to determine who takes on which roles and in what manner. Notably, there are no enforced voting systems. To enhance the multiplayer experience, some features have been included, such as the ability to ping a specific land of interest to alert the rest of the group."),this.image("images/screens/multiplayer.png",1140,376),this.separator,this.header("Integrated Game Library"),this.textBlock("As my gaming sessions continued to accumulate, I found myself in need of a more organized approach. While initially having a simple system to save and load games, the concept of a game library soon took center stage. The notion of having an in-game library that cataloged every played game seemed like a fantastic idea. Subsequently, I built a dedicated page where you can not only view overall statistics but also seamlessly jump into any of the saved games. This feature proved to be an invaluable tool, especially when gearing up for the next task at hand..."),this.image("images/screens/stats.png",1140,606),this.separator,this.header("A.I. Capabilities"),this.textBlock("Simulating the intricacies of the rules posed one of the most formidable challenges in the development process. Most players has probably run into some situation that requires a quick lookup at Querki or posting a question to the rules section of the Discord server. But if I had known the sheer volume of potential corner cases in Spirit Island, I probably never would have tried to take upon this task. With 37 unique Spirits, each wielding special abilities that must harmonize with hundreds of other rules from adversaries, scenarios, events, and more, ensuring the functionality of every possible combination became a daunting task. For a long time, the simulation encountered issues when navigating specific situations, leading to freezes or peculiar errors that were difficult to resolve."),this.extraLine,this.textBlock("Confronted with the challenge of handling various corner cases, I recognized the need for a systematic approach. It became evident that the most efficient way to encounter and address a myriad of corner cases was through automation. Initially, I devised a random move inputter that played the game in a purely random manner. While effective to some extent, relying solely on random simulations had its limitations. Sure, these simulations could uncover some issues that could then be addressed, but the randomness didn't provide comprehensive testing, especially for situations that unfolded later in a game, as the simulations typically only lasted to turns 3 or 4 when running out of blight."),this.extraLine,this.textBlock("With the aspiration to enhance the algorithm's intelligence, I introduced a fairly simple Monte Carlo Tree Search algorithm coupled with a custom evaluation function. The results were surprisingly favorable, prompting me to delve deeper and continually refine its capabilities. The algorithm reached a notable milestone by successfully winning a difficulty 1 game. However, a significant hurdle emerged - the underlying simulation was too slow, severely limiting the number of simulations it could perform and constraining its improvement potential."),this.extraLine,this.textBlock("Undeterred, I committed months to revamping the simulation engine. Immersed in optimizing techniques at the lowest level of programming, the efforts proved fruitful. What once took seconds to simulate a complete game was now achieved in milliseconds. The result was a lightning-fast engine, significantly bolstering the algorithm's overall strength."),this.extraLine,this.textBlock("The subsequent challenge involved refining the evaluation function. I developed tools that allowed it to self-improve, tweaking values iteratively to find optimal evaluation parameters. While it hasn't reached the level of the most skilled human players, the A.I. has become sufficiently robust to win in many level 6 adversary matchups by its own. An illustrative example is showcased below, where Fathomless Mud of the Swamp emerges victorious against Sweden level 6."),this.video("videos/ai.mp4",1140,500),this.textBlock("Conducting thousands of automatically played games proved instrumental in addressing the initial challenge, resolving most, if not all, game-halting bugs. The sheer volume of games, each comprising hundreds of moves and simulating thousands of continuations, has led to encountering billions of game states. This extensive testing has exposed and rectified numerous peculiar situations."),this.extraLine,this.textBlock("For a long time now, the simulation has consistently demonstrated its capability to run without crashes. However, it's crucial to note that the absence of crashes doesn't guarantee 100% correctness in rule implementation. There are still lots of issues that can only be fixed by manual observation of games. Likely, all issues will never be fixed, considering even official developers does not know the rules in all corner cases."),this.extraLine,this.textBlock('With a functional A.I. in place, the last crucial step was integrating it into the user interface. Previously, it had been decoupled from the interface, and I would load simulated games into the client to observe them. Now, I introduced a button that could invoke the A.I. and have it specify its chosen move. As a result, the client now had the flexibility to mix and match human players with A.I. players in their games. It\'s worth noting that, unfortunately, strategy discussions with the A.I. are not possible at this stage. Its role is more akin to the scenario "A Diversity of Spirits." Perhaps in the future, with advancements such as Large Language Models, strategic dialogues with the A.I. could become a reality.'),this.separator,this.header("Progressive Campaign System"),this.textBlock("And then I ran out of things to implement. Everything was in the client. All that remained was to play Spirit Island. But what to actually play? I had so many options. If only there was some kind of campaign system..."),this.extraLine,this.textBlock("And so it came to be that I started to work on a simple system that would span multiple games. This was a feature I had always yearned for in the official rules, and I aimed to keep it straightforward. The intention wasn't to alter the core game mechanics but to introduce a meta-system that would govern the setup between games and provide a sense of progression. Ideally, this system would incorporate scenarios, the thematic board, and other play options that were infrequently explored in standard Spirit Island games."),this.extraLine,this.textBlock('I have a theory, by the way, about why scenarios and similar play options aren\'t as widely embraced as adversaries. I think it has to do with the fact that some scenarios are inherently harder or easier with certain Spirits, as indicated on the scenario card itself: "This Scenario is notably harder/easier...". I\'m not sure if this resonates with other players, but for me, when I first read those sections, I immediately knew that I wasn\'t going to be playing scenarios much. Why? Because no matter which Spirit one chooses to play the scenario with, it either leads to a feeling of "you won this because you played a Spirit that is notably easier to win this scenario with," or it results in the equally disheartening sentiment of "why aren\'t you playing optimally, choosing the best Spirits for the task at hand?" The same issue, of course, arises with adversaries, but I believe it occurs to a much lesser extent.'),this.extraLine,this.textBlock("One of the primary objectives of the campaign system was to address this challenge. The solution I devised was a straightforward system where you can select from four random encounters of equal difficulty and four random spirits. Each encounter encompasses a unique board layout, scenario, adversary, etc. Some feature the thematic board, while others incorporate an extra board or archipelago rules. The restriction on which spirits you could choose for these encounters turned out to be an advantage. It ensured that you could never consistently opt for the best spirit tailored to a particular scenario because that spirit might not be among the four available choices. Problem solved. Instead of presenting an issue, the potential imbalance of scenario-spirit combinations now became a strategic decision. To add a sense of progression, winning results in an increase in difficulty for the next encounter. However, in case of a loss, one of the spirits used is permanently retired from that campaign. In the broader context of a more extended campaign, this approach encourages players to carefully consider and choose the most favorable combination of encounters and spirits."),this.image("images/screens/campaign.png",1140,641),this.separator,this.header("Summary"),this.textBlock("In conclusion, the journey of creating a custom Spirit Island client has been a fascinating and rewarding endeavor. Fueled by a desire for a digital adaptation that could effectively capture the intricacies of the board game, the development process led to the birth of a versatile and engaging platform."),this.extraLine,this.textBlock("Curious to witness the custom Spirit Island client in action? Join me on my channel, where I'm currently documenting games played in a campaign entirely played by the A.I. I'd love to have you there—feel free to drop by and share your thoughts in the comments!")]},{width:"100%",minHeight:30,align:wn.MiddleRight,row:[{color:"#ffffe7",text:"Jonathan",margin:{right:5}}]}]}]}]}],mayRightClick:!1}}get extraLine(){return{width:"100%",height:10}}get header(){return e=>({color:"rgb(255, 230, 192)",size:20,bold:!0,margin:{top:10,bottom:10},text:e})}get image(){return(e,t,i)=>({width:1140*this.imageScale,height:i*this.imageScale,image:e,imageSize:{width:t*this.imageScale,height:i*this.imageScale},imageRepeat:On.NoRepeat,imagePosition:wn.MiddleCenter,margin:{top:20,bottom:20},shadow:!0})}get separator(){return{className:"separator",width:"100%",margin:{top:10,bottom:10}}}get textBlock(){return e=>({className:"text",color:"#fff",size:16,text:e})}get video(){return(e,t,i)=>({video:{autoplay:!0,loop:!0,muted:!0,source:e,width:t*this.imageScale,height:i*this.imageScale},width:t*this.imageScale,height:i*this.imageScale,margin:{top:20,bottom:20},shadow:!0})}}function In(e){return Number.isNaN(Number(e))?String(e):`${Number(e)}px`}!function(e){e.Background="background",e.Border="border",e.Bottom="bottom",e.Height="height",e.Image="background-image",e.ImageSize="background-size",e.Left="left",e.Margin="margin",e.Opacity="opacity",e.Padding="padding",e.Right="right",e.Shadow="filter",e.TextColor="color",e.TextSize="fontSize",e.Top="top",e.Transform="transform",e.TransformOrigin="transform-origin",e.Width="width",e.All="all"}(Tn||(Tn={}));const jn="ontouchstart"in window||!!navigator.maxTouchPoints;function Pn(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const i=Object.keys(e),n=Object.keys(t);return i.length===n.length&&i.every((i=>Pn(e[i],t[i])))}return!1}class Ln{static INPUT_MAP={value:(e,t)=>{e.value=t.value??""},onChange:(e,t)=>{e.onchange=this.addListener(t.onChange,t.enabled)},onInput:(e,t)=>{e.oninput=this.addListener(t.onInput,t.enabled)},enabled:(e,t)=>{Ln.INPUT_MAP.onChange(e,t)},autoFocus:()=>{},autoSelect:()=>{},spellCheck:(e,t)=>{e.spellcheck=void 0===t.spellCheck||t.spellCheck},ref:(e,t)=>{t.ref?.(e)},accept:(e,t)=>{e.accept=t.accept??""},type:(e,t)=>{e.type=t.type??""},name:(e,t)=>{e.name=t.name??""},multiple:(e,t)=>{e.multiple=t.multiple??!1}};static LAYOUT_MAP={align:(e,t)=>{if(void 0===t.align)e.style.justifyContent="",e.style.alignItems="";else{const i=t.column?this.inverted(t.align):t.align;switch(i){case wn.TopLeft:case wn.TopCenter:case wn.TopRight:case wn.Top:e.style.alignItems="flex-start";break;case wn.MiddleLeft:case wn.MiddleCenter:case wn.MiddleRight:case wn.Middle:e.style.alignItems="center";break;case wn.BottomLeft:case wn.BottomCenter:case wn.BottomRight:case wn.Bottom:e.style.alignItems="flex-end";break;case wn.Left:case wn.Center:case wn.Right:e.style.alignItems=""}switch(i){case wn.TopLeft:case wn.MiddleLeft:case wn.BottomLeft:case wn.Left:e.style.justifyContent="flex-start";break;case wn.TopCenter:case wn.MiddleCenter:case wn.BottomCenter:case wn.Center:e.style.justifyContent="center";break;case wn.TopRight:case wn.MiddleRight:case wn.BottomRight:case wn.Right:e.style.justifyContent="flex-end";break;case wn.Top:case wn.Middle:case wn.Bottom:e.style.justifyContent=""}}},animation:(e,t)=>{e.style.animation=t.animation??""},background:(e,t)=>{e.style.background=t.background??""},backgroundBlendMode:(e,t)=>{e.style.backgroundBlendMode=t.backgroundBlendMode??""},bold:(e,t)=>{e.style.fontWeight=t.bold?"bold":""},border:(e,t)=>{void 0===t.border?(e.style.border="",e.style.borderRadius="",e.style.borderColor="",e.style.borderWidth="",e.style.borderStyle=""):(void 0===t.border.radius?e.style.borderRadius="":t.border.radius instanceof Array?e.style.borderRadius=t.border.radius.map((e=>In(e))).join(" "):e.style.borderRadius=In(t.border.radius),void 0===t.border.color?e.style.borderColor="":t.border.color instanceof Array?e.style.borderColor=t.border.color.join(" "):e.style.borderColor=t.border.color,void 0===t.border.width?e.style.borderWidth="":t.border.width instanceof Array?e.style.borderWidth=t.border.width.map((e=>In(e))).join(" "):e.style.borderWidth=In(t.border.width),e.style.borderStyle=void 0!==t.border.color?"solid":"")},boxSizing:(e,t)=>{e.style.boxSizing=void 0!==t.boxSizing?t.boxSizing:""},className:(e,t)=>{e.className=void 0!==t.className?t.className:""},color:(e,t)=>{e.style.color=t.color??""},cursor:(e,t)=>{e.style.cursor=void 0!==t.cursor?t.cursor:""},display:(e,t)=>{e.style.display=void 0!==t.display?t.display:""},filter:(e,t)=>{e.style.filter=t.filter??""},fontFamily:(e,t)=>{e.style.fontFamily=t.fontFamily??""},gap:(e,t)=>{e.style.gap=void 0!==t.gap?In(t.gap):""},grayScale:(e,t)=>{e.style.filter=!0===t.grayScale?"grayscale(100%)":""},grow:(e,t)=>{e.style.flexGrow=void 0!==t.grow?String(t.grow):""},height:(e,t)=>{e.style.height=void 0!==t.height?In(t.height):"",this.updateImageSize(e,t)},image:(e,t)=>{void 0===t.image?e.style.backgroundImage="":t.image instanceof Array?e.style.backgroundImage=t.image.map((e=>`url(${e})`)).join(", "):e.style.backgroundImage=`url(${t.image})`,this.updateImageSize(e,t)},imagePosition:(e,t)=>{void 0===t.imagePosition?e.style.backgroundPosition="":t.imagePosition instanceof Object?e.style.backgroundPosition=`${In(t.imagePosition.left)} ${In(t.imagePosition.top)}`:e.style.backgroundPosition=t.imagePosition},imageRepeat:(e,t)=>{e.style.backgroundRepeat=t.imageRepeat??""},imageScaling:(e,t)=>{e.style.imageRendering=t.imageScaling??""},imageSize:(e,t)=>{this.updateImageSize(e,t)},letterSpacing:(e,t)=>{e.style.letterSpacing=void 0!==t.letterSpacing?In(t.letterSpacing):""},lineHeight:(e,t)=>{e.style.lineHeight=void 0!==t.lineHeight?In(t.lineHeight):""},margin:(e,t)=>{void 0===t.margin?e.style.margin="":t.margin instanceof Object?(e.style.marginLeft=In(t.margin.left??""),e.style.marginRight=In(t.margin.right??""),e.style.marginTop=In(t.margin.top??""),e.style.marginBottom=In(t.margin.bottom??"")):e.style.margin=In(t.margin)},mayClick:(e,t)=>{Ln.LAYOUT_MAP.onClick(e,t)},mayRightClick:(e,t)=>{Ln.LAYOUT_MAP.onRightClick(e,t)},maxWidth:(e,t)=>{e.style.maxWidth=void 0!==t.maxWidth?In(t.maxWidth):""},maxHeight:(e,t)=>{e.style.maxHeight=void 0!==t.maxHeight?In(t.maxHeight):""},minWidth:(e,t)=>{e.style.minWidth=void 0!==t.minWidth?In(t.minWidth):""},minHeight:(e,t)=>{e.style.minHeight=void 0!==t.minHeight?In(t.minHeight):""},nowrap:(e,t)=>{e.style.whiteSpace=t.nowrap?"nowrap":""},onClick:(e,t)=>{e.onclick=this.addListener(t.onClick,t.mayClick)},onCreate:()=>{},onRightClick:(e,t)=>{jn||(e.oncontextmenu=this.addListener(t.onRightClick,t.mayRightClick))},onMouseOver:(e,t)=>{jn||(e.onmouseover=this.addListener(t.onMouseOver))},onMouseOut:(e,t)=>{jn||(e.onmouseout=this.addListener(t.onMouseOut))},onMouseEnter:(e,t)=>{jn||(e.onmouseenter=this.addListener(t.onMouseEnter))},onMouseLeave:(e,t)=>{jn||(e.onmouseleave=this.addListener(t.onMouseLeave))},onMouseDown:(e,t)=>{jn||(e.onmousedown=this.addListener(t.onMouseDown))},onMouseUp:(e,t)=>{jn||(e.onmouseup=this.addListener(t.onMouseUp))},onMouseMove:(e,t)=>{jn||(e.onmousemove=this.addListener(t.onMouseMove))},onWheel:(e,t)=>{jn||(e.oldEventListener&&(e.removeEventListener("wheel",e.oldEventListener),e.oldEventListener=void 0),void 0!==t.onWheel&&(e.oldEventListener=this.addListener(t.onWheel),e.addEventListener("wheel",e.oldEventListener,{passive:!1})))},opacity:(e,t)=>{e.style.opacity=void 0!==t.opacity?String(t.opacity):""},outline:(e,t)=>{if(void 0===t.outline)e.style.textShadow="";else if(t.outline instanceof Object){const i=In(t.outline.width);e.style.textShadow=`-${i} -${i} 0 ${t.outline.color}, ${i} -${i} 0 ${t.outline.color}, -${i} ${i} 0 ${t.outline.color},${i} ${i} 0 ${t.outline.color}`}else e.style.textShadow=`-0.5px -0.5px 0 ${t.outline}, 0.5px -0.5px 0 ${t.outline}, -0.5px 0.5px 0 ${t.outline}, 0.5px 0.5px 0 ${t.outline}`},overflow:(e,t)=>{e.style.overflow=t.overflow??""},mixBlendMode:(e,t)=>{e.style.mixBlendMode=t.mixBlendMode??""},padding:(e,t)=>{void 0===t.padding?e.style.padding="":t.padding instanceof Object?(e.style.paddingLeft=In(t.padding.left??""),e.style.paddingRight=In(t.padding.right??""),e.style.paddingTop=In(t.padding.top??""),e.style.paddingBottom=In(t.padding.bottom??"")):e.style.padding=In(t.padding)},pointerEvents:(e,t)=>{void 0===t.pointerEvents?e.style.pointerEvents="":e.style.pointerEvents=t.pointerEvents?"auto":"none"},polygon:(e,t)=>{void 0===t.polygon?e.style.clipPath="":e.style.clipPath=`polygon(${t.polygon.map((([e,t])=>`${In(e)} ${In(t)}`)).join(", ")})`},position:(e,t)=>{void 0===t.position?e.style.position="":"string"==typeof t.position?e.style.position=t.position:e.style.position=t.position.type??"",void 0===t.position||"string"==typeof t.position?(e.style.top="",e.style.bottom="",e.style.left="",e.style.right=""):(e.style.top=void 0!==t.position.top?In(t.position.top):"",e.style.bottom=void 0!==t.position.bottom?In(t.position.bottom):"",e.style.left=void 0!==t.position.left?In(t.position.left):"",e.style.right=void 0!==t.position.right?In(t.position.right):"")},shadow:(e,t)=>{if(void 0===t.shadow)e.style.filter="";else{const i="boolean"==typeof t.shadow?{}:t.shadow,n=void 0!==i.offset?In(i.offset):"3px",r=void 0!==i.blur?In(i.blur):"5px",o=i.color??"#282828";e.style.filter=`drop-shadow(${n} ${n} ${r} ${o})`}},showBackface:(e,t)=>{void 0===t.showBackface?e.style.backfaceVisibility="":e.style.backfaceVisibility=t.showBackface?"visible":"hidden"},size:(e,t)=>{e.style.fontSize=In(t.size)},stretch:(e,t)=>{e.style.alignSelf=!0===t.stretch?"stretch":""},textAlign:(e,t)=>{e.style.textAlign=t.textAlign??""},textTransform:(e,t)=>{e.style.textTransform=t.textTransform??""},transition:(e,t)=>{if(void 0===t.transition)e.style.transition="";else{const n="boolean"==typeof(i=t.transition)?i?[{parameter:Tn.All,time:.2}]:[]:i;e.style.transition=n.map((({parameter:e,time:t})=>(e instanceof Array?e.map((e=>({parameter:e,time:t}))):[{parameter:e,time:t}]).map((e=>`${e.parameter} ${e.time??.2}s ease-in-out 0s`)).join(", "))).join(", ")}var i},transform:(e,t)=>{void 0===t.transform?e.style.transform="":e.style.transform=t.transform.map((e=>void 0!==e.perspective?`perspective(${In(e.perspective)})`:void 0!==e.rotateDeg?`rotate(${e.rotateDeg}deg)`:void 0!==e.rotateRad?`rotate(${e.rotateRad}rad)`:void 0!==e.rotateXdeg?`rotateX(${e.rotateXdeg}deg)`:void 0!==e.rotateYdeg?`rotateY(${e.rotateYdeg}deg)`:void 0!==e.rotateZdeg?`rotateY(${e.rotateZdeg}deg)`:void 0!==e.translateX?`translateX(${In(e.translateX)})`:void 0!==e.translateY?`translateY(${In(e.translateY)})`:void 0!==e.translateZ?`translateZ(${In(e.translateZ)})`:void 0!==e.scale?`scale(${e.scale})`:void 0!==e.scaleX?`scaleX(${e.scaleX})`:void 0!==e.scaleY?`scaleY(${e.scaleY})`:void 0!==e.scaleZ?`scaleZ(${e.scaleZ})`:"")).join(" ")},transformOrigin:(e,t)=>{t.transformOrigin instanceof Object?e.style.transformOrigin=`${In(t.transformOrigin.x)} ${In(t.transformOrigin.y)}`:e.style.transformOrigin=t.transformOrigin??""},video:(e,t)=>{const i=document.createElement("video");this.updateVideoContent(i,t),this.removeChildren(e),e.appendChild(i),t.onCreate?.(e)},width:(e,t)=>{e.style.width=void 0!==t.width?In(t.width):"",this.updateImageSize(e,t)},wrap:(e,t)=>{e.style.flexWrap=!0===t.wrap?"wrap":""},whiteSpace:(e,t)=>{e.style.whiteSpace=t.whiteSpace??""},zIndex:(e,t)=>{e.style.zIndex=void 0!==t.zIndex?String(t.zIndex):""},input:(e,t)=>{const i=document.createElement("input");this.updateInputContent(i,t),this.removeChildren(e),e.appendChild(i),(t.input?.autoFocus||t.input?.autoSelect)&&setTimeout((()=>{t.input.autoSelect&&i.setSelectionRange(0,i.value.length),t.input.autoFocus&&i.focus()}),0),t.onCreate?.(e)},text:(e,t)=>{const i=document.createElement("span");this.updateTextContent(i,t),this.removeChildren(e),e.appendChild(i),t.onCreate?.(e)},row:(e,t)=>{e.style.flexDirection="row",this.removeChildren(e),t.row.forEach((t=>{!1!==t&&e.appendChild(this.renderNode(t))}))},column:(e,t)=>{e.style.flexDirection="column",this.removeChildren(e),t.column.forEach((t=>{!1!==t&&e.appendChild(this.renderNode(t))}))},ref:(e,t)=>{t.ref?.(e)}};static TEXT_MAP={text:(e,t)=>{this.removeChildren(e),e.textContent=t.text},ref:(e,t)=>{t.ref?.(e)}};static VIDEO_MAP={autoplay:(e,t)=>{e.autoplay=t.autoplay??!1},loop:(e,t)=>{e.loop=t.loop??!1},muted:(e,t)=>{e.muted=t.muted??!1},playsInline:(e,t)=>{e.playsInline=t.playsInline??!1},source:(e,t)=>{e.src=t.source??""}};static render(e,t){Rt((()=>{const i=this.renderNode(t.layout);e.appendChild(i),function(e,t,i){var n,r,o,a;void 0===i&&(i=u);var s,l,c,h,d=null!=(n=i.name)?n:"Reaction",f=Rt(d,i.onError?(s=i.onError,l=t,function(){try{return l.apply(this,arguments)}catch(e){s.call(this,e)}}):t),p=!i.scheduler&&!i.delay,v=Ut(i),g=!0,m=!1,y=i.compareStructural?G.structural:i.equals||G.default,b=new xt(d,(function(){g||p?_():m||(m=!0,v(_))}),i.onError,i.requiresObservable);function _(){if(m=!1,!b.isDisposed_){var t=!1;b.track((function(){var i=$e(!1,(function(){return e(b)}));t=g||!y(c,i),h=c,c=i})),(g&&i.fireImmediately||!g&&t)&&f(c,h,b),g=!1}}null!=(r=i)&&null!=(o=r.signal)&&o.aborted||b.schedule_(),b.getDisposer_(null==(a=i)?void 0:a.signal)}((()=>t.layout),((e,t)=>{this.updateRecursively(i,e,t)}))}))()}static addListener(e,t){return void 0===e?null:Rt((i=>{!1!==t?e?.(i)&&(i.stopPropagation(),i.preventDefault()):i.preventDefault()}))}static inverted(e){switch(e){case wn.TopCenter:return wn.MiddleLeft;case wn.TopRight:return wn.BottomLeft;case wn.MiddleLeft:return wn.TopCenter;case wn.MiddleRight:return wn.BottomCenter;case wn.BottomLeft:return wn.TopRight;case wn.BottomCenter:return wn.MiddleRight;case wn.Top:return wn.Left;case wn.Left:return wn.Top;case wn.Center:return wn.Middle;case wn.Middle:return wn.Center;case wn.Right:return wn.Bottom;case wn.Bottom:return wn.Right;default:return e}}static removeChildren(e){for(;e.firstChild;)e.removeChild(e.firstChild);e.textContent=""}static renderNode(e){const t=document.createElement("div");return Object.keys(e).forEach((i=>{if("key"!==i){const n=i;Ln.LAYOUT_MAP[n]?Ln.LAYOUT_MAP[n](t,e):console.warn(`${n} is not a handled!`)}})),e.onCreate?.(t),t}static updateImageSize(e,t){void 0===t.imageSize?e.style.backgroundSize=void 0!==t.image&&void 0!==t.width&&void 0!==t.height?`${In(t.width)} ${In(t.height)}`:"":t.imageSize instanceof Object?e.style.backgroundSize=`${In(t.imageSize.width)} ${In(t.imageSize.height)}`:e.style.backgroundSize=t.imageSize}static updateInputContent(e,t){void 0===t.input?this.removeChildren(e):Object.keys(t.input).forEach((i=>{const n=i,r=i;if(Ln.INPUT_MAP[n])Ln.INPUT_MAP[n](e,t.input);else{if(!Ln.LAYOUT_MAP[r])throw new Error(`Unknown input property: ${i}`);Ln.LAYOUT_MAP[r](e,t.input)}}))}static updateRecursively(e,t,i){Object.keys(t).forEach((n=>{if("key"===n)return;const r=n;if("column"===r||"row"===r||!Pn(t[r],i[r]))if("column"===r||"row"===r){const n=t[r]?.filter((e=>!1!==e)),o=i[r]?.filter((e=>!1!==e));void 0===o&&(this.removeChildren(e),e.style.flexDirection=r);let a=0,s=0,l=0;for(;a<n.length&&void 0!==o&&s<o.length;)Pn(n[a],o[s])?(a+=1,s+=1,l+=1):s+1<o.length&&Pn(n[a],o[s+1])?(e.removeChild(e.childNodes[l]),s+=1):a+1<n.length&&Pn(n[a+1],o[s])?(e.insertBefore(this.renderNode(n[a]),e.childNodes[l]),l+=1,a+=1):n[a].key!==o[s].key?(e.replaceChild(this.renderNode(n[a]),e.childNodes[l]),l+=1,a+=1,s+=1):(this.updateRecursively(e.childNodes[l],n[a],o[s]),l+=1,a+=1,s+=1);for(;a<n.length;)e.appendChild(this.renderNode(n[a])),a+=1;for(;void 0!==o&&s<o.length;)e.removeChild(e.lastChild),s+=1}else"text"===r?void 0===i.text?Ln.LAYOUT_MAP.text(e,t):(this.updateTextContent(e.firstChild,t),"string"!=typeof i.text&&Object.keys(i.text).forEach((i=>{const n=i,r=i;if("string"==typeof t.text)if(this.TEXT_MAP[n])this.TEXT_MAP[n](e.firstChild,{});else{if(!this.LAYOUT_MAP[r])throw new Error(`Unknown text property: ${i}`);this.LAYOUT_MAP[r](e.firstChild,{})}else if(!(i in t.text))if(this.TEXT_MAP[n])this.TEXT_MAP[n](e.firstChild,t.text);else{if(!this.LAYOUT_MAP[r])throw new Error(`Unknown text property: ${i}`);this.LAYOUT_MAP[r](e.firstChild,t.text)}}))):"input"===r?void 0===i.input?Ln.LAYOUT_MAP.input(e,t):(this.updateInputContent(e.firstChild,t),Object.keys(i.input).forEach((i=>{i in t.input||Ln.INPUT_MAP[i](e.firstChild,t.input)}))):"video"===r?void 0===i.video?Ln.LAYOUT_MAP.video(e,t):(this.updateVideoContent(e.firstChild,t),Object.keys(i.video).forEach((i=>{i in t.video||Ln.VIDEO_MAP[i](e.firstChild,t.video)}))):Ln.LAYOUT_MAP[r]?Ln.LAYOUT_MAP[r](e,t):console.warn(`${r} is not a handled!`)})),Object.keys(i).forEach((i=>{if(!(i in t)&&"column"!==i&&"row"!==i&&"text"!==i&&"input"!==i&&"video"!==i){const n=i;if(!Ln.LAYOUT_MAP[n])throw new Error(`Unknown layout property: ${n} in layout ${JSON.stringify(t)}`);Ln.LAYOUT_MAP[n](e,t)}})),void 0===t.column&&void 0===t.row&&void 0===t.text&&void 0===t.input&&void 0===t.video&&this.removeChildren(e)}static updateTextContent(e,t){const{text:i}=t;void 0===i?this.removeChildren(e):"string"==typeof i?(this.removeChildren(e),e.textContent=i):Object.keys(i).forEach((t=>{const n=t,r=t;if(this.TEXT_MAP[n])this.TEXT_MAP[n](e,i);else{if(!this.LAYOUT_MAP[r])throw new Error(`Unknown text property: ${t}`);this.LAYOUT_MAP[r](e,i)}}))}static updateVideoContent(e,t){void 0===t.video?this.removeChildren(e):Object.keys(t.video).forEach((i=>{const n=i,r=i;if(Ln.VIDEO_MAP[n])Ln.VIDEO_MAP[n](e,t.video);else{if(!Ln.LAYOUT_MAP[r])throw new Error(`Unknown input property: ${i}`);Ln.LAYOUT_MAP[r](e,t.video)}}))}}!function(e){!0===e.isolateGlobalState&&function(){if((pt.pendingReactions.length||pt.inBatch||pt.isRunningReactions)&&t(36),ft=!0,dt){var e=n();0==--e.__mobxInstanceCount&&(e.__mobxGlobals=void 0),pt=new ht}}();var i,r,o=e.useProxies,a=e.enforceActions;if(void 0!==o&&(pt.useProxies=o===Gt||"never"!==o&&"undefined"!=typeof Proxy),"ifavailable"===o&&(pt.verifyProxies=!0),void 0!==a){var s=a===Gt?Gt:"observed"===a;pt.enforceActions=s,pt.allowStateChanges=!0!==s&&s!==Gt}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach((function(t){t in e&&(pt[t]=!!e[t])})),pt.allowStateReads=!pt.observableRequiresReaction,e.reactionScheduler&&(i=e.reactionScheduler,r=kt,kt=function(e){return i((function(){return r(e)}))})}({enforceActions:"never",computedRequiresReaction:!1,observableRequiresReaction:!1});const En=document.getElementById("root");!function(e){We(e.name,!1,e,this,void 0)}((()=>{const e=Cn.create();Ln.render(En,e),Object.assign(window,{get R(){return e}})}))})();