@sticky-studio-npm/ui-core 0.1.6 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui-bundle.es.js +28999 -0
- package/package.json +1 -1
- package/dist/main.es.js +0 -4077
- package/dist/main.umd.js +0 -68
package/dist/main.umd.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
(function(y,Ke){typeof exports=="object"&&typeof module<"u"?module.exports=Ke(require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["react","react-dom"],Ke):(y=typeof globalThis<"u"?globalThis:y||self,y.UiCore=Ke(y.React,y.ReactDOM))})(this,(function(y,Ke){"use strict";var ot={exports:{}},qe={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var En;function ni(){if(En)return qe;En=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,i,s){var o=null;if(s!==void 0&&(o=""+s),i.key!==void 0&&(o=""+i.key),"key"in i){s={};for(var a in i)a!=="key"&&(s[a]=i[a])}else s=i;return i=s.ref,{$$typeof:e,type:n,key:o,ref:i!==void 0?i:null,props:s}}return qe.Fragment=t,qe.jsx=r,qe.jsxs=r,qe}var ze={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Nn;function ri(){return Nn||(Nn=1,process.env.NODE_ENV!=="production"&&(function(){function e(p){if(p==null)return null;if(typeof p=="function")return p.$$typeof===Qo?null:p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case E:return"Fragment";case T:return"Profiler";case A:return"StrictMode";case B:return"Suspense";case be:return"SuspenseList";case Zo:return"Activity"}if(typeof p=="object")switch(typeof p.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),p.$$typeof){case g:return"Portal";case x:return(p.displayName||"Context")+".Provider";case Z:return(p._context.displayName||"Context")+".Consumer";case j:var O=p.render;return p=p.displayName,p||(p=O.displayName||O.name||"",p=p!==""?"ForwardRef("+p+")":"ForwardRef"),p;case kt:return O=p.displayName||null,O!==null?O:e(p.type)||"Memo";case Xr:O=p._payload,p=p._init;try{return e(p(O))}catch{}}return null}function t(p){return""+p}function r(p){try{t(p);var O=!1}catch{O=!0}if(O){O=console;var w=O.error,V=typeof Symbol=="function"&&Symbol.toStringTag&&p[Symbol.toStringTag]||p.constructor.name||"Object";return w.call(O,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",V),t(p)}}function n(p){if(p===E)return"<>";if(typeof p=="object"&&p!==null&&p.$$typeof===Xr)return"<...>";try{var O=e(p);return O?"<"+O+">":"<...>"}catch{return"<...>"}}function i(){var p=bn.A;return p===null?null:p.getOwner()}function s(){return Error("react-stack-top-frame")}function o(p){if(Hr.call(p,"key")){var O=Object.getOwnPropertyDescriptor(p,"key").get;if(O&&O.isReactWarning)return!1}return p.key!==void 0}function a(p,O){function w(){Jr||(Jr=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",O))}w.isReactWarning=!0,Object.defineProperty(p,"key",{get:w,configurable:!0})}function u(){var p=e(this.type);return Zr[p]||(Zr[p]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),p=this.props.ref,p!==void 0?p:null}function l(p,O,w,V,Ee,fe,gn,yn){return w=fe.ref,p={$$typeof:m,type:p,key:O,props:fe,_owner:Ee},(w!==void 0?w:null)!==null?Object.defineProperty(p,"ref",{enumerable:!1,get:u}):Object.defineProperty(p,"ref",{enumerable:!1,value:null}),p._store={},Object.defineProperty(p._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(p,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(p,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:gn}),Object.defineProperty(p,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:yn}),Object.freeze&&(Object.freeze(p.props),Object.freeze(p)),p}function d(p,O,w,V,Ee,fe,gn,yn){var P=O.children;if(P!==void 0)if(V)if(ea(P)){for(V=0;V<P.length;V++)h(P[V]);Object.freeze&&Object.freeze(P)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else h(P);if(Hr.call(O,"key")){P=e(p);var Ge=Object.keys(O).filter(function(ta){return ta!=="key"});V=0<Ge.length?"{key: someKey, "+Ge.join(": ..., ")+": ...}":"{key: someKey}",ti[P+V]||(Ge=0<Ge.length?"{"+Ge.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
-
let props = %s;
|
|
19
|
-
<%s {...props} />
|
|
20
|
-
React keys must be passed directly to JSX without using spread:
|
|
21
|
-
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,V,P,Ge,P),ti[P+V]=!0)}if(P=null,w!==void 0&&(r(w),P=""+w),o(O)&&(r(O.key),P=""+O.key),"key"in O){w={};for(var On in O)On!=="key"&&(w[On]=O[On])}else w=O;return P&&a(w,typeof p=="function"?p.displayName||p.name||"Unknown":p),l(p,P,fe,Ee,i(),w,gn,yn)}function h(p){typeof p=="object"&&p!==null&&p.$$typeof===m&&p._store&&(p._store.validated=1)}var _=y,m=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),x=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),be=Symbol.for("react.suspense_list"),kt=Symbol.for("react.memo"),Xr=Symbol.for("react.lazy"),Zo=Symbol.for("react.activity"),Qo=Symbol.for("react.client.reference"),bn=_.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Hr=Object.prototype.hasOwnProperty,ea=Array.isArray,mn=console.createTask?console.createTask:function(){return null};_={react_stack_bottom_frame:function(p){return p()}};var Jr,Zr={},Qr=_.react_stack_bottom_frame.bind(_,s)(),ei=mn(n(s)),ti={};ze.Fragment=E,ze.jsx=function(p,O,w,V,Ee){var fe=1e4>bn.recentlyCreatedOwnerStacks++;return d(p,O,w,!1,V,Ee,fe?Error("react-stack-top-frame"):Qr,fe?mn(n(p)):ei)},ze.jsxs=function(p,O,w,V,Ee){var fe=1e4>bn.recentlyCreatedOwnerStacks++;return d(p,O,w,!0,V,Ee,fe?Error("react-stack-top-frame"):Qr,fe?mn(n(p)):ei)}})()),ze}var An;function ii(){return An||(An=1,process.env.NODE_ENV==="production"?ot.exports=ni():ot.exports=ri()),ot.exports}var c=ii(),si={0:"Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'",1:function(t,r){return"Cannot apply '"+t+"' to '"+r.toString()+"': Field not found."},5:"'keys()' can only be used on observable objects, arrays, sets and maps",6:"'values()' can only be used on observable objects, arrays, sets and maps",7:"'entries()' can only be used on observable objects, arrays and maps",8:"'set()' can only be used on observable objects, arrays and maps",9:"'remove()' can only be used on observable objects, arrays and maps",10:"'has()' can only be used on observable objects, arrays and maps",11:"'get()' can only be used on observable objects, arrays and maps",12:"Invalid annotation",13:"Dynamic observable objects cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)",14:"Intercept handlers should return nothing or a change object",15:"Observable arrays cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)",16:"Modification exception: the internal structure of an observable array was changed.",17:function(t,r){return"[mobx.array] Index out of bounds, "+t+" is larger than "+r},18:"mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js",19:function(t){return"Cannot initialize from classes that inherit from Map: "+t.constructor.name},20:function(t){return"Cannot initialize map from "+t},21:function(t){return"Cannot convert to map from '"+t+"'"},22:"mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js",23:"It is not possible to get index atoms from arrays",24:function(t){return"Cannot obtain administration from "+t},25:function(t,r){return"the entry '"+t+"' does not exist in the observable map '"+r+"'"},26:"please specify a property",27:function(t,r){return"no observable property '"+t.toString()+"' found on the observable object '"+r+"'"},28:function(t){return"Cannot obtain atom from "+t},29:"Expecting some object",30:"invalid action stack. did you forget to finish an action?",31:"missing option for computed: get",32:function(t,r){return"Cycle detected in computation "+t+": "+r},33:function(t){return"The setter of computed value '"+t+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"},34:function(t){return"[ComputedValue '"+t+"'] It is not possible to assign a new value to a computed value."},35:"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`",36:"isolateGlobalState should be called before MobX is running any reactions",37:function(t){return"[mobx] `observableArray."+t+"()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice()."+t+"()` instead"},38:"'ownKeys()' can only be used on observable objects",39:"'defineProperty()' can only be used on observable objects"},oi=process.env.NODE_ENV!=="production"?si:{};function v(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(process.env.NODE_ENV!=="production"){var i=typeof e=="string"?e:oi[e];throw typeof i=="function"&&(i=i.apply(null,r)),new Error("[MobX] "+i)}throw new Error(typeof e=="number"?"[MobX] minified error nr: "+e+(r.length?" "+r.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var ai={};function at(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:ai}var Sn=Object.assign,ut=Object.getOwnPropertyDescriptor,se=Object.defineProperty,ct=Object.prototype,lt=[];Object.freeze(lt);var wn={};Object.freeze(wn);var ui=typeof Proxy<"u",ci=Object.toString();function jn(){ui||v(process.env.NODE_ENV!=="production"?"`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`":"Proxy not available")}function We(e){process.env.NODE_ENV!=="production"&&f.verifyProxies&&v("MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to "+e)}function Q(){return++f.mobxGuid}function Mt(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var Ve=function(){};function D(e){return typeof e=="function"}function Ne(e){var t=typeof e;switch(t){case"string":case"symbol":case"number":return!0}return!1}function ft(e){return e!==null&&typeof e=="object"}function M(e){if(!ft(e))return!1;var t=Object.getPrototypeOf(e);if(t==null)return!0;var r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r.toString()===ci}function xn(e){var t=e?.constructor;return t?t.name==="GeneratorFunction"||t.displayName==="GeneratorFunction":!1}function Ye(e,t,r){se(e,t,{enumerable:!1,writable:!0,configurable:!0,value:r})}function Dn(e,t,r){se(e,t,{enumerable:!1,writable:!1,configurable:!0,value:r})}function Ae(e,t){var r="isMobX"+e;return t.prototype[r]=!0,function(n){return ft(n)&&n[r]===!0}}function Pe(e){return e!=null&&Object.prototype.toString.call(e)==="[object Map]"}function li(e){var t=Object.getPrototypeOf(e),r=Object.getPrototypeOf(t),n=Object.getPrototypeOf(r);return n===null}function de(e){return e!=null&&Object.prototype.toString.call(e)==="[object Set]"}var Tn=typeof Object.getOwnPropertySymbols<"u";function fi(e){var t=Object.keys(e);if(!Tn)return t;var r=Object.getOwnPropertySymbols(e);return r.length?[].concat(t,r.filter(function(n){return ct.propertyIsEnumerable.call(e,n)})):t}var Be=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Tn?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function Lt(e){return typeof e=="string"?e:typeof e=="symbol"?e.toString():new String(e).toString()}function Cn(e){return e===null?null:typeof e=="object"?""+e:e}function G(e,t){return ct.hasOwnProperty.call(e,t)}var di=Object.getOwnPropertyDescriptors||function(t){var r={};return Be(t).forEach(function(n){r[n]=ut(t,n)}),r};function L(e,t){return!!(e&t)}function I(e,t,r){return r?e|=t:e&=~t,e}function Rn(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function pi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,hi(n.key),n)}}function ke(e,t,r){return t&&pi(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Me(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=_i(e))||t){r&&(e=r);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.
|
|
23
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pe(){return pe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pe.apply(null,arguments)}function Vn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,It(e,t)}function It(e,t){return It=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},It(e,t)}function vi(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function hi(e){var t=vi(e,"string");return typeof t=="symbol"?t:t+""}function _i(e,t){if(e){if(typeof e=="string")return Rn(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Rn(e,t):void 0}}var k=Symbol("mobx-stored-annotations");function oe(e){function t(r,n){if(He(n))return e.decorate_20223_(r,n);Xe(r,n,e)}return Object.assign(t,e)}function Xe(e,t,r){if(G(e,k)||Ye(e,k,pe({},e[k])),process.env.NODE_ENV!=="production"&&ht(r)&&!G(e[k],t)){var n=e.constructor.name+".prototype."+t.toString();v("'"+n+"' is decorated with 'override', but no such decorated member was found on prototype.")}bi(e,r,t),ht(r)||(e[k][t]=r)}function bi(e,t,r){if(process.env.NODE_ENV!=="production"&&!ht(t)&&G(e[k],r)){var n=e.constructor.name+".prototype."+r.toString(),i=e[k][r].annotationType_,s=t.annotationType_;v("Cannot apply '@"+s+"' to '"+n+"':"+(`
|
|
24
|
-
The field is already decorated with '@`+i+"'.")+`
|
|
25
|
-
Re-decorating fields is not allowed.
|
|
26
|
-
Use '@override' decorator for methods overridden by subclass.`)}}function mi(e){return G(e,k)||Ye(e,k,pe({},e[k])),e[k]}function He(e){return typeof e=="object"&&typeof e.kind=="string"}function dt(e,t){process.env.NODE_ENV!=="production"&&!t.includes(e.kind)&&v("The decorator applied to '"+String(e.name)+"' cannot be used on a "+e.kind+" element")}var b=Symbol("mobx administration"),me=(function(){function e(r){r===void 0&&(r=process.env.NODE_ENV!=="production"?"Atom@"+Q():"Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=N.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=r}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},t.reportObserved=function(){return Zn(this)},t.reportChanged=function(){z(),Qn(this),W()},t.toString=function(){return this.name_},ke(e,[{key:"isBeingObserved",get:function(){return L(this.flags_,e.isBeingObservedMask_)},set:function(n){this.flags_=I(this.flags_,e.isBeingObservedMask_,n)}},{key:"isPendingUnobservation",get:function(){return L(this.flags_,e.isPendingUnobservationMask_)},set:function(n){this.flags_=I(this.flags_,e.isPendingUnobservationMask_,n)}},{key:"diffValue",get:function(){return L(this.flags_,e.diffValueMask_)?1:0},set:function(n){this.flags_=I(this.flags_,e.diffValueMask_,n===1)}}])})();me.isBeingObservedMask_=1,me.isPendingUnobservationMask_=2,me.diffValueMask_=4;var $t=Ae("Atom",me);function Pn(e,t,r){t===void 0&&(t=Ve),r===void 0&&(r=Ve);var n=new me(e);return t!==Ve&&Ts(n,t),r!==Ve&&or(n,r),n}function gi(e,t){return Dr(e,t)}function yi(e,t){return Object.is?Object.is(e,t):e===t?e!==0||1/e===1/t:e!==e&&t!==t}var pt={structural:gi,default:yi};function Se(e,t,r){return tt(e)?e:Array.isArray(e)?C.array(e,{name:r}):M(e)?C.object(e,void 0,{name:r}):Pe(e)?C.map(e,{name:r}):de(e)?C.set(e,{name:r}):typeof e=="function"&&!Ie(e)&&!et(e)?xn(e)?$e(e):Qe(r,e):e}function Oi(e,t,r){if(e==null||Ue(e)||Dt(e)||ye(e)||ue(e))return e;if(Array.isArray(e))return C.array(e,{name:r,deep:!1});if(M(e))return C.object(e,void 0,{name:r,deep:!1});if(Pe(e))return C.map(e,{name:r,deep:!1});if(de(e))return C.set(e,{name:r,deep:!1});process.env.NODE_ENV!=="production"&&v("The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets")}function vt(e){return e}function Ei(e,t){return process.env.NODE_ENV!=="production"&&tt(e)&&v("observable.struct should not be used with observable values"),Dr(e,t)?t:e}var Ni="override";function ht(e){return e.annotationType_===Ni}function Je(e,t){return{annotationType_:e,options_:t,make_:Ai,extend_:Si,decorate_20223_:wi}}function Ai(e,t,r,n){var i;if((i=this.options_)!=null&&i.bound)return this.extend_(e,t,r,!1)===null?0:1;if(n===e.target_)return this.extend_(e,t,r,!1)===null?0:2;if(Ie(r.value))return 1;var s=Bn(e,this,t,r,!1);return se(n,t,s),2}function Si(e,t,r,n){var i=Bn(e,this,t,r);return e.defineProperty_(t,i,n)}function wi(e,t){process.env.NODE_ENV!=="production"&&dt(t,["method","field"]);var r=t.kind,n=t.name,i=t.addInitializer,s=this,o=function(l){var d,h,_,m;return we((d=(h=s.options_)==null?void 0:h.name)!=null?d:n.toString(),l,(_=(m=s.options_)==null?void 0:m.autoAction)!=null?_:!1)};if(r=="field")return function(u){var l,d=u;return Ie(d)||(d=o(d)),(l=s.options_)!=null&&l.bound&&(d=d.bind(this),d.isMobxAction=!0),d};if(r=="method"){var a;return Ie(e)||(e=o(e)),(a=this.options_)!=null&&a.bound&&i(function(){var u=this,l=u[n].bind(u);l.isMobxAction=!0,u[n]=l}),e}v("Cannot apply '"+s.annotationType_+"' to '"+String(n)+"' (kind: "+r+"):"+(`
|
|
27
|
-
'`+s.annotationType_+"' can only be used on properties with a function value."))}function ji(e,t,r,n){var i=t.annotationType_,s=n.value;process.env.NODE_ENV!=="production"&&!D(s)&&v("Cannot apply '"+i+"' to '"+e.name_+"."+r.toString()+"':"+(`
|
|
28
|
-
'`+i+"' can only be used on properties with a function value."))}function Bn(e,t,r,n,i){var s,o,a,u,l,d,h;i===void 0&&(i=f.safeDescriptors),ji(e,t,r,n);var _=n.value;if((s=t.options_)!=null&&s.bound){var m;_=_.bind((m=e.proxy_)!=null?m:e.target_)}return{value:we((o=(a=t.options_)==null?void 0:a.name)!=null?o:r.toString(),_,(u=(l=t.options_)==null?void 0:l.autoAction)!=null?u:!1,(d=t.options_)!=null&&d.bound?(h=e.proxy_)!=null?h:e.target_:void 0),configurable:i?e.isPlainObject_:!0,enumerable:!1,writable:!i}}function kn(e,t){return{annotationType_:e,options_:t,make_:xi,extend_:Di,decorate_20223_:Ti}}function xi(e,t,r,n){var i;if(n===e.target_)return this.extend_(e,t,r,!1)===null?0:2;if((i=this.options_)!=null&&i.bound&&(!G(e.target_,t)||!et(e.target_[t]))&&this.extend_(e,t,r,!1)===null)return 0;if(et(r.value))return 1;var s=Mn(e,this,t,r,!1,!1);return se(n,t,s),2}function Di(e,t,r,n){var i,s=Mn(e,this,t,r,(i=this.options_)==null?void 0:i.bound);return e.defineProperty_(t,s,n)}function Ti(e,t){var r;process.env.NODE_ENV!=="production"&&dt(t,["method"]);var n=t.name,i=t.addInitializer;return et(e)||(e=$e(e)),(r=this.options_)!=null&&r.bound&&i(function(){var s=this,o=s[n].bind(s);o.isMobXFlow=!0,s[n]=o}),e}function Ci(e,t,r,n){var i=t.annotationType_,s=n.value;process.env.NODE_ENV!=="production"&&!D(s)&&v("Cannot apply '"+i+"' to '"+e.name_+"."+r.toString()+"':"+(`
|
|
29
|
-
'`+i+"' can only be used on properties with a generator function value."))}function Mn(e,t,r,n,i,s){s===void 0&&(s=f.safeDescriptors),Ci(e,t,r,n);var o=n.value;if(et(o)||(o=$e(o)),i){var a;o=o.bind((a=e.proxy_)!=null?a:e.target_),o.isMobXFlow=!0}return{value:o,configurable:s?e.isPlainObject_:!0,enumerable:!1,writable:!s}}function Ut(e,t){return{annotationType_:e,options_:t,make_:Ri,extend_:Vi,decorate_20223_:Pi}}function Ri(e,t,r){return this.extend_(e,t,r,!1)===null?0:1}function Vi(e,t,r,n){return Bi(e,this,t,r),e.defineComputedProperty_(t,pe({},this.options_,{get:r.get,set:r.set}),n)}function Pi(e,t){process.env.NODE_ENV!=="production"&&dt(t,["getter"]);var r=this,n=t.name,i=t.addInitializer;return i(function(){var s=Re(this)[b],o=pe({},r.options_,{get:e,context:this});o.name||(o.name=process.env.NODE_ENV!=="production"?s.name_+"."+n.toString():"ObservableObject."+n.toString()),s.values_.set(n,new K(o))}),function(){return this[b].getObservablePropValue_(n)}}function Bi(e,t,r,n){var i=t.annotationType_,s=n.get;process.env.NODE_ENV!=="production"&&!s&&v("Cannot apply '"+i+"' to '"+e.name_+"."+r.toString()+"':"+(`
|
|
30
|
-
'`+i+"' can only be used on getter(+setter) properties."))}function _t(e,t){return{annotationType_:e,options_:t,make_:ki,extend_:Mi,decorate_20223_:Li}}function ki(e,t,r){return this.extend_(e,t,r,!1)===null?0:1}function Mi(e,t,r,n){var i,s;return Ii(e,this,t,r),e.defineObservableProperty_(t,r.value,(i=(s=this.options_)==null?void 0:s.enhancer)!=null?i:Se,n)}function Li(e,t){if(process.env.NODE_ENV!=="production"){if(t.kind==="field")throw v("Please use `@observable accessor "+String(t.name)+"` instead of `@observable "+String(t.name)+"`");dt(t,["accessor"])}var r=this,n=t.kind,i=t.name,s=new WeakSet;function o(a,u){var l,d,h=Re(a)[b],_=new je(u,(l=(d=r.options_)==null?void 0:d.enhancer)!=null?l:Se,process.env.NODE_ENV!=="production"?h.name_+"."+i.toString():"ObservableObject."+i.toString(),!1);h.values_.set(i,_),s.add(a)}if(n=="accessor")return{get:function(){return s.has(this)||o(this,e.get.call(this)),this[b].getObservablePropValue_(i)},set:function(u){return s.has(this)||o(this,u),this[b].setObservablePropValue_(i,u)},init:function(u){return s.has(this)||o(this,u),u}}}function Ii(e,t,r,n){var i=t.annotationType_;process.env.NODE_ENV!=="production"&&!("value"in n)&&v("Cannot apply '"+i+"' to '"+e.name_+"."+r.toString()+"':"+(`
|
|
31
|
-
'`+i+"' cannot be used on getter/setter properties"))}var $i="true",Ui=Ln();function Ln(e){return{annotationType_:$i,options_:e,make_:Fi,extend_:Gi,decorate_20223_:Ki}}function Fi(e,t,r,n){var i,s;if(r.get)return gt.make_(e,t,r,n);if(r.set){var o=we(t.toString(),r.set);return n===e.target_?e.defineProperty_(t,{configurable:f.safeDescriptors?e.isPlainObject_:!0,set:o})===null?0:2:(se(n,t,{configurable:!0,set:o}),2)}if(n!==e.target_&&typeof r.value=="function"){var a;if(xn(r.value)){var u,l=(u=this.options_)!=null&&u.autoBind?$e.bound:$e;return l.make_(e,t,r,n)}var d=(a=this.options_)!=null&&a.autoBind?Qe.bound:Qe;return d.make_(e,t,r,n)}var h=((i=this.options_)==null?void 0:i.deep)===!1?C.ref:C;if(typeof r.value=="function"&&(s=this.options_)!=null&&s.autoBind){var _;r.value=r.value.bind((_=e.proxy_)!=null?_:e.target_)}return h.make_(e,t,r,n)}function Gi(e,t,r,n){var i,s;if(r.get)return gt.extend_(e,t,r,n);if(r.set)return e.defineProperty_(t,{configurable:f.safeDescriptors?e.isPlainObject_:!0,set:we(t.toString(),r.set)},n);if(typeof r.value=="function"&&(i=this.options_)!=null&&i.autoBind){var o;r.value=r.value.bind((o=e.proxy_)!=null?o:e.target_)}var a=((s=this.options_)==null?void 0:s.deep)===!1?C.ref:C;return a.extend_(e,t,r,n)}function Ki(e,t){v("'"+this.annotationType_+"' cannot be used as a decorator")}var qi="observable",zi="observable.ref",Wi="observable.shallow",Yi="observable.struct",In={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(In);function bt(e){return e||In}var Ft=_t(qi),Xi=_t(zi,{enhancer:vt}),Hi=_t(Wi,{enhancer:Oi}),Ji=_t(Yi,{enhancer:Ei}),$n=oe(Ft);function mt(e){return e.deep===!0?Se:e.deep===!1?vt:Qi(e.defaultDecorator)}function Zi(e){var t;return e?(t=e.defaultDecorator)!=null?t:Ln(e):void 0}function Qi(e){var t,r;return e&&(t=(r=e.options_)==null?void 0:r.enhancer)!=null?t:Se}function Un(e,t,r){if(He(t))return Ft.decorate_20223_(e,t);if(Ne(t)){Xe(e,t,Ft);return}return tt(e)?e:M(e)?C.object(e,t,r):Array.isArray(e)?C.array(e,t):Pe(e)?C.map(e,t):de(e)?C.set(e,t):typeof e=="object"&&e!==null?e:C.box(e,t)}Sn(Un,$n);var es={box:function(t,r){var n=bt(r);return new je(t,mt(n),n.name,!0,n.equals)},array:function(t,r){var n=bt(r);return(f.useProxies===!1||n.proxy===!1?to:qs)(t,mt(n),n.name)},map:function(t,r){var n=bt(r);return new hr(t,mt(n),n.name)},set:function(t,r){var n=bt(r);return new br(t,mt(n),n.name)},object:function(t,r,n){return Oe(function(){return ur(f.useProxies===!1||n?.proxy===!1?Re({},n):Us({},n),t,r)})},ref:oe(Xi),shallow:oe(Hi),deep:$n,struct:oe(Ji)},C=Sn(Un,es),Fn="computed",ts="computed.struct",Gt=Ut(Fn),ns=Ut(ts,{equals:pt.structural}),gt=function(t,r){if(He(r))return Gt.decorate_20223_(t,r);if(Ne(r))return Xe(t,r,Gt);if(M(t))return oe(Ut(Fn,t));process.env.NODE_ENV!=="production"&&(D(t)||v("First argument to `computed` should be an expression."),D(r)&&v("A setter as second argument is no longer supported, use `{ set: fn }` option instead"));var n=M(r)?r:{};return n.get=t,n.name||(n.name=t.name||""),new K(n)};Object.assign(gt,Gt),gt.struct=oe(ns);var Gn,Kn,yt=0,rs=1,is=(Gn=(Kn=ut(function(){},"name"))==null?void 0:Kn.configurable)!=null?Gn:!1,qn={value:"action",configurable:!0,writable:!1,enumerable:!1};function we(e,t,r,n){r===void 0&&(r=!1),process.env.NODE_ENV!=="production"&&(D(t)||v("`action` can only be invoked on functions"),(typeof e!="string"||!e)&&v("actions should have valid names, got: '"+e+"'"));function i(){return ss(e,r,t,n||this,arguments)}return i.isMobxAction=!0,i.toString=function(){return t.toString()},is&&(qn.value=e,se(i,"name",qn)),i}function ss(e,t,r,n,i){var s=os(e,t,n,i);try{return r.apply(n,i)}catch(o){throw s.error_=o,o}finally{as(s)}}function os(e,t,r,n){var i=process.env.NODE_ENV!=="production"&&R()&&!!e,s=0;if(process.env.NODE_ENV!=="production"&&i){s=Date.now();var o=n?Array.from(n):lt;$({type:Ht,name:e,object:r,arguments:o})}var a=f.trackingDerivation,u=!t||!a;z();var l=f.allowStateChanges;u&&(xe(),l=Kt(!0));var d=Yt(!0),h={runAsAction_:u,prevDerivation_:a,prevAllowStateChanges_:l,prevAllowStateReads_:d,notifySpy_:i,startTime_:s,actionId_:rs++,parentActionId_:yt};return yt=h.actionId_,h}function as(e){yt!==e.actionId_&&v(30),yt=e.parentActionId_,e.error_!==void 0&&(f.suppressReactionErrors=!0),qt(e.prevAllowStateChanges_),Ze(e.prevAllowStateReads_),W(),e.runAsAction_&&ve(e.prevDerivation_),process.env.NODE_ENV!=="production"&&e.notifySpy_&&U({time:Date.now()-e.startTime_}),f.suppressReactionErrors=!1}function Kt(e){var t=f.allowStateChanges;return f.allowStateChanges=e,t}function qt(e){f.allowStateChanges=e}var us="create",je=(function(e){function t(n,i,s,o,a){var u;return s===void 0&&(s=process.env.NODE_ENV!=="production"?"ObservableValue@"+Q():"ObservableValue"),o===void 0&&(o=!0),a===void 0&&(a=pt.default),u=e.call(this,s)||this,u.enhancer=void 0,u.name_=void 0,u.equals=void 0,u.hasUnreportedChange_=!1,u.interceptors_=void 0,u.changeListeners_=void 0,u.value_=void 0,u.dehancer=void 0,u.enhancer=i,u.name_=s,u.equals=a,u.value_=i(n,void 0,s),process.env.NODE_ENV!=="production"&&o&&R()&&De({type:us,object:u,observableKind:"value",debugObjectName:u.name_,newValue:""+u.value_}),u}Vn(t,e);var r=t.prototype;return r.dehanceValue=function(i){return this.dehancer!==void 0?this.dehancer(i):i},r.set=function(i){var s=this.value_;if(i=this.prepareNewValue_(i),i!==f.UNCHANGED){var o=R();process.env.NODE_ENV!=="production"&&o&&$({type:ne,object:this,observableKind:"value",debugObjectName:this.name_,newValue:i,oldValue:s}),this.setNewValue_(i),process.env.NODE_ENV!=="production"&&o&&U()}},r.prepareNewValue_=function(i){if(ae(this),Y(this)){var s=X(this,{object:this,type:ne,newValue:i});if(!s)return f.UNCHANGED;i=s.newValue}return i=this.enhancer(i,this.value_,this.name_),this.equals(this.value_,i)?f.UNCHANGED:i},r.setNewValue_=function(i){var s=this.value_;this.value_=i,this.reportChanged(),ee(this)&&te(this,{type:ne,object:this,newValue:i,oldValue:s})},r.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},r.intercept_=function(i){return nt(this,i)},r.observe_=function(i,s){return s&&i({observableKind:"value",debugObjectName:this.name_,object:this,type:ne,newValue:this.value_,oldValue:void 0}),rt(this,i)},r.raw=function(){return this.value_},r.toJSON=function(){return this.get()},r.toString=function(){return this.name_+"["+this.value_+"]"},r.valueOf=function(){return Cn(this.get())},r[Symbol.toPrimitive]=function(){return this.valueOf()},t})(me),K=(function(){function e(r){this.dependenciesState_=N.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=N.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Et(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=q.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,r.get||v(31),this.derivation=r.get,this.name_=r.name||(process.env.NODE_ENV!=="production"?"ComputedValue@"+Q():"ComputedValue"),r.set&&(this.setter_=we(process.env.NODE_ENV!=="production"?this.name_+"-setter":"ComputedValue-setter",r.set)),this.equals_=r.equals||(r.compareStructural||r.struct?pt.structural:pt.default),this.scope_=r.context,this.requiresReaction_=r.requiresReaction,this.keepAlive_=!!r.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){hs(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},t.get=function(){if(this.isComputing&&v(32,this.name_,this.derivation),f.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)zt(this)&&(this.warnAboutUntrackedRead_(),z(),this.value_=this.computeValue_(!1),W());else if(Zn(this),zt(this)){var n=f.trackingContext;this.keepAlive_&&!n&&(f.trackingContext=this),this.trackAndCompute()&&vs(this),f.trackingContext=n}var i=this.value_;if(Nt(i))throw i.cause;return i},t.set=function(n){if(this.setter_){this.isRunningSetter&&v(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,n)}finally{this.isRunningSetter=!1}}else v(34,this.name_)},t.trackAndCompute=function(){var n=this.value_,i=this.dependenciesState_===N.NOT_TRACKING_,s=this.computeValue_(!0),o=i||Nt(n)||Nt(s)||!this.equals_(n,s);return o&&(this.value_=s,process.env.NODE_ENV!=="production"&&R()&&De({observableKind:"computed",debugObjectName:this.name_,object:this.scope_,type:"update",oldValue:n,newValue:s})),o},t.computeValue_=function(n){this.isComputing=!0;var i=Kt(!1),s;if(n)s=zn(this,this.derivation,this.scope_);else if(f.disableErrorBoundaries===!0)s=this.derivation.call(this.scope_);else try{s=this.derivation.call(this.scope_)}catch(o){s=new Et(o)}return qt(i),this.isComputing=!1,s},t.suspend_=function(){this.keepAlive_||(Wt(this),this.value_=void 0,process.env.NODE_ENV!=="production"&&this.isTracing_!==q.NONE&&console.log("[mobx.trace] Computed value '"+this.name_+"' was suspended and it will recompute on the next access."))},t.observe_=function(n,i){var s=this,o=!0,a=void 0;return Ss(function(){var u=s.get();if(!o||i){var l=xe();n({observableKind:"computed",debugObjectName:s.name_,type:ne,object:s,newValue:u,oldValue:a}),ve(l)}o=!1,a=u})},t.warnAboutUntrackedRead_=function(){process.env.NODE_ENV!=="production"&&(this.isTracing_!==q.NONE&&console.log("[mobx.trace] Computed value '"+this.name_+"' is being read outside a reactive context. Doing a full recompute."),(typeof this.requiresReaction_=="boolean"?this.requiresReaction_:f.computedRequiresReaction)&&console.warn("[mobx] Computed value '"+this.name_+"' is being read outside a reactive context. Doing a full recompute."))},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return Cn(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},ke(e,[{key:"isComputing",get:function(){return L(this.flags_,e.isComputingMask_)},set:function(n){this.flags_=I(this.flags_,e.isComputingMask_,n)}},{key:"isRunningSetter",get:function(){return L(this.flags_,e.isRunningSetterMask_)},set:function(n){this.flags_=I(this.flags_,e.isRunningSetterMask_,n)}},{key:"isBeingObserved",get:function(){return L(this.flags_,e.isBeingObservedMask_)},set:function(n){this.flags_=I(this.flags_,e.isBeingObservedMask_,n)}},{key:"isPendingUnobservation",get:function(){return L(this.flags_,e.isPendingUnobservationMask_)},set:function(n){this.flags_=I(this.flags_,e.isPendingUnobservationMask_,n)}},{key:"diffValue",get:function(){return L(this.flags_,e.diffValueMask_)?1:0},set:function(n){this.flags_=I(this.flags_,e.diffValueMask_,n===1)}}])})();K.isComputingMask_=1,K.isRunningSetterMask_=2,K.isBeingObservedMask_=4,K.isPendingUnobservationMask_=8,K.diffValueMask_=16;var Ot=Ae("ComputedValue",K),N;(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_"})(N||(N={}));var q;(function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"})(q||(q={}));var Et=function(t){this.cause=void 0,this.cause=t};function Nt(e){return e instanceof Et}function zt(e){switch(e.dependenciesState_){case N.UP_TO_DATE_:return!1;case N.NOT_TRACKING_:case N.STALE_:return!0;case N.POSSIBLY_STALE_:{for(var t=Yt(!0),r=xe(),n=e.observing_,i=n.length,s=0;s<i;s++){var o=n[s];if(Ot(o)){if(f.disableErrorBoundaries)o.get();else try{o.get()}catch{return ve(r),Ze(t),!0}if(e.dependenciesState_===N.STALE_)return ve(r),Ze(t),!0}}return Yn(e),ve(r),Ze(t),!1}}}function ae(e){if(process.env.NODE_ENV!=="production"){var t=e.observers_.size>0;!f.allowStateChanges&&(t||f.enforceActions==="always")&&console.warn("[MobX] "+(f.enforceActions?"Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: ":"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: ")+e.name_)}}function cs(e){process.env.NODE_ENV!=="production"&&!f.allowStateReads&&f.observableRequiresReaction&&console.warn("[mobx] Observable '"+e.name_+"' being read outside a reactive context.")}function zn(e,t,r){var n=Yt(!0);Yn(e),e.newObserving_=new Array(e.runId_===0?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++f.runId;var i=f.trackingDerivation;f.trackingDerivation=e,f.inBatch++;var s;if(f.disableErrorBoundaries===!0)s=t.call(r);else try{s=t.call(r)}catch(o){s=new Et(o)}return f.inBatch--,f.trackingDerivation=i,fs(e),ls(e),Ze(n),s}function ls(e){process.env.NODE_ENV!=="production"&&e.observing_.length===0&&(typeof e.requiresObservable_=="boolean"?e.requiresObservable_:f.reactionRequiresObservable)&&console.warn("[mobx] Derivation '"+e.name_+"' is created/updated without reading any observable value.")}function fs(e){for(var t=e.observing_,r=e.observing_=e.newObserving_,n=N.UP_TO_DATE_,i=0,s=e.unboundDepsCount_,o=0;o<s;o++){var a=r[o];a.diffValue===0&&(a.diffValue=1,i!==o&&(r[i]=a),i++),a.dependenciesState_>n&&(n=a.dependenciesState_)}for(r.length=i,e.newObserving_=null,s=t.length;s--;){var u=t[s];u.diffValue===0&&Hn(u,e),u.diffValue=0}for(;i--;){var l=r[i];l.diffValue===1&&(l.diffValue=0,ps(l,e))}n!==N.UP_TO_DATE_&&(e.dependenciesState_=n,e.onBecomeStale_())}function Wt(e){var t=e.observing_;e.observing_=[];for(var r=t.length;r--;)Hn(t[r],e);e.dependenciesState_=N.NOT_TRACKING_}function Wn(e){var t=xe();try{return e()}finally{ve(t)}}function xe(){var e=f.trackingDerivation;return f.trackingDerivation=null,e}function ve(e){f.trackingDerivation=e}function Yt(e){var t=f.allowStateReads;return f.allowStateReads=e,t}function Ze(e){f.allowStateReads=e}function Yn(e){if(e.dependenciesState_!==N.UP_TO_DATE_){e.dependenciesState_=N.UP_TO_DATE_;for(var t=e.observing_,r=t.length;r--;)t[r].lowestObserverState_=N.UP_TO_DATE_}}var At=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},St=!0,Xn=!1,f=(function(){var e=at();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(St=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new At().version&&(St=!1),St?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new At):(setTimeout(function(){Xn||v(35)},1),new At)})();function ds(){if((f.pendingReactions.length||f.inBatch||f.isRunningReactions)&&v(36),Xn=!0,St){var e=at();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),f=new At}}function ps(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function Hn(e,t){e.observers_.delete(t),e.observers_.size===0&&Jn(e)}function Jn(e){e.isPendingUnobservation===!1&&(e.isPendingUnobservation=!0,f.pendingUnobservations.push(e))}function z(){f.inBatch++}function W(){if(--f.inBatch===0){rr();for(var e=f.pendingUnobservations,t=0;t<e.length;t++){var r=e[t];r.isPendingUnobservation=!1,r.observers_.size===0&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBUO()),r instanceof K&&r.suspend_())}f.pendingUnobservations=[]}}function Zn(e){cs(e);var t=f.trackingDerivation;return t!==null?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved&&f.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved):(e.observers_.size===0&&f.inBatch>0&&Jn(e),!1)}function Qn(e){e.lowestObserverState_!==N.STALE_&&(e.lowestObserverState_=N.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===N.UP_TO_DATE_&&(process.env.NODE_ENV!=="production"&&t.isTracing_!==q.NONE&&er(t,e),t.onBecomeStale_()),t.dependenciesState_=N.STALE_}))}function vs(e){e.lowestObserverState_!==N.STALE_&&(e.lowestObserverState_=N.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===N.POSSIBLY_STALE_?(t.dependenciesState_=N.STALE_,process.env.NODE_ENV!=="production"&&t.isTracing_!==q.NONE&&er(t,e)):t.dependenciesState_===N.UP_TO_DATE_&&(e.lowestObserverState_=N.UP_TO_DATE_)}))}function hs(e){e.lowestObserverState_===N.UP_TO_DATE_&&(e.lowestObserverState_=N.POSSIBLY_STALE_,e.observers_.forEach(function(t){t.dependenciesState_===N.UP_TO_DATE_&&(t.dependenciesState_=N.POSSIBLY_STALE_,t.onBecomeStale_())}))}function er(e,t){if(console.log("[mobx.trace] '"+e.name_+"' is invalidated due to a change in: '"+t.name_+"'"),e.isTracing_===q.BREAK){var r=[];tr(cr(e),r,1),new Function(`debugger;
|
|
32
|
-
/*
|
|
33
|
-
Tracing '`+e.name_+`'
|
|
34
|
-
|
|
35
|
-
You are entering this break point because derivation '`+e.name_+"' is being traced and '"+t.name_+`' is now forcing it to update.
|
|
36
|
-
Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update
|
|
37
|
-
The stackframe you are looking for is at least ~6-8 stack-frames up.
|
|
38
|
-
|
|
39
|
-
`+(e instanceof K?e.derivation.toString().replace(/[*]\//g,"/"):"")+`
|
|
40
|
-
|
|
41
|
-
The dependencies for this derivation are:
|
|
42
|
-
|
|
43
|
-
`+r.join(`
|
|
44
|
-
`)+`
|
|
45
|
-
*/
|
|
46
|
-
`)()}}function tr(e,t,r){if(t.length>=1e3){t.push("(and many more)");return}t.push(""+" ".repeat(r-1)+e.name),e.dependencies&&e.dependencies.forEach(function(n){return tr(n,t,r+1)})}var he=(function(){function e(r,n,i,s){r===void 0&&(r=process.env.NODE_ENV!=="production"?"Reaction@"+Q():"Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=N.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=q.NONE,this.name_=r,this.onInvalidate_=n,this.errorHandler_=i,this.requiresObservable_=s}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled||(this.isScheduled=!0,f.pendingReactions.push(this),rr())},t.runReaction_=function(){if(!this.isDisposed){z(),this.isScheduled=!1;var n=f.trackingContext;if(f.trackingContext=this,zt(this)){this.isTrackPending=!0;try{this.onInvalidate_(),process.env.NODE_ENV!=="production"&&this.isTrackPending&&R()&&De({name:this.name_,type:"scheduled-reaction"})}catch(i){this.reportExceptionInDerivation_(i)}}f.trackingContext=n,W()}},t.track=function(n){if(!this.isDisposed){z();var i=R(),s;process.env.NODE_ENV!=="production"&&i&&(s=Date.now(),$({name:this.name_,type:"reaction"})),this.isRunning=!0;var o=f.trackingContext;f.trackingContext=this;var a=zn(this,n,void 0);f.trackingContext=o,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Wt(this),Nt(a)&&this.reportExceptionInDerivation_(a.cause),process.env.NODE_ENV!=="production"&&i&&U({time:Date.now()-s}),W()}},t.reportExceptionInDerivation_=function(n){var i=this;if(this.errorHandler_){this.errorHandler_(n,this);return}if(f.disableErrorBoundaries)throw n;var s=process.env.NODE_ENV!=="production"?"[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'":"[mobx] uncaught error in '"+this+"'";f.suppressReactionErrors?process.env.NODE_ENV!=="production"&&console.warn("[mobx] (error in reaction '"+this.name_+"' suppressed, fix error of causing action below)"):console.error(s,n),process.env.NODE_ENV!=="production"&&R()&&De({type:"error",name:this.name_,message:s,error:""+n}),f.globalReactionErrorHandlers.forEach(function(o){return o(n,i)})},t.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(z(),Wt(this),W()))},t.getDisposer_=function(n){var i=this,s=function o(){i.dispose(),n==null||n.removeEventListener==null||n.removeEventListener("abort",o)};return n==null||n.addEventListener==null||n.addEventListener("abort",s),s[b]=this,s},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(n){n===void 0&&(n=!1),Ls(this,n)},ke(e,[{key:"isDisposed",get:function(){return L(this.flags_,e.isDisposedMask_)},set:function(n){this.flags_=I(this.flags_,e.isDisposedMask_,n)}},{key:"isScheduled",get:function(){return L(this.flags_,e.isScheduledMask_)},set:function(n){this.flags_=I(this.flags_,e.isScheduledMask_,n)}},{key:"isTrackPending",get:function(){return L(this.flags_,e.isTrackPendingMask_)},set:function(n){this.flags_=I(this.flags_,e.isTrackPendingMask_,n)}},{key:"isRunning",get:function(){return L(this.flags_,e.isRunningMask_)},set:function(n){this.flags_=I(this.flags_,e.isRunningMask_,n)}},{key:"diffValue",get:function(){return L(this.flags_,e.diffValueMask_)?1:0},set:function(n){this.flags_=I(this.flags_,e.diffValueMask_,n===1)}}])})();he.isDisposedMask_=1,he.isScheduledMask_=2,he.isTrackPendingMask_=4,he.isRunningMask_=8,he.diffValueMask_=16;var nr=100,Xt=function(t){return t()};function rr(){f.inBatch>0||f.isRunningReactions||Xt(_s)}function _s(){f.isRunningReactions=!0;for(var e=f.pendingReactions,t=0;e.length>0;){++t===nr&&(console.error(process.env.NODE_ENV!=="production"?"Reaction doesn't converge to a stable state after "+nr+" iterations."+(" Probably there is a cycle in the reactive function: "+e[0]):"[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var r=e.splice(0),n=0,i=r.length;n<i;n++)r[n].runReaction_()}f.isRunningReactions=!1}var wt=Ae("Reaction",he);function bs(e){var t=Xt;Xt=function(n){return e(function(){return t(n)})}}function R(){return process.env.NODE_ENV!=="production"&&!!f.spyListeners.length}function De(e){if(process.env.NODE_ENV!=="production"&&f.spyListeners.length)for(var t=f.spyListeners,r=0,n=t.length;r<n;r++)t[r](e)}function $(e){if(process.env.NODE_ENV!=="production"){var t=pe({},e,{spyReportStart:!0});De(t)}}var ms={type:"report-end",spyReportEnd:!0};function U(e){process.env.NODE_ENV!=="production"&&De(e?pe({},e,{type:"report-end",spyReportEnd:!0}):ms)}function gs(e){return process.env.NODE_ENV==="production"?(console.warn("[mobx.spy] Is a no-op in production builds"),function(){}):(f.spyListeners.push(e),Mt(function(){f.spyListeners=f.spyListeners.filter(function(t){return t!==e})}))}var Ht="action",ys="action.bound",ir="autoAction",Os="autoAction.bound",Es="<unnamed action>",Jt=Je(Ht),Ns=Je(ys,{bound:!0}),Zt=Je(ir,{autoAction:!0}),As=Je(Os,{autoAction:!0,bound:!0});function sr(e){var t=function(n,i){if(D(n))return we(n.name||Es,n,e);if(D(i))return we(n,i,e);if(He(i))return(e?Zt:Jt).decorate_20223_(n,i);if(Ne(i))return Xe(n,i,e?Zt:Jt);if(Ne(n))return oe(Je(e?ir:Ht,{name:n,autoAction:e}));process.env.NODE_ENV!=="production"&&v("Invalid arguments for `action`")};return t}var Le=sr(!1);Object.assign(Le,Jt);var Qe=sr(!0);Object.assign(Qe,Zt),Le.bound=oe(Ns),Qe.bound=oe(As);function Ie(e){return D(e)&&e.isMobxAction===!0}function Ss(e,t){var r,n,i,s;t===void 0&&(t=wn),process.env.NODE_ENV!=="production"&&(D(e)||v("Autorun expects a function as first argument"),Ie(e)&&v("Autorun does not accept actions since actions are untrackable"));var o=(r=(n=t)==null?void 0:n.name)!=null?r:process.env.NODE_ENV!=="production"?e.name||"Autorun@"+Q():"Autorun",a=!t.scheduler&&!t.delay,u;if(a)u=new he(o,function(){this.track(h)},t.onError,t.requiresObservable);else{var l=js(t),d=!1;u=new he(o,function(){d||(d=!0,l(function(){d=!1,u.isDisposed||u.track(h)}))},t.onError,t.requiresObservable)}function h(){e(u)}return(i=t)!=null&&(i=i.signal)!=null&&i.aborted||u.schedule_(),u.getDisposer_((s=t)==null?void 0:s.signal)}var ws=function(t){return t()};function js(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:ws}var xs="onBO",Ds="onBUO";function Ts(e,t,r){return ar(xs,e,t,r)}function or(e,t,r){return ar(Ds,e,t,r)}function ar(e,t,r,n){var i=Fe(t),s=D(n)?n:r,o=e+"L";return i[o]?i[o].add(s):i[o]=new Set([s]),function(){var a=i[o];a&&(a.delete(s),a.size===0&&delete i[o])}}var Cs="never",jt="always",Rs="observed";function Vs(e){e.isolateGlobalState===!0&&ds();var t=e.useProxies,r=e.enforceActions;if(t!==void 0&&(f.useProxies=t===jt?!0:t===Cs?!1:typeof Proxy<"u"),t==="ifavailable"&&(f.verifyProxies=!0),r!==void 0){var n=r===jt?jt:r===Rs;f.enforceActions=n,f.allowStateChanges=!(n===!0||n===jt)}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(i){i in e&&(f[i]=!!e[i])}),f.allowStateReads=!f.observableRequiresReaction,process.env.NODE_ENV!=="production"&&f.disableErrorBoundaries===!0&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),e.reactionScheduler&&bs(e.reactionScheduler)}function ur(e,t,r,n){process.env.NODE_ENV!=="production"&&(arguments.length>4&&v("'extendObservable' expected 2-4 arguments"),typeof e!="object"&&v("'extendObservable' expects an object as first argument"),ye(e)&&v("'extendObservable' should not be used on maps, use map.merge instead"),M(t)||v("'extendObservable' only accepts plain objects as second argument"),(tt(t)||tt(r))&&v("Extending an object with another observable (object) is not supported"));var i=di(t);return Oe(function(){var s=Re(e,n)[b];Be(i).forEach(function(o){s.extend_(o,i[o],r&&o in r?r[o]:!0)})}),e}function cr(e,t){return lr(Fe(e,t))}function lr(e){var t={name:e.name_};return e.observing_&&e.observing_.length>0&&(t.dependencies=Ps(e.observing_).map(lr)),t}function Ps(e){return Array.from(new Set(e))}var Bs=0;function fr(){this.message="FLOW_CANCELLED"}fr.prototype=Object.create(Error.prototype);var Qt=kn("flow"),ks=kn("flow.bound",{bound:!0}),$e=Object.assign(function(t,r){if(He(r))return Qt.decorate_20223_(t,r);if(Ne(r))return Xe(t,r,Qt);process.env.NODE_ENV!=="production"&&arguments.length!==1&&v("Flow expects single argument with generator function");var n=t,i=n.name||"<unnamed flow>",s=function(){var a=this,u=arguments,l=++Bs,d=Le(i+" - runid: "+l+" - init",n).apply(a,u),h,_=void 0,m=new Promise(function(g,E){var A=0;h=E;function T(j){_=void 0;var B;try{B=Le(i+" - runid: "+l+" - yield "+A++,d.next).call(d,j)}catch(be){return E(be)}x(B)}function Z(j){_=void 0;var B;try{B=Le(i+" - runid: "+l+" - yield "+A++,d.throw).call(d,j)}catch(be){return E(be)}x(B)}function x(j){if(D(j?.then)){j.then(x,E);return}return j.done?g(j.value):(_=Promise.resolve(j.value),_.then(T,Z))}T(void 0)});return m.cancel=Le(i+" - runid: "+l+" - cancel",function(){try{_&&dr(_);var g=d.return(void 0),E=Promise.resolve(g.value);E.then(Ve,Ve),dr(E),h(new fr)}catch(A){h(A)}}),m};return s.isMobXFlow=!0,s},Qt);$e.bound=oe(ks);function dr(e){D(e.cancel)&&e.cancel()}function et(e){return e?.isMobXFlow===!0}function Ms(e,t){return e?Ue(e)||!!e[b]||$t(e)||wt(e)||Ot(e):!1}function tt(e){return process.env.NODE_ENV!=="production"&&arguments.length!==1&&v("isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property"),Ms(e)}function Ls(){if(process.env.NODE_ENV!=="production"){for(var e=!1,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];typeof r[r.length-1]=="boolean"&&(e=r.pop());var i=Is(r);if(!i)return v("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");i.isTracing_===q.NONE&&console.log("[mobx.trace] '"+i.name_+"' tracing enabled"),i.isTracing_=e?q.BREAK:q.LOG}}function Is(e){switch(e.length){case 0:return f.trackingDerivation;case 1:return Fe(e[0]);case 2:return Fe(e[0],e[1])}}function _e(e,t){t===void 0&&(t=void 0),z();try{return e.apply(t)}finally{W()}}function Te(e){return e[b]}var $s={has:function(t,r){return process.env.NODE_ENV!=="production"&&f.trackingDerivation&&We("detect new properties using the 'in' operator. Use 'has' from 'mobx' instead."),Te(t).has_(r)},get:function(t,r){return Te(t).get_(r)},set:function(t,r,n){var i;return Ne(r)?(process.env.NODE_ENV!=="production"&&!Te(t).values_.has(r)&&We("add a new observable property through direct assignment. Use 'set' from 'mobx' instead."),(i=Te(t).set_(r,n,!0))!=null?i:!0):!1},deleteProperty:function(t,r){var n;return process.env.NODE_ENV!=="production"&&We("delete properties from an observable object. Use 'remove' from 'mobx' instead."),Ne(r)?(n=Te(t).delete_(r,!0))!=null?n:!0:!1},defineProperty:function(t,r,n){var i;return process.env.NODE_ENV!=="production"&&We("define property on an observable object. Use 'defineProperty' from 'mobx' instead."),(i=Te(t).defineProperty_(r,n))!=null?i:!0},ownKeys:function(t){return process.env.NODE_ENV!=="production"&&f.trackingDerivation&&We("iterate keys to detect added / removed properties. Use 'keys' from 'mobx' instead."),Te(t).ownKeys_()},preventExtensions:function(t){v(13)}};function Us(e,t){var r,n;return jn(),e=Re(e,t),(n=(r=e[b]).proxy_)!=null?n:r.proxy_=new Proxy(e,$s)}function Y(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function nt(e,t){var r=e.interceptors_||(e.interceptors_=[]);return r.push(t),Mt(function(){var n=r.indexOf(t);n!==-1&&r.splice(n,1)})}function X(e,t){var r=xe();try{for(var n=[].concat(e.interceptors_||[]),i=0,s=n.length;i<s&&(t=n[i](t),t&&!t.type&&v(14),!!t);i++);return t}finally{ve(r)}}function ee(e){return e.changeListeners_!==void 0&&e.changeListeners_.length>0}function rt(e,t){var r=e.changeListeners_||(e.changeListeners_=[]);return r.push(t),Mt(function(){var n=r.indexOf(t);n!==-1&&r.splice(n,1)})}function te(e,t){var r=xe(),n=e.changeListeners_;if(n){n=n.slice();for(var i=0,s=n.length;i<s;i++)n[i](t);ve(r)}}function Fs(e,t,r){return Oe(function(){var n,i=Re(e,r)[b];process.env.NODE_ENV!=="production"&&t&&e[k]&&v("makeObservable second arg must be nullish when using decorators. Mixing @decorator syntax with annotations is not supported."),(n=t)!=null||(t=mi(e)),Be(t).forEach(function(s){return i.make_(s,t[s])})}),e}var en=Symbol("mobx-keys");function Ce(e,t,r){return process.env.NODE_ENV!=="production"&&(!M(e)&&!M(Object.getPrototypeOf(e))&&v("'makeAutoObservable' can only be used for classes that don't have a superclass"),Ue(e)&&v("makeAutoObservable can only be used on objects not already made observable")),M(e)?ur(e,e,t,r):(Oe(function(){var n=Re(e,r)[b];if(!e[en]){var i=Object.getPrototypeOf(e),s=new Set([].concat(Be(e),Be(i)));s.delete("constructor"),s.delete(b),Ye(i,en,s)}e[en].forEach(function(o){return n.make_(o,t&&o in t?t[o]:!0)})}),e)}var pr="splice",ne="update",Gs=1e4,Ks={get:function(t,r){var n=t[b];return r===b?n:r==="length"?n.getArrayLength_():typeof r=="string"&&!isNaN(r)?n.get_(parseInt(r)):G(xt,r)?xt[r]:t[r]},set:function(t,r,n){var i=t[b];return r==="length"&&i.setArrayLength_(n),typeof r=="symbol"||isNaN(r)?t[r]=n:i.set_(parseInt(r),n),!0},preventExtensions:function(){v(15)}},tn=(function(){function e(r,n,i,s){r===void 0&&(r=process.env.NODE_ENV!=="production"?"ObservableArray@"+Q():"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_=s,this.atom_=new me(r),this.enhancer_=function(o,a){return n(o,a,process.env.NODE_ENV!=="production"?r+"[..]":"ObservableArray[..]")}}var t=e.prototype;return t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.dehanceValues_=function(n){return this.dehancer!==void 0&&n.length>0?n.map(this.dehancer):n},t.intercept_=function(n){return nt(this,n)},t.observe_=function(n,i){return i===void 0&&(i=!1),i&&n({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),rt(this,n)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(n){(typeof n!="number"||isNaN(n)||n<0)&&v("Out of range: "+n);var i=this.values_.length;if(n!==i)if(n>i){for(var s=new Array(n-i),o=0;o<n-i;o++)s[o]=void 0;this.spliceWithArray_(i,0,s)}else this.spliceWithArray_(n,i-n)},t.updateArrayLength_=function(n,i){n!==this.lastKnownLength_&&v(16),this.lastKnownLength_+=i,this.legacyMode_&&i>0&&wr(n+i+1)},t.spliceWithArray_=function(n,i,s){var o=this;ae(this.atom_);var a=this.values_.length;if(n===void 0?n=0:n>a?n=a:n<0&&(n=Math.max(0,a+n)),arguments.length===1?i=a-n:i==null?i=0:i=Math.max(0,Math.min(i,a-n)),s===void 0&&(s=lt),Y(this)){var u=X(this,{object:this.proxy_,type:pr,index:n,removedCount:i,added:s});if(!u)return lt;i=u.removedCount,s=u.added}if(s=s.length===0?s:s.map(function(h){return o.enhancer_(h,void 0)}),this.legacyMode_||process.env.NODE_ENV!=="production"){var l=s.length-i;this.updateArrayLength_(a,l)}var d=this.spliceItemsIntoValues_(n,i,s);return(i!==0||s.length!==0)&&this.notifyArraySplice_(n,s,d),this.dehanceValues_(d)},t.spliceItemsIntoValues_=function(n,i,s){if(s.length<Gs){var o;return(o=this.values_).splice.apply(o,[n,i].concat(s))}else{var a=this.values_.slice(n,n+i),u=this.values_.slice(n+i);this.values_.length+=s.length-i;for(var l=0;l<s.length;l++)this.values_[n+l]=s[l];for(var d=0;d<u.length;d++)this.values_[n+s.length+d]=u[d];return a}},t.notifyArrayChildUpdate_=function(n,i,s){var o=!this.owned_&&R(),a=ee(this),u=a||o?{observableKind:"array",object:this.proxy_,type:ne,debugObjectName:this.atom_.name_,index:n,newValue:i,oldValue:s}:null;process.env.NODE_ENV!=="production"&&o&&$(u),this.atom_.reportChanged(),a&&te(this,u),process.env.NODE_ENV!=="production"&&o&&U()},t.notifyArraySplice_=function(n,i,s){var o=!this.owned_&&R(),a=ee(this),u=a||o?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:pr,index:n,removed:s,added:i,removedCount:s.length,addedCount:i.length}:null;process.env.NODE_ENV!=="production"&&o&&$(u),this.atom_.reportChanged(),a&&te(this,u),process.env.NODE_ENV!=="production"&&o&&U()},t.get_=function(n){if(this.legacyMode_&&n>=this.values_.length){console.warn(process.env.NODE_ENV!=="production"?"[mobx.array] Attempt to read an array index ("+n+") that is out of bounds ("+this.values_.length+"). Please check length first. Out of bound indices will not be tracked by MobX":"[mobx] Out of bounds read: "+n);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[n])},t.set_=function(n,i){var s=this.values_;if(this.legacyMode_&&n>s.length&&v(17,n,s.length),n<s.length){ae(this.atom_);var o=s[n];if(Y(this)){var a=X(this,{type:ne,object:this.proxy_,index:n,newValue:i});if(!a)return;i=a.newValue}i=this.enhancer_(i,o);var u=i!==o;u&&(s[n]=i,this.notifyArrayChildUpdate_(n,i,o))}else{for(var l=new Array(n+1-s.length),d=0;d<l.length-1;d++)l[d]=void 0;l[l.length-1]=i,this.spliceWithArray_(s.length,0,l)}},e})();function qs(e,t,r,n){return r===void 0&&(r=process.env.NODE_ENV!=="production"?"ObservableArray@"+Q():"ObservableArray"),n===void 0&&(n=!1),jn(),Oe(function(){var i=new tn(r,t,n,!1);Dn(i.values_,b,i);var s=new Proxy(i.values_,Ks);return i.proxy_=s,e&&e.length&&i.spliceWithArray_(0,0,e),s})}var xt={clear:function(){return this.splice(0)},replace:function(t){var r=this[b];return r.spliceWithArray_(0,r.values_.length,t)},toJSON:function(){return this.slice()},splice:function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];var o=this[b];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(t);case 2:return o.spliceWithArray_(t,r)}return o.spliceWithArray_(t,r,i)},spliceWithArray:function(t,r,n){return this[b].spliceWithArray_(t,r,n)},push:function(){for(var t=this[b],r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.spliceWithArray_(t.values_.length,0,n),t.values_.length},pop:function(){return this.splice(Math.max(this[b].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=this[b],r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.spliceWithArray_(0,0,n),t.values_.length},reverse:function(){return f.trackingDerivation&&v(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){f.trackingDerivation&&v(37,"sort");var t=this.slice();return t.sort.apply(t,arguments),this.replace(t),this},remove:function(t){var r=this[b],n=r.dehanceValues_(r.values_).indexOf(t);return n>-1?(this.splice(n,1),!0):!1}};S("at",F),S("concat",F),S("flat",F),S("includes",F),S("indexOf",F),S("join",F),S("lastIndexOf",F),S("slice",F),S("toString",F),S("toLocaleString",F),S("toSorted",F),S("toSpliced",F),S("with",F),S("every",re),S("filter",re),S("find",re),S("findIndex",re),S("findLast",re),S("findLastIndex",re),S("flatMap",re),S("forEach",re),S("map",re),S("some",re),S("toReversed",re),S("reduce",vr),S("reduceRight",vr);function S(e,t){typeof Array.prototype[e]=="function"&&(xt[e]=t(e))}function F(e){return function(){var t=this[b];t.atom_.reportObserved();var r=t.dehanceValues_(t.values_);return r[e].apply(r,arguments)}}function re(e){return function(t,r){var n=this,i=this[b];i.atom_.reportObserved();var s=i.dehanceValues_(i.values_);return s[e](function(o,a){return t.call(r,o,a,n)})}}function vr(e){return function(){var t=this,r=this[b];r.atom_.reportObserved();var n=r.dehanceValues_(r.values_),i=arguments[0];return arguments[0]=function(s,o,a){return i(s,o,a,t)},n[e].apply(n,arguments)}}var zs=Ae("ObservableArrayAdministration",tn);function Dt(e){return ft(e)&&zs(e[b])}var Ws={},ge="add",Tt="delete",hr=(function(){function e(r,n,i){var s=this;n===void 0&&(n=Se),i===void 0&&(i=process.env.NODE_ENV!=="production"?"ObservableMap@"+Q():"ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[b]=Ws,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_=n,this.name_=i,D(Map)||v(18),Oe(function(){s.keysAtom_=Pn(process.env.NODE_ENV!=="production"?s.name_+".keys()":"ObservableMap.keys()"),s.data_=new Map,s.hasMap_=new Map,r&&s.merge(r)})}var t=e.prototype;return t.has_=function(n){return this.data_.has(n)},t.has=function(n){var i=this;if(!f.trackingDerivation)return this.has_(n);var s=this.hasMap_.get(n);if(!s){var o=s=new je(this.has_(n),vt,process.env.NODE_ENV!=="production"?this.name_+"."+Lt(n)+"?":"ObservableMap.key?",!1);this.hasMap_.set(n,o),or(o,function(){return i.hasMap_.delete(n)})}return s.get()},t.set=function(n,i){var s=this.has_(n);if(Y(this)){var o=X(this,{type:s?ne:ge,object:this,newValue:i,name:n});if(!o)return this;i=o.newValue}return s?this.updateValue_(n,i):this.addValue_(n,i),this},t.delete=function(n){var i=this;if(ae(this.keysAtom_),Y(this)){var s=X(this,{type:Tt,object:this,name:n});if(!s)return!1}if(this.has_(n)){var o=R(),a=ee(this),u=a||o?{observableKind:"map",debugObjectName:this.name_,type:Tt,object:this,oldValue:this.data_.get(n).value_,name:n}:null;return process.env.NODE_ENV!=="production"&&o&&$(u),_e(function(){var l;i.keysAtom_.reportChanged(),(l=i.hasMap_.get(n))==null||l.setNewValue_(!1);var d=i.data_.get(n);d.setNewValue_(void 0),i.data_.delete(n)}),a&&te(this,u),process.env.NODE_ENV!=="production"&&o&&U(),!0}return!1},t.updateValue_=function(n,i){var s=this.data_.get(n);if(i=s.prepareNewValue_(i),i!==f.UNCHANGED){var o=R(),a=ee(this),u=a||o?{observableKind:"map",debugObjectName:this.name_,type:ne,object:this,oldValue:s.value_,name:n,newValue:i}:null;process.env.NODE_ENV!=="production"&&o&&$(u),s.setNewValue_(i),a&&te(this,u),process.env.NODE_ENV!=="production"&&o&&U()}},t.addValue_=function(n,i){var s=this;ae(this.keysAtom_),_e(function(){var l,d=new je(i,s.enhancer_,process.env.NODE_ENV!=="production"?s.name_+"."+Lt(n):"ObservableMap.key",!1);s.data_.set(n,d),i=d.value_,(l=s.hasMap_.get(n))==null||l.setNewValue_(!0),s.keysAtom_.reportChanged()});var o=R(),a=ee(this),u=a||o?{observableKind:"map",debugObjectName:this.name_,type:ge,object:this,name:n,newValue:i}:null;process.env.NODE_ENV!=="production"&&o&&$(u),a&&te(this,u),process.env.NODE_ENV!=="production"&&o&&U()},t.get=function(n){return this.has(n)?this.dehanceValue_(this.data_.get(n).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var n=this,i=this.keys();return _r({next:function(){var o=i.next(),a=o.done,u=o.value;return{done:a,value:a?void 0:n.get(u)}}})},t.entries=function(){var n=this,i=this.keys();return _r({next:function(){var o=i.next(),a=o.done,u=o.value;return{done:a,value:a?void 0:[u,n.get(u)]}}})},t[Symbol.iterator]=function(){return this.entries()},t.forEach=function(n,i){for(var s=Me(this),o;!(o=s()).done;){var a=o.value,u=a[0],l=a[1];n.call(i,l,u,this)}},t.merge=function(n){var i=this;return ye(n)&&(n=new Map(n)),_e(function(){M(n)?fi(n).forEach(function(s){return i.set(s,n[s])}):Array.isArray(n)?n.forEach(function(s){var o=s[0],a=s[1];return i.set(o,a)}):Pe(n)?(li(n)||v(19,n),n.forEach(function(s,o){return i.set(o,s)})):n!=null&&v(20,n)}),this},t.clear=function(){var n=this;_e(function(){Wn(function(){for(var i=Me(n.keys()),s;!(s=i()).done;){var o=s.value;n.delete(o)}})})},t.replace=function(n){var i=this;return _e(function(){for(var s=Ys(n),o=new Map,a=!1,u=Me(i.data_.keys()),l;!(l=u()).done;){var d=l.value;if(!s.has(d)){var h=i.delete(d);if(h)a=!0;else{var _=i.data_.get(d);o.set(d,_)}}}for(var m=Me(s.entries()),g;!(g=m()).done;){var E=g.value,A=E[0],T=E[1],Z=i.data_.has(A);if(i.set(A,T),i.data_.has(A)){var x=i.data_.get(A);o.set(A,x),Z||(a=!0)}}if(!a)if(i.data_.size!==o.size)i.keysAtom_.reportChanged();else for(var j=i.data_.keys(),B=o.keys(),be=j.next(),kt=B.next();!be.done;){if(be.value!==kt.value){i.keysAtom_.reportChanged();break}be=j.next(),kt=B.next()}i.data_=o}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(n,i){return process.env.NODE_ENV!=="production"&&i===!0&&v("`observe` doesn't support fireImmediately=true in combination with maps."),rt(this,n)},t.intercept_=function(n){return nt(this,n)},ke(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])})(),ye=Ae("ObservableMap",hr);function _r(e){return e[Symbol.toStringTag]="MapIterator",an(e)}function Ys(e){if(Pe(e)||ye(e))return e;if(Array.isArray(e))return new Map(e);if(M(e)){var t=new Map;for(var r in e)t.set(r,e[r]);return t}else return v(21,e)}var Xs={},br=(function(){function e(r,n,i){var s=this;n===void 0&&(n=Se),i===void 0&&(i=process.env.NODE_ENV!=="production"?"ObservableSet@"+Q():"ObservableSet"),this.name_=void 0,this[b]=Xs,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_=i,D(Set)||v(22),this.enhancer_=function(o,a){return n(o,a,i)},Oe(function(){s.atom_=Pn(s.name_),r&&s.replace(r)})}var t=e.prototype;return t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.clear=function(){var n=this;_e(function(){Wn(function(){for(var i=Me(n.data_.values()),s;!(s=i()).done;){var o=s.value;n.delete(o)}})})},t.forEach=function(n,i){for(var s=Me(this),o;!(o=s()).done;){var a=o.value;n.call(i,a,a,this)}},t.add=function(n){var i=this;if(ae(this.atom_),Y(this)){var s=X(this,{type:ge,object:this,newValue:n});if(!s)return this;n=s.newValue}if(!this.has(n)){_e(function(){i.data_.add(i.enhancer_(n,void 0)),i.atom_.reportChanged()});var o=process.env.NODE_ENV!=="production"&&R(),a=ee(this),u=a||o?{observableKind:"set",debugObjectName:this.name_,type:ge,object:this,newValue:n}:null;o&&process.env.NODE_ENV!=="production"&&$(u),a&&te(this,u),o&&process.env.NODE_ENV!=="production"&&U()}return this},t.delete=function(n){var i=this;if(Y(this)){var s=X(this,{type:Tt,object:this,oldValue:n});if(!s)return!1}if(this.has(n)){var o=process.env.NODE_ENV!=="production"&&R(),a=ee(this),u=a||o?{observableKind:"set",debugObjectName:this.name_,type:Tt,object:this,oldValue:n}:null;return o&&process.env.NODE_ENV!=="production"&&$(u),_e(function(){i.atom_.reportChanged(),i.data_.delete(n)}),a&&te(this,u),o&&process.env.NODE_ENV!=="production"&&U(),!0}return!1},t.has=function(n){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(n))},t.entries=function(){var n=this.values();return mr({next:function(){var s=n.next(),o=s.value,a=s.done;return a?{value:void 0,done:a}:{value:[o,o],done:a}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var n=this,i=this.data_.values();return mr({next:function(){var o=i.next(),a=o.value,u=o.done;return u?{value:void 0,done:u}:{value:n.dehanceValue_(a),done:u}}})},t.intersection=function(n){if(de(n)&&!ue(n))return n.intersection(this);var i=new Set(this);return i.intersection(n)},t.union=function(n){if(de(n)&&!ue(n))return n.union(this);var i=new Set(this);return i.union(n)},t.difference=function(n){return new Set(this).difference(n)},t.symmetricDifference=function(n){if(de(n)&&!ue(n))return n.symmetricDifference(this);var i=new Set(this);return i.symmetricDifference(n)},t.isSubsetOf=function(n){return new Set(this).isSubsetOf(n)},t.isSupersetOf=function(n){return new Set(this).isSupersetOf(n)},t.isDisjointFrom=function(n){if(de(n)&&!ue(n))return n.isDisjointFrom(this);var i=new Set(this);return i.isDisjointFrom(n)},t.replace=function(n){var i=this;return ue(n)&&(n=new Set(n)),_e(function(){Array.isArray(n)?(i.clear(),n.forEach(function(s){return i.add(s)})):de(n)?(i.clear(),n.forEach(function(s){return i.add(s)})):n!=null&&v("Cannot initialize set from "+n)}),this},t.observe_=function(n,i){return process.env.NODE_ENV!=="production"&&i===!0&&v("`observe` doesn't support fireImmediately=true in combination with sets."),rt(this,n)},t.intercept_=function(n){return nt(this,n)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[Symbol.iterator]=function(){return this.values()},ke(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])})(),ue=Ae("ObservableSet",br);function mr(e){return e[Symbol.toStringTag]="SetIterator",an(e)}var gr=Object.create(null),yr="remove",nn=(function(){function e(r,n,i,s){n===void 0&&(n=new Map),s===void 0&&(s=Ui),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_=r,this.values_=n,this.name_=i,this.defaultAnnotation_=s,this.keysAtom_=new me(process.env.NODE_ENV!=="production"?this.name_+".keys":"ObservableObject.keys"),this.isPlainObject_=M(this.target_),process.env.NODE_ENV!=="production"&&!Rr(this.defaultAnnotation_)&&v("defaultAnnotation must be valid annotation"),process.env.NODE_ENV!=="production"&&(this.appliedAnnotations_={})}var t=e.prototype;return t.getObservablePropValue_=function(n){return this.values_.get(n).get()},t.setObservablePropValue_=function(n,i){var s=this.values_.get(n);if(s instanceof K)return s.set(i),!0;if(Y(this)){var o=X(this,{type:ne,object:this.proxy_||this.target_,name:n,newValue:i});if(!o)return null;i=o.newValue}if(i=s.prepareNewValue_(i),i!==f.UNCHANGED){var a=ee(this),u=process.env.NODE_ENV!=="production"&&R(),l=a||u?{type:ne,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:s.value_,name:n,newValue:i}:null;process.env.NODE_ENV!=="production"&&u&&$(l),s.setNewValue_(i),a&&te(this,l),process.env.NODE_ENV!=="production"&&u&&U()}return!0},t.get_=function(n){return f.trackingDerivation&&!G(this.target_,n)&&this.has_(n),this.target_[n]},t.set_=function(n,i,s){return s===void 0&&(s=!1),G(this.target_,n)?this.values_.has(n)?this.setObservablePropValue_(n,i):s?Reflect.set(this.target_,n,i):(this.target_[n]=i,!0):this.extend_(n,{value:i,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,s)},t.has_=function(n){if(!f.trackingDerivation)return n in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var i=this.pendingKeys_.get(n);return i||(i=new je(n in this.target_,vt,process.env.NODE_ENV!=="production"?this.name_+"."+Lt(n)+"?":"ObservableObject.key?",!1),this.pendingKeys_.set(n,i)),i.get()},t.make_=function(n,i){if(i===!0&&(i=this.defaultAnnotation_),i!==!1){if(Nr(this,i,n),!(n in this.target_)){var s;if((s=this.target_[k])!=null&&s[n])return;v(1,i.annotationType_,this.name_+"."+n.toString())}for(var o=this.target_;o&&o!==ct;){var a=ut(o,n);if(a){var u=i.make_(this,n,a,o);if(u===0)return;if(u===1)break}o=Object.getPrototypeOf(o)}Er(this,i,n)}},t.extend_=function(n,i,s,o){if(o===void 0&&(o=!1),s===!0&&(s=this.defaultAnnotation_),s===!1)return this.defineProperty_(n,i,o);Nr(this,s,n);var a=s.extend_(this,n,i,o);return a&&Er(this,s,n),a},t.defineProperty_=function(n,i,s){s===void 0&&(s=!1),ae(this.keysAtom_);try{z();var o=this.delete_(n);if(!o)return o;if(Y(this)){var a=X(this,{object:this.proxy_||this.target_,name:n,type:ge,newValue:i.value});if(!a)return null;var u=a.newValue;i.value!==u&&(i=pe({},i,{value:u}))}if(s){if(!Reflect.defineProperty(this.target_,n,i))return!1}else se(this.target_,n,i);this.notifyPropertyAddition_(n,i.value)}finally{W()}return!0},t.defineObservableProperty_=function(n,i,s,o){o===void 0&&(o=!1),ae(this.keysAtom_);try{z();var a=this.delete_(n);if(!a)return a;if(Y(this)){var u=X(this,{object:this.proxy_||this.target_,name:n,type:ge,newValue:i});if(!u)return null;i=u.newValue}var l=Or(n),d={configurable:f.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:l.get,set:l.set};if(o){if(!Reflect.defineProperty(this.target_,n,d))return!1}else se(this.target_,n,d);var h=new je(i,s,process.env.NODE_ENV!=="production"?this.name_+"."+n.toString():"ObservableObject.key",!1);this.values_.set(n,h),this.notifyPropertyAddition_(n,h.value_)}finally{W()}return!0},t.defineComputedProperty_=function(n,i,s){s===void 0&&(s=!1),ae(this.keysAtom_);try{z();var o=this.delete_(n);if(!o)return o;if(Y(this)){var a=X(this,{object:this.proxy_||this.target_,name:n,type:ge,newValue:void 0});if(!a)return null}i.name||(i.name=process.env.NODE_ENV!=="production"?this.name_+"."+n.toString():"ObservableObject.key"),i.context=this.proxy_||this.target_;var u=Or(n),l={configurable:f.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:u.get,set:u.set};if(s){if(!Reflect.defineProperty(this.target_,n,l))return!1}else se(this.target_,n,l);this.values_.set(n,new K(i)),this.notifyPropertyAddition_(n,void 0)}finally{W()}return!0},t.delete_=function(n,i){if(i===void 0&&(i=!1),ae(this.keysAtom_),!G(this.target_,n))return!0;if(Y(this)){var s=X(this,{object:this.proxy_||this.target_,name:n,type:yr});if(!s)return null}try{var o;z();var a=ee(this),u=process.env.NODE_ENV!=="production"&&R(),l=this.values_.get(n),d=void 0;if(!l&&(a||u)){var h;d=(h=ut(this.target_,n))==null?void 0:h.value}if(i){if(!Reflect.deleteProperty(this.target_,n))return!1}else delete this.target_[n];if(process.env.NODE_ENV!=="production"&&delete this.appliedAnnotations_[n],l&&(this.values_.delete(n),l instanceof je&&(d=l.value_),Qn(l)),this.keysAtom_.reportChanged(),(o=this.pendingKeys_)==null||(o=o.get(n))==null||o.set(n in this.target_),a||u){var _={type:yr,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:d,name:n};process.env.NODE_ENV!=="production"&&u&&$(_),a&&te(this,_),process.env.NODE_ENV!=="production"&&u&&U()}}finally{W()}return!0},t.observe_=function(n,i){return process.env.NODE_ENV!=="production"&&i===!0&&v("`observe` doesn't support the fire immediately property for observable objects."),rt(this,n)},t.intercept_=function(n){return nt(this,n)},t.notifyPropertyAddition_=function(n,i){var s,o=ee(this),a=process.env.NODE_ENV!=="production"&&R();if(o||a){var u=o||a?{type:ge,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:n,newValue:i}:null;process.env.NODE_ENV!=="production"&&a&&$(u),o&&te(this,u),process.env.NODE_ENV!=="production"&&a&&U()}(s=this.pendingKeys_)==null||(s=s.get(n))==null||s.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),Be(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e})();function Re(e,t){var r;if(process.env.NODE_ENV!=="production"&&t&&Ue(e)&&v("Options can't be provided for already observable objects."),G(e,b))return process.env.NODE_ENV!=="production"&&!(jr(e)instanceof nn)&&v("Cannot convert '"+Ct(e)+`' into observable object:
|
|
47
|
-
The target is already observable of different type.
|
|
48
|
-
Extending builtins is not supported.`),e;process.env.NODE_ENV!=="production"&&!Object.isExtensible(e)&&v("Cannot make the designated object observable; it is not extensible");var n=(r=t?.name)!=null?r:process.env.NODE_ENV!=="production"?(M(e)?"ObservableObject":e.constructor.name)+"@"+Q():"ObservableObject",i=new nn(e,new Map,String(n),Zi(t));return Ye(e,b,i),e}var Hs=Ae("ObservableObjectAdministration",nn);function Or(e){return gr[e]||(gr[e]={get:function(){return this[b].getObservablePropValue_(e)},set:function(r){return this[b].setObservablePropValue_(e,r)}})}function Ue(e){return ft(e)?Hs(e[b]):!1}function Er(e,t,r){var n;process.env.NODE_ENV!=="production"&&(e.appliedAnnotations_[r]=t),(n=e.target_[k])==null||delete n[r]}function Nr(e,t,r){if(process.env.NODE_ENV!=="production"&&!Rr(t)&&v("Cannot annotate '"+e.name_+"."+r.toString()+"': Invalid annotation."),process.env.NODE_ENV!=="production"&&!ht(t)&&G(e.appliedAnnotations_,r)){var n=e.name_+"."+r.toString(),i=e.appliedAnnotations_[r].annotationType_,s=t.annotationType_;v("Cannot apply '"+s+"' to '"+n+"':"+(`
|
|
49
|
-
The field is already annotated with '`+i+"'.")+`
|
|
50
|
-
Re-annotating fields is not allowed.
|
|
51
|
-
Use 'override' annotation for methods overridden by subclass.`)}}var Js=Sr(0),Zs=(function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1})(),rn=0,Ar=function(){};function Qs(e,t){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,t):e.prototype.__proto__!==void 0?e.prototype.__proto__=t:e.prototype=t}Qs(Ar,Array.prototype);var sn=(function(e){function t(n,i,s,o){var a;return s===void 0&&(s=process.env.NODE_ENV!=="production"?"ObservableArray@"+Q():"ObservableArray"),o===void 0&&(o=!1),a=e.call(this)||this,Oe(function(){var u=new tn(s,i,o,!0);u.proxy_=a,Dn(a,b,u),n&&n.length&&a.spliceWithArray(0,0,n),Zs&&Object.defineProperty(a,"0",Js)}),a}Vn(t,e);var r=t.prototype;return r.concat=function(){this[b].atom_.reportObserved();for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];return Array.prototype.concat.apply(this.slice(),s.map(function(a){return Dt(a)?a.slice():a}))},r[Symbol.iterator]=function(){var n=this,i=0;return an({next:function(){return i<n.length?{value:n[i++],done:!1}:{done:!0,value:void 0}}})},ke(t,[{key:"length",get:function(){return this[b].getArrayLength_()},set:function(i){this[b].setArrayLength_(i)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])})(Ar);Object.entries(xt).forEach(function(e){var t=e[0],r=e[1];t!=="concat"&&Ye(sn.prototype,t,r)});function Sr(e){return{enumerable:!1,configurable:!0,get:function(){return this[b].get_(e)},set:function(r){this[b].set_(e,r)}}}function eo(e){se(sn.prototype,""+e,Sr(e))}function wr(e){if(e>rn){for(var t=rn;t<e+100;t++)eo(t);rn=e}}wr(1e3);function to(e,t,r){return new sn(e,t,r)}function Fe(e,t){if(typeof e=="object"&&e!==null){if(Dt(e))return t!==void 0&&v(23),e[b].atom_;if(ue(e))return e.atom_;if(ye(e)){if(t===void 0)return e.keysAtom_;var r=e.data_.get(t)||e.hasMap_.get(t);return r||v(25,t,Ct(e)),r}if(Ue(e)){if(!t)return v(26);var n=e[b].values_.get(t);return n||v(27,t,Ct(e)),n}if($t(e)||Ot(e)||wt(e))return e}else if(D(e)&&wt(e[b]))return e[b];v(28)}function jr(e,t){if(e||v(29),$t(e)||Ot(e)||wt(e)||ye(e)||ue(e))return e;if(e[b])return e[b];v(24,e)}function Ct(e,t){var r;if(t!==void 0)r=Fe(e,t);else{if(Ie(e))return e.name;Ue(e)||ye(e)||ue(e)?r=jr(e):r=Fe(e)}return r.name_}function Oe(e){var t=xe(),r=Kt(!0);z();try{return e()}finally{W(),qt(r),ve(t)}}var xr=ct.toString;function Dr(e,t,r){return r===void 0&&(r=-1),on(e,t,r)}function on(e,t,r,n,i){if(e===t)return e!==0||1/e===1/t;if(e==null||t==null)return!1;if(e!==e)return t!==t;var s=typeof e;if(s!=="function"&&s!=="object"&&typeof t!="object")return!1;var o=xr.call(e);if(o!==xr.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:+e==0?1/+e===1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":r>=0&&r++;break}e=Tr(e),t=Tr(t);var a=o==="[object Array]";if(!a){if(typeof e!="object"||typeof t!="object")return!1;var u=e.constructor,l=t.constructor;if(u!==l&&!(D(u)&&u instanceof u&&D(l)&&l instanceof l)&&"constructor"in e&&"constructor"in t)return!1}if(r===0)return!1;r<0&&(r=-1),n=n||[],i=i||[];for(var d=n.length;d--;)if(n[d]===e)return i[d]===t;if(n.push(e),i.push(t),a){if(d=e.length,d!==t.length)return!1;for(;d--;)if(!on(e[d],t[d],r-1,n,i))return!1}else{var h=Object.keys(e),_=h.length;if(Object.keys(t).length!==_)return!1;for(var m=0;m<_;m++){var g=h[m];if(!(G(t,g)&&on(e[g],t[g],r-1,n,i)))return!1}}return n.pop(),i.pop(),!0}function Tr(e){return Dt(e)?e.slice():Pe(e)||ye(e)||de(e)||ue(e)?Array.from(e.entries()):e}var Cr,no=((Cr=at().Iterator)==null?void 0:Cr.prototype)||{};function an(e){return e[Symbol.iterator]=ro,Object.assign(Object.create(no),e)}function ro(){return this}function Rr(e){return e instanceof Object&&typeof e.annotationType_=="string"&&D(e.make_)&&D(e.extend_)}if(["Symbol","Map","Set"].forEach(function(e){var t=at();typeof t[e]>"u"&&v("MobX requires global '"+e+"' to be available or polyfilled")}),typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:gs,extras:{getDebugName:Ct},$mobx:b}),!y.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!Fs)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function io(e){e()}function so(e){e||(e=io,process.env.NODE_ENV!=="production"&&console.warn("[MobX] Failed to get unstable_batched updates from react-dom / react-native")),Vs({reactionScheduler:e})}function oo(e){return cr(e)}var ao=1e4,uo=1e4,co=(function(){function e(t){var r=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(n){n===void 0&&(n=ao),clearTimeout(r.sweepTimeout),r.sweepTimeout=void 0;var i=Date.now();r.registrations.forEach(function(s,o){i-s.registeredAt>=n&&(r.finalize(s.value),r.registrations.delete(o))}),r.registrations.size>0&&r.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){r.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,n){this.registrations.set(n,{value:r,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.registrations.delete(t)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,uo))}}),e})(),lo=typeof FinalizationRegistry<"u"?FinalizationRegistry:co,un=new lo(function(e){var t;(t=e.reaction)===null||t===void 0||t.dispose(),e.reaction=null}),Rt={exports:{}},cn={};/**
|
|
52
|
-
* @license React
|
|
53
|
-
* use-sync-external-store-shim.production.js
|
|
54
|
-
*
|
|
55
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
56
|
-
*
|
|
57
|
-
* This source code is licensed under the MIT license found in the
|
|
58
|
-
* LICENSE file in the root directory of this source tree.
|
|
59
|
-
*/var Vr;function fo(){if(Vr)return cn;Vr=1;var e=y;function t(h,_){return h===_&&(h!==0||1/h===1/_)||h!==h&&_!==_}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function a(h,_){var m=_(),g=n({inst:{value:m,getSnapshot:_}}),E=g[0].inst,A=g[1];return s(function(){E.value=m,E.getSnapshot=_,u(E)&&A({inst:E})},[h,m,_]),i(function(){return u(E)&&A({inst:E}),h(function(){u(E)&&A({inst:E})})},[h]),o(m),m}function u(h){var _=h.getSnapshot;h=h.value;try{var m=_();return!r(h,m)}catch{return!0}}function l(h,_){return _()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:a;return cn.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,cn}var ln={};/**
|
|
60
|
-
* @license React
|
|
61
|
-
* use-sync-external-store-shim.development.js
|
|
62
|
-
*
|
|
63
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
64
|
-
*
|
|
65
|
-
* This source code is licensed under the MIT license found in the
|
|
66
|
-
* LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/var Pr;function po(){return Pr||(Pr=1,process.env.NODE_ENV!=="production"&&(function(){function e(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}function t(m,g){d||i.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var E=g();if(!h){var A=g();s(E,A)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}A=o({inst:{value:E,getSnapshot:g}});var T=A[0].inst,Z=A[1];return u(function(){T.value=E,T.getSnapshot=g,r(T)&&Z({inst:T})},[m,E,g]),a(function(){return r(T)&&Z({inst:T}),m(function(){r(T)&&Z({inst:T})})},[m]),l(E),E}function r(m){var g=m.getSnapshot;m=m.value;try{var E=g();return!s(m,E)}catch{return!0}}function n(m,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=y,s=typeof Object.is=="function"?Object.is:e,o=i.useState,a=i.useEffect,u=i.useLayoutEffect,l=i.useDebugValue,d=!1,h=!1,_=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:t;ln.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:_,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),ln}var Br;function vo(){return Br||(Br=1,process.env.NODE_ENV==="production"?Rt.exports=fo():Rt.exports=po()),Rt.exports}var ho=vo();function kr(e){e.reaction=new he("observer".concat(e.name),function(){var t;e.stateVersion=Symbol(),(t=e.onStoreChange)===null||t===void 0||t.call(e)})}function _o(e,t){t===void 0&&(t="observed");var r=y.useRef(null);if(!r.current){var n={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(a){return un.unregister(n),n.onStoreChange=a,n.reaction||(kr(n),n.stateVersion=Symbol()),function(){var u;n.onStoreChange=null,(u=n.reaction)===null||u===void 0||u.dispose(),n.reaction=null}},getSnapshot:function(){return n.stateVersion}};r.current=n}var i=r.current;i.reaction||(kr(i),un.register(r,i,i)),y.useDebugValue(i.reaction,oo),ho.useSyncExternalStore(i.subscribe,i.getSnapshot,i.getSnapshot);var s,o;if(i.reaction.track(function(){try{s=e()}catch(a){o=a}}),o)throw o;return s}var fn,dn,bo=!0,Mr=!0,Lr=typeof Symbol=="function"&&Symbol.for,mo=(dn=(fn=Object.getOwnPropertyDescriptor(function(){},"name"))===null||fn===void 0?void 0:fn.configurable)!==null&&dn!==void 0?dn:!1,Ir=Lr?Symbol.for("react.forward_ref"):typeof y.forwardRef=="function"&&y.forwardRef(function(e){return null}).$$typeof,$r=Lr?Symbol.for("react.memo"):typeof y.memo=="function"&&y.memo(function(e){return null}).$$typeof;function H(e,t){var r;if(process.env.NODE_ENV,$r&&e.$$typeof===$r)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var n=(r=void 0)!==null&&r!==void 0?r:!1,i=e,s=e.displayName||e.name;if(Ir&&e.$$typeof===Ir&&(n=!0,i=e.render,typeof i!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var o=function(a,u){return _o(function(){return i(a,u)},s)};return o.displayName=e.displayName,mo&&Object.defineProperty(o,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(o.contextTypes=e.contextTypes,process.env.NODE_ENV!=="production"&&Mr&&(Mr=!1,console.warn("[mobx-react-lite] Support for Legacy Context in function components will be removed in the next major release."))),n&&(o=y.forwardRef(o)),o=y.memo(o),yo(e,o),process.env.NODE_ENV!=="production"&&Object.defineProperty(o,"contextTypes",{set:function(){var a,u;throw new Error("[mobx-react-lite] `".concat(this.displayName||((a=this.type)===null||a===void 0?void 0:a.displayName)||((u=this.type)===null||u===void 0?void 0:u.name)||"Component",".contextTypes` must be set before applying `observer`."))}}),o}var go={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function yo(e,t){Object.keys(e).forEach(function(r){go[r]||Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}process.env.NODE_ENV;var pn;so(Ke.unstable_batchedUpdates),pn=un.finalizeAllImmediately;const Oo=({onClick:e,disabled:t=!1,imagePath:r})=>c.jsxs("div",{className:"buy-bonus-wrap","aria-hidden":t?"true":"false",children:[r&&c.jsx("div",{className:"bonus-thumb",role:"img","aria-label":"bonus thumbnail",style:{backgroundImage:`url(${r})`}}),c.jsx("button",{className:`buy-bonus ${t?"buy-bonus--disabled":""}`,onClick:e,disabled:t,"aria-pressed":t,children:r?"Disable":"Buy Bonus"})]}),Ur=({label:e,value:t})=>c.jsxs("div",{className:"info",children:[c.jsx("span",{className:"label",children:e}),c.jsx("span",{className:"value",children:t})]}),Eo=({onClick:e,disabled:t=!1,value:r,activeAnteBet:n=!1})=>c.jsxs("div",{className:`bet-amount ${t?"disabled":""}`,onClick:e,children:[c.jsx("div",{className:"bet-amount-icon"}),c.jsxs("label",{className:`bet-amount-text ${n?"ante-color":""}`,children:[r," FUN"]})]}),Fr=({onClick:e,disabled:t=!1,className:r})=>c.jsx("button",{className:`${r} ${t?"disabled":""}`,onClick:e}),No=({onClick:e,disabled:t=!1})=>c.jsx("button",{className:`spin-btn ${t?"disabled":""}`,onClick:e}),Gr=({onClick:e,disabled:t=!1,className:r,isActive:n})=>c.jsx("button",{className:`${r} ${t?"disabled":""} ${n?"active":""}`,onClick:e});class Ao{balance=1e4;betAmount=10;betIndex=0;lastWin=0;volume=50;betAmountRange=[10,20,50,100,500,1e3,5e3,1e4,25e3,5e5,65e3,8e4,1e5,15e4,2e5];maxBetAmount=this.betAmountRange[0];minBetAmount=this.betAmountRange[this.betAmountRange.length-1];displayCurrency="FUN";constructor(){Ce(this)}setBet(t){this.betAmount=t}setNextBetAmount(){if(this.betIndex===this.betAmountRange.length-1)return console.error("Bet Index must be less than BetStore.betAmountRange.length");this.betIndex+=1,this.betAmount=this.betAmountRange[this.betIndex]}setPrevBetAmount(){if(this.betIndex<1)return console.error("Bet Index must be more than 0");this.betIndex-=1,this.betAmount=this.betAmountRange[this.betIndex]}setBetAmountRange(t){this.betAmountRange=t,t.length>0&&(this.maxBetAmount=t[0],this.minBetAmount=t[t.length-1])}setDisplayCurrency(t){this.displayCurrency=t}setBalance(t){this.balance=t}setLastWin(t){this.lastWin=t}setVolume(t){this.volume=Math.max(0,Math.min(100,t))}}const ce=new Ao;class So{activePopup=null;constructor(){Ce(this)}open(t){this.activePopup=t}close(){this.activePopup=null}get isOpen(){return this.activePopup!==null}}const J=new So,ie={bet:"bet",autoplay:"autoplay",settings:"settings",history:"history",buyBonus:"buy_bonus"},wo={insufficientFunds:"insufficient funds"},Kr={primary:{background:"#FBDE38",color:"#1C1B1E"},secondary:{background:"#1C1B1E",color:"#FFFFFF"}},jo=[{name:wo.insufficientFunds,title:"Insufficient Funds",imagePath:"/img_1.png",message:"Your balance is low, please make a deposit",buttons:[{text:"Back",configs:Kr.secondary},{text:"Ok",configs:Kr.primary}]}],vn={ante:"ante",buy:"buy"};class xo{introSkip=!1;spaceToSpin=!1;spaceToSkip=!1;isTurbo=!1;volume=50;musicOn=!0;soundsOn=!0;constructor(){Ce(this)}setMusicOn(t){this.musicOn=t}setVolume(t){this.volume=t}setIsTurbo(t){this.isTurbo=t}setSoundsOn(t){this.soundsOn=t}setIntroSkip(t){this.introSkip=t}setSpaceToSpin(t){this.spaceToSpin=t}setSpaceToSkip(t){this.spaceToSkip=t}}const le=new xo;class Do{anteBets=[{title:"Ante 1",imagePath:"/img_1.png",costMultiplier:50},{title:"Ante 2",imagePath:"/img_1.png",costMultiplier:3},{title:"Ante 3",imagePath:"/img_1.png",costMultiplier:4},{title:"Ante 4",costMultiplier:4}];inReelFeatures=[{title:"ReelFeature 1",costMultiplier:500},{title:"ReelFeature 2",costMultiplier:6},{title:"ReelFeature 3",costMultiplier:7}];bonusFeatures=[{title:"Bonus 1",costMultiplier:50},{title:"Bonus 2",costMultiplier:100},{title:"Bonus 3",costMultiplier:200},{title:"Bonus 4",costMultiplier:500}];activeAnteBet=null;activeBonusFeature=null;activeInReelFeature=null;constructor(){Ce(this)}setAnteBets(t){this.anteBets=t}setActiveAnteBet(t){this.activeAnteBet=t}setActiveBonusFeature(t){this.activeBonusFeature=t}setActiveInReelFeature(t){this.activeInReelFeature=t}setInReelFeatures(t){this.inReelFeatures=t}setBonusFeatures(t){this.bonusFeatures=t}get isActiveBonus(){return!!this.activeBonusFeature}get isActiveInReelFeature(){return!!this.activeInReelFeature}get isActiveAnteBet(){return!!this.activeAnteBet}}const Vt=new Do,To=H(()=>{const{lastWin:e,balance:t,betAmount:r,displayCurrency:n,setNextBetAmount:i,setPrevBetAmount:s}=ce,{setIsTurbo:o,isTurbo:a}=le,{open:u}=J,{activeAnteBet:l,activeBonusFeature:d,activeInReelFeature:h}=Vt,_=y.useMemo(()=>l?.imagePath||h?.imagePath||d?.imagePath,[l,d,h]);return c.jsx("div",{className:"ui-footer",children:c.jsxs("div",{className:"top-row",children:[c.jsxs("div",{className:"left-group",children:[c.jsx(Oo,{imagePath:_,onClick:u.bind(J,ie.buyBonus)}),c.jsxs("div",{className:"balance-info",children:[c.jsx(Ur,{label:"LAST WIN",value:`${e} ${n}`}),c.jsx(Ur,{label:"BALANCE",value:`${t} ${n}`})]})]}),c.jsxs("div",{className:"bet-control",children:[c.jsx(Eo,{activeAnteBet:!!l,value:r,onClick:u.bind(J,ie.bet)}),c.jsxs("div",{className:"bet-box",children:[c.jsx(Fr,{onClick:()=>s.call(ce),className:"bet-btn minus"}),c.jsx(No,{onClick:()=>console.log("Spin"),state:"active"}),c.jsx(Fr,{onClick:()=>i.call(ce),className:"bet-btn plus"})]}),c.jsx(Gr,{className:"quick-spin",onClick:o.bind(le,!a),isActive:a}),c.jsx(Gr,{className:"auto-spin",onClick:u.bind(J,ie.autoplay),isActive:!1})]})]})})}),Co=({onMount:e,onUnmount:t,className:r})=>{const n=y.useRef(null);return y.useEffect(()=>(n.current&&e&&e(n.current),()=>{t?.()}),[e,t]),c.jsx("div",{ref:n,className:r,style:{width:"100%",height:"100%",position:"relative"}})};function Ro(e){const t=y.useRef(null);return y.useEffect(()=>{if(typeof e!="function")return;const r=n=>{const i=t.current;if(!i)return;const s=n.target;s&&(i.contains(s)||e(n))};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[e]),t}const Vo=H(()=>{const{volume:e,setVolume:t}=le,[r,n]=y.useState(!1),i=Ro(()=>n(!1)),s=y.useCallback(()=>{r||n(!0)},[r,n]);return c.jsxs(c.Fragment,{children:[r&&c.jsxs("div",{className:"volume-control",ref:i,children:[c.jsx("input",{type:"range",min:0,max:100,value:e,onChange:o=>t.call(le,Number(o.target.value)),className:"slider","aria-label":"Volume"}),c.jsx("span",{className:"volume-value",children:e})]}),c.jsx("button",{className:`btn-sound ${e===0?"inactive":""}`,"aria-label":"Toggle Sound",onClick:s})]})}),Po=H(()=>{const{open:e}=J;return c.jsxs("div",{className:"settings-section",children:[c.jsx(Vo,{}),c.jsx("button",{className:"btn-settings","aria-label":"Open Settings",onClick:e.bind(J,ie.settings)})]})});class Bo{dialogs=jo;activeDialog=null;constructor(){Ce(this)}add(t){this.dialogs.push(t)}open(t){const r=this.dialogs.find(n=>t===n.name);r?this.activeDialog=r:console.error(`Couldn't find dialog named ${t}`)}close(){this.activeDialog=null}get isOpen(){return this.activeDialog!==null}}const Pt=new Bo,ko=H(()=>{const{betAmount:e,displayCurrency:t,setNextBetAmount:r,setPrevBetAmount:n}=ce;return c.jsxs("div",{className:"overlay-bet-controller",children:[c.jsx("div",{className:"decrease-bet",onClick:n.bind(ce)}),c.jsxs("div",{className:"bet-amount",children:[e," ",t]}),c.jsx("div",{className:"increase-bet",onClick:r.bind(ce)})]})}),Mo=H(({children:e})=>{const t=J.activePopup,r=Pt.activeDialog;if(!t&&!r)return null;const n=s=>{s.target===s.currentTarget&&(J.close(),Pt.close())},i=()=>{J.close(),Pt.close()};return c.jsxs("div",{className:`overlay ${r?"dialog":""}`,onClick:n,role:"presentation",children:[typeof t=="string"&&c.jsx("span",{className:"popup-title",children:t.toUpperCase()}),c.jsx("div",{className:"overlay-content",role:"dialog","aria-modal":"true",children:e}),!r&&c.jsx("div",{className:"overlay-close","aria-label":"Close",onClick:i,children:c.jsx("img",{src:"/assets/icons/popup-close.svg",alt:"Close"})}),t===ie.buyBonus&&c.jsx(ko,{})]})}),qr=({value:e,onClick:t,active:r})=>c.jsx("div",{className:`rectLabel ${r?"current-active":""}`,onClick:()=>t(e),children:c.jsx("span",{children:e})}),Lo=H(()=>{const{betAmountRange:e,setBet:t,betAmount:r}=ce;return c.jsx("div",{className:"bet-popup-container",children:e.map((n,i)=>{const s=r===n;return c.jsx(qr,{value:n,active:s,onClick:t.bind(ce,n)},i)})})});class Io{countRange=[10,25,50,70,100,500,1e3];limitsRange=[10,20,50];count=0;specialFeatureSwitcherOn=!1;lossLimit=null;winLimit=null;constructor(){Ce(this)}setCount(t){this.count=t}setLimitsRange(t){this.limitsRange=t}setCountRange(t){this.countRange=t}setSpecialFeatureSwitcher(t){this.specialFeatureSwitcherOn=t}setLossLimit(t){console.log(t),this.lossLimit=t}setWinLimit(t){console.log(t),this.winLimit=t}start(){}}const it=new Io,Bt=({checked:e,onChange:t})=>c.jsx("button",{className:`ap-toggle ${e?"ap-toggle--on":"ap-toggle--off"}`,"aria-pressed":e,onClick:()=>t(!e),type:"button",children:c.jsx("span",{className:"ap-toggle__knob"})}),hn=({active:e,onClick:t,children:r})=>c.jsx("button",{className:`ap-limit ${e?"ap-limit--active":""}`,onClick:t,type:"button",children:r}),zr=({active:e,onClick:t,children:r})=>c.jsx("button",{className:`ap-tab ${e?"ap-tab--active":""}`,onClick:t,type:"button",children:r}),$o=({value:e,placeholder:t,inputType:r="text",className:n="",autoFocus:i=!0,onSubmit:s,onCancel:o})=>{const[a,u]=y.useState(""),l=y.useRef(null),d=y.useRef(!1);y.useEffect(()=>{u(e??""),d.current=!1},[e]),y.useEffect(()=>{i&&setTimeout(()=>{l.current?.focus(),l.current?.select()},0)},[i]);const h=()=>{d.current||(d.current=!0,s(a.trim()))},_=()=>{h()},m=g=>{g.key==="Enter"?(g.preventDefault(),h(),l.current?.blur()):g.key==="Escape"&&(u(e??""),o?.(),l.current?.blur())};return c.jsx("input",{ref:l,className:`ap-limit ${n}`,type:"number",value:a,placeholder:t,onChange:g=>u(g.target.value),onBlur:_,onKeyDown:m,inputMode:r==="number"?"numeric":void 0,"aria-label":"custom limit input"})},Uo=H(()=>{const{specialFeatureSwitcherOn:e,setSpecialFeatureSwitcher:t,countRange:r,count:n,setCount:i,lossLimit:s,winLimit:o,setLossLimit:a,limitsRange:u,setWinLimit:l}=it,[d,h]=y.useState(0),[_,m]=y.useState(!1),[g,E]=y.useState(""),A=y.useMemo(()=>d?o:s,[d,o,s]),T=y.useMemo(()=>d?l.bind(it):a.bind(it),[d,l,a]);y.useEffect(()=>{const x=A&&!u.includes(A);E(x?A:0)},[A,o]);const Z=!!n&&n>0;return c.jsxs("div",{className:"autoplay-wrap",children:[c.jsx("h3",{className:"ap-title",children:"Number of spins"}),c.jsx("div",{className:"autoplay-count",children:r.map((x,j)=>{const B=n===x;return c.jsx(qr,{value:x,active:B,onClick:i.bind(it,x)},j)})}),c.jsxs("div",{className:"ap-switch-row",children:[c.jsx("div",{className:"ap-switch-label",children:"Stop on special feature WIN"}),c.jsx("div",{className:"ap-switch-control",children:c.jsx(Bt,{checked:e,onChange:x=>t.call(it,x)})})]}),c.jsxs("div",{className:"ap-tabs",children:[c.jsx(zr,{active:!d,onClick:()=>h(0),children:"Loss limit"}),c.jsx(zr,{active:!!d,onClick:()=>h(1),children:"Single WIN limit"})]}),c.jsx("div",{className:"ap-limits-panel",children:c.jsx("div",{className:"ap-limits-inner",children:c.jsxs("div",{className:"ap-limit-grid",children:[u.map((x,j)=>c.jsxs(hn,{active:A===x,onClick:()=>T(x),children:[x,"X BET"]},j)),c.jsx(hn,{active:!A,onClick:()=>T(null),children:"NO LIMIT"}),_?c.jsx($o,{value:""+g,inputType:"number",onSubmit:x=>{const j=x.trim();if(j===""){m(!1);return}const B=Number(j);E(B??0),T(B),m(!1)},onCancel:()=>{m(!1)}}):c.jsx(hn,{onClick:()=>{m(!0)},active:!!A&&A===Number(g),children:g?`${g}X BET`:"CUSTOM"})]})})}),c.jsx("div",{className:"ap-start-row",children:c.jsx("button",{className:`ap-start-btn ${Z?"":"ap-start-btn--disabled"}`,onClick:()=>{},type:"button",disabled:!Z,children:"Start Autoplay"})})]})}),Wr=({onClick:e,label:t,className:r})=>c.jsxs("button",{className:`sp-action ${r}`,type:"button",onClick:e,children:[c.jsx("span",{className:"sp-action__icon","aria-hidden":"true"}),c.jsx("span",{className:"sp-action__label",children:t})]}),st=({onToggle:e,label:t,checked:r=!1})=>c.jsxs("div",{className:"sp-row",children:[c.jsx("div",{className:"sp-switch",children:c.jsx(Bt,{checked:r,onChange:()=>e(!r)})}),c.jsx("div",{className:"sp-label",children:t})]}),Fo=H(()=>{const{introSkip:e,spaceToSkip:t,musicOn:r,soundsOn:n,spaceToSpin:i,setSpaceToSpin:s,setIntroSkip:o,setSpaceToSkip:a,setSoundsOn:u,setMusicOn:l}=le,{open:d}=J;return c.jsxs("div",{className:"sp-wrap",children:[c.jsxs("div",{className:"sp-actions",children:[c.jsx(Wr,{onClick:d.bind(J,ie.history),className:"sp-action--history",label:"History"}),c.jsx(Wr,{onClick:()=>{},className:"sp-action--paytable",label:"Paytable"})]}),c.jsx("h3",{className:"sp-section-title",children:"Audio"}),c.jsxs("div",{className:"sp-rows",children:[c.jsx(st,{onToggle:l.bind(le),checked:r,label:"Music"}),c.jsx(st,{onToggle:u.bind(le),checked:n,label:"Sounds"})]}),c.jsx("h3",{className:"sp-section-title",children:"Game launch"}),c.jsx("div",{className:"sp-rows",children:c.jsx(st,{onToggle:o.bind(le),checked:e,label:"Skip Intro"})}),c.jsx("h3",{className:"sp-section-title",children:"Keyboard"}),c.jsxs("div",{className:"sp-rows",children:[c.jsx(st,{onToggle:s.bind(le),checked:i,label:"Spacebar to Spin"}),c.jsx(st,{onToggle:a.bind(le),checked:t,label:"Spacebar to Skip"})]})]})}),Go=({date:e,currencyCode:t,betAmount:r,winAmount:n})=>{const[i,s]=y.useState(!1);return c.jsxs("div",{className:`history-item ${i?"active":""}`,role:"row",children:[c.jsx("span",{className:"date-section",children:e}),c.jsxs("span",{className:"bet-section",children:[r,c.jsx("span",{className:"currency",children:t})]}),c.jsxs("span",{className:"win-section",children:[n,c.jsxs("span",{className:"currency",children:[" ",t]})]}),c.jsx("div",{className:`vector ${i?"up":"down"}`,"aria-hidden":"true",onClick:()=>s(!i)}),i&&c.jsxs("div",{className:"additional-info",children:[c.jsxs("button",{className:"additional-button replay",children:[c.jsx("div",{className:"replay-icon"}),"REPLAY"]}),c.jsx("button",{className:"additional-button",children:"LINK"})]})]})};class Ko{data=[{date:"26.11.2024 00:16",betAmount:1011,winAmount:20,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:20,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:1,winAmount:2e4,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"},{date:"26.11.2024 00:16",betAmount:10,winAmount:2002,currencyCode:"USD"}];constructor(){Ce(this)}setData(t){this.data=t}}const qo=new Ko,zo=H(()=>{const{data:e}=qo;return c.jsxs("div",{className:"history-wrap",role:"list","aria-label":"History list",children:[c.jsxs("div",{className:"history-item history-item--head",role:"row",children:[c.jsx("span",{className:"date-section",children:"Date"}),c.jsx("span",{className:"bet-section",children:"Bet"}),c.jsx("span",{className:"win-section",children:"Win"})]}),e.map((t,r)=>c.jsx(Go,{date:t.date,betAmount:t.betAmount,winAmount:t.winAmount,currencyCode:t.currencyCode,id:"aa"},r))]})}),Yr=H(({item:e,type:t,onToggle:r,onBuy:n})=>{const{betAmount:i}=ce,{activeAnteBet:s,setActiveAnteBet:o}=Vt,a=e.title.split(`
|
|
68
|
-
`);return c.jsxs("div",{className:"sf-card",role:"group","aria-label":a.join(" "),children:[c.jsx("div",{className:"sf-card__title",children:a.map((u,l)=>c.jsx("span",{children:u},l))}),c.jsxs("div",{className:"sf-card__content",children:[c.jsx("div",{className:"sf-card__image-wrap",children:e.imagePath?c.jsx("img",{src:e.imagePath,alt:a[0]}):c.jsx("div",{className:"sf-card__image-placeholder"})}),e.description&&c.jsx("div",{className:"sf-card__description",children:e.description})]}),c.jsxs("div",{className:`sf-card__bottom ${t}`,children:[c.jsxs("div",{className:"sf-card__price",children:[e.costMultiplier*i," ",ce.displayCurrency]}),t==="ante"?c.jsx("div",{className:"sf-card__toggle",children:c.jsx(Bt,{checked:s===e,onChange:u=>o.call(Vt,u?e:null)})}):c.jsx("button",{className:"sf-buy-btn",type:"button",onClick:()=>n&&n(e.title),children:"BUY"})]})]})}),_n=({features:e,type:t,title:r})=>c.jsxs(c.Fragment,{children:[c.jsx("h2",{className:"sf-section-title",children:r}),c.jsx("div",{className:"sf-grid",children:e.map((n,i)=>c.jsx(Yr,{item:n,type:t,onToggle:()=>{}},i))})]}),Wo=()=>{const e=i=>{console.log("buy",i)},{anteBets:t,inReelFeatures:r,bonusFeatures:n}=Vt;return c.jsxs("div",{className:"sf-wrap",children:[t.length&&c.jsx(_n,{features:t,type:vn.ante,title:"Ante Bets"},0),r.length&&c.jsx(_n,{features:r,type:vn.buy,title:"Reel Features"},1),n.length&&c.jsx(_n,{features:n,type:vn.buy,title:"Bonus"},2),c.jsx("h2",{className:"sf-section-title",children:"Bonus"}),c.jsx("div",{className:"sf-grid sf-grid--three",children:n.map((i,s)=>c.jsx(Yr,{item:i,type:"buy",onBuy:e},s))})]})},Yo=H(()=>{const{activePopup:e}=J;if(!e)return null;const t=y.useMemo(()=>{switch(e){case ie.bet:return Lo;case ie.autoplay:return Uo;case ie.settings:return Fo;case ie.history:return zo;case ie.buyBonus:return Wo;default:return null}},[e]);return t?c.jsx(t,{}):null}),Xo=({configs:e,text:t,onClick:r})=>c.jsx("button",{type:"button",className:"additional-btn",style:{"--btn-bg":e?.background??"transparent","--btn-color":e?.color??"inherit"},onClick:typeof r=="function"?r:void 0,children:t}),Ho=H(()=>{const{activeDialog:e}=Pt;return e?c.jsxs("div",{className:"dialogs-wrap","aria-live":"polite",children:[c.jsx("span",{className:"title",children:e?.title}),e?.imagePath&&c.jsx("img",{className:"dialog-image",src:e.imagePath,alt:e.title??"dialog image"}),c.jsx("span",{className:"message",children:e?.message}),e.toggle&&c.jsx(Bt,{checked:e.toggle.value,onChange:()=>e.toggle?.onClick()}),c.jsx("div",{className:"additional-btns",children:e?.buttons?.map((t,r)=>c.jsx(Xo,{configs:t.configs,text:t.text,onClick:t.onClick},r))})]}):null});function Jo(){return c.jsxs("div",{className:"app",children:[c.jsxs("div",{className:"game-container",children:[c.jsx(Co,{}),c.jsx(Po,{}),c.jsx(To,{})]}),c.jsxs(Mo,{children:[c.jsx(Yo,{}),c.jsx(Ho,{})]})]})}return Jo}));
|