@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.es.js
DELETED
|
@@ -1,4077 +0,0 @@
|
|
|
1
|
-
import ge, { useState as Dt, forwardRef as nn, memo as rn, useMemo as _t, useRef as bt, useEffect as He, useCallback as fi } from "react";
|
|
2
|
-
import { unstable_batchedUpdates as di } from "react-dom";
|
|
3
|
-
var at = { exports: {} }, Ke = {};
|
|
4
|
-
/**
|
|
5
|
-
* @license React
|
|
6
|
-
* react-jsx-runtime.production.js
|
|
7
|
-
*
|
|
8
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
9
|
-
*
|
|
10
|
-
* This source code is licensed under the MIT license found in the
|
|
11
|
-
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/
|
|
13
|
-
var Pn;
|
|
14
|
-
function pi() {
|
|
15
|
-
if (Pn) return Ke;
|
|
16
|
-
Pn = 1;
|
|
17
|
-
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
18
|
-
function r(n, i, s) {
|
|
19
|
-
var o = null;
|
|
20
|
-
if (s !== void 0 && (o = "" + s), i.key !== void 0 && (o = "" + i.key), "key" in i) {
|
|
21
|
-
s = {};
|
|
22
|
-
for (var a in i)
|
|
23
|
-
a !== "key" && (s[a] = i[a]);
|
|
24
|
-
} else s = i;
|
|
25
|
-
return i = s.ref, {
|
|
26
|
-
$$typeof: e,
|
|
27
|
-
type: n,
|
|
28
|
-
key: o,
|
|
29
|
-
ref: i !== void 0 ? i : null,
|
|
30
|
-
props: s
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
return Ke.Fragment = t, Ke.jsx = r, Ke.jsxs = r, Ke;
|
|
34
|
-
}
|
|
35
|
-
var qe = {};
|
|
36
|
-
/**
|
|
37
|
-
* @license React
|
|
38
|
-
* react-jsx-runtime.development.js
|
|
39
|
-
*
|
|
40
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
41
|
-
*
|
|
42
|
-
* This source code is licensed under the MIT license found in the
|
|
43
|
-
* LICENSE file in the root directory of this source tree.
|
|
44
|
-
*/
|
|
45
|
-
var Bn;
|
|
46
|
-
function vi() {
|
|
47
|
-
return Bn || (Bn = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
48
|
-
function e(p) {
|
|
49
|
-
if (p == null) return null;
|
|
50
|
-
if (typeof p == "function")
|
|
51
|
-
return p.$$typeof === ui ? null : p.displayName || p.name || null;
|
|
52
|
-
if (typeof p == "string") return p;
|
|
53
|
-
switch (p) {
|
|
54
|
-
case O:
|
|
55
|
-
return "Fragment";
|
|
56
|
-
case x:
|
|
57
|
-
return "Profiler";
|
|
58
|
-
case N:
|
|
59
|
-
return "StrictMode";
|
|
60
|
-
case P:
|
|
61
|
-
return "Suspense";
|
|
62
|
-
case fe:
|
|
63
|
-
return "SuspenseList";
|
|
64
|
-
case ai:
|
|
65
|
-
return "Activity";
|
|
66
|
-
}
|
|
67
|
-
if (typeof p == "object")
|
|
68
|
-
switch (typeof p.tag == "number" && console.error(
|
|
69
|
-
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
70
|
-
), p.$$typeof) {
|
|
71
|
-
case g:
|
|
72
|
-
return "Portal";
|
|
73
|
-
case j:
|
|
74
|
-
return (p.displayName || "Context") + ".Provider";
|
|
75
|
-
case F:
|
|
76
|
-
return (p._context.displayName || "Context") + ".Consumer";
|
|
77
|
-
case w:
|
|
78
|
-
var y = p.render;
|
|
79
|
-
return p = p.displayName, p || (p = y.displayName || y.name || "", p = p !== "" ? "ForwardRef(" + p + ")" : "ForwardRef"), p;
|
|
80
|
-
case ot:
|
|
81
|
-
return y = p.displayName || null, y !== null ? y : e(p.type) || "Memo";
|
|
82
|
-
case jn:
|
|
83
|
-
y = p._payload, p = p._init;
|
|
84
|
-
try {
|
|
85
|
-
return e(p(y));
|
|
86
|
-
} catch {
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
91
|
-
function t(p) {
|
|
92
|
-
return "" + p;
|
|
93
|
-
}
|
|
94
|
-
function r(p) {
|
|
95
|
-
try {
|
|
96
|
-
t(p);
|
|
97
|
-
var y = !1;
|
|
98
|
-
} catch {
|
|
99
|
-
y = !0;
|
|
100
|
-
}
|
|
101
|
-
if (y) {
|
|
102
|
-
y = console;
|
|
103
|
-
var S = y.error, V = typeof Symbol == "function" && Symbol.toStringTag && p[Symbol.toStringTag] || p.constructor.name || "Object";
|
|
104
|
-
return S.call(
|
|
105
|
-
y,
|
|
106
|
-
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
107
|
-
V
|
|
108
|
-
), t(p);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
function n(p) {
|
|
112
|
-
if (p === O) return "<>";
|
|
113
|
-
if (typeof p == "object" && p !== null && p.$$typeof === jn)
|
|
114
|
-
return "<...>";
|
|
115
|
-
try {
|
|
116
|
-
var y = e(p);
|
|
117
|
-
return y ? "<" + y + ">" : "<...>";
|
|
118
|
-
} catch {
|
|
119
|
-
return "<...>";
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
function i() {
|
|
123
|
-
var p = $t.A;
|
|
124
|
-
return p === null ? null : p.getOwner();
|
|
125
|
-
}
|
|
126
|
-
function s() {
|
|
127
|
-
return Error("react-stack-top-frame");
|
|
128
|
-
}
|
|
129
|
-
function o(p) {
|
|
130
|
-
if (xn.call(p, "key")) {
|
|
131
|
-
var y = Object.getOwnPropertyDescriptor(p, "key").get;
|
|
132
|
-
if (y && y.isReactWarning) return !1;
|
|
133
|
-
}
|
|
134
|
-
return p.key !== void 0;
|
|
135
|
-
}
|
|
136
|
-
function a(p, y) {
|
|
137
|
-
function S() {
|
|
138
|
-
Dn || (Dn = !0, console.error(
|
|
139
|
-
"%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)",
|
|
140
|
-
y
|
|
141
|
-
));
|
|
142
|
-
}
|
|
143
|
-
S.isReactWarning = !0, Object.defineProperty(p, "key", {
|
|
144
|
-
get: S,
|
|
145
|
-
configurable: !0
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
function u() {
|
|
149
|
-
var p = e(this.type);
|
|
150
|
-
return Rn[p] || (Rn[p] = !0, console.error(
|
|
151
|
-
"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."
|
|
152
|
-
)), p = this.props.ref, p !== void 0 ? p : null;
|
|
153
|
-
}
|
|
154
|
-
function l(p, y, S, V, be, ie, Ft, Gt) {
|
|
155
|
-
return S = ie.ref, p = {
|
|
156
|
-
$$typeof: b,
|
|
157
|
-
type: p,
|
|
158
|
-
key: y,
|
|
159
|
-
props: ie,
|
|
160
|
-
_owner: be
|
|
161
|
-
}, (S !== void 0 ? S : null) !== null ? Object.defineProperty(p, "ref", {
|
|
162
|
-
enumerable: !1,
|
|
163
|
-
get: u
|
|
164
|
-
}) : Object.defineProperty(p, "ref", { enumerable: !1, value: null }), p._store = {}, Object.defineProperty(p._store, "validated", {
|
|
165
|
-
configurable: !1,
|
|
166
|
-
enumerable: !1,
|
|
167
|
-
writable: !0,
|
|
168
|
-
value: 0
|
|
169
|
-
}), Object.defineProperty(p, "_debugInfo", {
|
|
170
|
-
configurable: !1,
|
|
171
|
-
enumerable: !1,
|
|
172
|
-
writable: !0,
|
|
173
|
-
value: null
|
|
174
|
-
}), Object.defineProperty(p, "_debugStack", {
|
|
175
|
-
configurable: !1,
|
|
176
|
-
enumerable: !1,
|
|
177
|
-
writable: !0,
|
|
178
|
-
value: Ft
|
|
179
|
-
}), Object.defineProperty(p, "_debugTask", {
|
|
180
|
-
configurable: !1,
|
|
181
|
-
enumerable: !1,
|
|
182
|
-
writable: !0,
|
|
183
|
-
value: Gt
|
|
184
|
-
}), Object.freeze && (Object.freeze(p.props), Object.freeze(p)), p;
|
|
185
|
-
}
|
|
186
|
-
function d(p, y, S, V, be, ie, Ft, Gt) {
|
|
187
|
-
var C = y.children;
|
|
188
|
-
if (C !== void 0)
|
|
189
|
-
if (V)
|
|
190
|
-
if (ci(C)) {
|
|
191
|
-
for (V = 0; V < C.length; V++)
|
|
192
|
-
h(C[V]);
|
|
193
|
-
Object.freeze && Object.freeze(C);
|
|
194
|
-
} else
|
|
195
|
-
console.error(
|
|
196
|
-
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
197
|
-
);
|
|
198
|
-
else h(C);
|
|
199
|
-
if (xn.call(y, "key")) {
|
|
200
|
-
C = e(p);
|
|
201
|
-
var Ce = Object.keys(y).filter(function(li) {
|
|
202
|
-
return li !== "key";
|
|
203
|
-
});
|
|
204
|
-
V = 0 < Ce.length ? "{key: someKey, " + Ce.join(": ..., ") + ": ...}" : "{key: someKey}", Cn[C + V] || (Ce = 0 < Ce.length ? "{" + Ce.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
205
|
-
`A props object containing a "key" prop is being spread into JSX:
|
|
206
|
-
let props = %s;
|
|
207
|
-
<%s {...props} />
|
|
208
|
-
React keys must be passed directly to JSX without using spread:
|
|
209
|
-
let props = %s;
|
|
210
|
-
<%s key={someKey} {...props} />`,
|
|
211
|
-
V,
|
|
212
|
-
C,
|
|
213
|
-
Ce,
|
|
214
|
-
C
|
|
215
|
-
), Cn[C + V] = !0);
|
|
216
|
-
}
|
|
217
|
-
if (C = null, S !== void 0 && (r(S), C = "" + S), o(y) && (r(y.key), C = "" + y.key), "key" in y) {
|
|
218
|
-
S = {};
|
|
219
|
-
for (var Kt in y)
|
|
220
|
-
Kt !== "key" && (S[Kt] = y[Kt]);
|
|
221
|
-
} else S = y;
|
|
222
|
-
return C && a(
|
|
223
|
-
S,
|
|
224
|
-
typeof p == "function" ? p.displayName || p.name || "Unknown" : p
|
|
225
|
-
), l(
|
|
226
|
-
p,
|
|
227
|
-
C,
|
|
228
|
-
ie,
|
|
229
|
-
be,
|
|
230
|
-
i(),
|
|
231
|
-
S,
|
|
232
|
-
Ft,
|
|
233
|
-
Gt
|
|
234
|
-
);
|
|
235
|
-
}
|
|
236
|
-
function h(p) {
|
|
237
|
-
typeof p == "object" && p !== null && p.$$typeof === b && p._store && (p._store.validated = 1);
|
|
238
|
-
}
|
|
239
|
-
var _ = ge, b = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), O = Symbol.for("react.fragment"), N = Symbol.for("react.strict_mode"), x = Symbol.for("react.profiler"), F = Symbol.for("react.consumer"), j = Symbol.for("react.context"), w = Symbol.for("react.forward_ref"), P = Symbol.for("react.suspense"), fe = Symbol.for("react.suspense_list"), ot = Symbol.for("react.memo"), jn = Symbol.for("react.lazy"), ai = Symbol.for("react.activity"), ui = Symbol.for("react.client.reference"), $t = _.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, xn = Object.prototype.hasOwnProperty, ci = Array.isArray, Ut = console.createTask ? console.createTask : function() {
|
|
240
|
-
return null;
|
|
241
|
-
};
|
|
242
|
-
_ = {
|
|
243
|
-
react_stack_bottom_frame: function(p) {
|
|
244
|
-
return p();
|
|
245
|
-
}
|
|
246
|
-
};
|
|
247
|
-
var Dn, Rn = {}, Tn = _.react_stack_bottom_frame.bind(
|
|
248
|
-
_,
|
|
249
|
-
s
|
|
250
|
-
)(), Vn = Ut(n(s)), Cn = {};
|
|
251
|
-
qe.Fragment = O, qe.jsx = function(p, y, S, V, be) {
|
|
252
|
-
var ie = 1e4 > $t.recentlyCreatedOwnerStacks++;
|
|
253
|
-
return d(
|
|
254
|
-
p,
|
|
255
|
-
y,
|
|
256
|
-
S,
|
|
257
|
-
!1,
|
|
258
|
-
V,
|
|
259
|
-
be,
|
|
260
|
-
ie ? Error("react-stack-top-frame") : Tn,
|
|
261
|
-
ie ? Ut(n(p)) : Vn
|
|
262
|
-
);
|
|
263
|
-
}, qe.jsxs = function(p, y, S, V, be) {
|
|
264
|
-
var ie = 1e4 > $t.recentlyCreatedOwnerStacks++;
|
|
265
|
-
return d(
|
|
266
|
-
p,
|
|
267
|
-
y,
|
|
268
|
-
S,
|
|
269
|
-
!0,
|
|
270
|
-
V,
|
|
271
|
-
be,
|
|
272
|
-
ie ? Error("react-stack-top-frame") : Tn,
|
|
273
|
-
ie ? Ut(n(p)) : Vn
|
|
274
|
-
);
|
|
275
|
-
};
|
|
276
|
-
})()), qe;
|
|
277
|
-
}
|
|
278
|
-
var kn;
|
|
279
|
-
function hi() {
|
|
280
|
-
return kn || (kn = 1, process.env.NODE_ENV === "production" ? at.exports = pi() : at.exports = vi()), at.exports;
|
|
281
|
-
}
|
|
282
|
-
var c = hi(), _i = {
|
|
283
|
-
0: "Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'",
|
|
284
|
-
1: function(t, r) {
|
|
285
|
-
return "Cannot apply '" + t + "' to '" + r.toString() + "': Field not found.";
|
|
286
|
-
},
|
|
287
|
-
/*
|
|
288
|
-
2(prop) {
|
|
289
|
-
return `invalid decorator for '${prop.toString()}'`
|
|
290
|
-
},
|
|
291
|
-
3(prop) {
|
|
292
|
-
return `Cannot decorate '${prop.toString()}': action can only be used on properties with a function value.`
|
|
293
|
-
},
|
|
294
|
-
4(prop) {
|
|
295
|
-
return `Cannot decorate '${prop.toString()}': computed can only be used on getter properties.`
|
|
296
|
-
},
|
|
297
|
-
*/
|
|
298
|
-
5: "'keys()' can only be used on observable objects, arrays, sets and maps",
|
|
299
|
-
6: "'values()' can only be used on observable objects, arrays, sets and maps",
|
|
300
|
-
7: "'entries()' can only be used on observable objects, arrays and maps",
|
|
301
|
-
8: "'set()' can only be used on observable objects, arrays and maps",
|
|
302
|
-
9: "'remove()' can only be used on observable objects, arrays and maps",
|
|
303
|
-
10: "'has()' can only be used on observable objects, arrays and maps",
|
|
304
|
-
11: "'get()' can only be used on observable objects, arrays and maps",
|
|
305
|
-
12: "Invalid annotation",
|
|
306
|
-
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)",
|
|
307
|
-
14: "Intercept handlers should return nothing or a change object",
|
|
308
|
-
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)",
|
|
309
|
-
16: "Modification exception: the internal structure of an observable array was changed.",
|
|
310
|
-
17: function(t, r) {
|
|
311
|
-
return "[mobx.array] Index out of bounds, " + t + " is larger than " + r;
|
|
312
|
-
},
|
|
313
|
-
18: "mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js",
|
|
314
|
-
19: function(t) {
|
|
315
|
-
return "Cannot initialize from classes that inherit from Map: " + t.constructor.name;
|
|
316
|
-
},
|
|
317
|
-
20: function(t) {
|
|
318
|
-
return "Cannot initialize map from " + t;
|
|
319
|
-
},
|
|
320
|
-
21: function(t) {
|
|
321
|
-
return "Cannot convert to map from '" + t + "'";
|
|
322
|
-
},
|
|
323
|
-
22: "mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js",
|
|
324
|
-
23: "It is not possible to get index atoms from arrays",
|
|
325
|
-
24: function(t) {
|
|
326
|
-
return "Cannot obtain administration from " + t;
|
|
327
|
-
},
|
|
328
|
-
25: function(t, r) {
|
|
329
|
-
return "the entry '" + t + "' does not exist in the observable map '" + r + "'";
|
|
330
|
-
},
|
|
331
|
-
26: "please specify a property",
|
|
332
|
-
27: function(t, r) {
|
|
333
|
-
return "no observable property '" + t.toString() + "' found on the observable object '" + r + "'";
|
|
334
|
-
},
|
|
335
|
-
28: function(t) {
|
|
336
|
-
return "Cannot obtain atom from " + t;
|
|
337
|
-
},
|
|
338
|
-
29: "Expecting some object",
|
|
339
|
-
30: "invalid action stack. did you forget to finish an action?",
|
|
340
|
-
31: "missing option for computed: get",
|
|
341
|
-
32: function(t, r) {
|
|
342
|
-
return "Cycle detected in computation " + t + ": " + r;
|
|
343
|
-
},
|
|
344
|
-
33: function(t) {
|
|
345
|
-
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?";
|
|
346
|
-
},
|
|
347
|
-
34: function(t) {
|
|
348
|
-
return "[ComputedValue '" + t + "'] It is not possible to assign a new value to a computed value.";
|
|
349
|
-
},
|
|
350
|
-
35: "There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`",
|
|
351
|
-
36: "isolateGlobalState should be called before MobX is running any reactions",
|
|
352
|
-
37: function(t) {
|
|
353
|
-
return "[mobx] `observableArray." + t + "()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice()." + t + "()` instead";
|
|
354
|
-
},
|
|
355
|
-
38: "'ownKeys()' can only be used on observable objects",
|
|
356
|
-
39: "'defineProperty()' can only be used on observable objects"
|
|
357
|
-
}, bi = process.env.NODE_ENV !== "production" ? _i : {};
|
|
358
|
-
function v(e) {
|
|
359
|
-
for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
|
|
360
|
-
r[n - 1] = arguments[n];
|
|
361
|
-
if (process.env.NODE_ENV !== "production") {
|
|
362
|
-
var i = typeof e == "string" ? e : bi[e];
|
|
363
|
-
throw typeof i == "function" && (i = i.apply(null, r)), new Error("[MobX] " + i);
|
|
364
|
-
}
|
|
365
|
-
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);
|
|
366
|
-
}
|
|
367
|
-
var mi = {};
|
|
368
|
-
function Rt() {
|
|
369
|
-
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : mi;
|
|
370
|
-
}
|
|
371
|
-
var pr = Object.assign, mt = Object.getOwnPropertyDescriptor, ue = Object.defineProperty, Tt = Object.prototype, gt = [];
|
|
372
|
-
Object.freeze(gt);
|
|
373
|
-
var vr = {};
|
|
374
|
-
Object.freeze(vr);
|
|
375
|
-
var gi = typeof Proxy < "u", yi = /* @__PURE__ */ Object.toString();
|
|
376
|
-
function hr() {
|
|
377
|
-
gi || 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");
|
|
378
|
-
}
|
|
379
|
-
function ze(e) {
|
|
380
|
-
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);
|
|
381
|
-
}
|
|
382
|
-
function ne() {
|
|
383
|
-
return ++f.mobxGuid;
|
|
384
|
-
}
|
|
385
|
-
function bn(e) {
|
|
386
|
-
var t = !1;
|
|
387
|
-
return function() {
|
|
388
|
-
if (!t)
|
|
389
|
-
return t = !0, e.apply(this, arguments);
|
|
390
|
-
};
|
|
391
|
-
}
|
|
392
|
-
var Pe = function() {
|
|
393
|
-
};
|
|
394
|
-
function D(e) {
|
|
395
|
-
return typeof e == "function";
|
|
396
|
-
}
|
|
397
|
-
function Se(e) {
|
|
398
|
-
var t = typeof e;
|
|
399
|
-
switch (t) {
|
|
400
|
-
case "string":
|
|
401
|
-
case "symbol":
|
|
402
|
-
case "number":
|
|
403
|
-
return !0;
|
|
404
|
-
}
|
|
405
|
-
return !1;
|
|
406
|
-
}
|
|
407
|
-
function Vt(e) {
|
|
408
|
-
return e !== null && typeof e == "object";
|
|
409
|
-
}
|
|
410
|
-
function L(e) {
|
|
411
|
-
if (!Vt(e))
|
|
412
|
-
return !1;
|
|
413
|
-
var t = Object.getPrototypeOf(e);
|
|
414
|
-
if (t == null)
|
|
415
|
-
return !0;
|
|
416
|
-
var r = Object.hasOwnProperty.call(t, "constructor") && t.constructor;
|
|
417
|
-
return typeof r == "function" && r.toString() === yi;
|
|
418
|
-
}
|
|
419
|
-
function _r(e) {
|
|
420
|
-
var t = e?.constructor;
|
|
421
|
-
return t ? t.name === "GeneratorFunction" || t.displayName === "GeneratorFunction" : !1;
|
|
422
|
-
}
|
|
423
|
-
function et(e, t, r) {
|
|
424
|
-
ue(e, t, {
|
|
425
|
-
enumerable: !1,
|
|
426
|
-
writable: !0,
|
|
427
|
-
configurable: !0,
|
|
428
|
-
value: r
|
|
429
|
-
});
|
|
430
|
-
}
|
|
431
|
-
function br(e, t, r) {
|
|
432
|
-
ue(e, t, {
|
|
433
|
-
enumerable: !1,
|
|
434
|
-
writable: !1,
|
|
435
|
-
configurable: !0,
|
|
436
|
-
value: r
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
|
-
function De(e, t) {
|
|
440
|
-
var r = "isMobX" + e;
|
|
441
|
-
return t.prototype[r] = !0, function(n) {
|
|
442
|
-
return Vt(n) && n[r] === !0;
|
|
443
|
-
};
|
|
444
|
-
}
|
|
445
|
-
function Ue(e) {
|
|
446
|
-
return e != null && Object.prototype.toString.call(e) === "[object Map]";
|
|
447
|
-
}
|
|
448
|
-
function Oi(e) {
|
|
449
|
-
var t = Object.getPrototypeOf(e), r = Object.getPrototypeOf(t), n = Object.getPrototypeOf(r);
|
|
450
|
-
return n === null;
|
|
451
|
-
}
|
|
452
|
-
function de(e) {
|
|
453
|
-
return e != null && Object.prototype.toString.call(e) === "[object Set]";
|
|
454
|
-
}
|
|
455
|
-
var mr = typeof Object.getOwnPropertySymbols < "u";
|
|
456
|
-
function Ei(e) {
|
|
457
|
-
var t = Object.keys(e);
|
|
458
|
-
if (!mr)
|
|
459
|
-
return t;
|
|
460
|
-
var r = Object.getOwnPropertySymbols(e);
|
|
461
|
-
return r.length ? [].concat(t, r.filter(function(n) {
|
|
462
|
-
return Tt.propertyIsEnumerable.call(e, n);
|
|
463
|
-
})) : t;
|
|
464
|
-
}
|
|
465
|
-
var Me = typeof Reflect < "u" && Reflect.ownKeys ? Reflect.ownKeys : mr ? function(e) {
|
|
466
|
-
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
|
|
467
|
-
} : (
|
|
468
|
-
/* istanbul ignore next */
|
|
469
|
-
Object.getOwnPropertyNames
|
|
470
|
-
);
|
|
471
|
-
function sn(e) {
|
|
472
|
-
return typeof e == "string" ? e : typeof e == "symbol" ? e.toString() : new String(e).toString();
|
|
473
|
-
}
|
|
474
|
-
function gr(e) {
|
|
475
|
-
return e === null ? null : typeof e == "object" ? "" + e : e;
|
|
476
|
-
}
|
|
477
|
-
function Y(e, t) {
|
|
478
|
-
return Tt.hasOwnProperty.call(e, t);
|
|
479
|
-
}
|
|
480
|
-
var Ni = Object.getOwnPropertyDescriptors || function(t) {
|
|
481
|
-
var r = {};
|
|
482
|
-
return Me(t).forEach(function(n) {
|
|
483
|
-
r[n] = mt(t, n);
|
|
484
|
-
}), r;
|
|
485
|
-
};
|
|
486
|
-
function k(e, t) {
|
|
487
|
-
return !!(e & t);
|
|
488
|
-
}
|
|
489
|
-
function M(e, t, r) {
|
|
490
|
-
return r ? e |= t : e &= ~t, e;
|
|
491
|
-
}
|
|
492
|
-
function Mn(e, t) {
|
|
493
|
-
(t == null || t > e.length) && (t = e.length);
|
|
494
|
-
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
495
|
-
return n;
|
|
496
|
-
}
|
|
497
|
-
function Ai(e, t) {
|
|
498
|
-
for (var r = 0; r < t.length; r++) {
|
|
499
|
-
var n = t[r];
|
|
500
|
-
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, wi(n.key), n);
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
function Fe(e, t, r) {
|
|
504
|
-
return t && Ai(e.prototype, t), Object.defineProperty(e, "prototype", {
|
|
505
|
-
writable: !1
|
|
506
|
-
}), e;
|
|
507
|
-
}
|
|
508
|
-
function Be(e, t) {
|
|
509
|
-
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
510
|
-
if (r) return (r = r.call(e)).next.bind(r);
|
|
511
|
-
if (Array.isArray(e) || (r = ji(e)) || t) {
|
|
512
|
-
r && (e = r);
|
|
513
|
-
var n = 0;
|
|
514
|
-
return function() {
|
|
515
|
-
return n >= e.length ? {
|
|
516
|
-
done: !0
|
|
517
|
-
} : {
|
|
518
|
-
done: !1,
|
|
519
|
-
value: e[n++]
|
|
520
|
-
};
|
|
521
|
-
};
|
|
522
|
-
}
|
|
523
|
-
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
524
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
525
|
-
}
|
|
526
|
-
function he() {
|
|
527
|
-
return he = Object.assign ? Object.assign.bind() : function(e) {
|
|
528
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
529
|
-
var r = arguments[t];
|
|
530
|
-
for (var n in r) ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
531
|
-
}
|
|
532
|
-
return e;
|
|
533
|
-
}, he.apply(null, arguments);
|
|
534
|
-
}
|
|
535
|
-
function yr(e, t) {
|
|
536
|
-
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, on(e, t);
|
|
537
|
-
}
|
|
538
|
-
function on(e, t) {
|
|
539
|
-
return on = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, n) {
|
|
540
|
-
return r.__proto__ = n, r;
|
|
541
|
-
}, on(e, t);
|
|
542
|
-
}
|
|
543
|
-
function Si(e, t) {
|
|
544
|
-
if (typeof e != "object" || !e) return e;
|
|
545
|
-
var r = e[Symbol.toPrimitive];
|
|
546
|
-
if (r !== void 0) {
|
|
547
|
-
var n = r.call(e, t);
|
|
548
|
-
if (typeof n != "object") return n;
|
|
549
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
550
|
-
}
|
|
551
|
-
return String(e);
|
|
552
|
-
}
|
|
553
|
-
function wi(e) {
|
|
554
|
-
var t = Si(e, "string");
|
|
555
|
-
return typeof t == "symbol" ? t : t + "";
|
|
556
|
-
}
|
|
557
|
-
function ji(e, t) {
|
|
558
|
-
if (e) {
|
|
559
|
-
if (typeof e == "string") return Mn(e, t);
|
|
560
|
-
var r = {}.toString.call(e).slice(8, -1);
|
|
561
|
-
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) ? Mn(e, t) : void 0;
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
var B = /* @__PURE__ */ Symbol("mobx-stored-annotations");
|
|
565
|
-
function ce(e) {
|
|
566
|
-
function t(r, n) {
|
|
567
|
-
if (nt(n))
|
|
568
|
-
return e.decorate_20223_(r, n);
|
|
569
|
-
tt(r, n, e);
|
|
570
|
-
}
|
|
571
|
-
return Object.assign(t, e);
|
|
572
|
-
}
|
|
573
|
-
function tt(e, t, r) {
|
|
574
|
-
if (Y(e, B) || et(e, B, he({}, e[B])), process.env.NODE_ENV !== "production" && Ot(r) && !Y(e[B], t)) {
|
|
575
|
-
var n = e.constructor.name + ".prototype." + t.toString();
|
|
576
|
-
v("'" + n + "' is decorated with 'override', but no such decorated member was found on prototype.");
|
|
577
|
-
}
|
|
578
|
-
xi(e, r, t), Ot(r) || (e[B][t] = r);
|
|
579
|
-
}
|
|
580
|
-
function xi(e, t, r) {
|
|
581
|
-
if (process.env.NODE_ENV !== "production" && !Ot(t) && Y(e[B], r)) {
|
|
582
|
-
var n = e.constructor.name + ".prototype." + r.toString(), i = e[B][r].annotationType_, s = t.annotationType_;
|
|
583
|
-
v("Cannot apply '@" + s + "' to '" + n + "':" + (`
|
|
584
|
-
The field is already decorated with '@` + i + "'.") + `
|
|
585
|
-
Re-decorating fields is not allowed.
|
|
586
|
-
Use '@override' decorator for methods overridden by subclass.`);
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
function Di(e) {
|
|
590
|
-
return Y(e, B) || et(e, B, he({}, e[B])), e[B];
|
|
591
|
-
}
|
|
592
|
-
function nt(e) {
|
|
593
|
-
return typeof e == "object" && typeof e.kind == "string";
|
|
594
|
-
}
|
|
595
|
-
function Ct(e, t) {
|
|
596
|
-
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");
|
|
597
|
-
}
|
|
598
|
-
var m = /* @__PURE__ */ Symbol("mobx administration"), ye = /* @__PURE__ */ (function() {
|
|
599
|
-
function e(r) {
|
|
600
|
-
r === void 0 && (r = process.env.NODE_ENV !== "production" ? "Atom@" + ne() : "Atom"), this.name_ = void 0, this.flags_ = 0, this.observers_ = /* @__PURE__ */ new Set(), this.lastAccessedBy_ = 0, this.lowestObserverState_ = E.NOT_TRACKING_, this.onBOL = void 0, this.onBUOL = void 0, this.name_ = r;
|
|
601
|
-
}
|
|
602
|
-
var t = e.prototype;
|
|
603
|
-
return t.onBO = function() {
|
|
604
|
-
this.onBOL && this.onBOL.forEach(function(n) {
|
|
605
|
-
return n();
|
|
606
|
-
});
|
|
607
|
-
}, t.onBUO = function() {
|
|
608
|
-
this.onBUOL && this.onBUOL.forEach(function(n) {
|
|
609
|
-
return n();
|
|
610
|
-
});
|
|
611
|
-
}, t.reportObserved = function() {
|
|
612
|
-
return kr(this);
|
|
613
|
-
}, t.reportChanged = function() {
|
|
614
|
-
q(), Mr(this), z();
|
|
615
|
-
}, t.toString = function() {
|
|
616
|
-
return this.name_;
|
|
617
|
-
}, Fe(e, [{
|
|
618
|
-
key: "isBeingObserved",
|
|
619
|
-
get: function() {
|
|
620
|
-
return k(this.flags_, e.isBeingObservedMask_);
|
|
621
|
-
},
|
|
622
|
-
set: function(n) {
|
|
623
|
-
this.flags_ = M(this.flags_, e.isBeingObservedMask_, n);
|
|
624
|
-
}
|
|
625
|
-
}, {
|
|
626
|
-
key: "isPendingUnobservation",
|
|
627
|
-
get: function() {
|
|
628
|
-
return k(this.flags_, e.isPendingUnobservationMask_);
|
|
629
|
-
},
|
|
630
|
-
set: function(n) {
|
|
631
|
-
this.flags_ = M(this.flags_, e.isPendingUnobservationMask_, n);
|
|
632
|
-
}
|
|
633
|
-
}, {
|
|
634
|
-
key: "diffValue",
|
|
635
|
-
get: function() {
|
|
636
|
-
return k(this.flags_, e.diffValueMask_) ? 1 : 0;
|
|
637
|
-
},
|
|
638
|
-
set: function(n) {
|
|
639
|
-
this.flags_ = M(this.flags_, e.diffValueMask_, n === 1);
|
|
640
|
-
}
|
|
641
|
-
}]);
|
|
642
|
-
})();
|
|
643
|
-
ye.isBeingObservedMask_ = 1;
|
|
644
|
-
ye.isPendingUnobservationMask_ = 2;
|
|
645
|
-
ye.diffValueMask_ = 4;
|
|
646
|
-
var mn = /* @__PURE__ */ De("Atom", ye);
|
|
647
|
-
function Or(e, t, r) {
|
|
648
|
-
t === void 0 && (t = Pe), r === void 0 && (r = Pe);
|
|
649
|
-
var n = new ye(e);
|
|
650
|
-
return t !== Pe && Us(n, t), r !== Pe && Gr(n, r), n;
|
|
651
|
-
}
|
|
652
|
-
function Ri(e, t) {
|
|
653
|
-
return ni(e, t);
|
|
654
|
-
}
|
|
655
|
-
function Ti(e, t) {
|
|
656
|
-
return Object.is ? Object.is(e, t) : e === t ? e !== 0 || 1 / e === 1 / t : e !== e && t !== t;
|
|
657
|
-
}
|
|
658
|
-
var yt = {
|
|
659
|
-
structural: Ri,
|
|
660
|
-
default: Ti
|
|
661
|
-
};
|
|
662
|
-
function we(e, t, r) {
|
|
663
|
-
return Qe(e) ? e : Array.isArray(e) ? R.array(e, {
|
|
664
|
-
name: r
|
|
665
|
-
}) : L(e) ? R.object(e, void 0, {
|
|
666
|
-
name: r
|
|
667
|
-
}) : Ue(e) ? R.map(e, {
|
|
668
|
-
name: r
|
|
669
|
-
}) : de(e) ? R.set(e, {
|
|
670
|
-
name: r
|
|
671
|
-
}) : typeof e == "function" && !Le(e) && !Ze(e) ? _r(e) ? Ie(e) : Je(r, e) : e;
|
|
672
|
-
}
|
|
673
|
-
function Vi(e, t, r) {
|
|
674
|
-
if (e == null || Ge(e) || Lt(e) || Oe(e) || oe(e))
|
|
675
|
-
return e;
|
|
676
|
-
if (Array.isArray(e))
|
|
677
|
-
return R.array(e, {
|
|
678
|
-
name: r,
|
|
679
|
-
deep: !1
|
|
680
|
-
});
|
|
681
|
-
if (L(e))
|
|
682
|
-
return R.object(e, void 0, {
|
|
683
|
-
name: r,
|
|
684
|
-
deep: !1
|
|
685
|
-
});
|
|
686
|
-
if (Ue(e))
|
|
687
|
-
return R.map(e, {
|
|
688
|
-
name: r,
|
|
689
|
-
deep: !1
|
|
690
|
-
});
|
|
691
|
-
if (de(e))
|
|
692
|
-
return R.set(e, {
|
|
693
|
-
name: r,
|
|
694
|
-
deep: !1
|
|
695
|
-
});
|
|
696
|
-
process.env.NODE_ENV !== "production" && v("The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets");
|
|
697
|
-
}
|
|
698
|
-
function Pt(e) {
|
|
699
|
-
return e;
|
|
700
|
-
}
|
|
701
|
-
function Ci(e, t) {
|
|
702
|
-
return process.env.NODE_ENV !== "production" && Qe(e) && v("observable.struct should not be used with observable values"), ni(e, t) ? t : e;
|
|
703
|
-
}
|
|
704
|
-
var Pi = "override";
|
|
705
|
-
function Ot(e) {
|
|
706
|
-
return e.annotationType_ === Pi;
|
|
707
|
-
}
|
|
708
|
-
function rt(e, t) {
|
|
709
|
-
return {
|
|
710
|
-
annotationType_: e,
|
|
711
|
-
options_: t,
|
|
712
|
-
make_: Bi,
|
|
713
|
-
extend_: ki,
|
|
714
|
-
decorate_20223_: Mi
|
|
715
|
-
};
|
|
716
|
-
}
|
|
717
|
-
function Bi(e, t, r, n) {
|
|
718
|
-
var i;
|
|
719
|
-
if ((i = this.options_) != null && i.bound)
|
|
720
|
-
return this.extend_(e, t, r, !1) === null ? 0 : 1;
|
|
721
|
-
if (n === e.target_)
|
|
722
|
-
return this.extend_(e, t, r, !1) === null ? 0 : 2;
|
|
723
|
-
if (Le(r.value))
|
|
724
|
-
return 1;
|
|
725
|
-
var s = Er(e, this, t, r, !1);
|
|
726
|
-
return ue(n, t, s), 2;
|
|
727
|
-
}
|
|
728
|
-
function ki(e, t, r, n) {
|
|
729
|
-
var i = Er(e, this, t, r);
|
|
730
|
-
return e.defineProperty_(t, i, n);
|
|
731
|
-
}
|
|
732
|
-
function Mi(e, t) {
|
|
733
|
-
process.env.NODE_ENV !== "production" && Ct(t, ["method", "field"]);
|
|
734
|
-
var r = t.kind, n = t.name, i = t.addInitializer, s = this, o = function(l) {
|
|
735
|
-
var d, h, _, b;
|
|
736
|
-
return je((d = (h = s.options_) == null ? void 0 : h.name) != null ? d : n.toString(), l, (_ = (b = s.options_) == null ? void 0 : b.autoAction) != null ? _ : !1);
|
|
737
|
-
};
|
|
738
|
-
if (r == "field")
|
|
739
|
-
return function(u) {
|
|
740
|
-
var l, d = u;
|
|
741
|
-
return Le(d) || (d = o(d)), (l = s.options_) != null && l.bound && (d = d.bind(this), d.isMobxAction = !0), d;
|
|
742
|
-
};
|
|
743
|
-
if (r == "method") {
|
|
744
|
-
var a;
|
|
745
|
-
return Le(e) || (e = o(e)), (a = this.options_) != null && a.bound && i(function() {
|
|
746
|
-
var u = this, l = u[n].bind(u);
|
|
747
|
-
l.isMobxAction = !0, u[n] = l;
|
|
748
|
-
}), e;
|
|
749
|
-
}
|
|
750
|
-
v("Cannot apply '" + s.annotationType_ + "' to '" + String(n) + "' (kind: " + r + "):" + (`
|
|
751
|
-
'` + s.annotationType_ + "' can only be used on properties with a function value."));
|
|
752
|
-
}
|
|
753
|
-
function Li(e, t, r, n) {
|
|
754
|
-
var i = t.annotationType_, s = n.value;
|
|
755
|
-
process.env.NODE_ENV !== "production" && !D(s) && v("Cannot apply '" + i + "' to '" + e.name_ + "." + r.toString() + "':" + (`
|
|
756
|
-
'` + i + "' can only be used on properties with a function value."));
|
|
757
|
-
}
|
|
758
|
-
function Er(e, t, r, n, i) {
|
|
759
|
-
var s, o, a, u, l, d, h;
|
|
760
|
-
i === void 0 && (i = f.safeDescriptors), Li(e, t, r, n);
|
|
761
|
-
var _ = n.value;
|
|
762
|
-
if ((s = t.options_) != null && s.bound) {
|
|
763
|
-
var b;
|
|
764
|
-
_ = _.bind((b = e.proxy_) != null ? b : e.target_);
|
|
765
|
-
}
|
|
766
|
-
return {
|
|
767
|
-
value: je(
|
|
768
|
-
(o = (a = t.options_) == null ? void 0 : a.name) != null ? o : r.toString(),
|
|
769
|
-
_,
|
|
770
|
-
(u = (l = t.options_) == null ? void 0 : l.autoAction) != null ? u : !1,
|
|
771
|
-
// https://github.com/mobxjs/mobx/discussions/3140
|
|
772
|
-
(d = t.options_) != null && d.bound ? (h = e.proxy_) != null ? h : e.target_ : void 0
|
|
773
|
-
),
|
|
774
|
-
// Non-configurable for classes
|
|
775
|
-
// prevents accidental field redefinition in subclass
|
|
776
|
-
configurable: i ? e.isPlainObject_ : !0,
|
|
777
|
-
// https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058
|
|
778
|
-
enumerable: !1,
|
|
779
|
-
// Non-obsevable, therefore non-writable
|
|
780
|
-
// Also prevents rewriting in subclass constructor
|
|
781
|
-
writable: !i
|
|
782
|
-
};
|
|
783
|
-
}
|
|
784
|
-
function Nr(e, t) {
|
|
785
|
-
return {
|
|
786
|
-
annotationType_: e,
|
|
787
|
-
options_: t,
|
|
788
|
-
make_: Ii,
|
|
789
|
-
extend_: $i,
|
|
790
|
-
decorate_20223_: Ui
|
|
791
|
-
};
|
|
792
|
-
}
|
|
793
|
-
function Ii(e, t, r, n) {
|
|
794
|
-
var i;
|
|
795
|
-
if (n === e.target_)
|
|
796
|
-
return this.extend_(e, t, r, !1) === null ? 0 : 2;
|
|
797
|
-
if ((i = this.options_) != null && i.bound && (!Y(e.target_, t) || !Ze(e.target_[t])) && this.extend_(e, t, r, !1) === null)
|
|
798
|
-
return 0;
|
|
799
|
-
if (Ze(r.value))
|
|
800
|
-
return 1;
|
|
801
|
-
var s = Ar(e, this, t, r, !1, !1);
|
|
802
|
-
return ue(n, t, s), 2;
|
|
803
|
-
}
|
|
804
|
-
function $i(e, t, r, n) {
|
|
805
|
-
var i, s = Ar(e, this, t, r, (i = this.options_) == null ? void 0 : i.bound);
|
|
806
|
-
return e.defineProperty_(t, s, n);
|
|
807
|
-
}
|
|
808
|
-
function Ui(e, t) {
|
|
809
|
-
var r;
|
|
810
|
-
process.env.NODE_ENV !== "production" && Ct(t, ["method"]);
|
|
811
|
-
var n = t.name, i = t.addInitializer;
|
|
812
|
-
return Ze(e) || (e = Ie(e)), (r = this.options_) != null && r.bound && i(function() {
|
|
813
|
-
var s = this, o = s[n].bind(s);
|
|
814
|
-
o.isMobXFlow = !0, s[n] = o;
|
|
815
|
-
}), e;
|
|
816
|
-
}
|
|
817
|
-
function Fi(e, t, r, n) {
|
|
818
|
-
var i = t.annotationType_, s = n.value;
|
|
819
|
-
process.env.NODE_ENV !== "production" && !D(s) && v("Cannot apply '" + i + "' to '" + e.name_ + "." + r.toString() + "':" + (`
|
|
820
|
-
'` + i + "' can only be used on properties with a generator function value."));
|
|
821
|
-
}
|
|
822
|
-
function Ar(e, t, r, n, i, s) {
|
|
823
|
-
s === void 0 && (s = f.safeDescriptors), Fi(e, t, r, n);
|
|
824
|
-
var o = n.value;
|
|
825
|
-
if (Ze(o) || (o = Ie(o)), i) {
|
|
826
|
-
var a;
|
|
827
|
-
o = o.bind((a = e.proxy_) != null ? a : e.target_), o.isMobXFlow = !0;
|
|
828
|
-
}
|
|
829
|
-
return {
|
|
830
|
-
value: o,
|
|
831
|
-
// Non-configurable for classes
|
|
832
|
-
// prevents accidental field redefinition in subclass
|
|
833
|
-
configurable: s ? e.isPlainObject_ : !0,
|
|
834
|
-
// https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058
|
|
835
|
-
enumerable: !1,
|
|
836
|
-
// Non-obsevable, therefore non-writable
|
|
837
|
-
// Also prevents rewriting in subclass constructor
|
|
838
|
-
writable: !s
|
|
839
|
-
};
|
|
840
|
-
}
|
|
841
|
-
function gn(e, t) {
|
|
842
|
-
return {
|
|
843
|
-
annotationType_: e,
|
|
844
|
-
options_: t,
|
|
845
|
-
make_: Gi,
|
|
846
|
-
extend_: Ki,
|
|
847
|
-
decorate_20223_: qi
|
|
848
|
-
};
|
|
849
|
-
}
|
|
850
|
-
function Gi(e, t, r) {
|
|
851
|
-
return this.extend_(e, t, r, !1) === null ? 0 : 1;
|
|
852
|
-
}
|
|
853
|
-
function Ki(e, t, r, n) {
|
|
854
|
-
return zi(e, this, t, r), e.defineComputedProperty_(t, he({}, this.options_, {
|
|
855
|
-
get: r.get,
|
|
856
|
-
set: r.set
|
|
857
|
-
}), n);
|
|
858
|
-
}
|
|
859
|
-
function qi(e, t) {
|
|
860
|
-
process.env.NODE_ENV !== "production" && Ct(t, ["getter"]);
|
|
861
|
-
var r = this, n = t.name, i = t.addInitializer;
|
|
862
|
-
return i(function() {
|
|
863
|
-
var s = Ve(this)[m], o = he({}, r.options_, {
|
|
864
|
-
get: e,
|
|
865
|
-
context: this
|
|
866
|
-
});
|
|
867
|
-
o.name || (o.name = process.env.NODE_ENV !== "production" ? s.name_ + "." + n.toString() : "ObservableObject." + n.toString()), s.values_.set(n, new H(o));
|
|
868
|
-
}), function() {
|
|
869
|
-
return this[m].getObservablePropValue_(n);
|
|
870
|
-
};
|
|
871
|
-
}
|
|
872
|
-
function zi(e, t, r, n) {
|
|
873
|
-
var i = t.annotationType_, s = n.get;
|
|
874
|
-
process.env.NODE_ENV !== "production" && !s && v("Cannot apply '" + i + "' to '" + e.name_ + "." + r.toString() + "':" + (`
|
|
875
|
-
'` + i + "' can only be used on getter(+setter) properties."));
|
|
876
|
-
}
|
|
877
|
-
function Bt(e, t) {
|
|
878
|
-
return {
|
|
879
|
-
annotationType_: e,
|
|
880
|
-
options_: t,
|
|
881
|
-
make_: Wi,
|
|
882
|
-
extend_: Yi,
|
|
883
|
-
decorate_20223_: Xi
|
|
884
|
-
};
|
|
885
|
-
}
|
|
886
|
-
function Wi(e, t, r) {
|
|
887
|
-
return this.extend_(e, t, r, !1) === null ? 0 : 1;
|
|
888
|
-
}
|
|
889
|
-
function Yi(e, t, r, n) {
|
|
890
|
-
var i, s;
|
|
891
|
-
return Hi(e, this, t, r), e.defineObservableProperty_(t, r.value, (i = (s = this.options_) == null ? void 0 : s.enhancer) != null ? i : we, n);
|
|
892
|
-
}
|
|
893
|
-
function Xi(e, t) {
|
|
894
|
-
if (process.env.NODE_ENV !== "production") {
|
|
895
|
-
if (t.kind === "field")
|
|
896
|
-
throw v("Please use `@observable accessor " + String(t.name) + "` instead of `@observable " + String(t.name) + "`");
|
|
897
|
-
Ct(t, ["accessor"]);
|
|
898
|
-
}
|
|
899
|
-
var r = this, n = t.kind, i = t.name, s = /* @__PURE__ */ new WeakSet();
|
|
900
|
-
function o(a, u) {
|
|
901
|
-
var l, d, h = Ve(a)[m], _ = new Ae(u, (l = (d = r.options_) == null ? void 0 : d.enhancer) != null ? l : we, process.env.NODE_ENV !== "production" ? h.name_ + "." + i.toString() : "ObservableObject." + i.toString(), !1);
|
|
902
|
-
h.values_.set(i, _), s.add(a);
|
|
903
|
-
}
|
|
904
|
-
if (n == "accessor")
|
|
905
|
-
return {
|
|
906
|
-
get: function() {
|
|
907
|
-
return s.has(this) || o(this, e.get.call(this)), this[m].getObservablePropValue_(i);
|
|
908
|
-
},
|
|
909
|
-
set: function(u) {
|
|
910
|
-
return s.has(this) || o(this, u), this[m].setObservablePropValue_(i, u);
|
|
911
|
-
},
|
|
912
|
-
init: function(u) {
|
|
913
|
-
return s.has(this) || o(this, u), u;
|
|
914
|
-
}
|
|
915
|
-
};
|
|
916
|
-
}
|
|
917
|
-
function Hi(e, t, r, n) {
|
|
918
|
-
var i = t.annotationType_;
|
|
919
|
-
process.env.NODE_ENV !== "production" && !("value" in n) && v("Cannot apply '" + i + "' to '" + e.name_ + "." + r.toString() + "':" + (`
|
|
920
|
-
'` + i + "' cannot be used on getter/setter properties"));
|
|
921
|
-
}
|
|
922
|
-
var Ji = "true", Zi = /* @__PURE__ */ Sr();
|
|
923
|
-
function Sr(e) {
|
|
924
|
-
return {
|
|
925
|
-
annotationType_: Ji,
|
|
926
|
-
options_: e,
|
|
927
|
-
make_: Qi,
|
|
928
|
-
extend_: es,
|
|
929
|
-
decorate_20223_: ts
|
|
930
|
-
};
|
|
931
|
-
}
|
|
932
|
-
function Qi(e, t, r, n) {
|
|
933
|
-
var i, s;
|
|
934
|
-
if (r.get)
|
|
935
|
-
return kt.make_(e, t, r, n);
|
|
936
|
-
if (r.set) {
|
|
937
|
-
var o = je(t.toString(), r.set);
|
|
938
|
-
return n === e.target_ ? e.defineProperty_(t, {
|
|
939
|
-
configurable: f.safeDescriptors ? e.isPlainObject_ : !0,
|
|
940
|
-
set: o
|
|
941
|
-
}) === null ? 0 : 2 : (ue(n, t, {
|
|
942
|
-
configurable: !0,
|
|
943
|
-
set: o
|
|
944
|
-
}), 2);
|
|
945
|
-
}
|
|
946
|
-
if (n !== e.target_ && typeof r.value == "function") {
|
|
947
|
-
var a;
|
|
948
|
-
if (_r(r.value)) {
|
|
949
|
-
var u, l = (u = this.options_) != null && u.autoBind ? Ie.bound : Ie;
|
|
950
|
-
return l.make_(e, t, r, n);
|
|
951
|
-
}
|
|
952
|
-
var d = (a = this.options_) != null && a.autoBind ? Je.bound : Je;
|
|
953
|
-
return d.make_(e, t, r, n);
|
|
954
|
-
}
|
|
955
|
-
var h = ((i = this.options_) == null ? void 0 : i.deep) === !1 ? R.ref : R;
|
|
956
|
-
if (typeof r.value == "function" && (s = this.options_) != null && s.autoBind) {
|
|
957
|
-
var _;
|
|
958
|
-
r.value = r.value.bind((_ = e.proxy_) != null ? _ : e.target_);
|
|
959
|
-
}
|
|
960
|
-
return h.make_(e, t, r, n);
|
|
961
|
-
}
|
|
962
|
-
function es(e, t, r, n) {
|
|
963
|
-
var i, s;
|
|
964
|
-
if (r.get)
|
|
965
|
-
return kt.extend_(e, t, r, n);
|
|
966
|
-
if (r.set)
|
|
967
|
-
return e.defineProperty_(t, {
|
|
968
|
-
configurable: f.safeDescriptors ? e.isPlainObject_ : !0,
|
|
969
|
-
set: je(t.toString(), r.set)
|
|
970
|
-
}, n);
|
|
971
|
-
if (typeof r.value == "function" && (i = this.options_) != null && i.autoBind) {
|
|
972
|
-
var o;
|
|
973
|
-
r.value = r.value.bind((o = e.proxy_) != null ? o : e.target_);
|
|
974
|
-
}
|
|
975
|
-
var a = ((s = this.options_) == null ? void 0 : s.deep) === !1 ? R.ref : R;
|
|
976
|
-
return a.extend_(e, t, r, n);
|
|
977
|
-
}
|
|
978
|
-
function ts(e, t) {
|
|
979
|
-
v("'" + this.annotationType_ + "' cannot be used as a decorator");
|
|
980
|
-
}
|
|
981
|
-
var ns = "observable", rs = "observable.ref", is = "observable.shallow", ss = "observable.struct", wr = {
|
|
982
|
-
deep: !0,
|
|
983
|
-
name: void 0,
|
|
984
|
-
defaultDecorator: void 0,
|
|
985
|
-
proxy: !0
|
|
986
|
-
};
|
|
987
|
-
Object.freeze(wr);
|
|
988
|
-
function ut(e) {
|
|
989
|
-
return e || wr;
|
|
990
|
-
}
|
|
991
|
-
var an = /* @__PURE__ */ Bt(ns), os = /* @__PURE__ */ Bt(rs, {
|
|
992
|
-
enhancer: Pt
|
|
993
|
-
}), as = /* @__PURE__ */ Bt(is, {
|
|
994
|
-
enhancer: Vi
|
|
995
|
-
}), us = /* @__PURE__ */ Bt(ss, {
|
|
996
|
-
enhancer: Ci
|
|
997
|
-
}), jr = /* @__PURE__ */ ce(an);
|
|
998
|
-
function ct(e) {
|
|
999
|
-
return e.deep === !0 ? we : e.deep === !1 ? Pt : ls(e.defaultDecorator);
|
|
1000
|
-
}
|
|
1001
|
-
function cs(e) {
|
|
1002
|
-
var t;
|
|
1003
|
-
return e ? (t = e.defaultDecorator) != null ? t : Sr(e) : void 0;
|
|
1004
|
-
}
|
|
1005
|
-
function ls(e) {
|
|
1006
|
-
var t, r;
|
|
1007
|
-
return e && (t = (r = e.options_) == null ? void 0 : r.enhancer) != null ? t : we;
|
|
1008
|
-
}
|
|
1009
|
-
function xr(e, t, r) {
|
|
1010
|
-
if (nt(t))
|
|
1011
|
-
return an.decorate_20223_(e, t);
|
|
1012
|
-
if (Se(t)) {
|
|
1013
|
-
tt(e, t, an);
|
|
1014
|
-
return;
|
|
1015
|
-
}
|
|
1016
|
-
return Qe(e) ? e : L(e) ? R.object(e, t, r) : Array.isArray(e) ? R.array(e, t) : Ue(e) ? R.map(e, t) : de(e) ? R.set(e, t) : typeof e == "object" && e !== null ? e : R.box(e, t);
|
|
1017
|
-
}
|
|
1018
|
-
pr(xr, jr);
|
|
1019
|
-
var fs = {
|
|
1020
|
-
box: function(t, r) {
|
|
1021
|
-
var n = ut(r);
|
|
1022
|
-
return new Ae(t, ct(n), n.name, !0, n.equals);
|
|
1023
|
-
},
|
|
1024
|
-
array: function(t, r) {
|
|
1025
|
-
var n = ut(r);
|
|
1026
|
-
return (f.useProxies === !1 || n.proxy === !1 ? po : no)(t, ct(n), n.name);
|
|
1027
|
-
},
|
|
1028
|
-
map: function(t, r) {
|
|
1029
|
-
var n = ut(r);
|
|
1030
|
-
return new Hr(t, ct(n), n.name);
|
|
1031
|
-
},
|
|
1032
|
-
set: function(t, r) {
|
|
1033
|
-
var n = ut(r);
|
|
1034
|
-
return new Jr(t, ct(n), n.name);
|
|
1035
|
-
},
|
|
1036
|
-
object: function(t, r, n) {
|
|
1037
|
-
return Ee(function() {
|
|
1038
|
-
return qr(f.useProxies === !1 || n?.proxy === !1 ? Ve({}, n) : Zs({}, n), t, r);
|
|
1039
|
-
});
|
|
1040
|
-
},
|
|
1041
|
-
ref: /* @__PURE__ */ ce(os),
|
|
1042
|
-
shallow: /* @__PURE__ */ ce(as),
|
|
1043
|
-
deep: jr,
|
|
1044
|
-
struct: /* @__PURE__ */ ce(us)
|
|
1045
|
-
}, R = /* @__PURE__ */ pr(xr, fs), Dr = "computed", ds = "computed.struct", un = /* @__PURE__ */ gn(Dr), ps = /* @__PURE__ */ gn(ds, {
|
|
1046
|
-
equals: yt.structural
|
|
1047
|
-
}), kt = function(t, r) {
|
|
1048
|
-
if (nt(r))
|
|
1049
|
-
return un.decorate_20223_(t, r);
|
|
1050
|
-
if (Se(r))
|
|
1051
|
-
return tt(t, r, un);
|
|
1052
|
-
if (L(t))
|
|
1053
|
-
return ce(gn(Dr, t));
|
|
1054
|
-
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"));
|
|
1055
|
-
var n = L(r) ? r : {};
|
|
1056
|
-
return n.get = t, n.name || (n.name = t.name || ""), new H(n);
|
|
1057
|
-
};
|
|
1058
|
-
Object.assign(kt, un);
|
|
1059
|
-
kt.struct = /* @__PURE__ */ ce(ps);
|
|
1060
|
-
var Ln, In, Et = 0, vs = 1, hs = (Ln = (In = /* @__PURE__ */ mt(function() {
|
|
1061
|
-
}, "name")) == null ? void 0 : In.configurable) != null ? Ln : !1, $n = {
|
|
1062
|
-
value: "action",
|
|
1063
|
-
configurable: !0,
|
|
1064
|
-
writable: !1,
|
|
1065
|
-
enumerable: !1
|
|
1066
|
-
};
|
|
1067
|
-
function je(e, t, r, n) {
|
|
1068
|
-
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 + "'"));
|
|
1069
|
-
function i() {
|
|
1070
|
-
return _s(e, r, t, n || this, arguments);
|
|
1071
|
-
}
|
|
1072
|
-
return i.isMobxAction = !0, i.toString = function() {
|
|
1073
|
-
return t.toString();
|
|
1074
|
-
}, hs && ($n.value = e, ue(i, "name", $n)), i;
|
|
1075
|
-
}
|
|
1076
|
-
function _s(e, t, r, n, i) {
|
|
1077
|
-
var s = bs(e, t, n, i);
|
|
1078
|
-
try {
|
|
1079
|
-
return r.apply(n, i);
|
|
1080
|
-
} catch (o) {
|
|
1081
|
-
throw s.error_ = o, o;
|
|
1082
|
-
} finally {
|
|
1083
|
-
ms(s);
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1086
|
-
function bs(e, t, r, n) {
|
|
1087
|
-
var i = process.env.NODE_ENV !== "production" && T() && !!e, s = 0;
|
|
1088
|
-
if (process.env.NODE_ENV !== "production" && i) {
|
|
1089
|
-
s = Date.now();
|
|
1090
|
-
var o = n ? Array.from(n) : gt;
|
|
1091
|
-
I({
|
|
1092
|
-
type: Nn,
|
|
1093
|
-
name: e,
|
|
1094
|
-
object: r,
|
|
1095
|
-
arguments: o
|
|
1096
|
-
});
|
|
1097
|
-
}
|
|
1098
|
-
var a = f.trackingDerivation, u = !t || !a;
|
|
1099
|
-
q();
|
|
1100
|
-
var l = f.allowStateChanges;
|
|
1101
|
-
u && (Re(), l = yn(!0));
|
|
1102
|
-
var d = En(!0), h = {
|
|
1103
|
-
runAsAction_: u,
|
|
1104
|
-
prevDerivation_: a,
|
|
1105
|
-
prevAllowStateChanges_: l,
|
|
1106
|
-
prevAllowStateReads_: d,
|
|
1107
|
-
notifySpy_: i,
|
|
1108
|
-
startTime_: s,
|
|
1109
|
-
actionId_: vs++,
|
|
1110
|
-
parentActionId_: Et
|
|
1111
|
-
};
|
|
1112
|
-
return Et = h.actionId_, h;
|
|
1113
|
-
}
|
|
1114
|
-
function ms(e) {
|
|
1115
|
-
Et !== e.actionId_ && v(30), Et = e.parentActionId_, e.error_ !== void 0 && (f.suppressReactionErrors = !0), On(e.prevAllowStateChanges_), Xe(e.prevAllowStateReads_), z(), e.runAsAction_ && ve(e.prevDerivation_), process.env.NODE_ENV !== "production" && e.notifySpy_ && $({
|
|
1116
|
-
time: Date.now() - e.startTime_
|
|
1117
|
-
}), f.suppressReactionErrors = !1;
|
|
1118
|
-
}
|
|
1119
|
-
function yn(e) {
|
|
1120
|
-
var t = f.allowStateChanges;
|
|
1121
|
-
return f.allowStateChanges = e, t;
|
|
1122
|
-
}
|
|
1123
|
-
function On(e) {
|
|
1124
|
-
f.allowStateChanges = e;
|
|
1125
|
-
}
|
|
1126
|
-
var gs = "create", Ae = /* @__PURE__ */ (function(e) {
|
|
1127
|
-
function t(n, i, s, o, a) {
|
|
1128
|
-
var u;
|
|
1129
|
-
return s === void 0 && (s = process.env.NODE_ENV !== "production" ? "ObservableValue@" + ne() : "ObservableValue"), o === void 0 && (o = !0), a === void 0 && (a = yt.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 && T() && xe({
|
|
1130
|
-
type: gs,
|
|
1131
|
-
object: u,
|
|
1132
|
-
observableKind: "value",
|
|
1133
|
-
debugObjectName: u.name_,
|
|
1134
|
-
newValue: "" + u.value_
|
|
1135
|
-
}), u;
|
|
1136
|
-
}
|
|
1137
|
-
yr(t, e);
|
|
1138
|
-
var r = t.prototype;
|
|
1139
|
-
return r.dehanceValue = function(i) {
|
|
1140
|
-
return this.dehancer !== void 0 ? this.dehancer(i) : i;
|
|
1141
|
-
}, r.set = function(i) {
|
|
1142
|
-
var s = this.value_;
|
|
1143
|
-
if (i = this.prepareNewValue_(i), i !== f.UNCHANGED) {
|
|
1144
|
-
var o = T();
|
|
1145
|
-
process.env.NODE_ENV !== "production" && o && I({
|
|
1146
|
-
type: Q,
|
|
1147
|
-
object: this,
|
|
1148
|
-
observableKind: "value",
|
|
1149
|
-
debugObjectName: this.name_,
|
|
1150
|
-
newValue: i,
|
|
1151
|
-
oldValue: s
|
|
1152
|
-
}), this.setNewValue_(i), process.env.NODE_ENV !== "production" && o && $();
|
|
1153
|
-
}
|
|
1154
|
-
}, r.prepareNewValue_ = function(i) {
|
|
1155
|
-
if (ae(this), G(this)) {
|
|
1156
|
-
var s = K(this, {
|
|
1157
|
-
object: this,
|
|
1158
|
-
type: Q,
|
|
1159
|
-
newValue: i
|
|
1160
|
-
});
|
|
1161
|
-
if (!s)
|
|
1162
|
-
return f.UNCHANGED;
|
|
1163
|
-
i = s.newValue;
|
|
1164
|
-
}
|
|
1165
|
-
return i = this.enhancer(i, this.value_, this.name_), this.equals(this.value_, i) ? f.UNCHANGED : i;
|
|
1166
|
-
}, r.setNewValue_ = function(i) {
|
|
1167
|
-
var s = this.value_;
|
|
1168
|
-
this.value_ = i, this.reportChanged(), ee(this) && te(this, {
|
|
1169
|
-
type: Q,
|
|
1170
|
-
object: this,
|
|
1171
|
-
newValue: i,
|
|
1172
|
-
oldValue: s
|
|
1173
|
-
});
|
|
1174
|
-
}, r.get = function() {
|
|
1175
|
-
return this.reportObserved(), this.dehanceValue(this.value_);
|
|
1176
|
-
}, r.intercept_ = function(i) {
|
|
1177
|
-
return it(this, i);
|
|
1178
|
-
}, r.observe_ = function(i, s) {
|
|
1179
|
-
return s && i({
|
|
1180
|
-
observableKind: "value",
|
|
1181
|
-
debugObjectName: this.name_,
|
|
1182
|
-
object: this,
|
|
1183
|
-
type: Q,
|
|
1184
|
-
newValue: this.value_,
|
|
1185
|
-
oldValue: void 0
|
|
1186
|
-
}), st(this, i);
|
|
1187
|
-
}, r.raw = function() {
|
|
1188
|
-
return this.value_;
|
|
1189
|
-
}, r.toJSON = function() {
|
|
1190
|
-
return this.get();
|
|
1191
|
-
}, r.toString = function() {
|
|
1192
|
-
return this.name_ + "[" + this.value_ + "]";
|
|
1193
|
-
}, r.valueOf = function() {
|
|
1194
|
-
return gr(this.get());
|
|
1195
|
-
}, r[Symbol.toPrimitive] = function() {
|
|
1196
|
-
return this.valueOf();
|
|
1197
|
-
}, t;
|
|
1198
|
-
})(ye), H = /* @__PURE__ */ (function() {
|
|
1199
|
-
function e(r) {
|
|
1200
|
-
this.dependenciesState_ = E.NOT_TRACKING_, this.observing_ = [], this.newObserving_ = null, this.observers_ = /* @__PURE__ */ new Set(), this.runId_ = 0, this.lastAccessedBy_ = 0, this.lowestObserverState_ = E.UP_TO_DATE_, this.unboundDepsCount_ = 0, this.value_ = new Nt(null), this.name_ = void 0, this.triggeredBy_ = void 0, this.flags_ = 0, this.derivation = void 0, this.setter_ = void 0, this.isTracing_ = X.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@" + ne() : "ComputedValue"), r.set && (this.setter_ = je(process.env.NODE_ENV !== "production" ? this.name_ + "-setter" : "ComputedValue-setter", r.set)), this.equals_ = r.equals || (r.compareStructural || r.struct ? yt.structural : yt.default), this.scope_ = r.context, this.requiresReaction_ = r.requiresReaction, this.keepAlive_ = !!r.keepAlive;
|
|
1201
|
-
}
|
|
1202
|
-
var t = e.prototype;
|
|
1203
|
-
return t.onBecomeStale_ = function() {
|
|
1204
|
-
ws(this);
|
|
1205
|
-
}, t.onBO = function() {
|
|
1206
|
-
this.onBOL && this.onBOL.forEach(function(n) {
|
|
1207
|
-
return n();
|
|
1208
|
-
});
|
|
1209
|
-
}, t.onBUO = function() {
|
|
1210
|
-
this.onBUOL && this.onBUOL.forEach(function(n) {
|
|
1211
|
-
return n();
|
|
1212
|
-
});
|
|
1213
|
-
}, t.get = function() {
|
|
1214
|
-
if (this.isComputing && v(32, this.name_, this.derivation), f.inBatch === 0 && // !globalState.trackingDerivatpion &&
|
|
1215
|
-
this.observers_.size === 0 && !this.keepAlive_)
|
|
1216
|
-
cn(this) && (this.warnAboutUntrackedRead_(), q(), this.value_ = this.computeValue_(!1), z());
|
|
1217
|
-
else if (kr(this), cn(this)) {
|
|
1218
|
-
var n = f.trackingContext;
|
|
1219
|
-
this.keepAlive_ && !n && (f.trackingContext = this), this.trackAndCompute() && Ss(this), f.trackingContext = n;
|
|
1220
|
-
}
|
|
1221
|
-
var i = this.value_;
|
|
1222
|
-
if (dt(i))
|
|
1223
|
-
throw i.cause;
|
|
1224
|
-
return i;
|
|
1225
|
-
}, t.set = function(n) {
|
|
1226
|
-
if (this.setter_) {
|
|
1227
|
-
this.isRunningSetter && v(33, this.name_), this.isRunningSetter = !0;
|
|
1228
|
-
try {
|
|
1229
|
-
this.setter_.call(this.scope_, n);
|
|
1230
|
-
} finally {
|
|
1231
|
-
this.isRunningSetter = !1;
|
|
1232
|
-
}
|
|
1233
|
-
} else
|
|
1234
|
-
v(34, this.name_);
|
|
1235
|
-
}, t.trackAndCompute = function() {
|
|
1236
|
-
var n = this.value_, i = (
|
|
1237
|
-
/* see #1208 */
|
|
1238
|
-
this.dependenciesState_ === E.NOT_TRACKING_
|
|
1239
|
-
), s = this.computeValue_(!0), o = i || dt(n) || dt(s) || !this.equals_(n, s);
|
|
1240
|
-
return o && (this.value_ = s, process.env.NODE_ENV !== "production" && T() && xe({
|
|
1241
|
-
observableKind: "computed",
|
|
1242
|
-
debugObjectName: this.name_,
|
|
1243
|
-
object: this.scope_,
|
|
1244
|
-
type: "update",
|
|
1245
|
-
oldValue: n,
|
|
1246
|
-
newValue: s
|
|
1247
|
-
})), o;
|
|
1248
|
-
}, t.computeValue_ = function(n) {
|
|
1249
|
-
this.isComputing = !0;
|
|
1250
|
-
var i = yn(!1), s;
|
|
1251
|
-
if (n)
|
|
1252
|
-
s = Rr(this, this.derivation, this.scope_);
|
|
1253
|
-
else if (f.disableErrorBoundaries === !0)
|
|
1254
|
-
s = this.derivation.call(this.scope_);
|
|
1255
|
-
else
|
|
1256
|
-
try {
|
|
1257
|
-
s = this.derivation.call(this.scope_);
|
|
1258
|
-
} catch (o) {
|
|
1259
|
-
s = new Nt(o);
|
|
1260
|
-
}
|
|
1261
|
-
return On(i), this.isComputing = !1, s;
|
|
1262
|
-
}, t.suspend_ = function() {
|
|
1263
|
-
this.keepAlive_ || (ln(this), this.value_ = void 0, process.env.NODE_ENV !== "production" && this.isTracing_ !== X.NONE && console.log("[mobx.trace] Computed value '" + this.name_ + "' was suspended and it will recompute on the next access."));
|
|
1264
|
-
}, t.observe_ = function(n, i) {
|
|
1265
|
-
var s = this, o = !0, a = void 0;
|
|
1266
|
-
return ks(function() {
|
|
1267
|
-
var u = s.get();
|
|
1268
|
-
if (!o || i) {
|
|
1269
|
-
var l = Re();
|
|
1270
|
-
n({
|
|
1271
|
-
observableKind: "computed",
|
|
1272
|
-
debugObjectName: s.name_,
|
|
1273
|
-
type: Q,
|
|
1274
|
-
object: s,
|
|
1275
|
-
newValue: u,
|
|
1276
|
-
oldValue: a
|
|
1277
|
-
}), ve(l);
|
|
1278
|
-
}
|
|
1279
|
-
o = !1, a = u;
|
|
1280
|
-
});
|
|
1281
|
-
}, t.warnAboutUntrackedRead_ = function() {
|
|
1282
|
-
process.env.NODE_ENV !== "production" && (this.isTracing_ !== X.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."));
|
|
1283
|
-
}, t.toString = function() {
|
|
1284
|
-
return this.name_ + "[" + this.derivation.toString() + "]";
|
|
1285
|
-
}, t.valueOf = function() {
|
|
1286
|
-
return gr(this.get());
|
|
1287
|
-
}, t[Symbol.toPrimitive] = function() {
|
|
1288
|
-
return this.valueOf();
|
|
1289
|
-
}, Fe(e, [{
|
|
1290
|
-
key: "isComputing",
|
|
1291
|
-
get: function() {
|
|
1292
|
-
return k(this.flags_, e.isComputingMask_);
|
|
1293
|
-
},
|
|
1294
|
-
set: function(n) {
|
|
1295
|
-
this.flags_ = M(this.flags_, e.isComputingMask_, n);
|
|
1296
|
-
}
|
|
1297
|
-
}, {
|
|
1298
|
-
key: "isRunningSetter",
|
|
1299
|
-
get: function() {
|
|
1300
|
-
return k(this.flags_, e.isRunningSetterMask_);
|
|
1301
|
-
},
|
|
1302
|
-
set: function(n) {
|
|
1303
|
-
this.flags_ = M(this.flags_, e.isRunningSetterMask_, n);
|
|
1304
|
-
}
|
|
1305
|
-
}, {
|
|
1306
|
-
key: "isBeingObserved",
|
|
1307
|
-
get: function() {
|
|
1308
|
-
return k(this.flags_, e.isBeingObservedMask_);
|
|
1309
|
-
},
|
|
1310
|
-
set: function(n) {
|
|
1311
|
-
this.flags_ = M(this.flags_, e.isBeingObservedMask_, n);
|
|
1312
|
-
}
|
|
1313
|
-
}, {
|
|
1314
|
-
key: "isPendingUnobservation",
|
|
1315
|
-
get: function() {
|
|
1316
|
-
return k(this.flags_, e.isPendingUnobservationMask_);
|
|
1317
|
-
},
|
|
1318
|
-
set: function(n) {
|
|
1319
|
-
this.flags_ = M(this.flags_, e.isPendingUnobservationMask_, n);
|
|
1320
|
-
}
|
|
1321
|
-
}, {
|
|
1322
|
-
key: "diffValue",
|
|
1323
|
-
get: function() {
|
|
1324
|
-
return k(this.flags_, e.diffValueMask_) ? 1 : 0;
|
|
1325
|
-
},
|
|
1326
|
-
set: function(n) {
|
|
1327
|
-
this.flags_ = M(this.flags_, e.diffValueMask_, n === 1);
|
|
1328
|
-
}
|
|
1329
|
-
}]);
|
|
1330
|
-
})();
|
|
1331
|
-
H.isComputingMask_ = 1;
|
|
1332
|
-
H.isRunningSetterMask_ = 2;
|
|
1333
|
-
H.isBeingObservedMask_ = 4;
|
|
1334
|
-
H.isPendingUnobservationMask_ = 8;
|
|
1335
|
-
H.diffValueMask_ = 16;
|
|
1336
|
-
var Mt = /* @__PURE__ */ De("ComputedValue", H), E;
|
|
1337
|
-
(function(e) {
|
|
1338
|
-
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_";
|
|
1339
|
-
})(E || (E = {}));
|
|
1340
|
-
var X;
|
|
1341
|
-
(function(e) {
|
|
1342
|
-
e[e.NONE = 0] = "NONE", e[e.LOG = 1] = "LOG", e[e.BREAK = 2] = "BREAK";
|
|
1343
|
-
})(X || (X = {}));
|
|
1344
|
-
var Nt = function(t) {
|
|
1345
|
-
this.cause = void 0, this.cause = t;
|
|
1346
|
-
};
|
|
1347
|
-
function dt(e) {
|
|
1348
|
-
return e instanceof Nt;
|
|
1349
|
-
}
|
|
1350
|
-
function cn(e) {
|
|
1351
|
-
switch (e.dependenciesState_) {
|
|
1352
|
-
case E.UP_TO_DATE_:
|
|
1353
|
-
return !1;
|
|
1354
|
-
case E.NOT_TRACKING_:
|
|
1355
|
-
case E.STALE_:
|
|
1356
|
-
return !0;
|
|
1357
|
-
case E.POSSIBLY_STALE_: {
|
|
1358
|
-
for (var t = En(!0), r = Re(), n = e.observing_, i = n.length, s = 0; s < i; s++) {
|
|
1359
|
-
var o = n[s];
|
|
1360
|
-
if (Mt(o)) {
|
|
1361
|
-
if (f.disableErrorBoundaries)
|
|
1362
|
-
o.get();
|
|
1363
|
-
else
|
|
1364
|
-
try {
|
|
1365
|
-
o.get();
|
|
1366
|
-
} catch {
|
|
1367
|
-
return ve(r), Xe(t), !0;
|
|
1368
|
-
}
|
|
1369
|
-
if (e.dependenciesState_ === E.STALE_)
|
|
1370
|
-
return ve(r), Xe(t), !0;
|
|
1371
|
-
}
|
|
1372
|
-
}
|
|
1373
|
-
return Vr(e), ve(r), Xe(t), !1;
|
|
1374
|
-
}
|
|
1375
|
-
}
|
|
1376
|
-
}
|
|
1377
|
-
function ae(e) {
|
|
1378
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1379
|
-
var t = e.observers_.size > 0;
|
|
1380
|
-
!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_);
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
1383
|
-
function ys(e) {
|
|
1384
|
-
process.env.NODE_ENV !== "production" && !f.allowStateReads && f.observableRequiresReaction && console.warn("[mobx] Observable '" + e.name_ + "' being read outside a reactive context.");
|
|
1385
|
-
}
|
|
1386
|
-
function Rr(e, t, r) {
|
|
1387
|
-
var n = En(!0);
|
|
1388
|
-
Vr(e), e.newObserving_ = new Array(
|
|
1389
|
-
// Reserve constant space for initial dependencies, dynamic space otherwise.
|
|
1390
|
-
// See https://github.com/mobxjs/mobx/pull/3833
|
|
1391
|
-
e.runId_ === 0 ? 100 : e.observing_.length
|
|
1392
|
-
), e.unboundDepsCount_ = 0, e.runId_ = ++f.runId;
|
|
1393
|
-
var i = f.trackingDerivation;
|
|
1394
|
-
f.trackingDerivation = e, f.inBatch++;
|
|
1395
|
-
var s;
|
|
1396
|
-
if (f.disableErrorBoundaries === !0)
|
|
1397
|
-
s = t.call(r);
|
|
1398
|
-
else
|
|
1399
|
-
try {
|
|
1400
|
-
s = t.call(r);
|
|
1401
|
-
} catch (o) {
|
|
1402
|
-
s = new Nt(o);
|
|
1403
|
-
}
|
|
1404
|
-
return f.inBatch--, f.trackingDerivation = i, Es(e), Os(e), Xe(n), s;
|
|
1405
|
-
}
|
|
1406
|
-
function Os(e) {
|
|
1407
|
-
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.");
|
|
1408
|
-
}
|
|
1409
|
-
function Es(e) {
|
|
1410
|
-
for (var t = e.observing_, r = e.observing_ = e.newObserving_, n = E.UP_TO_DATE_, i = 0, s = e.unboundDepsCount_, o = 0; o < s; o++) {
|
|
1411
|
-
var a = r[o];
|
|
1412
|
-
a.diffValue === 0 && (a.diffValue = 1, i !== o && (r[i] = a), i++), a.dependenciesState_ > n && (n = a.dependenciesState_);
|
|
1413
|
-
}
|
|
1414
|
-
for (r.length = i, e.newObserving_ = null, s = t.length; s--; ) {
|
|
1415
|
-
var u = t[s];
|
|
1416
|
-
u.diffValue === 0 && Pr(u, e), u.diffValue = 0;
|
|
1417
|
-
}
|
|
1418
|
-
for (; i--; ) {
|
|
1419
|
-
var l = r[i];
|
|
1420
|
-
l.diffValue === 1 && (l.diffValue = 0, As(l, e));
|
|
1421
|
-
}
|
|
1422
|
-
n !== E.UP_TO_DATE_ && (e.dependenciesState_ = n, e.onBecomeStale_());
|
|
1423
|
-
}
|
|
1424
|
-
function ln(e) {
|
|
1425
|
-
var t = e.observing_;
|
|
1426
|
-
e.observing_ = [];
|
|
1427
|
-
for (var r = t.length; r--; )
|
|
1428
|
-
Pr(t[r], e);
|
|
1429
|
-
e.dependenciesState_ = E.NOT_TRACKING_;
|
|
1430
|
-
}
|
|
1431
|
-
function Tr(e) {
|
|
1432
|
-
var t = Re();
|
|
1433
|
-
try {
|
|
1434
|
-
return e();
|
|
1435
|
-
} finally {
|
|
1436
|
-
ve(t);
|
|
1437
|
-
}
|
|
1438
|
-
}
|
|
1439
|
-
function Re() {
|
|
1440
|
-
var e = f.trackingDerivation;
|
|
1441
|
-
return f.trackingDerivation = null, e;
|
|
1442
|
-
}
|
|
1443
|
-
function ve(e) {
|
|
1444
|
-
f.trackingDerivation = e;
|
|
1445
|
-
}
|
|
1446
|
-
function En(e) {
|
|
1447
|
-
var t = f.allowStateReads;
|
|
1448
|
-
return f.allowStateReads = e, t;
|
|
1449
|
-
}
|
|
1450
|
-
function Xe(e) {
|
|
1451
|
-
f.allowStateReads = e;
|
|
1452
|
-
}
|
|
1453
|
-
function Vr(e) {
|
|
1454
|
-
if (e.dependenciesState_ !== E.UP_TO_DATE_) {
|
|
1455
|
-
e.dependenciesState_ = E.UP_TO_DATE_;
|
|
1456
|
-
for (var t = e.observing_, r = t.length; r--; )
|
|
1457
|
-
t[r].lowestObserverState_ = E.UP_TO_DATE_;
|
|
1458
|
-
}
|
|
1459
|
-
}
|
|
1460
|
-
var pt = function() {
|
|
1461
|
-
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;
|
|
1462
|
-
}, vt = !0, Cr = !1, f = /* @__PURE__ */ (function() {
|
|
1463
|
-
var e = /* @__PURE__ */ Rt();
|
|
1464
|
-
return e.__mobxInstanceCount > 0 && !e.__mobxGlobals && (vt = !1), e.__mobxGlobals && e.__mobxGlobals.version !== new pt().version && (vt = !1), vt ? e.__mobxGlobals ? (e.__mobxInstanceCount += 1, e.__mobxGlobals.UNCHANGED || (e.__mobxGlobals.UNCHANGED = {}), e.__mobxGlobals) : (e.__mobxInstanceCount = 1, e.__mobxGlobals = /* @__PURE__ */ new pt()) : (setTimeout(function() {
|
|
1465
|
-
Cr || v(35);
|
|
1466
|
-
}, 1), new pt());
|
|
1467
|
-
})();
|
|
1468
|
-
function Ns() {
|
|
1469
|
-
if ((f.pendingReactions.length || f.inBatch || f.isRunningReactions) && v(36), Cr = !0, vt) {
|
|
1470
|
-
var e = Rt();
|
|
1471
|
-
--e.__mobxInstanceCount === 0 && (e.__mobxGlobals = void 0), f = new pt();
|
|
1472
|
-
}
|
|
1473
|
-
}
|
|
1474
|
-
function As(e, t) {
|
|
1475
|
-
e.observers_.add(t), e.lowestObserverState_ > t.dependenciesState_ && (e.lowestObserverState_ = t.dependenciesState_);
|
|
1476
|
-
}
|
|
1477
|
-
function Pr(e, t) {
|
|
1478
|
-
e.observers_.delete(t), e.observers_.size === 0 && Br(e);
|
|
1479
|
-
}
|
|
1480
|
-
function Br(e) {
|
|
1481
|
-
e.isPendingUnobservation === !1 && (e.isPendingUnobservation = !0, f.pendingUnobservations.push(e));
|
|
1482
|
-
}
|
|
1483
|
-
function q() {
|
|
1484
|
-
f.inBatch++;
|
|
1485
|
-
}
|
|
1486
|
-
function z() {
|
|
1487
|
-
if (--f.inBatch === 0) {
|
|
1488
|
-
$r();
|
|
1489
|
-
for (var e = f.pendingUnobservations, t = 0; t < e.length; t++) {
|
|
1490
|
-
var r = e[t];
|
|
1491
|
-
r.isPendingUnobservation = !1, r.observers_.size === 0 && (r.isBeingObserved && (r.isBeingObserved = !1, r.onBUO()), r instanceof H && r.suspend_());
|
|
1492
|
-
}
|
|
1493
|
-
f.pendingUnobservations = [];
|
|
1494
|
-
}
|
|
1495
|
-
}
|
|
1496
|
-
function kr(e) {
|
|
1497
|
-
ys(e);
|
|
1498
|
-
var t = f.trackingDerivation;
|
|
1499
|
-
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 && Br(e), !1);
|
|
1500
|
-
}
|
|
1501
|
-
function Mr(e) {
|
|
1502
|
-
e.lowestObserverState_ !== E.STALE_ && (e.lowestObserverState_ = E.STALE_, e.observers_.forEach(function(t) {
|
|
1503
|
-
t.dependenciesState_ === E.UP_TO_DATE_ && (process.env.NODE_ENV !== "production" && t.isTracing_ !== X.NONE && Lr(t, e), t.onBecomeStale_()), t.dependenciesState_ = E.STALE_;
|
|
1504
|
-
}));
|
|
1505
|
-
}
|
|
1506
|
-
function Ss(e) {
|
|
1507
|
-
e.lowestObserverState_ !== E.STALE_ && (e.lowestObserverState_ = E.STALE_, e.observers_.forEach(function(t) {
|
|
1508
|
-
t.dependenciesState_ === E.POSSIBLY_STALE_ ? (t.dependenciesState_ = E.STALE_, process.env.NODE_ENV !== "production" && t.isTracing_ !== X.NONE && Lr(t, e)) : t.dependenciesState_ === E.UP_TO_DATE_ && (e.lowestObserverState_ = E.UP_TO_DATE_);
|
|
1509
|
-
}));
|
|
1510
|
-
}
|
|
1511
|
-
function ws(e) {
|
|
1512
|
-
e.lowestObserverState_ === E.UP_TO_DATE_ && (e.lowestObserverState_ = E.POSSIBLY_STALE_, e.observers_.forEach(function(t) {
|
|
1513
|
-
t.dependenciesState_ === E.UP_TO_DATE_ && (t.dependenciesState_ = E.POSSIBLY_STALE_, t.onBecomeStale_());
|
|
1514
|
-
}));
|
|
1515
|
-
}
|
|
1516
|
-
function Lr(e, t) {
|
|
1517
|
-
if (console.log("[mobx.trace] '" + e.name_ + "' is invalidated due to a change in: '" + t.name_ + "'"), e.isTracing_ === X.BREAK) {
|
|
1518
|
-
var r = [];
|
|
1519
|
-
Ir(zr(e), r, 1), new Function(`debugger;
|
|
1520
|
-
/*
|
|
1521
|
-
Tracing '` + e.name_ + `'
|
|
1522
|
-
|
|
1523
|
-
You are entering this break point because derivation '` + e.name_ + "' is being traced and '" + t.name_ + `' is now forcing it to update.
|
|
1524
|
-
Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update
|
|
1525
|
-
The stackframe you are looking for is at least ~6-8 stack-frames up.
|
|
1526
|
-
|
|
1527
|
-
` + (e instanceof H ? e.derivation.toString().replace(/[*]\//g, "/") : "") + `
|
|
1528
|
-
|
|
1529
|
-
The dependencies for this derivation are:
|
|
1530
|
-
|
|
1531
|
-
` + r.join(`
|
|
1532
|
-
`) + `
|
|
1533
|
-
*/
|
|
1534
|
-
`)();
|
|
1535
|
-
}
|
|
1536
|
-
}
|
|
1537
|
-
function Ir(e, t, r) {
|
|
1538
|
-
if (t.length >= 1e3) {
|
|
1539
|
-
t.push("(and many more)");
|
|
1540
|
-
return;
|
|
1541
|
-
}
|
|
1542
|
-
t.push("" + " ".repeat(r - 1) + e.name), e.dependencies && e.dependencies.forEach(function(n) {
|
|
1543
|
-
return Ir(n, t, r + 1);
|
|
1544
|
-
});
|
|
1545
|
-
}
|
|
1546
|
-
var _e = /* @__PURE__ */ (function() {
|
|
1547
|
-
function e(r, n, i, s) {
|
|
1548
|
-
r === void 0 && (r = process.env.NODE_ENV !== "production" ? "Reaction@" + ne() : "Reaction"), this.name_ = void 0, this.onInvalidate_ = void 0, this.errorHandler_ = void 0, this.requiresObservable_ = void 0, this.observing_ = [], this.newObserving_ = [], this.dependenciesState_ = E.NOT_TRACKING_, this.runId_ = 0, this.unboundDepsCount_ = 0, this.flags_ = 0, this.isTracing_ = X.NONE, this.name_ = r, this.onInvalidate_ = n, this.errorHandler_ = i, this.requiresObservable_ = s;
|
|
1549
|
-
}
|
|
1550
|
-
var t = e.prototype;
|
|
1551
|
-
return t.onBecomeStale_ = function() {
|
|
1552
|
-
this.schedule_();
|
|
1553
|
-
}, t.schedule_ = function() {
|
|
1554
|
-
this.isScheduled || (this.isScheduled = !0, f.pendingReactions.push(this), $r());
|
|
1555
|
-
}, t.runReaction_ = function() {
|
|
1556
|
-
if (!this.isDisposed) {
|
|
1557
|
-
q(), this.isScheduled = !1;
|
|
1558
|
-
var n = f.trackingContext;
|
|
1559
|
-
if (f.trackingContext = this, cn(this)) {
|
|
1560
|
-
this.isTrackPending = !0;
|
|
1561
|
-
try {
|
|
1562
|
-
this.onInvalidate_(), process.env.NODE_ENV !== "production" && this.isTrackPending && T() && xe({
|
|
1563
|
-
name: this.name_,
|
|
1564
|
-
type: "scheduled-reaction"
|
|
1565
|
-
});
|
|
1566
|
-
} catch (i) {
|
|
1567
|
-
this.reportExceptionInDerivation_(i);
|
|
1568
|
-
}
|
|
1569
|
-
}
|
|
1570
|
-
f.trackingContext = n, z();
|
|
1571
|
-
}
|
|
1572
|
-
}, t.track = function(n) {
|
|
1573
|
-
if (!this.isDisposed) {
|
|
1574
|
-
q();
|
|
1575
|
-
var i = T(), s;
|
|
1576
|
-
process.env.NODE_ENV !== "production" && i && (s = Date.now(), I({
|
|
1577
|
-
name: this.name_,
|
|
1578
|
-
type: "reaction"
|
|
1579
|
-
})), this.isRunning = !0;
|
|
1580
|
-
var o = f.trackingContext;
|
|
1581
|
-
f.trackingContext = this;
|
|
1582
|
-
var a = Rr(this, n, void 0);
|
|
1583
|
-
f.trackingContext = o, this.isRunning = !1, this.isTrackPending = !1, this.isDisposed && ln(this), dt(a) && this.reportExceptionInDerivation_(a.cause), process.env.NODE_ENV !== "production" && i && $({
|
|
1584
|
-
time: Date.now() - s
|
|
1585
|
-
}), z();
|
|
1586
|
-
}
|
|
1587
|
-
}, t.reportExceptionInDerivation_ = function(n) {
|
|
1588
|
-
var i = this;
|
|
1589
|
-
if (this.errorHandler_) {
|
|
1590
|
-
this.errorHandler_(n, this);
|
|
1591
|
-
return;
|
|
1592
|
-
}
|
|
1593
|
-
if (f.disableErrorBoundaries)
|
|
1594
|
-
throw n;
|
|
1595
|
-
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 + "'";
|
|
1596
|
-
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" && T() && xe({
|
|
1597
|
-
type: "error",
|
|
1598
|
-
name: this.name_,
|
|
1599
|
-
message: s,
|
|
1600
|
-
error: "" + n
|
|
1601
|
-
}), f.globalReactionErrorHandlers.forEach(function(o) {
|
|
1602
|
-
return o(n, i);
|
|
1603
|
-
});
|
|
1604
|
-
}, t.dispose = function() {
|
|
1605
|
-
this.isDisposed || (this.isDisposed = !0, this.isRunning || (q(), ln(this), z()));
|
|
1606
|
-
}, t.getDisposer_ = function(n) {
|
|
1607
|
-
var i = this, s = function o() {
|
|
1608
|
-
i.dispose(), n == null || n.removeEventListener == null || n.removeEventListener("abort", o);
|
|
1609
|
-
};
|
|
1610
|
-
return n == null || n.addEventListener == null || n.addEventListener("abort", s), s[m] = this, s;
|
|
1611
|
-
}, t.toString = function() {
|
|
1612
|
-
return "Reaction[" + this.name_ + "]";
|
|
1613
|
-
}, t.trace = function(n) {
|
|
1614
|
-
n === void 0 && (n = !1), Xs(this, n);
|
|
1615
|
-
}, Fe(e, [{
|
|
1616
|
-
key: "isDisposed",
|
|
1617
|
-
get: function() {
|
|
1618
|
-
return k(this.flags_, e.isDisposedMask_);
|
|
1619
|
-
},
|
|
1620
|
-
set: function(n) {
|
|
1621
|
-
this.flags_ = M(this.flags_, e.isDisposedMask_, n);
|
|
1622
|
-
}
|
|
1623
|
-
}, {
|
|
1624
|
-
key: "isScheduled",
|
|
1625
|
-
get: function() {
|
|
1626
|
-
return k(this.flags_, e.isScheduledMask_);
|
|
1627
|
-
},
|
|
1628
|
-
set: function(n) {
|
|
1629
|
-
this.flags_ = M(this.flags_, e.isScheduledMask_, n);
|
|
1630
|
-
}
|
|
1631
|
-
}, {
|
|
1632
|
-
key: "isTrackPending",
|
|
1633
|
-
get: function() {
|
|
1634
|
-
return k(this.flags_, e.isTrackPendingMask_);
|
|
1635
|
-
},
|
|
1636
|
-
set: function(n) {
|
|
1637
|
-
this.flags_ = M(this.flags_, e.isTrackPendingMask_, n);
|
|
1638
|
-
}
|
|
1639
|
-
}, {
|
|
1640
|
-
key: "isRunning",
|
|
1641
|
-
get: function() {
|
|
1642
|
-
return k(this.flags_, e.isRunningMask_);
|
|
1643
|
-
},
|
|
1644
|
-
set: function(n) {
|
|
1645
|
-
this.flags_ = M(this.flags_, e.isRunningMask_, n);
|
|
1646
|
-
}
|
|
1647
|
-
}, {
|
|
1648
|
-
key: "diffValue",
|
|
1649
|
-
get: function() {
|
|
1650
|
-
return k(this.flags_, e.diffValueMask_) ? 1 : 0;
|
|
1651
|
-
},
|
|
1652
|
-
set: function(n) {
|
|
1653
|
-
this.flags_ = M(this.flags_, e.diffValueMask_, n === 1);
|
|
1654
|
-
}
|
|
1655
|
-
}]);
|
|
1656
|
-
})();
|
|
1657
|
-
_e.isDisposedMask_ = 1;
|
|
1658
|
-
_e.isScheduledMask_ = 2;
|
|
1659
|
-
_e.isTrackPendingMask_ = 4;
|
|
1660
|
-
_e.isRunningMask_ = 8;
|
|
1661
|
-
_e.diffValueMask_ = 16;
|
|
1662
|
-
var Un = 100, fn = function(t) {
|
|
1663
|
-
return t();
|
|
1664
|
-
};
|
|
1665
|
-
function $r() {
|
|
1666
|
-
f.inBatch > 0 || f.isRunningReactions || fn(js);
|
|
1667
|
-
}
|
|
1668
|
-
function js() {
|
|
1669
|
-
f.isRunningReactions = !0;
|
|
1670
|
-
for (var e = f.pendingReactions, t = 0; e.length > 0; ) {
|
|
1671
|
-
++t === Un && (console.error(process.env.NODE_ENV !== "production" ? "Reaction doesn't converge to a stable state after " + Un + " iterations." + (" Probably there is a cycle in the reactive function: " + e[0]) : "[mobx] cycle in reaction: " + e[0]), e.splice(0));
|
|
1672
|
-
for (var r = e.splice(0), n = 0, i = r.length; n < i; n++)
|
|
1673
|
-
r[n].runReaction_();
|
|
1674
|
-
}
|
|
1675
|
-
f.isRunningReactions = !1;
|
|
1676
|
-
}
|
|
1677
|
-
var At = /* @__PURE__ */ De("Reaction", _e);
|
|
1678
|
-
function xs(e) {
|
|
1679
|
-
var t = fn;
|
|
1680
|
-
fn = function(n) {
|
|
1681
|
-
return e(function() {
|
|
1682
|
-
return t(n);
|
|
1683
|
-
});
|
|
1684
|
-
};
|
|
1685
|
-
}
|
|
1686
|
-
function T() {
|
|
1687
|
-
return process.env.NODE_ENV !== "production" && !!f.spyListeners.length;
|
|
1688
|
-
}
|
|
1689
|
-
function xe(e) {
|
|
1690
|
-
if (process.env.NODE_ENV !== "production" && f.spyListeners.length)
|
|
1691
|
-
for (var t = f.spyListeners, r = 0, n = t.length; r < n; r++)
|
|
1692
|
-
t[r](e);
|
|
1693
|
-
}
|
|
1694
|
-
function I(e) {
|
|
1695
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1696
|
-
var t = he({}, e, {
|
|
1697
|
-
spyReportStart: !0
|
|
1698
|
-
});
|
|
1699
|
-
xe(t);
|
|
1700
|
-
}
|
|
1701
|
-
}
|
|
1702
|
-
var Ds = {
|
|
1703
|
-
type: "report-end",
|
|
1704
|
-
spyReportEnd: !0
|
|
1705
|
-
};
|
|
1706
|
-
function $(e) {
|
|
1707
|
-
process.env.NODE_ENV !== "production" && xe(e ? he({}, e, {
|
|
1708
|
-
type: "report-end",
|
|
1709
|
-
spyReportEnd: !0
|
|
1710
|
-
}) : Ds);
|
|
1711
|
-
}
|
|
1712
|
-
function Rs(e) {
|
|
1713
|
-
return process.env.NODE_ENV === "production" ? (console.warn("[mobx.spy] Is a no-op in production builds"), function() {
|
|
1714
|
-
}) : (f.spyListeners.push(e), bn(function() {
|
|
1715
|
-
f.spyListeners = f.spyListeners.filter(function(t) {
|
|
1716
|
-
return t !== e;
|
|
1717
|
-
});
|
|
1718
|
-
}));
|
|
1719
|
-
}
|
|
1720
|
-
var Nn = "action", Ts = "action.bound", Ur = "autoAction", Vs = "autoAction.bound", Cs = "<unnamed action>", dn = /* @__PURE__ */ rt(Nn), Ps = /* @__PURE__ */ rt(Ts, {
|
|
1721
|
-
bound: !0
|
|
1722
|
-
}), pn = /* @__PURE__ */ rt(Ur, {
|
|
1723
|
-
autoAction: !0
|
|
1724
|
-
}), Bs = /* @__PURE__ */ rt(Vs, {
|
|
1725
|
-
autoAction: !0,
|
|
1726
|
-
bound: !0
|
|
1727
|
-
});
|
|
1728
|
-
function Fr(e) {
|
|
1729
|
-
var t = function(n, i) {
|
|
1730
|
-
if (D(n))
|
|
1731
|
-
return je(n.name || Cs, n, e);
|
|
1732
|
-
if (D(i))
|
|
1733
|
-
return je(n, i, e);
|
|
1734
|
-
if (nt(i))
|
|
1735
|
-
return (e ? pn : dn).decorate_20223_(n, i);
|
|
1736
|
-
if (Se(i))
|
|
1737
|
-
return tt(n, i, e ? pn : dn);
|
|
1738
|
-
if (Se(n))
|
|
1739
|
-
return ce(rt(e ? Ur : Nn, {
|
|
1740
|
-
name: n,
|
|
1741
|
-
autoAction: e
|
|
1742
|
-
}));
|
|
1743
|
-
process.env.NODE_ENV !== "production" && v("Invalid arguments for `action`");
|
|
1744
|
-
};
|
|
1745
|
-
return t;
|
|
1746
|
-
}
|
|
1747
|
-
var ke = /* @__PURE__ */ Fr(!1);
|
|
1748
|
-
Object.assign(ke, dn);
|
|
1749
|
-
var Je = /* @__PURE__ */ Fr(!0);
|
|
1750
|
-
Object.assign(Je, pn);
|
|
1751
|
-
ke.bound = /* @__PURE__ */ ce(Ps);
|
|
1752
|
-
Je.bound = /* @__PURE__ */ ce(Bs);
|
|
1753
|
-
function Le(e) {
|
|
1754
|
-
return D(e) && e.isMobxAction === !0;
|
|
1755
|
-
}
|
|
1756
|
-
function ks(e, t) {
|
|
1757
|
-
var r, n, i, s;
|
|
1758
|
-
t === void 0 && (t = vr), process.env.NODE_ENV !== "production" && (D(e) || v("Autorun expects a function as first argument"), Le(e) && v("Autorun does not accept actions since actions are untrackable"));
|
|
1759
|
-
var o = (r = (n = t) == null ? void 0 : n.name) != null ? r : process.env.NODE_ENV !== "production" ? e.name || "Autorun@" + ne() : "Autorun", a = !t.scheduler && !t.delay, u;
|
|
1760
|
-
if (a)
|
|
1761
|
-
u = new _e(o, function() {
|
|
1762
|
-
this.track(h);
|
|
1763
|
-
}, t.onError, t.requiresObservable);
|
|
1764
|
-
else {
|
|
1765
|
-
var l = Ls(t), d = !1;
|
|
1766
|
-
u = new _e(o, function() {
|
|
1767
|
-
d || (d = !0, l(function() {
|
|
1768
|
-
d = !1, u.isDisposed || u.track(h);
|
|
1769
|
-
}));
|
|
1770
|
-
}, t.onError, t.requiresObservable);
|
|
1771
|
-
}
|
|
1772
|
-
function h() {
|
|
1773
|
-
e(u);
|
|
1774
|
-
}
|
|
1775
|
-
return (i = t) != null && (i = i.signal) != null && i.aborted || u.schedule_(), u.getDisposer_((s = t) == null ? void 0 : s.signal);
|
|
1776
|
-
}
|
|
1777
|
-
var Ms = function(t) {
|
|
1778
|
-
return t();
|
|
1779
|
-
};
|
|
1780
|
-
function Ls(e) {
|
|
1781
|
-
return e.scheduler ? e.scheduler : e.delay ? function(t) {
|
|
1782
|
-
return setTimeout(t, e.delay);
|
|
1783
|
-
} : Ms;
|
|
1784
|
-
}
|
|
1785
|
-
var Is = "onBO", $s = "onBUO";
|
|
1786
|
-
function Us(e, t, r) {
|
|
1787
|
-
return Kr(Is, e, t, r);
|
|
1788
|
-
}
|
|
1789
|
-
function Gr(e, t, r) {
|
|
1790
|
-
return Kr($s, e, t, r);
|
|
1791
|
-
}
|
|
1792
|
-
function Kr(e, t, r, n) {
|
|
1793
|
-
var i = $e(t), s = D(n) ? n : r, o = e + "L";
|
|
1794
|
-
return i[o] ? i[o].add(s) : i[o] = /* @__PURE__ */ new Set([s]), function() {
|
|
1795
|
-
var a = i[o];
|
|
1796
|
-
a && (a.delete(s), a.size === 0 && delete i[o]);
|
|
1797
|
-
};
|
|
1798
|
-
}
|
|
1799
|
-
var Fs = "never", lt = "always", Gs = "observed";
|
|
1800
|
-
function Ks(e) {
|
|
1801
|
-
e.isolateGlobalState === !0 && Ns();
|
|
1802
|
-
var t = e.useProxies, r = e.enforceActions;
|
|
1803
|
-
if (t !== void 0 && (f.useProxies = t === lt ? !0 : t === Fs ? !1 : typeof Proxy < "u"), t === "ifavailable" && (f.verifyProxies = !0), r !== void 0) {
|
|
1804
|
-
var n = r === lt ? lt : r === Gs;
|
|
1805
|
-
f.enforceActions = n, f.allowStateChanges = !(n === !0 || n === lt);
|
|
1806
|
-
}
|
|
1807
|
-
["computedRequiresReaction", "reactionRequiresObservable", "observableRequiresReaction", "disableErrorBoundaries", "safeDescriptors"].forEach(function(i) {
|
|
1808
|
-
i in e && (f[i] = !!e[i]);
|
|
1809
|
-
}), 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 && xs(e.reactionScheduler);
|
|
1810
|
-
}
|
|
1811
|
-
function qr(e, t, r, n) {
|
|
1812
|
-
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"), Oe(e) && v("'extendObservable' should not be used on maps, use map.merge instead"), L(t) || v("'extendObservable' only accepts plain objects as second argument"), (Qe(t) || Qe(r)) && v("Extending an object with another observable (object) is not supported"));
|
|
1813
|
-
var i = Ni(t);
|
|
1814
|
-
return Ee(function() {
|
|
1815
|
-
var s = Ve(e, n)[m];
|
|
1816
|
-
Me(i).forEach(function(o) {
|
|
1817
|
-
s.extend_(
|
|
1818
|
-
o,
|
|
1819
|
-
i[o],
|
|
1820
|
-
// must pass "undefined" for { key: undefined }
|
|
1821
|
-
r && o in r ? r[o] : !0
|
|
1822
|
-
);
|
|
1823
|
-
});
|
|
1824
|
-
}), e;
|
|
1825
|
-
}
|
|
1826
|
-
function zr(e, t) {
|
|
1827
|
-
return Wr($e(e, t));
|
|
1828
|
-
}
|
|
1829
|
-
function Wr(e) {
|
|
1830
|
-
var t = {
|
|
1831
|
-
name: e.name_
|
|
1832
|
-
};
|
|
1833
|
-
return e.observing_ && e.observing_.length > 0 && (t.dependencies = qs(e.observing_).map(Wr)), t;
|
|
1834
|
-
}
|
|
1835
|
-
function qs(e) {
|
|
1836
|
-
return Array.from(new Set(e));
|
|
1837
|
-
}
|
|
1838
|
-
var zs = 0;
|
|
1839
|
-
function Yr() {
|
|
1840
|
-
this.message = "FLOW_CANCELLED";
|
|
1841
|
-
}
|
|
1842
|
-
Yr.prototype = /* @__PURE__ */ Object.create(Error.prototype);
|
|
1843
|
-
var qt = /* @__PURE__ */ Nr("flow"), Ws = /* @__PURE__ */ Nr("flow.bound", {
|
|
1844
|
-
bound: !0
|
|
1845
|
-
}), Ie = /* @__PURE__ */ Object.assign(function(t, r) {
|
|
1846
|
-
if (nt(r))
|
|
1847
|
-
return qt.decorate_20223_(t, r);
|
|
1848
|
-
if (Se(r))
|
|
1849
|
-
return tt(t, r, qt);
|
|
1850
|
-
process.env.NODE_ENV !== "production" && arguments.length !== 1 && v("Flow expects single argument with generator function");
|
|
1851
|
-
var n = t, i = n.name || "<unnamed flow>", s = function() {
|
|
1852
|
-
var a = this, u = arguments, l = ++zs, d = ke(i + " - runid: " + l + " - init", n).apply(a, u), h, _ = void 0, b = new Promise(function(g, O) {
|
|
1853
|
-
var N = 0;
|
|
1854
|
-
h = O;
|
|
1855
|
-
function x(w) {
|
|
1856
|
-
_ = void 0;
|
|
1857
|
-
var P;
|
|
1858
|
-
try {
|
|
1859
|
-
P = ke(i + " - runid: " + l + " - yield " + N++, d.next).call(d, w);
|
|
1860
|
-
} catch (fe) {
|
|
1861
|
-
return O(fe);
|
|
1862
|
-
}
|
|
1863
|
-
j(P);
|
|
1864
|
-
}
|
|
1865
|
-
function F(w) {
|
|
1866
|
-
_ = void 0;
|
|
1867
|
-
var P;
|
|
1868
|
-
try {
|
|
1869
|
-
P = ke(i + " - runid: " + l + " - yield " + N++, d.throw).call(d, w);
|
|
1870
|
-
} catch (fe) {
|
|
1871
|
-
return O(fe);
|
|
1872
|
-
}
|
|
1873
|
-
j(P);
|
|
1874
|
-
}
|
|
1875
|
-
function j(w) {
|
|
1876
|
-
if (D(w?.then)) {
|
|
1877
|
-
w.then(j, O);
|
|
1878
|
-
return;
|
|
1879
|
-
}
|
|
1880
|
-
return w.done ? g(w.value) : (_ = Promise.resolve(w.value), _.then(x, F));
|
|
1881
|
-
}
|
|
1882
|
-
x(void 0);
|
|
1883
|
-
});
|
|
1884
|
-
return b.cancel = ke(i + " - runid: " + l + " - cancel", function() {
|
|
1885
|
-
try {
|
|
1886
|
-
_ && Fn(_);
|
|
1887
|
-
var g = d.return(void 0), O = Promise.resolve(g.value);
|
|
1888
|
-
O.then(Pe, Pe), Fn(O), h(new Yr());
|
|
1889
|
-
} catch (N) {
|
|
1890
|
-
h(N);
|
|
1891
|
-
}
|
|
1892
|
-
}), b;
|
|
1893
|
-
};
|
|
1894
|
-
return s.isMobXFlow = !0, s;
|
|
1895
|
-
}, qt);
|
|
1896
|
-
Ie.bound = /* @__PURE__ */ ce(Ws);
|
|
1897
|
-
function Fn(e) {
|
|
1898
|
-
D(e.cancel) && e.cancel();
|
|
1899
|
-
}
|
|
1900
|
-
function Ze(e) {
|
|
1901
|
-
return e?.isMobXFlow === !0;
|
|
1902
|
-
}
|
|
1903
|
-
function Ys(e, t) {
|
|
1904
|
-
return e ? Ge(e) || !!e[m] || mn(e) || At(e) || Mt(e) : !1;
|
|
1905
|
-
}
|
|
1906
|
-
function Qe(e) {
|
|
1907
|
-
return process.env.NODE_ENV !== "production" && arguments.length !== 1 && v("isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property"), Ys(e);
|
|
1908
|
-
}
|
|
1909
|
-
function Xs() {
|
|
1910
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1911
|
-
for (var e = !1, t = arguments.length, r = new Array(t), n = 0; n < t; n++)
|
|
1912
|
-
r[n] = arguments[n];
|
|
1913
|
-
typeof r[r.length - 1] == "boolean" && (e = r.pop());
|
|
1914
|
-
var i = Hs(r);
|
|
1915
|
-
if (!i)
|
|
1916
|
-
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");
|
|
1917
|
-
i.isTracing_ === X.NONE && console.log("[mobx.trace] '" + i.name_ + "' tracing enabled"), i.isTracing_ = e ? X.BREAK : X.LOG;
|
|
1918
|
-
}
|
|
1919
|
-
}
|
|
1920
|
-
function Hs(e) {
|
|
1921
|
-
switch (e.length) {
|
|
1922
|
-
case 0:
|
|
1923
|
-
return f.trackingDerivation;
|
|
1924
|
-
case 1:
|
|
1925
|
-
return $e(e[0]);
|
|
1926
|
-
case 2:
|
|
1927
|
-
return $e(e[0], e[1]);
|
|
1928
|
-
}
|
|
1929
|
-
}
|
|
1930
|
-
function pe(e, t) {
|
|
1931
|
-
t === void 0 && (t = void 0), q();
|
|
1932
|
-
try {
|
|
1933
|
-
return e.apply(t);
|
|
1934
|
-
} finally {
|
|
1935
|
-
z();
|
|
1936
|
-
}
|
|
1937
|
-
}
|
|
1938
|
-
function Ne(e) {
|
|
1939
|
-
return e[m];
|
|
1940
|
-
}
|
|
1941
|
-
var Js = {
|
|
1942
|
-
has: function(t, r) {
|
|
1943
|
-
return process.env.NODE_ENV !== "production" && f.trackingDerivation && ze("detect new properties using the 'in' operator. Use 'has' from 'mobx' instead."), Ne(t).has_(r);
|
|
1944
|
-
},
|
|
1945
|
-
get: function(t, r) {
|
|
1946
|
-
return Ne(t).get_(r);
|
|
1947
|
-
},
|
|
1948
|
-
set: function(t, r, n) {
|
|
1949
|
-
var i;
|
|
1950
|
-
return Se(r) ? (process.env.NODE_ENV !== "production" && !Ne(t).values_.has(r) && ze("add a new observable property through direct assignment. Use 'set' from 'mobx' instead."), (i = Ne(t).set_(r, n, !0)) != null ? i : !0) : !1;
|
|
1951
|
-
},
|
|
1952
|
-
deleteProperty: function(t, r) {
|
|
1953
|
-
var n;
|
|
1954
|
-
return process.env.NODE_ENV !== "production" && ze("delete properties from an observable object. Use 'remove' from 'mobx' instead."), Se(r) ? (n = Ne(t).delete_(r, !0)) != null ? n : !0 : !1;
|
|
1955
|
-
},
|
|
1956
|
-
defineProperty: function(t, r, n) {
|
|
1957
|
-
var i;
|
|
1958
|
-
return process.env.NODE_ENV !== "production" && ze("define property on an observable object. Use 'defineProperty' from 'mobx' instead."), (i = Ne(t).defineProperty_(r, n)) != null ? i : !0;
|
|
1959
|
-
},
|
|
1960
|
-
ownKeys: function(t) {
|
|
1961
|
-
return process.env.NODE_ENV !== "production" && f.trackingDerivation && ze("iterate keys to detect added / removed properties. Use 'keys' from 'mobx' instead."), Ne(t).ownKeys_();
|
|
1962
|
-
},
|
|
1963
|
-
preventExtensions: function(t) {
|
|
1964
|
-
v(13);
|
|
1965
|
-
}
|
|
1966
|
-
};
|
|
1967
|
-
function Zs(e, t) {
|
|
1968
|
-
var r, n;
|
|
1969
|
-
return hr(), e = Ve(e, t), (n = (r = e[m]).proxy_) != null ? n : r.proxy_ = new Proxy(e, Js);
|
|
1970
|
-
}
|
|
1971
|
-
function G(e) {
|
|
1972
|
-
return e.interceptors_ !== void 0 && e.interceptors_.length > 0;
|
|
1973
|
-
}
|
|
1974
|
-
function it(e, t) {
|
|
1975
|
-
var r = e.interceptors_ || (e.interceptors_ = []);
|
|
1976
|
-
return r.push(t), bn(function() {
|
|
1977
|
-
var n = r.indexOf(t);
|
|
1978
|
-
n !== -1 && r.splice(n, 1);
|
|
1979
|
-
});
|
|
1980
|
-
}
|
|
1981
|
-
function K(e, t) {
|
|
1982
|
-
var r = Re();
|
|
1983
|
-
try {
|
|
1984
|
-
for (var n = [].concat(e.interceptors_ || []), i = 0, s = n.length; i < s && (t = n[i](t), t && !t.type && v(14), !!t); i++)
|
|
1985
|
-
;
|
|
1986
|
-
return t;
|
|
1987
|
-
} finally {
|
|
1988
|
-
ve(r);
|
|
1989
|
-
}
|
|
1990
|
-
}
|
|
1991
|
-
function ee(e) {
|
|
1992
|
-
return e.changeListeners_ !== void 0 && e.changeListeners_.length > 0;
|
|
1993
|
-
}
|
|
1994
|
-
function st(e, t) {
|
|
1995
|
-
var r = e.changeListeners_ || (e.changeListeners_ = []);
|
|
1996
|
-
return r.push(t), bn(function() {
|
|
1997
|
-
var n = r.indexOf(t);
|
|
1998
|
-
n !== -1 && r.splice(n, 1);
|
|
1999
|
-
});
|
|
2000
|
-
}
|
|
2001
|
-
function te(e, t) {
|
|
2002
|
-
var r = Re(), n = e.changeListeners_;
|
|
2003
|
-
if (n) {
|
|
2004
|
-
n = n.slice();
|
|
2005
|
-
for (var i = 0, s = n.length; i < s; i++)
|
|
2006
|
-
n[i](t);
|
|
2007
|
-
ve(r);
|
|
2008
|
-
}
|
|
2009
|
-
}
|
|
2010
|
-
function Qs(e, t, r) {
|
|
2011
|
-
return Ee(function() {
|
|
2012
|
-
var n, i = Ve(e, r)[m];
|
|
2013
|
-
process.env.NODE_ENV !== "production" && t && e[B] && v("makeObservable second arg must be nullish when using decorators. Mixing @decorator syntax with annotations is not supported."), (n = t) != null || (t = Di(e)), Me(t).forEach(function(s) {
|
|
2014
|
-
return i.make_(s, t[s]);
|
|
2015
|
-
});
|
|
2016
|
-
}), e;
|
|
2017
|
-
}
|
|
2018
|
-
var zt = /* @__PURE__ */ Symbol("mobx-keys");
|
|
2019
|
-
function Te(e, t, r) {
|
|
2020
|
-
return process.env.NODE_ENV !== "production" && (!L(e) && !L(Object.getPrototypeOf(e)) && v("'makeAutoObservable' can only be used for classes that don't have a superclass"), Ge(e) && v("makeAutoObservable can only be used on objects not already made observable")), L(e) ? qr(e, e, t, r) : (Ee(function() {
|
|
2021
|
-
var n = Ve(e, r)[m];
|
|
2022
|
-
if (!e[zt]) {
|
|
2023
|
-
var i = Object.getPrototypeOf(e), s = new Set([].concat(Me(e), Me(i)));
|
|
2024
|
-
s.delete("constructor"), s.delete(m), et(i, zt, s);
|
|
2025
|
-
}
|
|
2026
|
-
e[zt].forEach(function(o) {
|
|
2027
|
-
return n.make_(
|
|
2028
|
-
o,
|
|
2029
|
-
// must pass "undefined" for { key: undefined }
|
|
2030
|
-
t && o in t ? t[o] : !0
|
|
2031
|
-
);
|
|
2032
|
-
});
|
|
2033
|
-
}), e);
|
|
2034
|
-
}
|
|
2035
|
-
var Gn = "splice", Q = "update", eo = 1e4, to = {
|
|
2036
|
-
get: function(t, r) {
|
|
2037
|
-
var n = t[m];
|
|
2038
|
-
return r === m ? n : r === "length" ? n.getArrayLength_() : typeof r == "string" && !isNaN(r) ? n.get_(parseInt(r)) : Y(St, r) ? St[r] : t[r];
|
|
2039
|
-
},
|
|
2040
|
-
set: function(t, r, n) {
|
|
2041
|
-
var i = t[m];
|
|
2042
|
-
return r === "length" && i.setArrayLength_(n), typeof r == "symbol" || isNaN(r) ? t[r] = n : i.set_(parseInt(r), n), !0;
|
|
2043
|
-
},
|
|
2044
|
-
preventExtensions: function() {
|
|
2045
|
-
v(15);
|
|
2046
|
-
}
|
|
2047
|
-
}, An = /* @__PURE__ */ (function() {
|
|
2048
|
-
function e(r, n, i, s) {
|
|
2049
|
-
r === void 0 && (r = process.env.NODE_ENV !== "production" ? "ObservableArray@" + ne() : "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 ye(r), this.enhancer_ = function(o, a) {
|
|
2050
|
-
return n(o, a, process.env.NODE_ENV !== "production" ? r + "[..]" : "ObservableArray[..]");
|
|
2051
|
-
};
|
|
2052
|
-
}
|
|
2053
|
-
var t = e.prototype;
|
|
2054
|
-
return t.dehanceValue_ = function(n) {
|
|
2055
|
-
return this.dehancer !== void 0 ? this.dehancer(n) : n;
|
|
2056
|
-
}, t.dehanceValues_ = function(n) {
|
|
2057
|
-
return this.dehancer !== void 0 && n.length > 0 ? n.map(this.dehancer) : n;
|
|
2058
|
-
}, t.intercept_ = function(n) {
|
|
2059
|
-
return it(this, n);
|
|
2060
|
-
}, t.observe_ = function(n, i) {
|
|
2061
|
-
return i === void 0 && (i = !1), i && n({
|
|
2062
|
-
observableKind: "array",
|
|
2063
|
-
object: this.proxy_,
|
|
2064
|
-
debugObjectName: this.atom_.name_,
|
|
2065
|
-
type: "splice",
|
|
2066
|
-
index: 0,
|
|
2067
|
-
added: this.values_.slice(),
|
|
2068
|
-
addedCount: this.values_.length,
|
|
2069
|
-
removed: [],
|
|
2070
|
-
removedCount: 0
|
|
2071
|
-
}), st(this, n);
|
|
2072
|
-
}, t.getArrayLength_ = function() {
|
|
2073
|
-
return this.atom_.reportObserved(), this.values_.length;
|
|
2074
|
-
}, t.setArrayLength_ = function(n) {
|
|
2075
|
-
(typeof n != "number" || isNaN(n) || n < 0) && v("Out of range: " + n);
|
|
2076
|
-
var i = this.values_.length;
|
|
2077
|
-
if (n !== i)
|
|
2078
|
-
if (n > i) {
|
|
2079
|
-
for (var s = new Array(n - i), o = 0; o < n - i; o++)
|
|
2080
|
-
s[o] = void 0;
|
|
2081
|
-
this.spliceWithArray_(i, 0, s);
|
|
2082
|
-
} else
|
|
2083
|
-
this.spliceWithArray_(n, i - n);
|
|
2084
|
-
}, t.updateArrayLength_ = function(n, i) {
|
|
2085
|
-
n !== this.lastKnownLength_ && v(16), this.lastKnownLength_ += i, this.legacyMode_ && i > 0 && ei(n + i + 1);
|
|
2086
|
-
}, t.spliceWithArray_ = function(n, i, s) {
|
|
2087
|
-
var o = this;
|
|
2088
|
-
ae(this.atom_);
|
|
2089
|
-
var a = this.values_.length;
|
|
2090
|
-
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 = gt), G(this)) {
|
|
2091
|
-
var u = K(this, {
|
|
2092
|
-
object: this.proxy_,
|
|
2093
|
-
type: Gn,
|
|
2094
|
-
index: n,
|
|
2095
|
-
removedCount: i,
|
|
2096
|
-
added: s
|
|
2097
|
-
});
|
|
2098
|
-
if (!u)
|
|
2099
|
-
return gt;
|
|
2100
|
-
i = u.removedCount, s = u.added;
|
|
2101
|
-
}
|
|
2102
|
-
if (s = s.length === 0 ? s : s.map(function(h) {
|
|
2103
|
-
return o.enhancer_(h, void 0);
|
|
2104
|
-
}), this.legacyMode_ || process.env.NODE_ENV !== "production") {
|
|
2105
|
-
var l = s.length - i;
|
|
2106
|
-
this.updateArrayLength_(a, l);
|
|
2107
|
-
}
|
|
2108
|
-
var d = this.spliceItemsIntoValues_(n, i, s);
|
|
2109
|
-
return (i !== 0 || s.length !== 0) && this.notifyArraySplice_(n, s, d), this.dehanceValues_(d);
|
|
2110
|
-
}, t.spliceItemsIntoValues_ = function(n, i, s) {
|
|
2111
|
-
if (s.length < eo) {
|
|
2112
|
-
var o;
|
|
2113
|
-
return (o = this.values_).splice.apply(o, [n, i].concat(s));
|
|
2114
|
-
} else {
|
|
2115
|
-
var a = this.values_.slice(n, n + i), u = this.values_.slice(n + i);
|
|
2116
|
-
this.values_.length += s.length - i;
|
|
2117
|
-
for (var l = 0; l < s.length; l++)
|
|
2118
|
-
this.values_[n + l] = s[l];
|
|
2119
|
-
for (var d = 0; d < u.length; d++)
|
|
2120
|
-
this.values_[n + s.length + d] = u[d];
|
|
2121
|
-
return a;
|
|
2122
|
-
}
|
|
2123
|
-
}, t.notifyArrayChildUpdate_ = function(n, i, s) {
|
|
2124
|
-
var o = !this.owned_ && T(), a = ee(this), u = a || o ? {
|
|
2125
|
-
observableKind: "array",
|
|
2126
|
-
object: this.proxy_,
|
|
2127
|
-
type: Q,
|
|
2128
|
-
debugObjectName: this.atom_.name_,
|
|
2129
|
-
index: n,
|
|
2130
|
-
newValue: i,
|
|
2131
|
-
oldValue: s
|
|
2132
|
-
} : null;
|
|
2133
|
-
process.env.NODE_ENV !== "production" && o && I(u), this.atom_.reportChanged(), a && te(this, u), process.env.NODE_ENV !== "production" && o && $();
|
|
2134
|
-
}, t.notifyArraySplice_ = function(n, i, s) {
|
|
2135
|
-
var o = !this.owned_ && T(), a = ee(this), u = a || o ? {
|
|
2136
|
-
observableKind: "array",
|
|
2137
|
-
object: this.proxy_,
|
|
2138
|
-
debugObjectName: this.atom_.name_,
|
|
2139
|
-
type: Gn,
|
|
2140
|
-
index: n,
|
|
2141
|
-
removed: s,
|
|
2142
|
-
added: i,
|
|
2143
|
-
removedCount: s.length,
|
|
2144
|
-
addedCount: i.length
|
|
2145
|
-
} : null;
|
|
2146
|
-
process.env.NODE_ENV !== "production" && o && I(u), this.atom_.reportChanged(), a && te(this, u), process.env.NODE_ENV !== "production" && o && $();
|
|
2147
|
-
}, t.get_ = function(n) {
|
|
2148
|
-
if (this.legacyMode_ && n >= this.values_.length) {
|
|
2149
|
-
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);
|
|
2150
|
-
return;
|
|
2151
|
-
}
|
|
2152
|
-
return this.atom_.reportObserved(), this.dehanceValue_(this.values_[n]);
|
|
2153
|
-
}, t.set_ = function(n, i) {
|
|
2154
|
-
var s = this.values_;
|
|
2155
|
-
if (this.legacyMode_ && n > s.length && v(17, n, s.length), n < s.length) {
|
|
2156
|
-
ae(this.atom_);
|
|
2157
|
-
var o = s[n];
|
|
2158
|
-
if (G(this)) {
|
|
2159
|
-
var a = K(this, {
|
|
2160
|
-
type: Q,
|
|
2161
|
-
object: this.proxy_,
|
|
2162
|
-
// since "this" is the real array we need to pass its proxy
|
|
2163
|
-
index: n,
|
|
2164
|
-
newValue: i
|
|
2165
|
-
});
|
|
2166
|
-
if (!a)
|
|
2167
|
-
return;
|
|
2168
|
-
i = a.newValue;
|
|
2169
|
-
}
|
|
2170
|
-
i = this.enhancer_(i, o);
|
|
2171
|
-
var u = i !== o;
|
|
2172
|
-
u && (s[n] = i, this.notifyArrayChildUpdate_(n, i, o));
|
|
2173
|
-
} else {
|
|
2174
|
-
for (var l = new Array(n + 1 - s.length), d = 0; d < l.length - 1; d++)
|
|
2175
|
-
l[d] = void 0;
|
|
2176
|
-
l[l.length - 1] = i, this.spliceWithArray_(s.length, 0, l);
|
|
2177
|
-
}
|
|
2178
|
-
}, e;
|
|
2179
|
-
})();
|
|
2180
|
-
function no(e, t, r, n) {
|
|
2181
|
-
return r === void 0 && (r = process.env.NODE_ENV !== "production" ? "ObservableArray@" + ne() : "ObservableArray"), n === void 0 && (n = !1), hr(), Ee(function() {
|
|
2182
|
-
var i = new An(r, t, n, !1);
|
|
2183
|
-
br(i.values_, m, i);
|
|
2184
|
-
var s = new Proxy(i.values_, to);
|
|
2185
|
-
return i.proxy_ = s, e && e.length && i.spliceWithArray_(0, 0, e), s;
|
|
2186
|
-
});
|
|
2187
|
-
}
|
|
2188
|
-
var St = {
|
|
2189
|
-
clear: function() {
|
|
2190
|
-
return this.splice(0);
|
|
2191
|
-
},
|
|
2192
|
-
replace: function(t) {
|
|
2193
|
-
var r = this[m];
|
|
2194
|
-
return r.spliceWithArray_(0, r.values_.length, t);
|
|
2195
|
-
},
|
|
2196
|
-
// Used by JSON.stringify
|
|
2197
|
-
toJSON: function() {
|
|
2198
|
-
return this.slice();
|
|
2199
|
-
},
|
|
2200
|
-
/*
|
|
2201
|
-
* functions that do alter the internal structure of the array, (based on lib.es6.d.ts)
|
|
2202
|
-
* since these functions alter the inner structure of the array, the have side effects.
|
|
2203
|
-
* Because the have side effects, they should not be used in computed function,
|
|
2204
|
-
* and for that reason the do not call dependencyState.notifyObserved
|
|
2205
|
-
*/
|
|
2206
|
-
splice: function(t, r) {
|
|
2207
|
-
for (var n = arguments.length, i = new Array(n > 2 ? n - 2 : 0), s = 2; s < n; s++)
|
|
2208
|
-
i[s - 2] = arguments[s];
|
|
2209
|
-
var o = this[m];
|
|
2210
|
-
switch (arguments.length) {
|
|
2211
|
-
case 0:
|
|
2212
|
-
return [];
|
|
2213
|
-
case 1:
|
|
2214
|
-
return o.spliceWithArray_(t);
|
|
2215
|
-
case 2:
|
|
2216
|
-
return o.spliceWithArray_(t, r);
|
|
2217
|
-
}
|
|
2218
|
-
return o.spliceWithArray_(t, r, i);
|
|
2219
|
-
},
|
|
2220
|
-
spliceWithArray: function(t, r, n) {
|
|
2221
|
-
return this[m].spliceWithArray_(t, r, n);
|
|
2222
|
-
},
|
|
2223
|
-
push: function() {
|
|
2224
|
-
for (var t = this[m], r = arguments.length, n = new Array(r), i = 0; i < r; i++)
|
|
2225
|
-
n[i] = arguments[i];
|
|
2226
|
-
return t.spliceWithArray_(t.values_.length, 0, n), t.values_.length;
|
|
2227
|
-
},
|
|
2228
|
-
pop: function() {
|
|
2229
|
-
return this.splice(Math.max(this[m].values_.length - 1, 0), 1)[0];
|
|
2230
|
-
},
|
|
2231
|
-
shift: function() {
|
|
2232
|
-
return this.splice(0, 1)[0];
|
|
2233
|
-
},
|
|
2234
|
-
unshift: function() {
|
|
2235
|
-
for (var t = this[m], r = arguments.length, n = new Array(r), i = 0; i < r; i++)
|
|
2236
|
-
n[i] = arguments[i];
|
|
2237
|
-
return t.spliceWithArray_(0, 0, n), t.values_.length;
|
|
2238
|
-
},
|
|
2239
|
-
reverse: function() {
|
|
2240
|
-
return f.trackingDerivation && v(37, "reverse"), this.replace(this.slice().reverse()), this;
|
|
2241
|
-
},
|
|
2242
|
-
sort: function() {
|
|
2243
|
-
f.trackingDerivation && v(37, "sort");
|
|
2244
|
-
var t = this.slice();
|
|
2245
|
-
return t.sort.apply(t, arguments), this.replace(t), this;
|
|
2246
|
-
},
|
|
2247
|
-
remove: function(t) {
|
|
2248
|
-
var r = this[m], n = r.dehanceValues_(r.values_).indexOf(t);
|
|
2249
|
-
return n > -1 ? (this.splice(n, 1), !0) : !1;
|
|
2250
|
-
}
|
|
2251
|
-
};
|
|
2252
|
-
A("at", U);
|
|
2253
|
-
A("concat", U);
|
|
2254
|
-
A("flat", U);
|
|
2255
|
-
A("includes", U);
|
|
2256
|
-
A("indexOf", U);
|
|
2257
|
-
A("join", U);
|
|
2258
|
-
A("lastIndexOf", U);
|
|
2259
|
-
A("slice", U);
|
|
2260
|
-
A("toString", U);
|
|
2261
|
-
A("toLocaleString", U);
|
|
2262
|
-
A("toSorted", U);
|
|
2263
|
-
A("toSpliced", U);
|
|
2264
|
-
A("with", U);
|
|
2265
|
-
A("every", re);
|
|
2266
|
-
A("filter", re);
|
|
2267
|
-
A("find", re);
|
|
2268
|
-
A("findIndex", re);
|
|
2269
|
-
A("findLast", re);
|
|
2270
|
-
A("findLastIndex", re);
|
|
2271
|
-
A("flatMap", re);
|
|
2272
|
-
A("forEach", re);
|
|
2273
|
-
A("map", re);
|
|
2274
|
-
A("some", re);
|
|
2275
|
-
A("toReversed", re);
|
|
2276
|
-
A("reduce", Xr);
|
|
2277
|
-
A("reduceRight", Xr);
|
|
2278
|
-
function A(e, t) {
|
|
2279
|
-
typeof Array.prototype[e] == "function" && (St[e] = t(e));
|
|
2280
|
-
}
|
|
2281
|
-
function U(e) {
|
|
2282
|
-
return function() {
|
|
2283
|
-
var t = this[m];
|
|
2284
|
-
t.atom_.reportObserved();
|
|
2285
|
-
var r = t.dehanceValues_(t.values_);
|
|
2286
|
-
return r[e].apply(r, arguments);
|
|
2287
|
-
};
|
|
2288
|
-
}
|
|
2289
|
-
function re(e) {
|
|
2290
|
-
return function(t, r) {
|
|
2291
|
-
var n = this, i = this[m];
|
|
2292
|
-
i.atom_.reportObserved();
|
|
2293
|
-
var s = i.dehanceValues_(i.values_);
|
|
2294
|
-
return s[e](function(o, a) {
|
|
2295
|
-
return t.call(r, o, a, n);
|
|
2296
|
-
});
|
|
2297
|
-
};
|
|
2298
|
-
}
|
|
2299
|
-
function Xr(e) {
|
|
2300
|
-
return function() {
|
|
2301
|
-
var t = this, r = this[m];
|
|
2302
|
-
r.atom_.reportObserved();
|
|
2303
|
-
var n = r.dehanceValues_(r.values_), i = arguments[0];
|
|
2304
|
-
return arguments[0] = function(s, o, a) {
|
|
2305
|
-
return i(s, o, a, t);
|
|
2306
|
-
}, n[e].apply(n, arguments);
|
|
2307
|
-
};
|
|
2308
|
-
}
|
|
2309
|
-
var ro = /* @__PURE__ */ De("ObservableArrayAdministration", An);
|
|
2310
|
-
function Lt(e) {
|
|
2311
|
-
return Vt(e) && ro(e[m]);
|
|
2312
|
-
}
|
|
2313
|
-
var io = {}, me = "add", wt = "delete", Hr = /* @__PURE__ */ (function() {
|
|
2314
|
-
function e(r, n, i) {
|
|
2315
|
-
var s = this;
|
|
2316
|
-
n === void 0 && (n = we), i === void 0 && (i = process.env.NODE_ENV !== "production" ? "ObservableMap@" + ne() : "ObservableMap"), this.enhancer_ = void 0, this.name_ = void 0, this[m] = io, 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), Ee(function() {
|
|
2317
|
-
s.keysAtom_ = Or(process.env.NODE_ENV !== "production" ? s.name_ + ".keys()" : "ObservableMap.keys()"), s.data_ = /* @__PURE__ */ new Map(), s.hasMap_ = /* @__PURE__ */ new Map(), r && s.merge(r);
|
|
2318
|
-
});
|
|
2319
|
-
}
|
|
2320
|
-
var t = e.prototype;
|
|
2321
|
-
return t.has_ = function(n) {
|
|
2322
|
-
return this.data_.has(n);
|
|
2323
|
-
}, t.has = function(n) {
|
|
2324
|
-
var i = this;
|
|
2325
|
-
if (!f.trackingDerivation)
|
|
2326
|
-
return this.has_(n);
|
|
2327
|
-
var s = this.hasMap_.get(n);
|
|
2328
|
-
if (!s) {
|
|
2329
|
-
var o = s = new Ae(this.has_(n), Pt, process.env.NODE_ENV !== "production" ? this.name_ + "." + sn(n) + "?" : "ObservableMap.key?", !1);
|
|
2330
|
-
this.hasMap_.set(n, o), Gr(o, function() {
|
|
2331
|
-
return i.hasMap_.delete(n);
|
|
2332
|
-
});
|
|
2333
|
-
}
|
|
2334
|
-
return s.get();
|
|
2335
|
-
}, t.set = function(n, i) {
|
|
2336
|
-
var s = this.has_(n);
|
|
2337
|
-
if (G(this)) {
|
|
2338
|
-
var o = K(this, {
|
|
2339
|
-
type: s ? Q : me,
|
|
2340
|
-
object: this,
|
|
2341
|
-
newValue: i,
|
|
2342
|
-
name: n
|
|
2343
|
-
});
|
|
2344
|
-
if (!o)
|
|
2345
|
-
return this;
|
|
2346
|
-
i = o.newValue;
|
|
2347
|
-
}
|
|
2348
|
-
return s ? this.updateValue_(n, i) : this.addValue_(n, i), this;
|
|
2349
|
-
}, t.delete = function(n) {
|
|
2350
|
-
var i = this;
|
|
2351
|
-
if (ae(this.keysAtom_), G(this)) {
|
|
2352
|
-
var s = K(this, {
|
|
2353
|
-
type: wt,
|
|
2354
|
-
object: this,
|
|
2355
|
-
name: n
|
|
2356
|
-
});
|
|
2357
|
-
if (!s)
|
|
2358
|
-
return !1;
|
|
2359
|
-
}
|
|
2360
|
-
if (this.has_(n)) {
|
|
2361
|
-
var o = T(), a = ee(this), u = a || o ? {
|
|
2362
|
-
observableKind: "map",
|
|
2363
|
-
debugObjectName: this.name_,
|
|
2364
|
-
type: wt,
|
|
2365
|
-
object: this,
|
|
2366
|
-
oldValue: this.data_.get(n).value_,
|
|
2367
|
-
name: n
|
|
2368
|
-
} : null;
|
|
2369
|
-
return process.env.NODE_ENV !== "production" && o && I(u), pe(function() {
|
|
2370
|
-
var l;
|
|
2371
|
-
i.keysAtom_.reportChanged(), (l = i.hasMap_.get(n)) == null || l.setNewValue_(!1);
|
|
2372
|
-
var d = i.data_.get(n);
|
|
2373
|
-
d.setNewValue_(void 0), i.data_.delete(n);
|
|
2374
|
-
}), a && te(this, u), process.env.NODE_ENV !== "production" && o && $(), !0;
|
|
2375
|
-
}
|
|
2376
|
-
return !1;
|
|
2377
|
-
}, t.updateValue_ = function(n, i) {
|
|
2378
|
-
var s = this.data_.get(n);
|
|
2379
|
-
if (i = s.prepareNewValue_(i), i !== f.UNCHANGED) {
|
|
2380
|
-
var o = T(), a = ee(this), u = a || o ? {
|
|
2381
|
-
observableKind: "map",
|
|
2382
|
-
debugObjectName: this.name_,
|
|
2383
|
-
type: Q,
|
|
2384
|
-
object: this,
|
|
2385
|
-
oldValue: s.value_,
|
|
2386
|
-
name: n,
|
|
2387
|
-
newValue: i
|
|
2388
|
-
} : null;
|
|
2389
|
-
process.env.NODE_ENV !== "production" && o && I(u), s.setNewValue_(i), a && te(this, u), process.env.NODE_ENV !== "production" && o && $();
|
|
2390
|
-
}
|
|
2391
|
-
}, t.addValue_ = function(n, i) {
|
|
2392
|
-
var s = this;
|
|
2393
|
-
ae(this.keysAtom_), pe(function() {
|
|
2394
|
-
var l, d = new Ae(i, s.enhancer_, process.env.NODE_ENV !== "production" ? s.name_ + "." + sn(n) : "ObservableMap.key", !1);
|
|
2395
|
-
s.data_.set(n, d), i = d.value_, (l = s.hasMap_.get(n)) == null || l.setNewValue_(!0), s.keysAtom_.reportChanged();
|
|
2396
|
-
});
|
|
2397
|
-
var o = T(), a = ee(this), u = a || o ? {
|
|
2398
|
-
observableKind: "map",
|
|
2399
|
-
debugObjectName: this.name_,
|
|
2400
|
-
type: me,
|
|
2401
|
-
object: this,
|
|
2402
|
-
name: n,
|
|
2403
|
-
newValue: i
|
|
2404
|
-
} : null;
|
|
2405
|
-
process.env.NODE_ENV !== "production" && o && I(u), a && te(this, u), process.env.NODE_ENV !== "production" && o && $();
|
|
2406
|
-
}, t.get = function(n) {
|
|
2407
|
-
return this.has(n) ? this.dehanceValue_(this.data_.get(n).get()) : this.dehanceValue_(void 0);
|
|
2408
|
-
}, t.dehanceValue_ = function(n) {
|
|
2409
|
-
return this.dehancer !== void 0 ? this.dehancer(n) : n;
|
|
2410
|
-
}, t.keys = function() {
|
|
2411
|
-
return this.keysAtom_.reportObserved(), this.data_.keys();
|
|
2412
|
-
}, t.values = function() {
|
|
2413
|
-
var n = this, i = this.keys();
|
|
2414
|
-
return Kn({
|
|
2415
|
-
next: function() {
|
|
2416
|
-
var o = i.next(), a = o.done, u = o.value;
|
|
2417
|
-
return {
|
|
2418
|
-
done: a,
|
|
2419
|
-
value: a ? void 0 : n.get(u)
|
|
2420
|
-
};
|
|
2421
|
-
}
|
|
2422
|
-
});
|
|
2423
|
-
}, t.entries = function() {
|
|
2424
|
-
var n = this, i = this.keys();
|
|
2425
|
-
return Kn({
|
|
2426
|
-
next: function() {
|
|
2427
|
-
var o = i.next(), a = o.done, u = o.value;
|
|
2428
|
-
return {
|
|
2429
|
-
done: a,
|
|
2430
|
-
value: a ? void 0 : [u, n.get(u)]
|
|
2431
|
-
};
|
|
2432
|
-
}
|
|
2433
|
-
});
|
|
2434
|
-
}, t[Symbol.iterator] = function() {
|
|
2435
|
-
return this.entries();
|
|
2436
|
-
}, t.forEach = function(n, i) {
|
|
2437
|
-
for (var s = Be(this), o; !(o = s()).done; ) {
|
|
2438
|
-
var a = o.value, u = a[0], l = a[1];
|
|
2439
|
-
n.call(i, l, u, this);
|
|
2440
|
-
}
|
|
2441
|
-
}, t.merge = function(n) {
|
|
2442
|
-
var i = this;
|
|
2443
|
-
return Oe(n) && (n = new Map(n)), pe(function() {
|
|
2444
|
-
L(n) ? Ei(n).forEach(function(s) {
|
|
2445
|
-
return i.set(s, n[s]);
|
|
2446
|
-
}) : Array.isArray(n) ? n.forEach(function(s) {
|
|
2447
|
-
var o = s[0], a = s[1];
|
|
2448
|
-
return i.set(o, a);
|
|
2449
|
-
}) : Ue(n) ? (Oi(n) || v(19, n), n.forEach(function(s, o) {
|
|
2450
|
-
return i.set(o, s);
|
|
2451
|
-
})) : n != null && v(20, n);
|
|
2452
|
-
}), this;
|
|
2453
|
-
}, t.clear = function() {
|
|
2454
|
-
var n = this;
|
|
2455
|
-
pe(function() {
|
|
2456
|
-
Tr(function() {
|
|
2457
|
-
for (var i = Be(n.keys()), s; !(s = i()).done; ) {
|
|
2458
|
-
var o = s.value;
|
|
2459
|
-
n.delete(o);
|
|
2460
|
-
}
|
|
2461
|
-
});
|
|
2462
|
-
});
|
|
2463
|
-
}, t.replace = function(n) {
|
|
2464
|
-
var i = this;
|
|
2465
|
-
return pe(function() {
|
|
2466
|
-
for (var s = so(n), o = /* @__PURE__ */ new Map(), a = !1, u = Be(i.data_.keys()), l; !(l = u()).done; ) {
|
|
2467
|
-
var d = l.value;
|
|
2468
|
-
if (!s.has(d)) {
|
|
2469
|
-
var h = i.delete(d);
|
|
2470
|
-
if (h)
|
|
2471
|
-
a = !0;
|
|
2472
|
-
else {
|
|
2473
|
-
var _ = i.data_.get(d);
|
|
2474
|
-
o.set(d, _);
|
|
2475
|
-
}
|
|
2476
|
-
}
|
|
2477
|
-
}
|
|
2478
|
-
for (var b = Be(s.entries()), g; !(g = b()).done; ) {
|
|
2479
|
-
var O = g.value, N = O[0], x = O[1], F = i.data_.has(N);
|
|
2480
|
-
if (i.set(N, x), i.data_.has(N)) {
|
|
2481
|
-
var j = i.data_.get(N);
|
|
2482
|
-
o.set(N, j), F || (a = !0);
|
|
2483
|
-
}
|
|
2484
|
-
}
|
|
2485
|
-
if (!a)
|
|
2486
|
-
if (i.data_.size !== o.size)
|
|
2487
|
-
i.keysAtom_.reportChanged();
|
|
2488
|
-
else
|
|
2489
|
-
for (var w = i.data_.keys(), P = o.keys(), fe = w.next(), ot = P.next(); !fe.done; ) {
|
|
2490
|
-
if (fe.value !== ot.value) {
|
|
2491
|
-
i.keysAtom_.reportChanged();
|
|
2492
|
-
break;
|
|
2493
|
-
}
|
|
2494
|
-
fe = w.next(), ot = P.next();
|
|
2495
|
-
}
|
|
2496
|
-
i.data_ = o;
|
|
2497
|
-
}), this;
|
|
2498
|
-
}, t.toString = function() {
|
|
2499
|
-
return "[object ObservableMap]";
|
|
2500
|
-
}, t.toJSON = function() {
|
|
2501
|
-
return Array.from(this);
|
|
2502
|
-
}, t.observe_ = function(n, i) {
|
|
2503
|
-
return process.env.NODE_ENV !== "production" && i === !0 && v("`observe` doesn't support fireImmediately=true in combination with maps."), st(this, n);
|
|
2504
|
-
}, t.intercept_ = function(n) {
|
|
2505
|
-
return it(this, n);
|
|
2506
|
-
}, Fe(e, [{
|
|
2507
|
-
key: "size",
|
|
2508
|
-
get: function() {
|
|
2509
|
-
return this.keysAtom_.reportObserved(), this.data_.size;
|
|
2510
|
-
}
|
|
2511
|
-
}, {
|
|
2512
|
-
key: Symbol.toStringTag,
|
|
2513
|
-
get: function() {
|
|
2514
|
-
return "Map";
|
|
2515
|
-
}
|
|
2516
|
-
}]);
|
|
2517
|
-
})(), Oe = /* @__PURE__ */ De("ObservableMap", Hr);
|
|
2518
|
-
function Kn(e) {
|
|
2519
|
-
return e[Symbol.toStringTag] = "MapIterator", wn(e);
|
|
2520
|
-
}
|
|
2521
|
-
function so(e) {
|
|
2522
|
-
if (Ue(e) || Oe(e))
|
|
2523
|
-
return e;
|
|
2524
|
-
if (Array.isArray(e))
|
|
2525
|
-
return new Map(e);
|
|
2526
|
-
if (L(e)) {
|
|
2527
|
-
var t = /* @__PURE__ */ new Map();
|
|
2528
|
-
for (var r in e)
|
|
2529
|
-
t.set(r, e[r]);
|
|
2530
|
-
return t;
|
|
2531
|
-
} else
|
|
2532
|
-
return v(21, e);
|
|
2533
|
-
}
|
|
2534
|
-
var oo = {}, Jr = /* @__PURE__ */ (function() {
|
|
2535
|
-
function e(r, n, i) {
|
|
2536
|
-
var s = this;
|
|
2537
|
-
n === void 0 && (n = we), i === void 0 && (i = process.env.NODE_ENV !== "production" ? "ObservableSet@" + ne() : "ObservableSet"), this.name_ = void 0, this[m] = oo, this.data_ = /* @__PURE__ */ 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) {
|
|
2538
|
-
return n(o, a, i);
|
|
2539
|
-
}, Ee(function() {
|
|
2540
|
-
s.atom_ = Or(s.name_), r && s.replace(r);
|
|
2541
|
-
});
|
|
2542
|
-
}
|
|
2543
|
-
var t = e.prototype;
|
|
2544
|
-
return t.dehanceValue_ = function(n) {
|
|
2545
|
-
return this.dehancer !== void 0 ? this.dehancer(n) : n;
|
|
2546
|
-
}, t.clear = function() {
|
|
2547
|
-
var n = this;
|
|
2548
|
-
pe(function() {
|
|
2549
|
-
Tr(function() {
|
|
2550
|
-
for (var i = Be(n.data_.values()), s; !(s = i()).done; ) {
|
|
2551
|
-
var o = s.value;
|
|
2552
|
-
n.delete(o);
|
|
2553
|
-
}
|
|
2554
|
-
});
|
|
2555
|
-
});
|
|
2556
|
-
}, t.forEach = function(n, i) {
|
|
2557
|
-
for (var s = Be(this), o; !(o = s()).done; ) {
|
|
2558
|
-
var a = o.value;
|
|
2559
|
-
n.call(i, a, a, this);
|
|
2560
|
-
}
|
|
2561
|
-
}, t.add = function(n) {
|
|
2562
|
-
var i = this;
|
|
2563
|
-
if (ae(this.atom_), G(this)) {
|
|
2564
|
-
var s = K(this, {
|
|
2565
|
-
type: me,
|
|
2566
|
-
object: this,
|
|
2567
|
-
newValue: n
|
|
2568
|
-
});
|
|
2569
|
-
if (!s)
|
|
2570
|
-
return this;
|
|
2571
|
-
n = s.newValue;
|
|
2572
|
-
}
|
|
2573
|
-
if (!this.has(n)) {
|
|
2574
|
-
pe(function() {
|
|
2575
|
-
i.data_.add(i.enhancer_(n, void 0)), i.atom_.reportChanged();
|
|
2576
|
-
});
|
|
2577
|
-
var o = process.env.NODE_ENV !== "production" && T(), a = ee(this), u = a || o ? {
|
|
2578
|
-
observableKind: "set",
|
|
2579
|
-
debugObjectName: this.name_,
|
|
2580
|
-
type: me,
|
|
2581
|
-
object: this,
|
|
2582
|
-
newValue: n
|
|
2583
|
-
} : null;
|
|
2584
|
-
o && process.env.NODE_ENV !== "production" && I(u), a && te(this, u), o && process.env.NODE_ENV !== "production" && $();
|
|
2585
|
-
}
|
|
2586
|
-
return this;
|
|
2587
|
-
}, t.delete = function(n) {
|
|
2588
|
-
var i = this;
|
|
2589
|
-
if (G(this)) {
|
|
2590
|
-
var s = K(this, {
|
|
2591
|
-
type: wt,
|
|
2592
|
-
object: this,
|
|
2593
|
-
oldValue: n
|
|
2594
|
-
});
|
|
2595
|
-
if (!s)
|
|
2596
|
-
return !1;
|
|
2597
|
-
}
|
|
2598
|
-
if (this.has(n)) {
|
|
2599
|
-
var o = process.env.NODE_ENV !== "production" && T(), a = ee(this), u = a || o ? {
|
|
2600
|
-
observableKind: "set",
|
|
2601
|
-
debugObjectName: this.name_,
|
|
2602
|
-
type: wt,
|
|
2603
|
-
object: this,
|
|
2604
|
-
oldValue: n
|
|
2605
|
-
} : null;
|
|
2606
|
-
return o && process.env.NODE_ENV !== "production" && I(u), pe(function() {
|
|
2607
|
-
i.atom_.reportChanged(), i.data_.delete(n);
|
|
2608
|
-
}), a && te(this, u), o && process.env.NODE_ENV !== "production" && $(), !0;
|
|
2609
|
-
}
|
|
2610
|
-
return !1;
|
|
2611
|
-
}, t.has = function(n) {
|
|
2612
|
-
return this.atom_.reportObserved(), this.data_.has(this.dehanceValue_(n));
|
|
2613
|
-
}, t.entries = function() {
|
|
2614
|
-
var n = this.values();
|
|
2615
|
-
return qn({
|
|
2616
|
-
next: function() {
|
|
2617
|
-
var s = n.next(), o = s.value, a = s.done;
|
|
2618
|
-
return a ? {
|
|
2619
|
-
value: void 0,
|
|
2620
|
-
done: a
|
|
2621
|
-
} : {
|
|
2622
|
-
value: [o, o],
|
|
2623
|
-
done: a
|
|
2624
|
-
};
|
|
2625
|
-
}
|
|
2626
|
-
});
|
|
2627
|
-
}, t.keys = function() {
|
|
2628
|
-
return this.values();
|
|
2629
|
-
}, t.values = function() {
|
|
2630
|
-
this.atom_.reportObserved();
|
|
2631
|
-
var n = this, i = this.data_.values();
|
|
2632
|
-
return qn({
|
|
2633
|
-
next: function() {
|
|
2634
|
-
var o = i.next(), a = o.value, u = o.done;
|
|
2635
|
-
return u ? {
|
|
2636
|
-
value: void 0,
|
|
2637
|
-
done: u
|
|
2638
|
-
} : {
|
|
2639
|
-
value: n.dehanceValue_(a),
|
|
2640
|
-
done: u
|
|
2641
|
-
};
|
|
2642
|
-
}
|
|
2643
|
-
});
|
|
2644
|
-
}, t.intersection = function(n) {
|
|
2645
|
-
if (de(n) && !oe(n))
|
|
2646
|
-
return n.intersection(this);
|
|
2647
|
-
var i = new Set(this);
|
|
2648
|
-
return i.intersection(n);
|
|
2649
|
-
}, t.union = function(n) {
|
|
2650
|
-
if (de(n) && !oe(n))
|
|
2651
|
-
return n.union(this);
|
|
2652
|
-
var i = new Set(this);
|
|
2653
|
-
return i.union(n);
|
|
2654
|
-
}, t.difference = function(n) {
|
|
2655
|
-
return new Set(this).difference(n);
|
|
2656
|
-
}, t.symmetricDifference = function(n) {
|
|
2657
|
-
if (de(n) && !oe(n))
|
|
2658
|
-
return n.symmetricDifference(this);
|
|
2659
|
-
var i = new Set(this);
|
|
2660
|
-
return i.symmetricDifference(n);
|
|
2661
|
-
}, t.isSubsetOf = function(n) {
|
|
2662
|
-
return new Set(this).isSubsetOf(n);
|
|
2663
|
-
}, t.isSupersetOf = function(n) {
|
|
2664
|
-
return new Set(this).isSupersetOf(n);
|
|
2665
|
-
}, t.isDisjointFrom = function(n) {
|
|
2666
|
-
if (de(n) && !oe(n))
|
|
2667
|
-
return n.isDisjointFrom(this);
|
|
2668
|
-
var i = new Set(this);
|
|
2669
|
-
return i.isDisjointFrom(n);
|
|
2670
|
-
}, t.replace = function(n) {
|
|
2671
|
-
var i = this;
|
|
2672
|
-
return oe(n) && (n = new Set(n)), pe(function() {
|
|
2673
|
-
Array.isArray(n) ? (i.clear(), n.forEach(function(s) {
|
|
2674
|
-
return i.add(s);
|
|
2675
|
-
})) : de(n) ? (i.clear(), n.forEach(function(s) {
|
|
2676
|
-
return i.add(s);
|
|
2677
|
-
})) : n != null && v("Cannot initialize set from " + n);
|
|
2678
|
-
}), this;
|
|
2679
|
-
}, t.observe_ = function(n, i) {
|
|
2680
|
-
return process.env.NODE_ENV !== "production" && i === !0 && v("`observe` doesn't support fireImmediately=true in combination with sets."), st(this, n);
|
|
2681
|
-
}, t.intercept_ = function(n) {
|
|
2682
|
-
return it(this, n);
|
|
2683
|
-
}, t.toJSON = function() {
|
|
2684
|
-
return Array.from(this);
|
|
2685
|
-
}, t.toString = function() {
|
|
2686
|
-
return "[object ObservableSet]";
|
|
2687
|
-
}, t[Symbol.iterator] = function() {
|
|
2688
|
-
return this.values();
|
|
2689
|
-
}, Fe(e, [{
|
|
2690
|
-
key: "size",
|
|
2691
|
-
get: function() {
|
|
2692
|
-
return this.atom_.reportObserved(), this.data_.size;
|
|
2693
|
-
}
|
|
2694
|
-
}, {
|
|
2695
|
-
key: Symbol.toStringTag,
|
|
2696
|
-
get: function() {
|
|
2697
|
-
return "Set";
|
|
2698
|
-
}
|
|
2699
|
-
}]);
|
|
2700
|
-
})(), oe = /* @__PURE__ */ De("ObservableSet", Jr);
|
|
2701
|
-
function qn(e) {
|
|
2702
|
-
return e[Symbol.toStringTag] = "SetIterator", wn(e);
|
|
2703
|
-
}
|
|
2704
|
-
var zn = /* @__PURE__ */ Object.create(null), Wn = "remove", vn = /* @__PURE__ */ (function() {
|
|
2705
|
-
function e(r, n, i, s) {
|
|
2706
|
-
n === void 0 && (n = /* @__PURE__ */ new Map()), s === void 0 && (s = Zi), 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 ye(process.env.NODE_ENV !== "production" ? this.name_ + ".keys" : "ObservableObject.keys"), this.isPlainObject_ = L(this.target_), process.env.NODE_ENV !== "production" && !ri(this.defaultAnnotation_) && v("defaultAnnotation must be valid annotation"), process.env.NODE_ENV !== "production" && (this.appliedAnnotations_ = {});
|
|
2707
|
-
}
|
|
2708
|
-
var t = e.prototype;
|
|
2709
|
-
return t.getObservablePropValue_ = function(n) {
|
|
2710
|
-
return this.values_.get(n).get();
|
|
2711
|
-
}, t.setObservablePropValue_ = function(n, i) {
|
|
2712
|
-
var s = this.values_.get(n);
|
|
2713
|
-
if (s instanceof H)
|
|
2714
|
-
return s.set(i), !0;
|
|
2715
|
-
if (G(this)) {
|
|
2716
|
-
var o = K(this, {
|
|
2717
|
-
type: Q,
|
|
2718
|
-
object: this.proxy_ || this.target_,
|
|
2719
|
-
name: n,
|
|
2720
|
-
newValue: i
|
|
2721
|
-
});
|
|
2722
|
-
if (!o)
|
|
2723
|
-
return null;
|
|
2724
|
-
i = o.newValue;
|
|
2725
|
-
}
|
|
2726
|
-
if (i = s.prepareNewValue_(i), i !== f.UNCHANGED) {
|
|
2727
|
-
var a = ee(this), u = process.env.NODE_ENV !== "production" && T(), l = a || u ? {
|
|
2728
|
-
type: Q,
|
|
2729
|
-
observableKind: "object",
|
|
2730
|
-
debugObjectName: this.name_,
|
|
2731
|
-
object: this.proxy_ || this.target_,
|
|
2732
|
-
oldValue: s.value_,
|
|
2733
|
-
name: n,
|
|
2734
|
-
newValue: i
|
|
2735
|
-
} : null;
|
|
2736
|
-
process.env.NODE_ENV !== "production" && u && I(l), s.setNewValue_(i), a && te(this, l), process.env.NODE_ENV !== "production" && u && $();
|
|
2737
|
-
}
|
|
2738
|
-
return !0;
|
|
2739
|
-
}, t.get_ = function(n) {
|
|
2740
|
-
return f.trackingDerivation && !Y(this.target_, n) && this.has_(n), this.target_[n];
|
|
2741
|
-
}, t.set_ = function(n, i, s) {
|
|
2742
|
-
return s === void 0 && (s = !1), Y(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, {
|
|
2743
|
-
value: i,
|
|
2744
|
-
enumerable: !0,
|
|
2745
|
-
writable: !0,
|
|
2746
|
-
configurable: !0
|
|
2747
|
-
}, this.defaultAnnotation_, s);
|
|
2748
|
-
}, t.has_ = function(n) {
|
|
2749
|
-
if (!f.trackingDerivation)
|
|
2750
|
-
return n in this.target_;
|
|
2751
|
-
this.pendingKeys_ || (this.pendingKeys_ = /* @__PURE__ */ new Map());
|
|
2752
|
-
var i = this.pendingKeys_.get(n);
|
|
2753
|
-
return i || (i = new Ae(n in this.target_, Pt, process.env.NODE_ENV !== "production" ? this.name_ + "." + sn(n) + "?" : "ObservableObject.key?", !1), this.pendingKeys_.set(n, i)), i.get();
|
|
2754
|
-
}, t.make_ = function(n, i) {
|
|
2755
|
-
if (i === !0 && (i = this.defaultAnnotation_), i !== !1) {
|
|
2756
|
-
if (Hn(this, i, n), !(n in this.target_)) {
|
|
2757
|
-
var s;
|
|
2758
|
-
if ((s = this.target_[B]) != null && s[n])
|
|
2759
|
-
return;
|
|
2760
|
-
v(1, i.annotationType_, this.name_ + "." + n.toString());
|
|
2761
|
-
}
|
|
2762
|
-
for (var o = this.target_; o && o !== Tt; ) {
|
|
2763
|
-
var a = mt(o, n);
|
|
2764
|
-
if (a) {
|
|
2765
|
-
var u = i.make_(this, n, a, o);
|
|
2766
|
-
if (u === 0)
|
|
2767
|
-
return;
|
|
2768
|
-
if (u === 1)
|
|
2769
|
-
break;
|
|
2770
|
-
}
|
|
2771
|
-
o = Object.getPrototypeOf(o);
|
|
2772
|
-
}
|
|
2773
|
-
Xn(this, i, n);
|
|
2774
|
-
}
|
|
2775
|
-
}, t.extend_ = function(n, i, s, o) {
|
|
2776
|
-
if (o === void 0 && (o = !1), s === !0 && (s = this.defaultAnnotation_), s === !1)
|
|
2777
|
-
return this.defineProperty_(n, i, o);
|
|
2778
|
-
Hn(this, s, n);
|
|
2779
|
-
var a = s.extend_(this, n, i, o);
|
|
2780
|
-
return a && Xn(this, s, n), a;
|
|
2781
|
-
}, t.defineProperty_ = function(n, i, s) {
|
|
2782
|
-
s === void 0 && (s = !1), ae(this.keysAtom_);
|
|
2783
|
-
try {
|
|
2784
|
-
q();
|
|
2785
|
-
var o = this.delete_(n);
|
|
2786
|
-
if (!o)
|
|
2787
|
-
return o;
|
|
2788
|
-
if (G(this)) {
|
|
2789
|
-
var a = K(this, {
|
|
2790
|
-
object: this.proxy_ || this.target_,
|
|
2791
|
-
name: n,
|
|
2792
|
-
type: me,
|
|
2793
|
-
newValue: i.value
|
|
2794
|
-
});
|
|
2795
|
-
if (!a)
|
|
2796
|
-
return null;
|
|
2797
|
-
var u = a.newValue;
|
|
2798
|
-
i.value !== u && (i = he({}, i, {
|
|
2799
|
-
value: u
|
|
2800
|
-
}));
|
|
2801
|
-
}
|
|
2802
|
-
if (s) {
|
|
2803
|
-
if (!Reflect.defineProperty(this.target_, n, i))
|
|
2804
|
-
return !1;
|
|
2805
|
-
} else
|
|
2806
|
-
ue(this.target_, n, i);
|
|
2807
|
-
this.notifyPropertyAddition_(n, i.value);
|
|
2808
|
-
} finally {
|
|
2809
|
-
z();
|
|
2810
|
-
}
|
|
2811
|
-
return !0;
|
|
2812
|
-
}, t.defineObservableProperty_ = function(n, i, s, o) {
|
|
2813
|
-
o === void 0 && (o = !1), ae(this.keysAtom_);
|
|
2814
|
-
try {
|
|
2815
|
-
q();
|
|
2816
|
-
var a = this.delete_(n);
|
|
2817
|
-
if (!a)
|
|
2818
|
-
return a;
|
|
2819
|
-
if (G(this)) {
|
|
2820
|
-
var u = K(this, {
|
|
2821
|
-
object: this.proxy_ || this.target_,
|
|
2822
|
-
name: n,
|
|
2823
|
-
type: me,
|
|
2824
|
-
newValue: i
|
|
2825
|
-
});
|
|
2826
|
-
if (!u)
|
|
2827
|
-
return null;
|
|
2828
|
-
i = u.newValue;
|
|
2829
|
-
}
|
|
2830
|
-
var l = Yn(n), d = {
|
|
2831
|
-
configurable: f.safeDescriptors ? this.isPlainObject_ : !0,
|
|
2832
|
-
enumerable: !0,
|
|
2833
|
-
get: l.get,
|
|
2834
|
-
set: l.set
|
|
2835
|
-
};
|
|
2836
|
-
if (o) {
|
|
2837
|
-
if (!Reflect.defineProperty(this.target_, n, d))
|
|
2838
|
-
return !1;
|
|
2839
|
-
} else
|
|
2840
|
-
ue(this.target_, n, d);
|
|
2841
|
-
var h = new Ae(i, s, process.env.NODE_ENV !== "production" ? this.name_ + "." + n.toString() : "ObservableObject.key", !1);
|
|
2842
|
-
this.values_.set(n, h), this.notifyPropertyAddition_(n, h.value_);
|
|
2843
|
-
} finally {
|
|
2844
|
-
z();
|
|
2845
|
-
}
|
|
2846
|
-
return !0;
|
|
2847
|
-
}, t.defineComputedProperty_ = function(n, i, s) {
|
|
2848
|
-
s === void 0 && (s = !1), ae(this.keysAtom_);
|
|
2849
|
-
try {
|
|
2850
|
-
q();
|
|
2851
|
-
var o = this.delete_(n);
|
|
2852
|
-
if (!o)
|
|
2853
|
-
return o;
|
|
2854
|
-
if (G(this)) {
|
|
2855
|
-
var a = K(this, {
|
|
2856
|
-
object: this.proxy_ || this.target_,
|
|
2857
|
-
name: n,
|
|
2858
|
-
type: me,
|
|
2859
|
-
newValue: void 0
|
|
2860
|
-
});
|
|
2861
|
-
if (!a)
|
|
2862
|
-
return null;
|
|
2863
|
-
}
|
|
2864
|
-
i.name || (i.name = process.env.NODE_ENV !== "production" ? this.name_ + "." + n.toString() : "ObservableObject.key"), i.context = this.proxy_ || this.target_;
|
|
2865
|
-
var u = Yn(n), l = {
|
|
2866
|
-
configurable: f.safeDescriptors ? this.isPlainObject_ : !0,
|
|
2867
|
-
enumerable: !1,
|
|
2868
|
-
get: u.get,
|
|
2869
|
-
set: u.set
|
|
2870
|
-
};
|
|
2871
|
-
if (s) {
|
|
2872
|
-
if (!Reflect.defineProperty(this.target_, n, l))
|
|
2873
|
-
return !1;
|
|
2874
|
-
} else
|
|
2875
|
-
ue(this.target_, n, l);
|
|
2876
|
-
this.values_.set(n, new H(i)), this.notifyPropertyAddition_(n, void 0);
|
|
2877
|
-
} finally {
|
|
2878
|
-
z();
|
|
2879
|
-
}
|
|
2880
|
-
return !0;
|
|
2881
|
-
}, t.delete_ = function(n, i) {
|
|
2882
|
-
if (i === void 0 && (i = !1), ae(this.keysAtom_), !Y(this.target_, n))
|
|
2883
|
-
return !0;
|
|
2884
|
-
if (G(this)) {
|
|
2885
|
-
var s = K(this, {
|
|
2886
|
-
object: this.proxy_ || this.target_,
|
|
2887
|
-
name: n,
|
|
2888
|
-
type: Wn
|
|
2889
|
-
});
|
|
2890
|
-
if (!s)
|
|
2891
|
-
return null;
|
|
2892
|
-
}
|
|
2893
|
-
try {
|
|
2894
|
-
var o;
|
|
2895
|
-
q();
|
|
2896
|
-
var a = ee(this), u = process.env.NODE_ENV !== "production" && T(), l = this.values_.get(n), d = void 0;
|
|
2897
|
-
if (!l && (a || u)) {
|
|
2898
|
-
var h;
|
|
2899
|
-
d = (h = mt(this.target_, n)) == null ? void 0 : h.value;
|
|
2900
|
-
}
|
|
2901
|
-
if (i) {
|
|
2902
|
-
if (!Reflect.deleteProperty(this.target_, n))
|
|
2903
|
-
return !1;
|
|
2904
|
-
} else
|
|
2905
|
-
delete this.target_[n];
|
|
2906
|
-
if (process.env.NODE_ENV !== "production" && delete this.appliedAnnotations_[n], l && (this.values_.delete(n), l instanceof Ae && (d = l.value_), Mr(l)), this.keysAtom_.reportChanged(), (o = this.pendingKeys_) == null || (o = o.get(n)) == null || o.set(n in this.target_), a || u) {
|
|
2907
|
-
var _ = {
|
|
2908
|
-
type: Wn,
|
|
2909
|
-
observableKind: "object",
|
|
2910
|
-
object: this.proxy_ || this.target_,
|
|
2911
|
-
debugObjectName: this.name_,
|
|
2912
|
-
oldValue: d,
|
|
2913
|
-
name: n
|
|
2914
|
-
};
|
|
2915
|
-
process.env.NODE_ENV !== "production" && u && I(_), a && te(this, _), process.env.NODE_ENV !== "production" && u && $();
|
|
2916
|
-
}
|
|
2917
|
-
} finally {
|
|
2918
|
-
z();
|
|
2919
|
-
}
|
|
2920
|
-
return !0;
|
|
2921
|
-
}, t.observe_ = function(n, i) {
|
|
2922
|
-
return process.env.NODE_ENV !== "production" && i === !0 && v("`observe` doesn't support the fire immediately property for observable objects."), st(this, n);
|
|
2923
|
-
}, t.intercept_ = function(n) {
|
|
2924
|
-
return it(this, n);
|
|
2925
|
-
}, t.notifyPropertyAddition_ = function(n, i) {
|
|
2926
|
-
var s, o = ee(this), a = process.env.NODE_ENV !== "production" && T();
|
|
2927
|
-
if (o || a) {
|
|
2928
|
-
var u = o || a ? {
|
|
2929
|
-
type: me,
|
|
2930
|
-
observableKind: "object",
|
|
2931
|
-
debugObjectName: this.name_,
|
|
2932
|
-
object: this.proxy_ || this.target_,
|
|
2933
|
-
name: n,
|
|
2934
|
-
newValue: i
|
|
2935
|
-
} : null;
|
|
2936
|
-
process.env.NODE_ENV !== "production" && a && I(u), o && te(this, u), process.env.NODE_ENV !== "production" && a && $();
|
|
2937
|
-
}
|
|
2938
|
-
(s = this.pendingKeys_) == null || (s = s.get(n)) == null || s.set(!0), this.keysAtom_.reportChanged();
|
|
2939
|
-
}, t.ownKeys_ = function() {
|
|
2940
|
-
return this.keysAtom_.reportObserved(), Me(this.target_);
|
|
2941
|
-
}, t.keys_ = function() {
|
|
2942
|
-
return this.keysAtom_.reportObserved(), Object.keys(this.target_);
|
|
2943
|
-
}, e;
|
|
2944
|
-
})();
|
|
2945
|
-
function Ve(e, t) {
|
|
2946
|
-
var r;
|
|
2947
|
-
if (process.env.NODE_ENV !== "production" && t && Ge(e) && v("Options can't be provided for already observable objects."), Y(e, m))
|
|
2948
|
-
return process.env.NODE_ENV !== "production" && !(ti(e) instanceof vn) && v("Cannot convert '" + jt(e) + `' into observable object:
|
|
2949
|
-
The target is already observable of different type.
|
|
2950
|
-
Extending builtins is not supported.`), e;
|
|
2951
|
-
process.env.NODE_ENV !== "production" && !Object.isExtensible(e) && v("Cannot make the designated object observable; it is not extensible");
|
|
2952
|
-
var n = (r = t?.name) != null ? r : process.env.NODE_ENV !== "production" ? (L(e) ? "ObservableObject" : e.constructor.name) + "@" + ne() : "ObservableObject", i = new vn(e, /* @__PURE__ */ new Map(), String(n), cs(t));
|
|
2953
|
-
return et(e, m, i), e;
|
|
2954
|
-
}
|
|
2955
|
-
var ao = /* @__PURE__ */ De("ObservableObjectAdministration", vn);
|
|
2956
|
-
function Yn(e) {
|
|
2957
|
-
return zn[e] || (zn[e] = {
|
|
2958
|
-
get: function() {
|
|
2959
|
-
return this[m].getObservablePropValue_(e);
|
|
2960
|
-
},
|
|
2961
|
-
set: function(r) {
|
|
2962
|
-
return this[m].setObservablePropValue_(e, r);
|
|
2963
|
-
}
|
|
2964
|
-
});
|
|
2965
|
-
}
|
|
2966
|
-
function Ge(e) {
|
|
2967
|
-
return Vt(e) ? ao(e[m]) : !1;
|
|
2968
|
-
}
|
|
2969
|
-
function Xn(e, t, r) {
|
|
2970
|
-
var n;
|
|
2971
|
-
process.env.NODE_ENV !== "production" && (e.appliedAnnotations_[r] = t), (n = e.target_[B]) == null || delete n[r];
|
|
2972
|
-
}
|
|
2973
|
-
function Hn(e, t, r) {
|
|
2974
|
-
if (process.env.NODE_ENV !== "production" && !ri(t) && v("Cannot annotate '" + e.name_ + "." + r.toString() + "': Invalid annotation."), process.env.NODE_ENV !== "production" && !Ot(t) && Y(e.appliedAnnotations_, r)) {
|
|
2975
|
-
var n = e.name_ + "." + r.toString(), i = e.appliedAnnotations_[r].annotationType_, s = t.annotationType_;
|
|
2976
|
-
v("Cannot apply '" + s + "' to '" + n + "':" + (`
|
|
2977
|
-
The field is already annotated with '` + i + "'.") + `
|
|
2978
|
-
Re-annotating fields is not allowed.
|
|
2979
|
-
Use 'override' annotation for methods overridden by subclass.`);
|
|
2980
|
-
}
|
|
2981
|
-
}
|
|
2982
|
-
var uo = /* @__PURE__ */ Qr(0), co = /* @__PURE__ */ (function() {
|
|
2983
|
-
var e = !1, t = {};
|
|
2984
|
-
return Object.defineProperty(t, "0", {
|
|
2985
|
-
set: function() {
|
|
2986
|
-
e = !0;
|
|
2987
|
-
}
|
|
2988
|
-
}), Object.create(t)[0] = 1, e === !1;
|
|
2989
|
-
})(), Wt = 0, Zr = function() {
|
|
2990
|
-
};
|
|
2991
|
-
function lo(e, t) {
|
|
2992
|
-
Object.setPrototypeOf ? Object.setPrototypeOf(e.prototype, t) : e.prototype.__proto__ !== void 0 ? e.prototype.__proto__ = t : e.prototype = t;
|
|
2993
|
-
}
|
|
2994
|
-
lo(Zr, Array.prototype);
|
|
2995
|
-
var Sn = /* @__PURE__ */ (function(e) {
|
|
2996
|
-
function t(n, i, s, o) {
|
|
2997
|
-
var a;
|
|
2998
|
-
return s === void 0 && (s = process.env.NODE_ENV !== "production" ? "ObservableArray@" + ne() : "ObservableArray"), o === void 0 && (o = !1), a = e.call(this) || this, Ee(function() {
|
|
2999
|
-
var u = new An(s, i, o, !0);
|
|
3000
|
-
u.proxy_ = a, br(a, m, u), n && n.length && a.spliceWithArray(0, 0, n), co && Object.defineProperty(a, "0", uo);
|
|
3001
|
-
}), a;
|
|
3002
|
-
}
|
|
3003
|
-
yr(t, e);
|
|
3004
|
-
var r = t.prototype;
|
|
3005
|
-
return r.concat = function() {
|
|
3006
|
-
this[m].atom_.reportObserved();
|
|
3007
|
-
for (var i = arguments.length, s = new Array(i), o = 0; o < i; o++)
|
|
3008
|
-
s[o] = arguments[o];
|
|
3009
|
-
return Array.prototype.concat.apply(
|
|
3010
|
-
this.slice(),
|
|
3011
|
-
//@ts-ignore
|
|
3012
|
-
s.map(function(a) {
|
|
3013
|
-
return Lt(a) ? a.slice() : a;
|
|
3014
|
-
})
|
|
3015
|
-
);
|
|
3016
|
-
}, r[Symbol.iterator] = function() {
|
|
3017
|
-
var n = this, i = 0;
|
|
3018
|
-
return wn({
|
|
3019
|
-
next: function() {
|
|
3020
|
-
return i < n.length ? {
|
|
3021
|
-
value: n[i++],
|
|
3022
|
-
done: !1
|
|
3023
|
-
} : {
|
|
3024
|
-
done: !0,
|
|
3025
|
-
value: void 0
|
|
3026
|
-
};
|
|
3027
|
-
}
|
|
3028
|
-
});
|
|
3029
|
-
}, Fe(t, [{
|
|
3030
|
-
key: "length",
|
|
3031
|
-
get: function() {
|
|
3032
|
-
return this[m].getArrayLength_();
|
|
3033
|
-
},
|
|
3034
|
-
set: function(i) {
|
|
3035
|
-
this[m].setArrayLength_(i);
|
|
3036
|
-
}
|
|
3037
|
-
}, {
|
|
3038
|
-
key: Symbol.toStringTag,
|
|
3039
|
-
get: function() {
|
|
3040
|
-
return "Array";
|
|
3041
|
-
}
|
|
3042
|
-
}]);
|
|
3043
|
-
})(Zr);
|
|
3044
|
-
Object.entries(St).forEach(function(e) {
|
|
3045
|
-
var t = e[0], r = e[1];
|
|
3046
|
-
t !== "concat" && et(Sn.prototype, t, r);
|
|
3047
|
-
});
|
|
3048
|
-
function Qr(e) {
|
|
3049
|
-
return {
|
|
3050
|
-
enumerable: !1,
|
|
3051
|
-
configurable: !0,
|
|
3052
|
-
get: function() {
|
|
3053
|
-
return this[m].get_(e);
|
|
3054
|
-
},
|
|
3055
|
-
set: function(r) {
|
|
3056
|
-
this[m].set_(e, r);
|
|
3057
|
-
}
|
|
3058
|
-
};
|
|
3059
|
-
}
|
|
3060
|
-
function fo(e) {
|
|
3061
|
-
ue(Sn.prototype, "" + e, Qr(e));
|
|
3062
|
-
}
|
|
3063
|
-
function ei(e) {
|
|
3064
|
-
if (e > Wt) {
|
|
3065
|
-
for (var t = Wt; t < e + 100; t++)
|
|
3066
|
-
fo(t);
|
|
3067
|
-
Wt = e;
|
|
3068
|
-
}
|
|
3069
|
-
}
|
|
3070
|
-
ei(1e3);
|
|
3071
|
-
function po(e, t, r) {
|
|
3072
|
-
return new Sn(e, t, r);
|
|
3073
|
-
}
|
|
3074
|
-
function $e(e, t) {
|
|
3075
|
-
if (typeof e == "object" && e !== null) {
|
|
3076
|
-
if (Lt(e))
|
|
3077
|
-
return t !== void 0 && v(23), e[m].atom_;
|
|
3078
|
-
if (oe(e))
|
|
3079
|
-
return e.atom_;
|
|
3080
|
-
if (Oe(e)) {
|
|
3081
|
-
if (t === void 0)
|
|
3082
|
-
return e.keysAtom_;
|
|
3083
|
-
var r = e.data_.get(t) || e.hasMap_.get(t);
|
|
3084
|
-
return r || v(25, t, jt(e)), r;
|
|
3085
|
-
}
|
|
3086
|
-
if (Ge(e)) {
|
|
3087
|
-
if (!t)
|
|
3088
|
-
return v(26);
|
|
3089
|
-
var n = e[m].values_.get(t);
|
|
3090
|
-
return n || v(27, t, jt(e)), n;
|
|
3091
|
-
}
|
|
3092
|
-
if (mn(e) || Mt(e) || At(e))
|
|
3093
|
-
return e;
|
|
3094
|
-
} else if (D(e) && At(e[m]))
|
|
3095
|
-
return e[m];
|
|
3096
|
-
v(28);
|
|
3097
|
-
}
|
|
3098
|
-
function ti(e, t) {
|
|
3099
|
-
if (e || v(29), mn(e) || Mt(e) || At(e) || Oe(e) || oe(e))
|
|
3100
|
-
return e;
|
|
3101
|
-
if (e[m])
|
|
3102
|
-
return e[m];
|
|
3103
|
-
v(24, e);
|
|
3104
|
-
}
|
|
3105
|
-
function jt(e, t) {
|
|
3106
|
-
var r;
|
|
3107
|
-
if (t !== void 0)
|
|
3108
|
-
r = $e(e, t);
|
|
3109
|
-
else {
|
|
3110
|
-
if (Le(e))
|
|
3111
|
-
return e.name;
|
|
3112
|
-
Ge(e) || Oe(e) || oe(e) ? r = ti(e) : r = $e(e);
|
|
3113
|
-
}
|
|
3114
|
-
return r.name_;
|
|
3115
|
-
}
|
|
3116
|
-
function Ee(e) {
|
|
3117
|
-
var t = Re(), r = yn(!0);
|
|
3118
|
-
q();
|
|
3119
|
-
try {
|
|
3120
|
-
return e();
|
|
3121
|
-
} finally {
|
|
3122
|
-
z(), On(r), ve(t);
|
|
3123
|
-
}
|
|
3124
|
-
}
|
|
3125
|
-
var Jn = Tt.toString;
|
|
3126
|
-
function ni(e, t, r) {
|
|
3127
|
-
return r === void 0 && (r = -1), hn(e, t, r);
|
|
3128
|
-
}
|
|
3129
|
-
function hn(e, t, r, n, i) {
|
|
3130
|
-
if (e === t)
|
|
3131
|
-
return e !== 0 || 1 / e === 1 / t;
|
|
3132
|
-
if (e == null || t == null)
|
|
3133
|
-
return !1;
|
|
3134
|
-
if (e !== e)
|
|
3135
|
-
return t !== t;
|
|
3136
|
-
var s = typeof e;
|
|
3137
|
-
if (s !== "function" && s !== "object" && typeof t != "object")
|
|
3138
|
-
return !1;
|
|
3139
|
-
var o = Jn.call(e);
|
|
3140
|
-
if (o !== Jn.call(t))
|
|
3141
|
-
return !1;
|
|
3142
|
-
switch (o) {
|
|
3143
|
-
// Strings, numbers, regular expressions, dates, and booleans are compared by value.
|
|
3144
|
-
case "[object RegExp]":
|
|
3145
|
-
// RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
|
|
3146
|
-
case "[object String]":
|
|
3147
|
-
return "" + e == "" + t;
|
|
3148
|
-
case "[object Number]":
|
|
3149
|
-
return +e != +e ? +t != +t : +e == 0 ? 1 / +e === 1 / t : +e == +t;
|
|
3150
|
-
case "[object Date]":
|
|
3151
|
-
case "[object Boolean]":
|
|
3152
|
-
return +e == +t;
|
|
3153
|
-
case "[object Symbol]":
|
|
3154
|
-
return typeof Symbol < "u" && Symbol.valueOf.call(e) === Symbol.valueOf.call(t);
|
|
3155
|
-
case "[object Map]":
|
|
3156
|
-
case "[object Set]":
|
|
3157
|
-
r >= 0 && r++;
|
|
3158
|
-
break;
|
|
3159
|
-
}
|
|
3160
|
-
e = Zn(e), t = Zn(t);
|
|
3161
|
-
var a = o === "[object Array]";
|
|
3162
|
-
if (!a) {
|
|
3163
|
-
if (typeof e != "object" || typeof t != "object")
|
|
3164
|
-
return !1;
|
|
3165
|
-
var u = e.constructor, l = t.constructor;
|
|
3166
|
-
if (u !== l && !(D(u) && u instanceof u && D(l) && l instanceof l) && "constructor" in e && "constructor" in t)
|
|
3167
|
-
return !1;
|
|
3168
|
-
}
|
|
3169
|
-
if (r === 0)
|
|
3170
|
-
return !1;
|
|
3171
|
-
r < 0 && (r = -1), n = n || [], i = i || [];
|
|
3172
|
-
for (var d = n.length; d--; )
|
|
3173
|
-
if (n[d] === e)
|
|
3174
|
-
return i[d] === t;
|
|
3175
|
-
if (n.push(e), i.push(t), a) {
|
|
3176
|
-
if (d = e.length, d !== t.length)
|
|
3177
|
-
return !1;
|
|
3178
|
-
for (; d--; )
|
|
3179
|
-
if (!hn(e[d], t[d], r - 1, n, i))
|
|
3180
|
-
return !1;
|
|
3181
|
-
} else {
|
|
3182
|
-
var h = Object.keys(e), _ = h.length;
|
|
3183
|
-
if (Object.keys(t).length !== _)
|
|
3184
|
-
return !1;
|
|
3185
|
-
for (var b = 0; b < _; b++) {
|
|
3186
|
-
var g = h[b];
|
|
3187
|
-
if (!(Y(t, g) && hn(e[g], t[g], r - 1, n, i)))
|
|
3188
|
-
return !1;
|
|
3189
|
-
}
|
|
3190
|
-
}
|
|
3191
|
-
return n.pop(), i.pop(), !0;
|
|
3192
|
-
}
|
|
3193
|
-
function Zn(e) {
|
|
3194
|
-
return Lt(e) ? e.slice() : Ue(e) || Oe(e) || de(e) || oe(e) ? Array.from(e.entries()) : e;
|
|
3195
|
-
}
|
|
3196
|
-
var Qn, vo = ((Qn = Rt().Iterator) == null ? void 0 : Qn.prototype) || {};
|
|
3197
|
-
function wn(e) {
|
|
3198
|
-
return e[Symbol.iterator] = ho, Object.assign(Object.create(vo), e);
|
|
3199
|
-
}
|
|
3200
|
-
function ho() {
|
|
3201
|
-
return this;
|
|
3202
|
-
}
|
|
3203
|
-
function ri(e) {
|
|
3204
|
-
return (
|
|
3205
|
-
// Can be function
|
|
3206
|
-
e instanceof Object && typeof e.annotationType_ == "string" && D(e.make_) && D(e.extend_)
|
|
3207
|
-
);
|
|
3208
|
-
}
|
|
3209
|
-
["Symbol", "Map", "Set"].forEach(function(e) {
|
|
3210
|
-
var t = Rt();
|
|
3211
|
-
typeof t[e] > "u" && v("MobX requires global '" + e + "' to be available or polyfilled");
|
|
3212
|
-
});
|
|
3213
|
-
typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ == "object" && __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({
|
|
3214
|
-
spy: Rs,
|
|
3215
|
-
extras: {
|
|
3216
|
-
getDebugName: jt
|
|
3217
|
-
},
|
|
3218
|
-
$mobx: m
|
|
3219
|
-
});
|
|
3220
|
-
if (!Dt)
|
|
3221
|
-
throw new Error("mobx-react-lite requires React with Hooks support");
|
|
3222
|
-
if (!Qs)
|
|
3223
|
-
throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");
|
|
3224
|
-
function _o(e) {
|
|
3225
|
-
e();
|
|
3226
|
-
}
|
|
3227
|
-
function bo(e) {
|
|
3228
|
-
e || (e = _o, process.env.NODE_ENV !== "production" && console.warn("[MobX] Failed to get unstable_batched updates from react-dom / react-native")), Ks({ reactionScheduler: e });
|
|
3229
|
-
}
|
|
3230
|
-
function mo(e) {
|
|
3231
|
-
return zr(e);
|
|
3232
|
-
}
|
|
3233
|
-
var go = 1e4, yo = 1e4, Oo = (
|
|
3234
|
-
/** @class */
|
|
3235
|
-
(function() {
|
|
3236
|
-
function e(t) {
|
|
3237
|
-
var r = this;
|
|
3238
|
-
Object.defineProperty(this, "finalize", {
|
|
3239
|
-
enumerable: !0,
|
|
3240
|
-
configurable: !0,
|
|
3241
|
-
writable: !0,
|
|
3242
|
-
value: t
|
|
3243
|
-
}), Object.defineProperty(this, "registrations", {
|
|
3244
|
-
enumerable: !0,
|
|
3245
|
-
configurable: !0,
|
|
3246
|
-
writable: !0,
|
|
3247
|
-
value: /* @__PURE__ */ new Map()
|
|
3248
|
-
}), Object.defineProperty(this, "sweepTimeout", {
|
|
3249
|
-
enumerable: !0,
|
|
3250
|
-
configurable: !0,
|
|
3251
|
-
writable: !0,
|
|
3252
|
-
value: void 0
|
|
3253
|
-
}), Object.defineProperty(this, "sweep", {
|
|
3254
|
-
enumerable: !0,
|
|
3255
|
-
configurable: !0,
|
|
3256
|
-
writable: !0,
|
|
3257
|
-
value: function(n) {
|
|
3258
|
-
n === void 0 && (n = go), clearTimeout(r.sweepTimeout), r.sweepTimeout = void 0;
|
|
3259
|
-
var i = Date.now();
|
|
3260
|
-
r.registrations.forEach(function(s, o) {
|
|
3261
|
-
i - s.registeredAt >= n && (r.finalize(s.value), r.registrations.delete(o));
|
|
3262
|
-
}), r.registrations.size > 0 && r.scheduleSweep();
|
|
3263
|
-
}
|
|
3264
|
-
}), Object.defineProperty(this, "finalizeAllImmediately", {
|
|
3265
|
-
enumerable: !0,
|
|
3266
|
-
configurable: !0,
|
|
3267
|
-
writable: !0,
|
|
3268
|
-
value: function() {
|
|
3269
|
-
r.sweep(0);
|
|
3270
|
-
}
|
|
3271
|
-
});
|
|
3272
|
-
}
|
|
3273
|
-
return Object.defineProperty(e.prototype, "register", {
|
|
3274
|
-
enumerable: !1,
|
|
3275
|
-
configurable: !0,
|
|
3276
|
-
writable: !0,
|
|
3277
|
-
value: function(t, r, n) {
|
|
3278
|
-
this.registrations.set(n, {
|
|
3279
|
-
value: r,
|
|
3280
|
-
registeredAt: Date.now()
|
|
3281
|
-
}), this.scheduleSweep();
|
|
3282
|
-
}
|
|
3283
|
-
}), Object.defineProperty(e.prototype, "unregister", {
|
|
3284
|
-
enumerable: !1,
|
|
3285
|
-
configurable: !0,
|
|
3286
|
-
writable: !0,
|
|
3287
|
-
value: function(t) {
|
|
3288
|
-
this.registrations.delete(t);
|
|
3289
|
-
}
|
|
3290
|
-
}), Object.defineProperty(e.prototype, "scheduleSweep", {
|
|
3291
|
-
enumerable: !1,
|
|
3292
|
-
configurable: !0,
|
|
3293
|
-
writable: !0,
|
|
3294
|
-
value: function() {
|
|
3295
|
-
this.sweepTimeout === void 0 && (this.sweepTimeout = setTimeout(this.sweep, yo));
|
|
3296
|
-
}
|
|
3297
|
-
}), e;
|
|
3298
|
-
})()
|
|
3299
|
-
), Eo = typeof FinalizationRegistry < "u" ? FinalizationRegistry : Oo, _n = new Eo(function(e) {
|
|
3300
|
-
var t;
|
|
3301
|
-
(t = e.reaction) === null || t === void 0 || t.dispose(), e.reaction = null;
|
|
3302
|
-
}), ft = { exports: {} }, Yt = {};
|
|
3303
|
-
/**
|
|
3304
|
-
* @license React
|
|
3305
|
-
* use-sync-external-store-shim.production.js
|
|
3306
|
-
*
|
|
3307
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3308
|
-
*
|
|
3309
|
-
* This source code is licensed under the MIT license found in the
|
|
3310
|
-
* LICENSE file in the root directory of this source tree.
|
|
3311
|
-
*/
|
|
3312
|
-
var er;
|
|
3313
|
-
function No() {
|
|
3314
|
-
if (er) return Yt;
|
|
3315
|
-
er = 1;
|
|
3316
|
-
var e = ge;
|
|
3317
|
-
function t(h, _) {
|
|
3318
|
-
return h === _ && (h !== 0 || 1 / h === 1 / _) || h !== h && _ !== _;
|
|
3319
|
-
}
|
|
3320
|
-
var r = typeof Object.is == "function" ? Object.is : t, n = e.useState, i = e.useEffect, s = e.useLayoutEffect, o = e.useDebugValue;
|
|
3321
|
-
function a(h, _) {
|
|
3322
|
-
var b = _(), g = n({ inst: { value: b, getSnapshot: _ } }), O = g[0].inst, N = g[1];
|
|
3323
|
-
return s(
|
|
3324
|
-
function() {
|
|
3325
|
-
O.value = b, O.getSnapshot = _, u(O) && N({ inst: O });
|
|
3326
|
-
},
|
|
3327
|
-
[h, b, _]
|
|
3328
|
-
), i(
|
|
3329
|
-
function() {
|
|
3330
|
-
return u(O) && N({ inst: O }), h(function() {
|
|
3331
|
-
u(O) && N({ inst: O });
|
|
3332
|
-
});
|
|
3333
|
-
},
|
|
3334
|
-
[h]
|
|
3335
|
-
), o(b), b;
|
|
3336
|
-
}
|
|
3337
|
-
function u(h) {
|
|
3338
|
-
var _ = h.getSnapshot;
|
|
3339
|
-
h = h.value;
|
|
3340
|
-
try {
|
|
3341
|
-
var b = _();
|
|
3342
|
-
return !r(h, b);
|
|
3343
|
-
} catch {
|
|
3344
|
-
return !0;
|
|
3345
|
-
}
|
|
3346
|
-
}
|
|
3347
|
-
function l(h, _) {
|
|
3348
|
-
return _();
|
|
3349
|
-
}
|
|
3350
|
-
var d = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? l : a;
|
|
3351
|
-
return Yt.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : d, Yt;
|
|
3352
|
-
}
|
|
3353
|
-
var Xt = {};
|
|
3354
|
-
/**
|
|
3355
|
-
* @license React
|
|
3356
|
-
* use-sync-external-store-shim.development.js
|
|
3357
|
-
*
|
|
3358
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3359
|
-
*
|
|
3360
|
-
* This source code is licensed under the MIT license found in the
|
|
3361
|
-
* LICENSE file in the root directory of this source tree.
|
|
3362
|
-
*/
|
|
3363
|
-
var tr;
|
|
3364
|
-
function Ao() {
|
|
3365
|
-
return tr || (tr = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
3366
|
-
function e(b, g) {
|
|
3367
|
-
return b === g && (b !== 0 || 1 / b === 1 / g) || b !== b && g !== g;
|
|
3368
|
-
}
|
|
3369
|
-
function t(b, g) {
|
|
3370
|
-
d || i.startTransition === void 0 || (d = !0, console.error(
|
|
3371
|
-
"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."
|
|
3372
|
-
));
|
|
3373
|
-
var O = g();
|
|
3374
|
-
if (!h) {
|
|
3375
|
-
var N = g();
|
|
3376
|
-
s(O, N) || (console.error(
|
|
3377
|
-
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
3378
|
-
), h = !0);
|
|
3379
|
-
}
|
|
3380
|
-
N = o({
|
|
3381
|
-
inst: { value: O, getSnapshot: g }
|
|
3382
|
-
});
|
|
3383
|
-
var x = N[0].inst, F = N[1];
|
|
3384
|
-
return u(
|
|
3385
|
-
function() {
|
|
3386
|
-
x.value = O, x.getSnapshot = g, r(x) && F({ inst: x });
|
|
3387
|
-
},
|
|
3388
|
-
[b, O, g]
|
|
3389
|
-
), a(
|
|
3390
|
-
function() {
|
|
3391
|
-
return r(x) && F({ inst: x }), b(function() {
|
|
3392
|
-
r(x) && F({ inst: x });
|
|
3393
|
-
});
|
|
3394
|
-
},
|
|
3395
|
-
[b]
|
|
3396
|
-
), l(O), O;
|
|
3397
|
-
}
|
|
3398
|
-
function r(b) {
|
|
3399
|
-
var g = b.getSnapshot;
|
|
3400
|
-
b = b.value;
|
|
3401
|
-
try {
|
|
3402
|
-
var O = g();
|
|
3403
|
-
return !s(b, O);
|
|
3404
|
-
} catch {
|
|
3405
|
-
return !0;
|
|
3406
|
-
}
|
|
3407
|
-
}
|
|
3408
|
-
function n(b, g) {
|
|
3409
|
-
return g();
|
|
3410
|
-
}
|
|
3411
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
3412
|
-
var i = ge, 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;
|
|
3413
|
-
Xt.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());
|
|
3414
|
-
})()), Xt;
|
|
3415
|
-
}
|
|
3416
|
-
var nr;
|
|
3417
|
-
function So() {
|
|
3418
|
-
return nr || (nr = 1, process.env.NODE_ENV === "production" ? ft.exports = No() : ft.exports = Ao()), ft.exports;
|
|
3419
|
-
}
|
|
3420
|
-
var wo = So();
|
|
3421
|
-
function rr(e) {
|
|
3422
|
-
e.reaction = new _e("observer".concat(e.name), function() {
|
|
3423
|
-
var t;
|
|
3424
|
-
e.stateVersion = Symbol(), (t = e.onStoreChange) === null || t === void 0 || t.call(e);
|
|
3425
|
-
});
|
|
3426
|
-
}
|
|
3427
|
-
function jo(e, t) {
|
|
3428
|
-
t === void 0 && (t = "observed");
|
|
3429
|
-
var r = ge.useRef(null);
|
|
3430
|
-
if (!r.current) {
|
|
3431
|
-
var n = {
|
|
3432
|
-
reaction: null,
|
|
3433
|
-
onStoreChange: null,
|
|
3434
|
-
stateVersion: Symbol(),
|
|
3435
|
-
name: t,
|
|
3436
|
-
subscribe: function(a) {
|
|
3437
|
-
return _n.unregister(n), n.onStoreChange = a, n.reaction || (rr(n), n.stateVersion = Symbol()), function() {
|
|
3438
|
-
var u;
|
|
3439
|
-
n.onStoreChange = null, (u = n.reaction) === null || u === void 0 || u.dispose(), n.reaction = null;
|
|
3440
|
-
};
|
|
3441
|
-
},
|
|
3442
|
-
getSnapshot: function() {
|
|
3443
|
-
return n.stateVersion;
|
|
3444
|
-
}
|
|
3445
|
-
};
|
|
3446
|
-
r.current = n;
|
|
3447
|
-
}
|
|
3448
|
-
var i = r.current;
|
|
3449
|
-
i.reaction || (rr(i), _n.register(r, i, i)), ge.useDebugValue(i.reaction, mo), wo.useSyncExternalStore(
|
|
3450
|
-
// Both of these must be stable, otherwise it would keep resubscribing every render.
|
|
3451
|
-
i.subscribe,
|
|
3452
|
-
i.getSnapshot,
|
|
3453
|
-
i.getSnapshot
|
|
3454
|
-
);
|
|
3455
|
-
var s, o;
|
|
3456
|
-
if (i.reaction.track(function() {
|
|
3457
|
-
try {
|
|
3458
|
-
s = e();
|
|
3459
|
-
} catch (a) {
|
|
3460
|
-
o = a;
|
|
3461
|
-
}
|
|
3462
|
-
}), o)
|
|
3463
|
-
throw o;
|
|
3464
|
-
return s;
|
|
3465
|
-
}
|
|
3466
|
-
var Ht, Jt, xo = !0, ir = !0, ii = typeof Symbol == "function" && Symbol.for, Do = (Jt = (Ht = Object.getOwnPropertyDescriptor(function() {
|
|
3467
|
-
}, "name")) === null || Ht === void 0 ? void 0 : Ht.configurable) !== null && Jt !== void 0 ? Jt : !1, sr = ii ? Symbol.for("react.forward_ref") : typeof nn == "function" && nn(function(e) {
|
|
3468
|
-
return null;
|
|
3469
|
-
}).$$typeof, or = ii ? Symbol.for("react.memo") : typeof rn == "function" && rn(function(e) {
|
|
3470
|
-
return null;
|
|
3471
|
-
}).$$typeof;
|
|
3472
|
-
function J(e, t) {
|
|
3473
|
-
var r;
|
|
3474
|
-
if (process.env.NODE_ENV, or && e.$$typeof === or)
|
|
3475
|
-
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.");
|
|
3476
|
-
var n = (r = void 0) !== null && r !== void 0 ? r : !1, i = e, s = e.displayName || e.name;
|
|
3477
|
-
if (sr && e.$$typeof === sr && (n = !0, i = e.render, typeof i != "function"))
|
|
3478
|
-
throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");
|
|
3479
|
-
var o = function(a, u) {
|
|
3480
|
-
return jo(function() {
|
|
3481
|
-
return i(a, u);
|
|
3482
|
-
}, s);
|
|
3483
|
-
};
|
|
3484
|
-
return o.displayName = e.displayName, Do && Object.defineProperty(o, "name", {
|
|
3485
|
-
value: e.name,
|
|
3486
|
-
writable: !0,
|
|
3487
|
-
configurable: !0
|
|
3488
|
-
}), e.contextTypes && (o.contextTypes = e.contextTypes, process.env.NODE_ENV !== "production" && ir && (ir = !1, console.warn("[mobx-react-lite] Support for Legacy Context in function components will be removed in the next major release."))), n && (o = nn(o)), o = rn(o), To(e, o), process.env.NODE_ENV !== "production" && Object.defineProperty(o, "contextTypes", {
|
|
3489
|
-
set: function() {
|
|
3490
|
-
var a, u;
|
|
3491
|
-
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`."));
|
|
3492
|
-
}
|
|
3493
|
-
}), o;
|
|
3494
|
-
}
|
|
3495
|
-
var Ro = {
|
|
3496
|
-
$$typeof: !0,
|
|
3497
|
-
render: !0,
|
|
3498
|
-
compare: !0,
|
|
3499
|
-
type: !0,
|
|
3500
|
-
// Don't redefine `displayName`,
|
|
3501
|
-
// it's defined as getter-setter pair on `memo` (see #3192).
|
|
3502
|
-
displayName: !0
|
|
3503
|
-
};
|
|
3504
|
-
function To(e, t) {
|
|
3505
|
-
Object.keys(e).forEach(function(r) {
|
|
3506
|
-
Ro[r] || Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(e, r));
|
|
3507
|
-
});
|
|
3508
|
-
}
|
|
3509
|
-
process.env.NODE_ENV;
|
|
3510
|
-
var Zt;
|
|
3511
|
-
bo(di);
|
|
3512
|
-
Zt = _n.finalizeAllImmediately;
|
|
3513
|
-
const Vo = ({ 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" })] }), ar = ({ label: e, value: t }) => c.jsxs("div", { className: "info", children: [c.jsx("span", { className: "label", children: e }), c.jsx("span", { className: "value", children: t })] }), Co = ({ 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"] })] }), ur = ({ onClick: e, disabled: t = !1, className: r }) => c.jsx("button", { className: `${r} ${t ? "disabled" : ""}`, onClick: e }), Po = ({ onClick: e, disabled: t = !1 }) => c.jsx("button", { className: `spin-btn ${t ? "disabled" : ""}`, onClick: e }), cr = ({ onClick: e, disabled: t = !1, className: r, isActive: n }) => c.jsx("button", { className: `${r} ${t ? "disabled" : ""} ${n ? "active" : ""}`, onClick: e });
|
|
3514
|
-
class Bo {
|
|
3515
|
-
balance = 1e4;
|
|
3516
|
-
betAmount = 10;
|
|
3517
|
-
betIndex = 0;
|
|
3518
|
-
lastWin = 0;
|
|
3519
|
-
volume = 50;
|
|
3520
|
-
betAmountRange = [
|
|
3521
|
-
10,
|
|
3522
|
-
20,
|
|
3523
|
-
50,
|
|
3524
|
-
100,
|
|
3525
|
-
500,
|
|
3526
|
-
1e3,
|
|
3527
|
-
5e3,
|
|
3528
|
-
1e4,
|
|
3529
|
-
25e3,
|
|
3530
|
-
5e5,
|
|
3531
|
-
65e3,
|
|
3532
|
-
8e4,
|
|
3533
|
-
1e5,
|
|
3534
|
-
15e4,
|
|
3535
|
-
2e5
|
|
3536
|
-
];
|
|
3537
|
-
maxBetAmount = this.betAmountRange[0];
|
|
3538
|
-
minBetAmount = this.betAmountRange[this.betAmountRange.length - 1];
|
|
3539
|
-
displayCurrency = "FUN";
|
|
3540
|
-
constructor() {
|
|
3541
|
-
Te(this);
|
|
3542
|
-
}
|
|
3543
|
-
setBet(t) {
|
|
3544
|
-
this.betAmount = t;
|
|
3545
|
-
}
|
|
3546
|
-
setNextBetAmount() {
|
|
3547
|
-
if (this.betIndex === this.betAmountRange.length - 1)
|
|
3548
|
-
return console.error("Bet Index must be less than BetStore.betAmountRange.length");
|
|
3549
|
-
this.betIndex += 1, this.betAmount = this.betAmountRange[this.betIndex];
|
|
3550
|
-
}
|
|
3551
|
-
setPrevBetAmount() {
|
|
3552
|
-
if (this.betIndex < 1)
|
|
3553
|
-
return console.error("Bet Index must be more than 0");
|
|
3554
|
-
this.betIndex -= 1, this.betAmount = this.betAmountRange[this.betIndex];
|
|
3555
|
-
}
|
|
3556
|
-
setBetAmountRange(t) {
|
|
3557
|
-
this.betAmountRange = t, t.length > 0 && (this.maxBetAmount = t[0], this.minBetAmount = t[t.length - 1]);
|
|
3558
|
-
}
|
|
3559
|
-
setDisplayCurrency(t) {
|
|
3560
|
-
this.displayCurrency = t;
|
|
3561
|
-
}
|
|
3562
|
-
setBalance(t) {
|
|
3563
|
-
this.balance = t;
|
|
3564
|
-
}
|
|
3565
|
-
setLastWin(t) {
|
|
3566
|
-
this.lastWin = t;
|
|
3567
|
-
}
|
|
3568
|
-
setVolume(t) {
|
|
3569
|
-
this.volume = Math.max(0, Math.min(100, t));
|
|
3570
|
-
}
|
|
3571
|
-
}
|
|
3572
|
-
const le = new Bo();
|
|
3573
|
-
class ko {
|
|
3574
|
-
activePopup = null;
|
|
3575
|
-
constructor() {
|
|
3576
|
-
Te(this);
|
|
3577
|
-
}
|
|
3578
|
-
open(t) {
|
|
3579
|
-
this.activePopup = t;
|
|
3580
|
-
}
|
|
3581
|
-
close() {
|
|
3582
|
-
this.activePopup = null;
|
|
3583
|
-
}
|
|
3584
|
-
get isOpen() {
|
|
3585
|
-
return this.activePopup !== null;
|
|
3586
|
-
}
|
|
3587
|
-
}
|
|
3588
|
-
const W = new ko(), Z = {
|
|
3589
|
-
bet: "bet",
|
|
3590
|
-
autoplay: "autoplay",
|
|
3591
|
-
settings: "settings",
|
|
3592
|
-
history: "history",
|
|
3593
|
-
buyBonus: "buy_bonus"
|
|
3594
|
-
}, Mo = {
|
|
3595
|
-
insufficientFunds: "insufficient funds"
|
|
3596
|
-
}, lr = {
|
|
3597
|
-
primary: {
|
|
3598
|
-
background: "#FBDE38",
|
|
3599
|
-
color: "#1C1B1E"
|
|
3600
|
-
},
|
|
3601
|
-
secondary: {
|
|
3602
|
-
background: "#1C1B1E",
|
|
3603
|
-
color: "#FFFFFF"
|
|
3604
|
-
}
|
|
3605
|
-
}, Lo = [
|
|
3606
|
-
{
|
|
3607
|
-
name: Mo.insufficientFunds,
|
|
3608
|
-
title: "Insufficient Funds",
|
|
3609
|
-
imagePath: "/img_1.png",
|
|
3610
|
-
message: "Your balance is low, please make a deposit",
|
|
3611
|
-
buttons: [
|
|
3612
|
-
{
|
|
3613
|
-
text: "Back",
|
|
3614
|
-
configs: lr.secondary
|
|
3615
|
-
},
|
|
3616
|
-
{
|
|
3617
|
-
text: "Ok",
|
|
3618
|
-
configs: lr.primary
|
|
3619
|
-
}
|
|
3620
|
-
]
|
|
3621
|
-
}
|
|
3622
|
-
], Qt = {
|
|
3623
|
-
ante: "ante",
|
|
3624
|
-
buy: "buy"
|
|
3625
|
-
};
|
|
3626
|
-
class Io {
|
|
3627
|
-
introSkip = !1;
|
|
3628
|
-
spaceToSpin = !1;
|
|
3629
|
-
spaceToSkip = !1;
|
|
3630
|
-
isTurbo = !1;
|
|
3631
|
-
volume = 50;
|
|
3632
|
-
musicOn = !0;
|
|
3633
|
-
soundsOn = !0;
|
|
3634
|
-
constructor() {
|
|
3635
|
-
Te(this);
|
|
3636
|
-
}
|
|
3637
|
-
setMusicOn(t) {
|
|
3638
|
-
this.musicOn = t;
|
|
3639
|
-
}
|
|
3640
|
-
setVolume(t) {
|
|
3641
|
-
this.volume = t;
|
|
3642
|
-
}
|
|
3643
|
-
setIsTurbo(t) {
|
|
3644
|
-
this.isTurbo = t;
|
|
3645
|
-
}
|
|
3646
|
-
setSoundsOn(t) {
|
|
3647
|
-
this.soundsOn = t;
|
|
3648
|
-
}
|
|
3649
|
-
setIntroSkip(t) {
|
|
3650
|
-
this.introSkip = t;
|
|
3651
|
-
}
|
|
3652
|
-
setSpaceToSpin(t) {
|
|
3653
|
-
this.spaceToSpin = t;
|
|
3654
|
-
}
|
|
3655
|
-
setSpaceToSkip(t) {
|
|
3656
|
-
this.spaceToSkip = t;
|
|
3657
|
-
}
|
|
3658
|
-
}
|
|
3659
|
-
const se = new Io();
|
|
3660
|
-
class $o {
|
|
3661
|
-
anteBets = [
|
|
3662
|
-
{
|
|
3663
|
-
title: "Ante 1",
|
|
3664
|
-
imagePath: "/img_1.png",
|
|
3665
|
-
costMultiplier: 50
|
|
3666
|
-
},
|
|
3667
|
-
{
|
|
3668
|
-
title: "Ante 2",
|
|
3669
|
-
imagePath: "/img_1.png",
|
|
3670
|
-
costMultiplier: 3
|
|
3671
|
-
},
|
|
3672
|
-
{
|
|
3673
|
-
title: "Ante 3",
|
|
3674
|
-
imagePath: "/img_1.png",
|
|
3675
|
-
costMultiplier: 4
|
|
3676
|
-
},
|
|
3677
|
-
{
|
|
3678
|
-
title: "Ante 4",
|
|
3679
|
-
costMultiplier: 4
|
|
3680
|
-
}
|
|
3681
|
-
];
|
|
3682
|
-
inReelFeatures = [
|
|
3683
|
-
{
|
|
3684
|
-
title: "ReelFeature 1",
|
|
3685
|
-
costMultiplier: 500
|
|
3686
|
-
},
|
|
3687
|
-
{
|
|
3688
|
-
title: "ReelFeature 2",
|
|
3689
|
-
costMultiplier: 6
|
|
3690
|
-
},
|
|
3691
|
-
{
|
|
3692
|
-
title: "ReelFeature 3",
|
|
3693
|
-
costMultiplier: 7
|
|
3694
|
-
}
|
|
3695
|
-
];
|
|
3696
|
-
bonusFeatures = [
|
|
3697
|
-
{
|
|
3698
|
-
title: "Bonus 1",
|
|
3699
|
-
costMultiplier: 50
|
|
3700
|
-
},
|
|
3701
|
-
{
|
|
3702
|
-
title: "Bonus 2",
|
|
3703
|
-
costMultiplier: 100
|
|
3704
|
-
},
|
|
3705
|
-
{
|
|
3706
|
-
title: "Bonus 3",
|
|
3707
|
-
costMultiplier: 200
|
|
3708
|
-
},
|
|
3709
|
-
{
|
|
3710
|
-
title: "Bonus 4",
|
|
3711
|
-
costMultiplier: 500
|
|
3712
|
-
}
|
|
3713
|
-
];
|
|
3714
|
-
activeAnteBet = null;
|
|
3715
|
-
activeBonusFeature = null;
|
|
3716
|
-
activeInReelFeature = null;
|
|
3717
|
-
constructor() {
|
|
3718
|
-
Te(this);
|
|
3719
|
-
}
|
|
3720
|
-
setAnteBets(t) {
|
|
3721
|
-
this.anteBets = t;
|
|
3722
|
-
}
|
|
3723
|
-
setActiveAnteBet(t) {
|
|
3724
|
-
this.activeAnteBet = t;
|
|
3725
|
-
}
|
|
3726
|
-
setActiveBonusFeature(t) {
|
|
3727
|
-
this.activeBonusFeature = t;
|
|
3728
|
-
}
|
|
3729
|
-
setActiveInReelFeature(t) {
|
|
3730
|
-
this.activeInReelFeature = t;
|
|
3731
|
-
}
|
|
3732
|
-
setInReelFeatures(t) {
|
|
3733
|
-
this.inReelFeatures = t;
|
|
3734
|
-
}
|
|
3735
|
-
setBonusFeatures(t) {
|
|
3736
|
-
this.bonusFeatures = t;
|
|
3737
|
-
}
|
|
3738
|
-
get isActiveBonus() {
|
|
3739
|
-
return !!this.activeBonusFeature;
|
|
3740
|
-
}
|
|
3741
|
-
get isActiveInReelFeature() {
|
|
3742
|
-
return !!this.activeInReelFeature;
|
|
3743
|
-
}
|
|
3744
|
-
get isActiveAnteBet() {
|
|
3745
|
-
return !!this.activeAnteBet;
|
|
3746
|
-
}
|
|
3747
|
-
}
|
|
3748
|
-
const xt = new $o(), Uo = J(() => {
|
|
3749
|
-
const { lastWin: e, balance: t, betAmount: r, displayCurrency: n, setNextBetAmount: i, setPrevBetAmount: s } = le, { setIsTurbo: o, isTurbo: a } = se, { open: u } = W, { activeAnteBet: l, activeBonusFeature: d, activeInReelFeature: h } = xt, _ = _t(() => l?.imagePath || h?.imagePath || d?.imagePath, [l, d, h]);
|
|
3750
|
-
return c.jsx("div", { className: "ui-footer", children: c.jsxs("div", { className: "top-row", children: [c.jsxs("div", { className: "left-group", children: [c.jsx(Vo, { imagePath: _, onClick: u.bind(W, Z.buyBonus) }), c.jsxs("div", { className: "balance-info", children: [c.jsx(ar, { label: "LAST WIN", value: `${e} ${n}` }), c.jsx(ar, { label: "BALANCE", value: `${t} ${n}` })] })] }), c.jsxs("div", { className: "bet-control", children: [c.jsx(Co, { activeAnteBet: !!l, value: r, onClick: u.bind(W, Z.bet) }), c.jsxs("div", { className: "bet-box", children: [c.jsx(ur, { onClick: () => s.call(le), className: "bet-btn minus" }), c.jsx(Po, { onClick: () => console.log("Spin"), state: "active" }), c.jsx(ur, { onClick: () => i.call(le), className: "bet-btn plus" })] }), c.jsx(cr, { className: "quick-spin", onClick: o.bind(se, !a), isActive: a }), c.jsx(cr, { className: "auto-spin", onClick: u.bind(W, Z.autoplay), isActive: !1 })] })] }) });
|
|
3751
|
-
}), Fo = ({ onMount: e, onUnmount: t, className: r }) => {
|
|
3752
|
-
const n = bt(null);
|
|
3753
|
-
return He(() => (n.current && e && e(n.current), () => {
|
|
3754
|
-
t?.();
|
|
3755
|
-
}), [e, t]), c.jsx("div", { ref: n, className: r, style: {
|
|
3756
|
-
width: "100%",
|
|
3757
|
-
height: "100%",
|
|
3758
|
-
position: "relative"
|
|
3759
|
-
} });
|
|
3760
|
-
};
|
|
3761
|
-
function Go(e) {
|
|
3762
|
-
const t = bt(null);
|
|
3763
|
-
return He(() => {
|
|
3764
|
-
if (typeof e != "function")
|
|
3765
|
-
return;
|
|
3766
|
-
const r = (n) => {
|
|
3767
|
-
const i = t.current;
|
|
3768
|
-
if (!i)
|
|
3769
|
-
return;
|
|
3770
|
-
const s = n.target;
|
|
3771
|
-
s && (i.contains(s) || e(n));
|
|
3772
|
-
};
|
|
3773
|
-
return document.addEventListener("mousedown", r), document.addEventListener("touchstart", r), () => {
|
|
3774
|
-
document.removeEventListener("mousedown", r), document.removeEventListener("touchstart", r);
|
|
3775
|
-
};
|
|
3776
|
-
}, [e]), t;
|
|
3777
|
-
}
|
|
3778
|
-
const Ko = J(() => {
|
|
3779
|
-
const { volume: e, setVolume: t } = se, [r, n] = ge.useState(!1), i = Go(() => n(!1)), s = fi(() => {
|
|
3780
|
-
r || n(!0);
|
|
3781
|
-
}, [r, n]);
|
|
3782
|
-
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(se, 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 })] });
|
|
3783
|
-
}), qo = J(() => {
|
|
3784
|
-
const { open: e } = W;
|
|
3785
|
-
return c.jsxs("div", { className: "settings-section", children: [c.jsx(Ko, {}), c.jsx("button", { className: "btn-settings", "aria-label": "Open Settings", onClick: e.bind(W, Z.settings) })] });
|
|
3786
|
-
});
|
|
3787
|
-
class zo {
|
|
3788
|
-
dialogs = Lo;
|
|
3789
|
-
activeDialog = null;
|
|
3790
|
-
constructor() {
|
|
3791
|
-
Te(this);
|
|
3792
|
-
}
|
|
3793
|
-
add(t) {
|
|
3794
|
-
this.dialogs.push(t);
|
|
3795
|
-
}
|
|
3796
|
-
open(t) {
|
|
3797
|
-
const r = this.dialogs.find((n) => t === n.name);
|
|
3798
|
-
r ? this.activeDialog = r : console.error(`Couldn't find dialog named ${t}`);
|
|
3799
|
-
}
|
|
3800
|
-
close() {
|
|
3801
|
-
this.activeDialog = null;
|
|
3802
|
-
}
|
|
3803
|
-
get isOpen() {
|
|
3804
|
-
return this.activeDialog !== null;
|
|
3805
|
-
}
|
|
3806
|
-
}
|
|
3807
|
-
const ht = new zo(), Wo = J(() => {
|
|
3808
|
-
const { betAmount: e, displayCurrency: t, setNextBetAmount: r, setPrevBetAmount: n } = le;
|
|
3809
|
-
return c.jsxs("div", { className: "overlay-bet-controller", children: [c.jsx("div", { className: "decrease-bet", onClick: n.bind(le) }), c.jsxs("div", { className: "bet-amount", children: [e, " ", t] }), c.jsx("div", { className: "increase-bet", onClick: r.bind(le) })] });
|
|
3810
|
-
}), Yo = J(({ children: e }) => {
|
|
3811
|
-
const t = W.activePopup, r = ht.activeDialog;
|
|
3812
|
-
if (!t && !r)
|
|
3813
|
-
return null;
|
|
3814
|
-
const n = (s) => {
|
|
3815
|
-
s.target === s.currentTarget && (W.close(), ht.close());
|
|
3816
|
-
}, i = () => {
|
|
3817
|
-
W.close(), ht.close();
|
|
3818
|
-
};
|
|
3819
|
-
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 === Z.buyBonus && c.jsx(Wo, {})] });
|
|
3820
|
-
}), si = ({ value: e, onClick: t, active: r }) => c.jsx("div", { className: `rectLabel ${r ? "current-active" : ""}`, onClick: () => t(e), children: c.jsx("span", { children: e }) }), Xo = J(() => {
|
|
3821
|
-
const { betAmountRange: e, setBet: t, betAmount: r } = le;
|
|
3822
|
-
return c.jsx("div", { className: "bet-popup-container", children: e.map((n, i) => {
|
|
3823
|
-
const s = r === n;
|
|
3824
|
-
return c.jsx(si, { value: n, active: s, onClick: t.bind(le, n) }, i);
|
|
3825
|
-
}) });
|
|
3826
|
-
});
|
|
3827
|
-
class Ho {
|
|
3828
|
-
countRange = [10, 25, 50, 70, 100, 500, 1e3];
|
|
3829
|
-
limitsRange = [10, 20, 50];
|
|
3830
|
-
count = 0;
|
|
3831
|
-
specialFeatureSwitcherOn = !1;
|
|
3832
|
-
lossLimit = null;
|
|
3833
|
-
// X bet
|
|
3834
|
-
winLimit = null;
|
|
3835
|
-
// X bet
|
|
3836
|
-
constructor() {
|
|
3837
|
-
Te(this);
|
|
3838
|
-
}
|
|
3839
|
-
setCount(t) {
|
|
3840
|
-
this.count = t;
|
|
3841
|
-
}
|
|
3842
|
-
setLimitsRange(t) {
|
|
3843
|
-
this.limitsRange = t;
|
|
3844
|
-
}
|
|
3845
|
-
setCountRange(t) {
|
|
3846
|
-
this.countRange = t;
|
|
3847
|
-
}
|
|
3848
|
-
setSpecialFeatureSwitcher(t) {
|
|
3849
|
-
this.specialFeatureSwitcherOn = t;
|
|
3850
|
-
}
|
|
3851
|
-
setLossLimit(t) {
|
|
3852
|
-
console.log(t), this.lossLimit = t;
|
|
3853
|
-
}
|
|
3854
|
-
setWinLimit(t) {
|
|
3855
|
-
console.log(t), this.winLimit = t;
|
|
3856
|
-
}
|
|
3857
|
-
start() {
|
|
3858
|
-
}
|
|
3859
|
-
}
|
|
3860
|
-
const We = new Ho(), It = ({ 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" }) }), en = ({ active: e, onClick: t, children: r }) => c.jsx("button", { className: `ap-limit ${e ? "ap-limit--active" : ""}`, onClick: t, type: "button", children: r }), fr = ({ active: e, onClick: t, children: r }) => c.jsx("button", { className: `ap-tab ${e ? "ap-tab--active" : ""}`, onClick: t, type: "button", children: r }), Jo = ({ value: e, placeholder: t, inputType: r = "text", className: n = "", autoFocus: i = !0, onSubmit: s, onCancel: o }) => {
|
|
3861
|
-
const [a, u] = Dt(""), l = bt(null), d = bt(!1);
|
|
3862
|
-
He(() => {
|
|
3863
|
-
u(e ?? ""), d.current = !1;
|
|
3864
|
-
}, [e]), He(() => {
|
|
3865
|
-
i && setTimeout(() => {
|
|
3866
|
-
l.current?.focus(), l.current?.select();
|
|
3867
|
-
}, 0);
|
|
3868
|
-
}, [i]);
|
|
3869
|
-
const h = () => {
|
|
3870
|
-
d.current || (d.current = !0, s(a.trim()));
|
|
3871
|
-
}, _ = () => {
|
|
3872
|
-
h();
|
|
3873
|
-
}, b = (g) => {
|
|
3874
|
-
g.key === "Enter" ? (g.preventDefault(), h(), l.current?.blur()) : g.key === "Escape" && (u(e ?? ""), o?.(), l.current?.blur());
|
|
3875
|
-
};
|
|
3876
|
-
return c.jsx("input", { ref: l, className: `ap-limit ${n}`, type: "number", value: a, placeholder: t, onChange: (g) => u(g.target.value), onBlur: _, onKeyDown: b, inputMode: r === "number" ? "numeric" : void 0, "aria-label": "custom limit input" });
|
|
3877
|
-
}, Zo = J(() => {
|
|
3878
|
-
const { specialFeatureSwitcherOn: e, setSpecialFeatureSwitcher: t, countRange: r, count: n, setCount: i, lossLimit: s, winLimit: o, setLossLimit: a, limitsRange: u, setWinLimit: l } = We, [d, h] = ge.useState(0), [_, b] = ge.useState(!1), [g, O] = Dt(""), N = _t(() => d ? o : s, [d, o, s]), x = _t(() => d ? l.bind(We) : a.bind(We), [d, l, a]);
|
|
3879
|
-
He(() => {
|
|
3880
|
-
const j = N && !u.includes(N);
|
|
3881
|
-
O(j ? N : 0);
|
|
3882
|
-
}, [N, o]);
|
|
3883
|
-
const F = !!n && n > 0;
|
|
3884
|
-
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((j, w) => {
|
|
3885
|
-
const P = n === j;
|
|
3886
|
-
return c.jsx(si, { value: j, active: P, onClick: i.bind(We, j) }, w);
|
|
3887
|
-
}) }), 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(It, { checked: e, onChange: (j) => t.call(We, j) }) })] }), c.jsxs("div", { className: "ap-tabs", children: [c.jsx(fr, { active: !d, onClick: () => h(0), children: "Loss limit" }), c.jsx(fr, { 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((j, w) => c.jsxs(en, { active: N === j, onClick: () => x(j), children: [j, "X BET"] }, w)), c.jsx(en, { active: !N, onClick: () => x(null), children: "NO LIMIT" }), _ ? c.jsx(Jo, { value: "" + g, inputType: "number", onSubmit: (j) => {
|
|
3888
|
-
const w = j.trim();
|
|
3889
|
-
if (w === "") {
|
|
3890
|
-
b(!1);
|
|
3891
|
-
return;
|
|
3892
|
-
}
|
|
3893
|
-
const P = Number(w);
|
|
3894
|
-
O(P ?? 0), x(P), b(!1);
|
|
3895
|
-
}, onCancel: () => {
|
|
3896
|
-
b(!1);
|
|
3897
|
-
} }) : c.jsx(en, { onClick: () => {
|
|
3898
|
-
b(!0);
|
|
3899
|
-
}, active: !!N && N === Number(g), children: g ? `${g}X BET` : "CUSTOM" })] }) }) }), c.jsx("div", { className: "ap-start-row", children: c.jsx("button", { className: `ap-start-btn ${F ? "" : "ap-start-btn--disabled"}`, onClick: () => {
|
|
3900
|
-
}, type: "button", disabled: !F, children: "Start Autoplay" }) })] });
|
|
3901
|
-
}), dr = ({ 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 })] }), Ye = ({ onToggle: e, label: t, checked: r = !1 }) => c.jsxs("div", { className: "sp-row", children: [c.jsx("div", { className: "sp-switch", children: c.jsx(It, { checked: r, onChange: () => e(!r) }) }), c.jsx("div", { className: "sp-label", children: t })] }), Qo = J(() => {
|
|
3902
|
-
const { introSkip: e, spaceToSkip: t, musicOn: r, soundsOn: n, spaceToSpin: i, setSpaceToSpin: s, setIntroSkip: o, setSpaceToSkip: a, setSoundsOn: u, setMusicOn: l } = se, { open: d } = W;
|
|
3903
|
-
return c.jsxs("div", { className: "sp-wrap", children: [c.jsxs("div", { className: "sp-actions", children: [c.jsx(dr, { onClick: d.bind(W, Z.history), className: "sp-action--history", label: "History" }), c.jsx(dr, { onClick: () => {
|
|
3904
|
-
}, className: "sp-action--paytable", label: "Paytable" })] }), c.jsx("h3", { className: "sp-section-title", children: "Audio" }), c.jsxs("div", { className: "sp-rows", children: [c.jsx(Ye, { onToggle: l.bind(se), checked: r, label: "Music" }), c.jsx(Ye, { onToggle: u.bind(se), checked: n, label: "Sounds" })] }), c.jsx("h3", { className: "sp-section-title", children: "Game launch" }), c.jsx("div", { className: "sp-rows", children: c.jsx(Ye, { onToggle: o.bind(se), checked: e, label: "Skip Intro" }) }), c.jsx("h3", { className: "sp-section-title", children: "Keyboard" }), c.jsxs("div", { className: "sp-rows", children: [c.jsx(Ye, { onToggle: s.bind(se), checked: i, label: "Spacebar to Spin" }), c.jsx(Ye, { onToggle: a.bind(se), checked: t, label: "Spacebar to Skip" })] })] });
|
|
3905
|
-
}), ea = ({ date: e, currencyCode: t, betAmount: r, winAmount: n }) => {
|
|
3906
|
-
const [i, s] = Dt(!1);
|
|
3907
|
-
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" })] })] });
|
|
3908
|
-
};
|
|
3909
|
-
class ta {
|
|
3910
|
-
data = [
|
|
3911
|
-
{
|
|
3912
|
-
date: "26.11.2024 00:16",
|
|
3913
|
-
betAmount: 1011,
|
|
3914
|
-
winAmount: 20,
|
|
3915
|
-
currencyCode: "USD"
|
|
3916
|
-
},
|
|
3917
|
-
{
|
|
3918
|
-
date: "26.11.2024 00:16",
|
|
3919
|
-
betAmount: 10,
|
|
3920
|
-
winAmount: 20,
|
|
3921
|
-
currencyCode: "USD"
|
|
3922
|
-
},
|
|
3923
|
-
{
|
|
3924
|
-
date: "26.11.2024 00:16",
|
|
3925
|
-
betAmount: 1,
|
|
3926
|
-
winAmount: 2e4,
|
|
3927
|
-
currencyCode: "USD"
|
|
3928
|
-
},
|
|
3929
|
-
{
|
|
3930
|
-
date: "26.11.2024 00:16",
|
|
3931
|
-
betAmount: 10,
|
|
3932
|
-
winAmount: 2002,
|
|
3933
|
-
currencyCode: "USD"
|
|
3934
|
-
},
|
|
3935
|
-
{
|
|
3936
|
-
date: "26.11.2024 00:16",
|
|
3937
|
-
betAmount: 10,
|
|
3938
|
-
winAmount: 2002,
|
|
3939
|
-
currencyCode: "USD"
|
|
3940
|
-
},
|
|
3941
|
-
{
|
|
3942
|
-
date: "26.11.2024 00:16",
|
|
3943
|
-
betAmount: 10,
|
|
3944
|
-
winAmount: 2002,
|
|
3945
|
-
currencyCode: "USD"
|
|
3946
|
-
},
|
|
3947
|
-
{
|
|
3948
|
-
date: "26.11.2024 00:16",
|
|
3949
|
-
betAmount: 10,
|
|
3950
|
-
winAmount: 2002,
|
|
3951
|
-
currencyCode: "USD"
|
|
3952
|
-
},
|
|
3953
|
-
{
|
|
3954
|
-
date: "26.11.2024 00:16",
|
|
3955
|
-
betAmount: 10,
|
|
3956
|
-
winAmount: 2002,
|
|
3957
|
-
currencyCode: "USD"
|
|
3958
|
-
},
|
|
3959
|
-
{
|
|
3960
|
-
date: "26.11.2024 00:16",
|
|
3961
|
-
betAmount: 10,
|
|
3962
|
-
winAmount: 2002,
|
|
3963
|
-
currencyCode: "USD"
|
|
3964
|
-
},
|
|
3965
|
-
{
|
|
3966
|
-
date: "26.11.2024 00:16",
|
|
3967
|
-
betAmount: 10,
|
|
3968
|
-
winAmount: 2002,
|
|
3969
|
-
currencyCode: "USD"
|
|
3970
|
-
},
|
|
3971
|
-
{
|
|
3972
|
-
date: "26.11.2024 00:16",
|
|
3973
|
-
betAmount: 10,
|
|
3974
|
-
winAmount: 2002,
|
|
3975
|
-
currencyCode: "USD"
|
|
3976
|
-
},
|
|
3977
|
-
{
|
|
3978
|
-
date: "26.11.2024 00:16",
|
|
3979
|
-
betAmount: 10,
|
|
3980
|
-
winAmount: 2002,
|
|
3981
|
-
currencyCode: "USD"
|
|
3982
|
-
},
|
|
3983
|
-
{
|
|
3984
|
-
date: "26.11.2024 00:16",
|
|
3985
|
-
betAmount: 10,
|
|
3986
|
-
winAmount: 2002,
|
|
3987
|
-
currencyCode: "USD"
|
|
3988
|
-
},
|
|
3989
|
-
{
|
|
3990
|
-
date: "26.11.2024 00:16",
|
|
3991
|
-
betAmount: 10,
|
|
3992
|
-
winAmount: 2002,
|
|
3993
|
-
currencyCode: "USD"
|
|
3994
|
-
},
|
|
3995
|
-
{
|
|
3996
|
-
date: "26.11.2024 00:16",
|
|
3997
|
-
betAmount: 10,
|
|
3998
|
-
winAmount: 2002,
|
|
3999
|
-
currencyCode: "USD"
|
|
4000
|
-
},
|
|
4001
|
-
{
|
|
4002
|
-
date: "26.11.2024 00:16",
|
|
4003
|
-
betAmount: 10,
|
|
4004
|
-
winAmount: 2002,
|
|
4005
|
-
currencyCode: "USD"
|
|
4006
|
-
},
|
|
4007
|
-
{
|
|
4008
|
-
date: "26.11.2024 00:16",
|
|
4009
|
-
betAmount: 10,
|
|
4010
|
-
winAmount: 2002,
|
|
4011
|
-
currencyCode: "USD"
|
|
4012
|
-
}
|
|
4013
|
-
];
|
|
4014
|
-
constructor() {
|
|
4015
|
-
Te(this);
|
|
4016
|
-
}
|
|
4017
|
-
setData(t) {
|
|
4018
|
-
this.data = t;
|
|
4019
|
-
}
|
|
4020
|
-
}
|
|
4021
|
-
const na = new ta(), ra = J(() => {
|
|
4022
|
-
const { data: e } = na;
|
|
4023
|
-
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(ea, { date: t.date, betAmount: t.betAmount, winAmount: t.winAmount, currencyCode: t.currencyCode, id: "aa" }, r))] });
|
|
4024
|
-
}), oi = J(({ item: e, type: t, onToggle: r, onBuy: n }) => {
|
|
4025
|
-
const { betAmount: i } = le, { activeAnteBet: s, setActiveAnteBet: o } = xt, a = e.title.split(`
|
|
4026
|
-
`);
|
|
4027
|
-
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, " ", le.displayCurrency] }), t === "ante" ? c.jsx("div", { className: "sf-card__toggle", children: c.jsx(It, { checked: s === e, onChange: (u) => o.call(xt, u ? e : null) }) }) : c.jsx("button", { className: "sf-buy-btn", type: "button", onClick: () => n && n(e.title), children: "BUY" })] })] });
|
|
4028
|
-
}), tn = ({ 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(oi, { item: n, type: t, onToggle: () => {
|
|
4029
|
-
} }, i)) })] }), ia = () => {
|
|
4030
|
-
const e = (i) => {
|
|
4031
|
-
console.log("buy", i);
|
|
4032
|
-
}, { anteBets: t, inReelFeatures: r, bonusFeatures: n } = xt;
|
|
4033
|
-
return c.jsxs("div", { className: "sf-wrap", children: [t.length && c.jsx(tn, { features: t, type: Qt.ante, title: "Ante Bets" }, 0), r.length && c.jsx(tn, { features: r, type: Qt.buy, title: "Reel Features" }, 1), n.length && c.jsx(tn, { features: n, type: Qt.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(oi, { item: i, type: "buy", onBuy: e }, s)) })] });
|
|
4034
|
-
}, sa = J(() => {
|
|
4035
|
-
const { activePopup: e } = W;
|
|
4036
|
-
if (!e)
|
|
4037
|
-
return null;
|
|
4038
|
-
const t = _t(() => {
|
|
4039
|
-
switch (e) {
|
|
4040
|
-
case Z.bet:
|
|
4041
|
-
return Xo;
|
|
4042
|
-
case Z.autoplay:
|
|
4043
|
-
return Zo;
|
|
4044
|
-
case Z.settings:
|
|
4045
|
-
return Qo;
|
|
4046
|
-
case Z.history:
|
|
4047
|
-
return ra;
|
|
4048
|
-
case Z.buyBonus:
|
|
4049
|
-
return ia;
|
|
4050
|
-
default:
|
|
4051
|
-
return null;
|
|
4052
|
-
}
|
|
4053
|
-
}, [e]);
|
|
4054
|
-
return t ? c.jsx(t, {}) : null;
|
|
4055
|
-
}), oa = ({ configs: e, text: t, onClick: r }) => c.jsx("button", { type: "button", className: "additional-btn", style: {
|
|
4056
|
-
"--btn-bg": e?.background ?? "transparent",
|
|
4057
|
-
"--btn-color": e?.color ?? "inherit"
|
|
4058
|
-
}, onClick: typeof r == "function" ? r : void 0, children: t }), aa = J(() => {
|
|
4059
|
-
const { activeDialog: e } = ht;
|
|
4060
|
-
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(It, { checked: e.toggle.value, onChange: () => e.toggle?.onClick() }), c.jsx("div", { className: "additional-btns", children: e?.buttons?.map((t, r) => c.jsx(oa, { configs: t.configs, text: t.text, onClick: t.onClick }, r)) })] }) : null;
|
|
4061
|
-
});
|
|
4062
|
-
function la() {
|
|
4063
|
-
return /* @__PURE__ */ c.jsxs("div", { className: "app", children: [
|
|
4064
|
-
/* @__PURE__ */ c.jsxs("div", { className: "game-container", children: [
|
|
4065
|
-
/* @__PURE__ */ c.jsx(Fo, {}),
|
|
4066
|
-
/* @__PURE__ */ c.jsx(qo, {}),
|
|
4067
|
-
/* @__PURE__ */ c.jsx(Uo, {})
|
|
4068
|
-
] }),
|
|
4069
|
-
/* @__PURE__ */ c.jsxs(Yo, { children: [
|
|
4070
|
-
/* @__PURE__ */ c.jsx(sa, {}),
|
|
4071
|
-
/* @__PURE__ */ c.jsx(aa, {})
|
|
4072
|
-
] })
|
|
4073
|
-
] });
|
|
4074
|
-
}
|
|
4075
|
-
export {
|
|
4076
|
-
la as default
|
|
4077
|
-
};
|