@expofp/floorplan 3.5.2 → 3.6.0
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/browser/{CookieConsent-SW2eXIC8.js → CookieConsent-D4hudhgN.js} +8 -8
- package/dist/browser/{Debug-t7OzIN-8.js → Debug-C6vAYMhX.js} +7 -7
- package/dist/browser/{Demo-DJ98mlUr.js → Demo-DtTuLI8Z.js} +11 -11
- package/dist/browser/{Free-B9JCPcnr.js → Free-CqdWCHcR.js} +11 -11
- package/dist/browser/{Gallery-CPBGS9q7.js → Gallery-8RDDPykf.js} +10 -10
- package/dist/browser/{GpsLoader-vcgurCKn.js → GpsLoader-B4FEU6gL.js} +42 -42
- package/dist/browser/{KioskStore-DzLhE0fK.js → KioskStore-phPgRGhj.js} +36 -36
- package/dist/browser/{MaplibreAdapter-CAGVMAol.js → MaplibreAdapter-CS16BDJC.js} +98 -98
- package/dist/browser/{Modal-DBVl72uz.js → Modal-D_X6o9Jg.js} +10 -10
- package/dist/browser/{PermissionNotice-BDny4W7h.js → PermissionNotice-B226CFBT.js} +7 -7
- package/dist/browser/{SetKioskMode-CjKFTXwj.js → SetKioskMode-BE0tkdDL.js} +11 -11
- package/dist/browser/{ShowKiosk-bwEsTLSP.js → ShowKiosk-SbRgpnQB.js} +10 -10
- package/dist/browser/{TouchHand-DFPQ2vE8.js → TouchHand-CzEqXotc.js} +4 -4
- package/dist/browser/{ViewerMenuPanel-DK-DJHgD.js → ViewerMenuPanel-CwOeHoJI.js} +12 -12
- package/dist/browser/{add-debug-secret-listener-ND2YIuwE.js → add-debug-secret-listener-DiNpUPIy.js} +1 -1
- package/dist/browser/{boolean-editor-BXVL077p.js → boolean-editor-B4fmO-H1.js} +9 -9
- package/dist/browser/{bootIntercom-DLTAHEbT.js → bootIntercom-78s2IZm1.js} +2 -2
- package/dist/browser/{browser-V3D46fyx.js → browser-D0xyTgL5.js} +2 -2
- package/dist/browser/bundle.json +59 -56
- package/dist/browser/{classnames-Dxv3Iqu-.js → classnames-BrYUjPEV.js} +2 -2
- package/dist/browser/{client-C1kJisHy.js → client-BFmngvOl.js} +4 -4
- package/dist/browser/{components-B8Qifx-N.js → components-C562ZBah.js} +1522 -1514
- package/dist/browser/{createWayfinding-C8Pmd2H5.js → createWayfinding-DK2PWhbe.js} +598 -614
- package/dist/browser/{debug-overlay-DWJkUc3u.js → debug-overlay-z6WXDPBn.js} +10 -10
- package/dist/browser/{debug-ui-jAj6--ux.js → debug-ui-sCW8RARU.js} +6 -6
- package/dist/browser/{dist-DUIasJnS.js → dist-B1wg_Vg-.js} +3 -3
- package/dist/browser/{dist-CPyShXna.js → dist-CRY34h6v.js} +5 -5
- package/dist/browser/{dist-BHV9ghY4.js → dist-DnAXhxh2.js} +6 -6
- package/dist/browser/{efp-debug-init-AR3Fvs_0.js → efp-debug-init-B_ntwOhP.js} +2 -2
- package/dist/browser/{enum-editor-FiZIrNXM.js → enum-editor-DbuXf8r8.js} +11 -11
- package/dist/browser/{event-not-found-BzPx68a_.js → event-not-found-CAmc16WN.js} +1 -1
- package/dist/browser/{exports-DlEzkzSC.js → exports-BD8GG1L5.js} +1 -1
- package/dist/browser/{favicon-Dobo0b59.js → favicon-sZdpacxH.js} +1 -1
- package/dist/browser/{fetch-retry.umd-CXT8SYkm.js → fetch-retry.umd-AjUp2dMf.js} +2 -2
- package/dist/browser/{flex-DGR_Loqd.js → flex-CCWA2Kd-.js} +5 -5
- package/dist/browser/{floorplan.loader-GMByEo0q.js → floorplan.loader-CCXe84-M.js} +48 -47
- package/dist/browser/{floorplan.ready-DTwVRPUA.js → floorplan.ready-VVqKSxrS.js} +232 -232
- package/dist/browser/{fuse-CoX8SCVF.js → fuse-B8HbR5wR.js} +2 -2
- package/dist/browser/{i18n-CONnsQk4.js → i18n-C4ccU4Uz.js} +570 -543
- package/dist/browser/icons/departure_inactive.svg +5 -0
- package/dist/browser/index.js +11 -11
- package/dist/browser/{jsx-runtime-iIXfJE8d.js → jsx-runtime-zxgo_t9B.js} +2 -2
- package/dist/browser/{lib-CAUtTowO.js → lib-B4liZrwq.js} +4 -4
- package/dist/browser/{main-5p-fstPx.js → main-Bzb6dYP_.js} +1 -1
- package/dist/browser/{mobx-CP3094rF.js → mobx-COHcSxbj.js} +8 -8
- package/dist/browser/{particles.min-BvP0Ecuj.js → particles.min-B07pddyr.js} +2 -2
- package/dist/browser/{prop-types-CtPkc8Dm.js → prop-types-S_wOlY3G.js} +2 -2
- package/dist/browser/{react-dom-Bi44rMnr.js → react-dom-uOgI3fJi.js} +3 -3
- package/dist/browser/{react-DgvgFS2Z.js → react-v-0l0dCU.js} +2 -2
- package/dist/browser/{reset-all-settings-CB8d29KN.js → reset-all-settings-DP_XEkZl.js} +7 -7
- package/dist/browser/{rolldown-runtime-D0nkOxqx.js → rolldown-runtime-fX7LzKTd.js} +1 -1
- package/dist/browser/{settings-CTPClT89.js → settings-CvUKxJUO.js} +2 -2
- package/dist/browser/{settings-item-DFxxEXOa.js → settings-item-9XX6a5Rl.js} +6 -6
- package/dist/browser/{storage-DvQIEAC7.js → storage-I3dC3nwm.js} +5 -5
- package/dist/browser/{store-BlZ4xT_G.js → store-DZbEm-97.js} +5746 -5681
- package/dist/browser/{string-editor-YIMEKgRw.js → string-editor-CC5dLlZp.js} +7 -7
- package/dist/browser/{theme-Gip68cNV.js → theme-CFDTZaHO.js} +8 -8
- package/dist/browser/{ui-CZUswZut.js → ui-R-PKHh7O.js} +8 -8
- package/dist/browser/{useRenderTarget-DTeVFvZz.js → useRenderTarget-Da6-PWjd.js} +4 -4
- package/dist/esm/components/Kiosk/integrateKiosk.js +1 -1
- package/dist/esm/components/Map/Map.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-all.js +1 -1
- package/dist/esm/components/Wayfinding.js +1 -1
- package/dist/esm/services/routing.js +1 -1
- package/dist/esm/store/RootStore.js +1 -1
- package/dist/esm/store/RoutePlannerStore.js +1 -1
- package/dist/esm/store/RouteStore.d.ts +15 -6
- package/dist/esm/store/RouteStore.js +1 -1
- package/dist/esm/store/UIState.d.ts +1 -1
- package/dist/esm/store/UIState.js +1 -1
- package/dist/esm/types.d.ts +1 -1
- package/dist/esm/utils/loadIcons.js +1 -1
- package/dist/esm/wayfinding/adapters/arbitraryPoint.d.ts +28 -0
- package/dist/esm/wayfinding/adapters/arbitraryPoint.js +1 -0
- package/dist/esm/wayfinding/adapters/boothToEndpoint.d.ts +3 -3
- package/dist/esm/wayfinding/adapters/boothToEndpoint.js +1 -1
- package/dist/esm/wayfinding/adapters/canvasIconProvider.js +1 -1
- package/dist/esm/wayfinding/adapters/iconProvider.d.ts +1 -1
- package/dist/esm/wayfinding/adapters/index.d.ts +2 -0
- package/dist/esm/wayfinding/adapters/index.js +1 -1
- package/dist/esm/wayfinding/bindMobxReactions.d.ts +9 -1
- package/dist/esm/wayfinding/bindMobxReactions.js +1 -1
- package/dist/esm/wayfinding/core/createWayfindingEngine.js +1 -1
- package/dist/esm/wayfinding/core/geometry/projectPointOnSegment.d.ts +23 -0
- package/dist/esm/wayfinding/core/geometry/projectPointOnSegment.js +1 -0
- package/dist/esm/wayfinding/core/index.d.ts +6 -3
- package/dist/esm/wayfinding/core/index.js +1 -1
- package/dist/esm/wayfinding/core/position/gpsThreshold.d.ts +9 -0
- package/dist/esm/wayfinding/core/position/gpsThreshold.js +1 -1
- package/dist/esm/wayfinding/core/position/rerouteController.d.ts +10 -0
- package/dist/esm/wayfinding/core/position/rerouteController.js +1 -0
- package/dist/esm/wayfinding/core/position/snapToRoute.d.ts +2 -2
- package/dist/esm/wayfinding/core/position/snapToRoute.js +1 -1
- package/dist/esm/wayfinding/core/routing/{findNearestGraphPoint.d.ts → graphPointResolvers.d.ts} +1 -3
- package/dist/esm/wayfinding/core/routing/graphPointResolvers.js +1 -0
- package/dist/esm/wayfinding/core/routing/resolveWaypointCandidates.d.ts +17 -3
- package/dist/esm/wayfinding/core/routing/resolveWaypointCandidates.js +1 -1
- package/dist/esm/wayfinding/core/types.d.ts +5 -6
- package/dist/esm/wayfinding/createWayfinding.js +1 -1
- package/dist/esm/wayfinding/layers.d.ts +1 -0
- package/dist/esm/wayfinding/layers.js +1 -1
- package/dist/esm/wayfinding/runtime/createWayfindingRuntime.js +1 -1
- package/dist/esm/wayfinding/runtime/endpointView.d.ts +4 -1
- package/dist/esm/wayfinding/runtime/endpointView.js +1 -1
- package/dist/esm/wayfinding/runtime/positionTrailView.d.ts +14 -20
- package/dist/esm/wayfinding/runtime/positionTrailView.js +1 -1
- package/dist/esm/wayfinding/runtime/positionView.d.ts +1 -0
- package/dist/esm/wayfinding/runtime/positionView.js +1 -1
- package/dist/esm/wayfinding/runtime/routeRenderData.d.ts +1 -1
- package/dist/esm/wayfinding/runtime/types.d.ts +1 -0
- package/package.json +3 -3
- package/dist/esm/RouteCutIn.d.ts +0 -23
- package/dist/esm/RouteCutIn.js +0 -1
- package/dist/esm/wayfinding/core/position/shouldReroute.d.ts +0 -3
- package/dist/esm/wayfinding/core/position/shouldReroute.js +0 -1
- package/dist/esm/wayfinding/core/routing/findNearestGraphPoint.js +0 -1
- package/dist/esm/wayfinding/utils/findBoothInRadius.d.ts +0 -4
- package/dist/esm/wayfinding/utils/findBoothInRadius.js +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
try {
|
|
3
3
|
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
4
|
-
e.SENTRY_RELEASE = { id: "3.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.6.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "
|
|
6
|
+
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "97b6aa41-29e9-4ac2-b1cf-6bdbdbd9677f", e._sentryDebugIdIdentifier = "sentry-dbid-97b6aa41-29e9-4ac2-b1cf-6bdbdbd9677f");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e, t } from "./rolldown-runtime-
|
|
10
|
-
import { t as n } from "./browser-
|
|
9
|
+
import { r as e, t } from "./rolldown-runtime-fX7LzKTd.js";
|
|
10
|
+
import { t as n } from "./browser-D0xyTgL5.js";
|
|
11
11
|
//#region src/tools/logger.ts
|
|
12
12
|
var r = /* @__PURE__ */ e(n(), 1), i = class {
|
|
13
13
|
constructor() {
|
|
@@ -2008,44 +2008,44 @@ function O(e, t, n) {
|
|
|
2008
2008
|
}
|
|
2009
2009
|
//#endregion
|
|
2010
2010
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
|
|
2011
|
-
function
|
|
2011
|
+
function ze(e) {
|
|
2012
2012
|
if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2013
2013
|
return e;
|
|
2014
2014
|
}
|
|
2015
2015
|
//#endregion
|
|
2016
2016
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
|
|
2017
|
-
function
|
|
2017
|
+
function Be(e, t) {
|
|
2018
2018
|
if (t && (T(t) == "object" || typeof t == "function")) return t;
|
|
2019
2019
|
if (t !== void 0) throw TypeError("Derived constructors may only return object or undefined");
|
|
2020
|
-
return
|
|
2020
|
+
return ze(e);
|
|
2021
2021
|
}
|
|
2022
2022
|
//#endregion
|
|
2023
2023
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
|
|
2024
|
-
function
|
|
2025
|
-
return
|
|
2024
|
+
function Ve(e) {
|
|
2025
|
+
return Ve = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
2026
2026
|
return e.__proto__ || Object.getPrototypeOf(e);
|
|
2027
|
-
},
|
|
2027
|
+
}, Ve(e);
|
|
2028
2028
|
}
|
|
2029
2029
|
//#endregion
|
|
2030
2030
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
|
2031
|
-
function
|
|
2032
|
-
return
|
|
2031
|
+
function He(e, t) {
|
|
2032
|
+
return He = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
2033
2033
|
return e.__proto__ = t, e;
|
|
2034
|
-
},
|
|
2034
|
+
}, He(e, t);
|
|
2035
2035
|
}
|
|
2036
2036
|
//#endregion
|
|
2037
2037
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inherits.js
|
|
2038
|
-
function
|
|
2038
|
+
function Ue(e, t) {
|
|
2039
2039
|
if (typeof t != "function" && t !== null) throw TypeError("Super expression must either be null or a function");
|
|
2040
2040
|
e.prototype = Object.create(t && t.prototype, { constructor: {
|
|
2041
2041
|
value: e,
|
|
2042
2042
|
writable: !0,
|
|
2043
2043
|
configurable: !0
|
|
2044
|
-
} }), Object.defineProperty(e, "prototype", { writable: !1 }), t &&
|
|
2044
|
+
} }), Object.defineProperty(e, "prototype", { writable: !1 }), t && He(e, t);
|
|
2045
2045
|
}
|
|
2046
2046
|
//#endregion
|
|
2047
2047
|
//#region ../../node_modules/.pnpm/i18next@19.9.2/node_modules/i18next/dist/esm/i18next.js
|
|
2048
|
-
var
|
|
2048
|
+
var We = {
|
|
2049
2049
|
type: "logger",
|
|
2050
2050
|
log: function(e) {
|
|
2051
2051
|
this.output("log", e);
|
|
@@ -2059,7 +2059,7 @@ var Ue = {
|
|
|
2059
2059
|
output: function(e, t) {
|
|
2060
2060
|
console && console[e] && console[e].apply(console, t);
|
|
2061
2061
|
}
|
|
2062
|
-
},
|
|
2062
|
+
}, k = new (function() {
|
|
2063
2063
|
function e(t) {
|
|
2064
2064
|
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2065
2065
|
D(this, e), this.init(t, n);
|
|
@@ -2069,7 +2069,7 @@ var Ue = {
|
|
|
2069
2069
|
key: "init",
|
|
2070
2070
|
value: function(e) {
|
|
2071
2071
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2072
|
-
this.prefix = t.prefix || "i18next:", this.logger = e ||
|
|
2072
|
+
this.prefix = t.prefix || "i18next:", this.logger = e || We, this.options = t, this.debug = t.debug;
|
|
2073
2073
|
}
|
|
2074
2074
|
},
|
|
2075
2075
|
{
|
|
@@ -2119,7 +2119,7 @@ var Ue = {
|
|
|
2119
2119
|
}
|
|
2120
2120
|
}
|
|
2121
2121
|
]), e;
|
|
2122
|
-
}())(),
|
|
2122
|
+
}())(), A = function() {
|
|
2123
2123
|
function e() {
|
|
2124
2124
|
D(this, e), this.observers = {};
|
|
2125
2125
|
}
|
|
@@ -2160,21 +2160,21 @@ var Ue = {
|
|
|
2160
2160
|
}
|
|
2161
2161
|
]), e;
|
|
2162
2162
|
}();
|
|
2163
|
-
function
|
|
2163
|
+
function Ge() {
|
|
2164
2164
|
var e, t, n = new Promise(function(n, r) {
|
|
2165
2165
|
e = n, t = r;
|
|
2166
2166
|
});
|
|
2167
2167
|
return n.resolve = e, n.reject = t, n;
|
|
2168
2168
|
}
|
|
2169
|
-
function
|
|
2169
|
+
function Ke(e) {
|
|
2170
2170
|
return e == null ? "" : "" + e;
|
|
2171
2171
|
}
|
|
2172
|
-
function
|
|
2172
|
+
function qe(e, t, n) {
|
|
2173
2173
|
e.forEach(function(e) {
|
|
2174
2174
|
t[e] && (n[e] = t[e]);
|
|
2175
2175
|
});
|
|
2176
2176
|
}
|
|
2177
|
-
function
|
|
2177
|
+
function Je(e, t, n) {
|
|
2178
2178
|
function r(e) {
|
|
2179
2179
|
return e && e.indexOf("###") > -1 ? e.replace(/###/g, ".") : e;
|
|
2180
2180
|
}
|
|
@@ -2191,30 +2191,30 @@ function qe(e, t, n) {
|
|
|
2191
2191
|
k: r(a.shift())
|
|
2192
2192
|
};
|
|
2193
2193
|
}
|
|
2194
|
-
function
|
|
2195
|
-
var r =
|
|
2194
|
+
function Ye(e, t, n) {
|
|
2195
|
+
var r = Je(e, t, Object), i = r.obj, a = r.k;
|
|
2196
2196
|
i[a] = n;
|
|
2197
2197
|
}
|
|
2198
|
-
function
|
|
2199
|
-
var i =
|
|
2198
|
+
function Xe(e, t, n, r) {
|
|
2199
|
+
var i = Je(e, t, Object), a = i.obj, o = i.k;
|
|
2200
2200
|
a[o] = a[o] || [], r && (a[o] = a[o].concat(n)), r || a[o].push(n);
|
|
2201
2201
|
}
|
|
2202
|
-
function
|
|
2203
|
-
var n =
|
|
2202
|
+
function Ze(e, t) {
|
|
2203
|
+
var n = Je(e, t), r = n.obj, i = n.k;
|
|
2204
2204
|
if (r) return r[i];
|
|
2205
2205
|
}
|
|
2206
|
-
function Ze(e, t, n) {
|
|
2207
|
-
var r = Xe(e, n);
|
|
2208
|
-
return r === void 0 ? Xe(t, n) : r;
|
|
2209
|
-
}
|
|
2210
2206
|
function Qe(e, t, n) {
|
|
2211
|
-
|
|
2207
|
+
var r = Ze(e, n);
|
|
2208
|
+
return r === void 0 ? Ze(t, n) : r;
|
|
2209
|
+
}
|
|
2210
|
+
function $e(e, t, n) {
|
|
2211
|
+
for (var r in t) r !== "__proto__" && r !== "constructor" && (r in e ? typeof e[r] == "string" || e[r] instanceof String || typeof t[r] == "string" || t[r] instanceof String ? n && (e[r] = t[r]) : $e(e[r], t[r], n) : e[r] = t[r]);
|
|
2212
2212
|
return e;
|
|
2213
2213
|
}
|
|
2214
|
-
function
|
|
2214
|
+
function et(e) {
|
|
2215
2215
|
return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
2216
2216
|
}
|
|
2217
|
-
var
|
|
2217
|
+
var tt = {
|
|
2218
2218
|
"&": "&",
|
|
2219
2219
|
"<": "<",
|
|
2220
2220
|
">": ">",
|
|
@@ -2222,19 +2222,19 @@ var et = {
|
|
|
2222
2222
|
"'": "'",
|
|
2223
2223
|
"/": "/"
|
|
2224
2224
|
};
|
|
2225
|
-
function
|
|
2225
|
+
function nt(e) {
|
|
2226
2226
|
return typeof e == "string" ? e.replace(/[&<>"'\/]/g, function(e) {
|
|
2227
|
-
return
|
|
2227
|
+
return tt[e];
|
|
2228
2228
|
}) : e;
|
|
2229
2229
|
}
|
|
2230
|
-
var
|
|
2231
|
-
|
|
2230
|
+
var rt = typeof window < "u" && window.navigator && window.navigator.userAgent && window.navigator.userAgent.indexOf("MSIE") > -1, it = function(e) {
|
|
2231
|
+
Ue(t, e);
|
|
2232
2232
|
function t(e) {
|
|
2233
2233
|
var n, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
2234
2234
|
ns: ["translation"],
|
|
2235
2235
|
defaultNS: "translation"
|
|
2236
2236
|
};
|
|
2237
|
-
return D(this, t), n =
|
|
2237
|
+
return D(this, t), n = Be(this, Ve(t).call(this)), rt && A.call(ze(n)), n.data = e || {}, n.options = r, n.options.keySeparator === void 0 && (n.options.keySeparator = "."), n;
|
|
2238
2238
|
}
|
|
2239
2239
|
return O(t, [
|
|
2240
2240
|
{
|
|
@@ -2254,7 +2254,7 @@ var nt = typeof window < "u" && window.navigator && window.navigator.userAgent &
|
|
|
2254
2254
|
key: "getResource",
|
|
2255
2255
|
value: function(e, t, n) {
|
|
2256
2256
|
var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, i = r.keySeparator === void 0 ? this.options.keySeparator : r.keySeparator, a = [e, t];
|
|
2257
|
-
return n && typeof n != "string" && (a = a.concat(n)), n && typeof n == "string" && (a = a.concat(i ? n.split(i) : n)), e.indexOf(".") > -1 && (a = e.split(".")),
|
|
2257
|
+
return n && typeof n != "string" && (a = a.concat(n)), n && typeof n == "string" && (a = a.concat(i ? n.split(i) : n)), e.indexOf(".") > -1 && (a = e.split(".")), Ze(this.data, a);
|
|
2258
2258
|
}
|
|
2259
2259
|
},
|
|
2260
2260
|
{
|
|
@@ -2263,7 +2263,7 @@ var nt = typeof window < "u" && window.navigator && window.navigator.userAgent &
|
|
|
2263
2263
|
var i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : { silent: !1 }, a = this.options.keySeparator;
|
|
2264
2264
|
a === void 0 && (a = ".");
|
|
2265
2265
|
var o = [e, t];
|
|
2266
|
-
n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t),
|
|
2266
|
+
n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), Ye(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
|
|
2267
2267
|
}
|
|
2268
2268
|
},
|
|
2269
2269
|
{
|
|
@@ -2279,8 +2279,8 @@ var nt = typeof window < "u" && window.navigator && window.navigator.userAgent &
|
|
|
2279
2279
|
value: function(e, t, n, r, i) {
|
|
2280
2280
|
var a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : { silent: !1 }, o = [e, t];
|
|
2281
2281
|
e.indexOf(".") > -1 && (o = e.split("."), r = n, n = t, t = o[1]), this.addNamespaces(t);
|
|
2282
|
-
var s =
|
|
2283
|
-
r ?
|
|
2282
|
+
var s = Ze(this.data, o) || {};
|
|
2283
|
+
r ? $e(s, n, i) : s = E({}, s, n), Ye(this.data, o, s), a.silent || this.emit("added", e, t, n);
|
|
2284
2284
|
}
|
|
2285
2285
|
},
|
|
2286
2286
|
{
|
|
@@ -2314,7 +2314,7 @@ var nt = typeof window < "u" && window.navigator && window.navigator.userAgent &
|
|
|
2314
2314
|
}
|
|
2315
2315
|
}
|
|
2316
2316
|
]), t;
|
|
2317
|
-
}(
|
|
2317
|
+
}(A), at = {
|
|
2318
2318
|
processors: {},
|
|
2319
2319
|
addPostProcessor: function(e) {
|
|
2320
2320
|
this.processors[e.name] = e;
|
|
@@ -2325,11 +2325,11 @@ var nt = typeof window < "u" && window.navigator && window.navigator.userAgent &
|
|
|
2325
2325
|
a.processors[e] && (t = a.processors[e].process(t, n, r, i));
|
|
2326
2326
|
}), t;
|
|
2327
2327
|
}
|
|
2328
|
-
},
|
|
2329
|
-
|
|
2328
|
+
}, ot = {}, st = function(e) {
|
|
2329
|
+
Ue(t, e);
|
|
2330
2330
|
function t(e) {
|
|
2331
2331
|
var n, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2332
|
-
return D(this, t), n =
|
|
2332
|
+
return D(this, t), n = Be(this, Ve(t).call(this)), rt && A.call(ze(n)), qe([
|
|
2333
2333
|
"resourceStore",
|
|
2334
2334
|
"languageUtils",
|
|
2335
2335
|
"pluralResolver",
|
|
@@ -2337,7 +2337,7 @@ var nt = typeof window < "u" && window.navigator && window.navigator.userAgent &
|
|
|
2337
2337
|
"backendConnector",
|
|
2338
2338
|
"i18nFormat",
|
|
2339
2339
|
"utils"
|
|
2340
|
-
], e,
|
|
2340
|
+
], e, ze(n)), n.options = r, n.options.keySeparator === void 0 && (n.options.keySeparator = "."), n.logger = k.create("translator"), n;
|
|
2341
2341
|
}
|
|
2342
2342
|
return O(t, [
|
|
2343
2343
|
{
|
|
@@ -2450,7 +2450,7 @@ var nt = typeof window < "u" && window.navigator && window.navigator.userAgent &
|
|
|
2450
2450
|
}, n)), n.interpolation && this.interpolator.reset();
|
|
2451
2451
|
}
|
|
2452
2452
|
var f = n.postProcess || this.options.postProcess, p = typeof f == "string" ? [f] : f;
|
|
2453
|
-
return e != null && p && p.length && n.applyPostProcessor !== !1 && (e =
|
|
2453
|
+
return e != null && p && p.length && n.applyPostProcessor !== !1 && (e = at.handle(p, e, t, this.options && this.options.postProcessPassResolved ? E({ i18nResolved: r }, n) : n, this)), e;
|
|
2454
2454
|
}
|
|
2455
2455
|
},
|
|
2456
2456
|
{
|
|
@@ -2465,7 +2465,7 @@ var nt = typeof window < "u" && window.navigator && window.navigator.userAgent &
|
|
|
2465
2465
|
t.options.fallbackNS && (u = u.concat(t.options.fallbackNS));
|
|
2466
2466
|
var d = n.count !== void 0 && typeof n.count != "string", f = n.context !== void 0 && typeof n.context == "string" && n.context !== "", p = n.lngs ? n.lngs : t.languageUtils.toResolveHierarchy(n.lng || t.language, n.fallbackLng);
|
|
2467
2467
|
u.forEach(function(e) {
|
|
2468
|
-
t.isValidLookup(r) || (s = e, !
|
|
2468
|
+
t.isValidLookup(r) || (s = e, !ot[`${p[0]}-${e}`] && t.utils && t.utils.hasLoadedNamespace && !t.utils.hasLoadedNamespace(s) && (ot[`${p[0]}-${e}`] = !0, t.logger.warn(`key "${i}" for languages "${p.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), p.forEach(function(i) {
|
|
2469
2469
|
if (!t.isValidLookup(r)) {
|
|
2470
2470
|
o = i;
|
|
2471
2471
|
var s = l, c = [s];
|
|
@@ -2509,13 +2509,13 @@ var nt = typeof window < "u" && window.navigator && window.navigator.userAgent &
|
|
|
2509
2509
|
return !1;
|
|
2510
2510
|
}
|
|
2511
2511
|
}]), t;
|
|
2512
|
-
}(
|
|
2513
|
-
function
|
|
2512
|
+
}(A);
|
|
2513
|
+
function ct(e) {
|
|
2514
2514
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
2515
2515
|
}
|
|
2516
|
-
var
|
|
2516
|
+
var lt = function() {
|
|
2517
2517
|
function e(t) {
|
|
2518
|
-
D(this, e), this.options = t, this.whitelist = this.options.supportedLngs || !1, this.supportedLngs = this.options.supportedLngs || !1, this.logger =
|
|
2518
|
+
D(this, e), this.options = t, this.whitelist = this.options.supportedLngs || !1, this.supportedLngs = this.options.supportedLngs || !1, this.logger = k.create("languageUtils");
|
|
2519
2519
|
}
|
|
2520
2520
|
return O(e, [
|
|
2521
2521
|
{
|
|
@@ -2549,7 +2549,7 @@ var ct = function() {
|
|
|
2549
2549
|
], n = e.split("-");
|
|
2550
2550
|
return this.options.lowerCaseLng ? n = n.map(function(e) {
|
|
2551
2551
|
return e.toLowerCase();
|
|
2552
|
-
}) : n.length === 2 ? (n[0] = n[0].toLowerCase(), n[1] = n[1].toUpperCase(), t.indexOf(n[1].toLowerCase()) > -1 && (n[1] =
|
|
2552
|
+
}) : n.length === 2 ? (n[0] = n[0].toLowerCase(), n[1] = n[1].toUpperCase(), t.indexOf(n[1].toLowerCase()) > -1 && (n[1] = ct(n[1].toLowerCase()))) : n.length === 3 && (n[0] = n[0].toLowerCase(), n[1].length === 2 && (n[1] = n[1].toUpperCase()), n[0] !== "sgn" && n[2].length === 2 && (n[2] = n[2].toUpperCase()), t.indexOf(n[1].toLowerCase()) > -1 && (n[1] = ct(n[1].toLowerCase())), t.indexOf(n[2].toLowerCase()) > -1 && (n[2] = ct(n[2].toLowerCase()))), n.join("-");
|
|
2553
2553
|
}
|
|
2554
2554
|
return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e;
|
|
2555
2555
|
}
|
|
@@ -2610,7 +2610,7 @@ var ct = function() {
|
|
|
2610
2610
|
}
|
|
2611
2611
|
}
|
|
2612
2612
|
]), e;
|
|
2613
|
-
}(),
|
|
2613
|
+
}(), ut = [
|
|
2614
2614
|
{
|
|
2615
2615
|
lngs: [
|
|
2616
2616
|
"ach",
|
|
@@ -2851,7 +2851,7 @@ var ct = function() {
|
|
|
2851
2851
|
],
|
|
2852
2852
|
fc: 22
|
|
2853
2853
|
}
|
|
2854
|
-
],
|
|
2854
|
+
], dt = {
|
|
2855
2855
|
1: function(e) {
|
|
2856
2856
|
return Number(e > 1);
|
|
2857
2857
|
},
|
|
@@ -2919,21 +2919,21 @@ var ct = function() {
|
|
|
2919
2919
|
return Number(e == 1 ? 0 : e == 2 ? 1 : (e < 0 || e > 10) && e % 10 == 0 ? 2 : 3);
|
|
2920
2920
|
}
|
|
2921
2921
|
};
|
|
2922
|
-
function
|
|
2922
|
+
function ft() {
|
|
2923
2923
|
var e = {};
|
|
2924
|
-
return
|
|
2924
|
+
return ut.forEach(function(t) {
|
|
2925
2925
|
t.lngs.forEach(function(n) {
|
|
2926
2926
|
e[n] = {
|
|
2927
2927
|
numbers: t.nr,
|
|
2928
|
-
plurals:
|
|
2928
|
+
plurals: dt[t.fc]
|
|
2929
2929
|
};
|
|
2930
2930
|
});
|
|
2931
2931
|
}), e;
|
|
2932
2932
|
}
|
|
2933
|
-
var
|
|
2933
|
+
var pt = function() {
|
|
2934
2934
|
function e(t) {
|
|
2935
2935
|
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2936
|
-
D(this, e), this.languageUtils = t, this.options = n, this.logger =
|
|
2936
|
+
D(this, e), this.languageUtils = t, this.options = n, this.logger = k.create("pluralResolver"), this.rules = ft();
|
|
2937
2937
|
}
|
|
2938
2938
|
return O(e, [
|
|
2939
2939
|
{
|
|
@@ -2988,10 +2988,10 @@ var ft = function() {
|
|
|
2988
2988
|
}
|
|
2989
2989
|
}
|
|
2990
2990
|
]), e;
|
|
2991
|
-
}(),
|
|
2991
|
+
}(), mt = function() {
|
|
2992
2992
|
function e() {
|
|
2993
2993
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2994
|
-
D(this, e), this.logger =
|
|
2994
|
+
D(this, e), this.logger = k.create("interpolator"), this.options = t, this.format = t.interpolation && t.interpolation.format || function(e) {
|
|
2995
2995
|
return e;
|
|
2996
2996
|
}, this.init(t);
|
|
2997
2997
|
}
|
|
@@ -3002,7 +3002,7 @@ var ft = function() {
|
|
|
3002
3002
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
3003
3003
|
e.interpolation || (e.interpolation = { escapeValue: !0 });
|
|
3004
3004
|
var t = e.interpolation;
|
|
3005
|
-
this.escape = t.escape === void 0 ?
|
|
3005
|
+
this.escape = t.escape === void 0 ? nt : t.escape, this.escapeValue = t.escapeValue === void 0 ? !0 : t.escapeValue, this.useRawValueToEscape = t.useRawValueToEscape === void 0 ? !1 : t.useRawValueToEscape, this.prefix = t.prefix ? et(t.prefix) : t.prefixEscaped || "{{", this.suffix = t.suffix ? et(t.suffix) : t.suffixEscaped || "}}", this.formatSeparator = t.formatSeparator ? t.formatSeparator : t.formatSeparator || ",", this.unescapePrefix = t.unescapeSuffix ? "" : t.unescapePrefix || "-", this.unescapeSuffix = this.unescapePrefix ? "" : t.unescapeSuffix || "", this.nestingPrefix = t.nestingPrefix ? et(t.nestingPrefix) : t.nestingPrefixEscaped || et("$t("), this.nestingSuffix = t.nestingSuffix ? et(t.nestingSuffix) : t.nestingSuffixEscaped || et(")"), this.nestingOptionsSeparator = t.nestingOptionsSeparator ? t.nestingOptionsSeparator : t.nestingOptionsSeparator || ",", this.maxReplaces = t.maxReplaces ? t.maxReplaces : 1e3, this.alwaysFormat = t.alwaysFormat === void 0 ? !1 : t.alwaysFormat, this.resetRegExp();
|
|
3006
3006
|
}
|
|
3007
3007
|
},
|
|
3008
3008
|
{
|
|
@@ -3031,11 +3031,11 @@ var ft = function() {
|
|
|
3031
3031
|
}
|
|
3032
3032
|
var u = function(e) {
|
|
3033
3033
|
if (e.indexOf(i.formatSeparator) < 0) {
|
|
3034
|
-
var a =
|
|
3034
|
+
var a = Qe(t, c, e);
|
|
3035
3035
|
return i.alwaysFormat ? i.format(a, void 0, n) : a;
|
|
3036
3036
|
}
|
|
3037
3037
|
var o = e.split(i.formatSeparator), s = o.shift().trim(), l = o.join(i.formatSeparator).trim();
|
|
3038
|
-
return i.format(
|
|
3038
|
+
return i.format(Qe(t, c, s), l, n, r);
|
|
3039
3039
|
};
|
|
3040
3040
|
this.resetRegExp();
|
|
3041
3041
|
var d = r && r.missingInterpolationHandler || this.options.missingInterpolationHandler, f = r && r.interpolation && r.interpolation.skipOnVariables || this.options.interpolation.skipOnVariables;
|
|
@@ -3058,7 +3058,7 @@ var ft = function() {
|
|
|
3058
3058
|
o = a[0];
|
|
3059
3059
|
continue;
|
|
3060
3060
|
} else i.logger.warn(`missed to pass in variable ${a[1]} for interpolating ${e}`), o = "";
|
|
3061
|
-
else typeof o != "string" && !i.useRawValueToEscape && (o =
|
|
3061
|
+
else typeof o != "string" && !i.useRawValueToEscape && (o = Ke(o));
|
|
3062
3062
|
if (e = e.replace(a[0], t.safeValue(o)), t.regex.lastIndex = 0, s++, s >= i.maxReplaces) break;
|
|
3063
3063
|
}
|
|
3064
3064
|
}), e;
|
|
@@ -3090,7 +3090,7 @@ var ft = function() {
|
|
|
3090
3090
|
i[1] = u.shift(), c = u, l = !0;
|
|
3091
3091
|
}
|
|
3092
3092
|
if (a = t(s.call(this, i[1].trim(), o), o), a && i[0] === e && typeof a != "string") return a;
|
|
3093
|
-
typeof a != "string" && (a =
|
|
3093
|
+
typeof a != "string" && (a = Ke(a)), a || (this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`), a = ""), l && (a = c.reduce(function(e, t) {
|
|
3094
3094
|
return n.format(e, t, r.lng, r);
|
|
3095
3095
|
}, a.trim())), e = e.replace(i[0], a), this.regexp.lastIndex = 0;
|
|
3096
3096
|
}
|
|
@@ -3099,14 +3099,14 @@ var ft = function() {
|
|
|
3099
3099
|
}
|
|
3100
3100
|
]), e;
|
|
3101
3101
|
}();
|
|
3102
|
-
function
|
|
3102
|
+
function ht(e, t) {
|
|
3103
3103
|
for (var n = e.indexOf(t); n !== -1;) e.splice(n, 1), n = e.indexOf(t);
|
|
3104
3104
|
}
|
|
3105
|
-
var
|
|
3106
|
-
|
|
3105
|
+
var gt = function(e) {
|
|
3106
|
+
Ue(t, e);
|
|
3107
3107
|
function t(e, n, r) {
|
|
3108
3108
|
var i, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
3109
|
-
return D(this, t), i =
|
|
3109
|
+
return D(this, t), i = Be(this, Ve(t).call(this)), rt && A.call(ze(i)), i.backend = e, i.store = n, i.services = r, i.languageUtils = r.languageUtils, i.options = a, i.logger = k.create("backendConnector"), i.state = {}, i.queue = [], i.backend && i.backend.init && i.backend.init(r, a.backend, a), i;
|
|
3110
3110
|
}
|
|
3111
3111
|
return O(t, [
|
|
3112
3112
|
{
|
|
@@ -3139,7 +3139,7 @@ var ht = function(e) {
|
|
|
3139
3139
|
t && this.emit("failedLoading", i, a, t), n && this.store.addResourceBundle(i, a, n), this.state[e] = t ? -1 : 2;
|
|
3140
3140
|
var o = {};
|
|
3141
3141
|
this.queue.forEach(function(n) {
|
|
3142
|
-
|
|
3142
|
+
Xe(n.loaded, [i], a), ht(n.pending, e), t && n.errors.push(t), n.pending.length === 0 && !n.done && (Object.keys(n.loaded).forEach(function(e) {
|
|
3143
3143
|
o[e] || (o[e] = []), n.loaded[e].length && n.loaded[e].forEach(function(t) {
|
|
3144
3144
|
o[e].indexOf(t) < 0 && o[e].push(t);
|
|
3145
3145
|
});
|
|
@@ -3210,8 +3210,8 @@ var ht = function(e) {
|
|
|
3210
3210
|
}
|
|
3211
3211
|
}
|
|
3212
3212
|
]), t;
|
|
3213
|
-
}(
|
|
3214
|
-
function
|
|
3213
|
+
}(A);
|
|
3214
|
+
function _t() {
|
|
3215
3215
|
return {
|
|
3216
3216
|
debug: !1,
|
|
3217
3217
|
initImmediate: !0,
|
|
@@ -3274,16 +3274,16 @@ function gt() {
|
|
|
3274
3274
|
}
|
|
3275
3275
|
};
|
|
3276
3276
|
}
|
|
3277
|
-
function
|
|
3277
|
+
function vt(e) {
|
|
3278
3278
|
return typeof e.ns == "string" && (e.ns = [e.ns]), typeof e.fallbackLng == "string" && (e.fallbackLng = [e.fallbackLng]), typeof e.fallbackNS == "string" && (e.fallbackNS = [e.fallbackNS]), e.whitelist && (e.whitelist && e.whitelist.indexOf("cimode") < 0 && (e.whitelist = e.whitelist.concat(["cimode"])), e.supportedLngs = e.whitelist), e.nonExplicitWhitelist && (e.nonExplicitSupportedLngs = e.nonExplicitWhitelist), e.supportedLngs && e.supportedLngs.indexOf("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), e;
|
|
3279
3279
|
}
|
|
3280
|
-
function
|
|
3281
|
-
var
|
|
3282
|
-
|
|
3280
|
+
function yt() {}
|
|
3281
|
+
var bt = new (function(e) {
|
|
3282
|
+
Ue(t, e);
|
|
3283
3283
|
function t() {
|
|
3284
3284
|
var e, n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 ? arguments[1] : void 0;
|
|
3285
|
-
if (D(this, t), e =
|
|
3286
|
-
if (!e.options.initImmediate) return e.init(n, r),
|
|
3285
|
+
if (D(this, t), e = Be(this, Ve(t).call(this)), rt && A.call(ze(e)), e.options = vt(n), e.services = {}, e.logger = k, e.modules = { external: [] }, r && !e.isInitialized && !n.isClone) {
|
|
3286
|
+
if (!e.options.initImmediate) return e.init(n, r), Be(e, ze(e));
|
|
3287
3287
|
setTimeout(function() {
|
|
3288
3288
|
e.init(n, r);
|
|
3289
3289
|
}, 0);
|
|
@@ -3295,23 +3295,23 @@ var yt = new (function(e) {
|
|
|
3295
3295
|
key: "init",
|
|
3296
3296
|
value: function() {
|
|
3297
3297
|
var e = this, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 ? arguments[1] : void 0;
|
|
3298
|
-
typeof t == "function" && (n = t, t = {}), t.whitelist && !t.supportedLngs && this.logger.deprecate("whitelist", "option \"whitelist\" will be renamed to \"supportedLngs\" in the next major - please make sure to rename this option asap."), t.nonExplicitWhitelist && !t.nonExplicitSupportedLngs && this.logger.deprecate("whitelist", "options \"nonExplicitWhitelist\" will be renamed to \"nonExplicitSupportedLngs\" in the next major - please make sure to rename this option asap."), this.options = E({},
|
|
3298
|
+
typeof t == "function" && (n = t, t = {}), t.whitelist && !t.supportedLngs && this.logger.deprecate("whitelist", "option \"whitelist\" will be renamed to \"supportedLngs\" in the next major - please make sure to rename this option asap."), t.nonExplicitWhitelist && !t.nonExplicitSupportedLngs && this.logger.deprecate("whitelist", "options \"nonExplicitWhitelist\" will be renamed to \"nonExplicitSupportedLngs\" in the next major - please make sure to rename this option asap."), this.options = E({}, _t(), this.options, vt(t)), this.format = this.options.interpolation.format, n || (n = yt);
|
|
3299
3299
|
function r(e) {
|
|
3300
3300
|
return e ? typeof e == "function" ? new e() : e : null;
|
|
3301
3301
|
}
|
|
3302
3302
|
if (!this.options.isClone) {
|
|
3303
|
-
this.modules.logger ?
|
|
3304
|
-
var i = new
|
|
3305
|
-
this.store = new
|
|
3303
|
+
this.modules.logger ? k.init(r(this.modules.logger), this.options) : k.init(null, this.options);
|
|
3304
|
+
var i = new lt(this.options);
|
|
3305
|
+
this.store = new it(this.options.resources, this.options);
|
|
3306
3306
|
var a = this.services;
|
|
3307
|
-
a.logger =
|
|
3307
|
+
a.logger = k, a.resourceStore = this.store, a.languageUtils = i, a.pluralResolver = new pt(i, {
|
|
3308
3308
|
prepend: this.options.pluralSeparator,
|
|
3309
3309
|
compatibilityJSON: this.options.compatibilityJSON,
|
|
3310
3310
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
3311
|
-
}), a.interpolator = new
|
|
3311
|
+
}), a.interpolator = new mt(this.options), a.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, a.backendConnector = new gt(r(this.modules.backend), a.resourceStore, a, this.options), a.backendConnector.on("*", function(t) {
|
|
3312
3312
|
var n = [...arguments].slice(1);
|
|
3313
3313
|
e.emit.apply(e, [t].concat(n));
|
|
3314
|
-
}), this.modules.languageDetector && (a.languageDetector = r(this.modules.languageDetector), a.languageDetector.init(a, this.options.detection, this.options)), this.modules.i18nFormat && (a.i18nFormat = r(this.modules.i18nFormat), a.i18nFormat.init && a.i18nFormat.init(this)), this.translator = new
|
|
3314
|
+
}), this.modules.languageDetector && (a.languageDetector = r(this.modules.languageDetector), a.languageDetector.init(a, this.options.detection, this.options)), this.modules.i18nFormat && (a.i18nFormat = r(this.modules.i18nFormat), a.i18nFormat.init && a.i18nFormat.init(this)), this.translator = new st(this.services, this.options), this.translator.on("*", function(t) {
|
|
3315
3315
|
var n = [...arguments].slice(1);
|
|
3316
3316
|
e.emit.apply(e, [t].concat(n));
|
|
3317
3317
|
}), this.modules.external.forEach(function(t) {
|
|
@@ -3343,7 +3343,7 @@ var yt = new (function(e) {
|
|
|
3343
3343
|
return (n = e.store)[t].apply(n, arguments), e;
|
|
3344
3344
|
};
|
|
3345
3345
|
});
|
|
3346
|
-
var s =
|
|
3346
|
+
var s = Ge(), c = function() {
|
|
3347
3347
|
var t = function(t, r) {
|
|
3348
3348
|
e.isInitialized && e.logger.warn("init: i18next is already initialized. You should call init just once!"), e.isInitialized = !0, e.options.isClone || e.logger.log("initialized", e.options), e.emit("initialized", e.options), s.resolve(r), n(t, r);
|
|
3349
3349
|
};
|
|
@@ -3356,7 +3356,7 @@ var yt = new (function(e) {
|
|
|
3356
3356
|
{
|
|
3357
3357
|
key: "loadResources",
|
|
3358
3358
|
value: function(e) {
|
|
3359
|
-
var t = this, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
3359
|
+
var t = this, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : yt, r = typeof e == "string" ? e : this.language;
|
|
3360
3360
|
if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
3361
3361
|
if (r && r.toLowerCase() === "cimode") return n();
|
|
3362
3362
|
var i = [], a = function(e) {
|
|
@@ -3375,8 +3375,8 @@ var yt = new (function(e) {
|
|
|
3375
3375
|
{
|
|
3376
3376
|
key: "reloadResources",
|
|
3377
3377
|
value: function(e, t, n) {
|
|
3378
|
-
var r =
|
|
3379
|
-
return e || (e = this.languages), t || (t = this.options.ns), n || (n =
|
|
3378
|
+
var r = Ge();
|
|
3379
|
+
return e || (e = this.languages), t || (t = this.options.ns), n || (n = yt), this.services.backendConnector.reload(e, t, function(e) {
|
|
3380
3380
|
r.resolve(), n(e);
|
|
3381
3381
|
}), r;
|
|
3382
3382
|
}
|
|
@@ -3386,7 +3386,7 @@ var yt = new (function(e) {
|
|
|
3386
3386
|
value: function(e) {
|
|
3387
3387
|
if (!e) throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
|
|
3388
3388
|
if (!e.type) throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
|
|
3389
|
-
return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" &&
|
|
3389
|
+
return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && at.addPostProcessor(e), e.type === "3rdParty" && this.modules.external.push(e), this;
|
|
3390
3390
|
}
|
|
3391
3391
|
},
|
|
3392
3392
|
{
|
|
@@ -3394,7 +3394,7 @@ var yt = new (function(e) {
|
|
|
3394
3394
|
value: function(e, t) {
|
|
3395
3395
|
var n = this;
|
|
3396
3396
|
this.isLanguageChangingTo = e;
|
|
3397
|
-
var r =
|
|
3397
|
+
var r = Ge();
|
|
3398
3398
|
this.emit("languageChanging", e);
|
|
3399
3399
|
var i = function(e, i) {
|
|
3400
3400
|
i ? (n.language = i, n.languages = n.services.languageUtils.toResolveHierarchy(i), n.translator.changeLanguage(i), n.isLanguageChangingTo = void 0, n.emit("languageChanged", i), n.logger.log("languageChanged", i)) : n.isLanguageChangingTo = void 0, r.resolve(function() {
|
|
@@ -3467,7 +3467,7 @@ var yt = new (function(e) {
|
|
|
3467
3467
|
{
|
|
3468
3468
|
key: "loadNamespaces",
|
|
3469
3469
|
value: function(e, t) {
|
|
3470
|
-
var n = this, r =
|
|
3470
|
+
var n = this, r = Ge();
|
|
3471
3471
|
return this.options.ns ? (typeof e == "string" && (e = [e]), e.forEach(function(e) {
|
|
3472
3472
|
n.options.ns.indexOf(e) < 0 && n.options.ns.push(e);
|
|
3473
3473
|
}), this.loadResources(function(e) {
|
|
@@ -3478,7 +3478,7 @@ var yt = new (function(e) {
|
|
|
3478
3478
|
{
|
|
3479
3479
|
key: "loadLanguages",
|
|
3480
3480
|
value: function(e, t) {
|
|
3481
|
-
var n =
|
|
3481
|
+
var n = Ge();
|
|
3482
3482
|
typeof e == "string" && (e = [e]);
|
|
3483
3483
|
var r = this.options.preload || [], i = e.filter(function(e) {
|
|
3484
3484
|
return r.indexOf(e) < 0;
|
|
@@ -3503,64 +3503,64 @@ var yt = new (function(e) {
|
|
|
3503
3503
|
{
|
|
3504
3504
|
key: "cloneInstance",
|
|
3505
3505
|
value: function() {
|
|
3506
|
-
var e = this, n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
3506
|
+
var e = this, n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : yt, i = E({}, this.options, n, { isClone: !0 }), a = new t(i);
|
|
3507
3507
|
return [
|
|
3508
3508
|
"store",
|
|
3509
3509
|
"services",
|
|
3510
3510
|
"language"
|
|
3511
3511
|
].forEach(function(t) {
|
|
3512
3512
|
a[t] = e[t];
|
|
3513
|
-
}), a.services = E({}, this.services), a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, a.translator = new
|
|
3513
|
+
}), a.services = E({}, this.services), a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, a.translator = new st(a.services, a.options), a.translator.on("*", function(e) {
|
|
3514
3514
|
var t = [...arguments].slice(1);
|
|
3515
3515
|
a.emit.apply(a, [e].concat(t));
|
|
3516
3516
|
}), a.init(i, r), a.translator.options = a.options, a.translator.backendConnector.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, a;
|
|
3517
3517
|
}
|
|
3518
3518
|
}
|
|
3519
3519
|
]), t;
|
|
3520
|
-
}(
|
|
3521
|
-
Object.freeze(xt);
|
|
3522
|
-
var St = {};
|
|
3520
|
+
}(A))(), xt = "An invariant failed, however the error is obfuscated because this is a production build.", St = [];
|
|
3523
3521
|
Object.freeze(St);
|
|
3524
|
-
|
|
3522
|
+
var Ct = {};
|
|
3523
|
+
Object.freeze(Ct);
|
|
3524
|
+
function j() {
|
|
3525
3525
|
return ++H.mobxGuid;
|
|
3526
3526
|
}
|
|
3527
|
-
function
|
|
3528
|
-
throw
|
|
3527
|
+
function M(e) {
|
|
3528
|
+
throw wt(!1, e), "X";
|
|
3529
3529
|
}
|
|
3530
|
-
function
|
|
3531
|
-
if (!e) throw Error("[mobx] " + (t ||
|
|
3530
|
+
function wt(e, t) {
|
|
3531
|
+
if (!e) throw Error("[mobx] " + (t || xt));
|
|
3532
3532
|
}
|
|
3533
|
-
function
|
|
3533
|
+
function Tt(e) {
|
|
3534
3534
|
var t = !1;
|
|
3535
3535
|
return function() {
|
|
3536
3536
|
if (!t) return t = !0, e.apply(this, arguments);
|
|
3537
3537
|
};
|
|
3538
3538
|
}
|
|
3539
|
-
var
|
|
3540
|
-
function
|
|
3539
|
+
var Et = function() {};
|
|
3540
|
+
function Dt(e) {
|
|
3541
3541
|
var t = [];
|
|
3542
3542
|
return e.forEach(function(e) {
|
|
3543
3543
|
t.indexOf(e) === -1 && t.push(e);
|
|
3544
3544
|
}), t;
|
|
3545
3545
|
}
|
|
3546
|
-
function
|
|
3546
|
+
function Ot(e) {
|
|
3547
3547
|
return typeof e == "object" && !!e;
|
|
3548
3548
|
}
|
|
3549
|
-
function
|
|
3549
|
+
function kt(e) {
|
|
3550
3550
|
if (typeof e != "object" || !e) return !1;
|
|
3551
3551
|
var t = Object.getPrototypeOf(e);
|
|
3552
3552
|
return t === Object.prototype || t === null;
|
|
3553
3553
|
}
|
|
3554
|
-
function
|
|
3555
|
-
if (
|
|
3554
|
+
function At(e) {
|
|
3555
|
+
if (Pt(e) || Q(e)) return e;
|
|
3556
3556
|
if (Array.isArray(e)) return new Map(e);
|
|
3557
|
-
if (
|
|
3557
|
+
if (kt(e)) {
|
|
3558
3558
|
var t = /* @__PURE__ */ new Map();
|
|
3559
3559
|
for (var n in e) t.set(n, e[n]);
|
|
3560
3560
|
return t;
|
|
3561
|
-
} else return
|
|
3561
|
+
} else return M("Cannot convert to map from '" + e + "'");
|
|
3562
3562
|
}
|
|
3563
|
-
function
|
|
3563
|
+
function jt(e, t, n) {
|
|
3564
3564
|
Object.defineProperty(e, t, {
|
|
3565
3565
|
enumerable: !1,
|
|
3566
3566
|
writable: !0,
|
|
@@ -3568,7 +3568,7 @@ function At(e, t, n) {
|
|
|
3568
3568
|
value: n
|
|
3569
3569
|
});
|
|
3570
3570
|
}
|
|
3571
|
-
function
|
|
3571
|
+
function Mt(e, t, n) {
|
|
3572
3572
|
Object.defineProperty(e, t, {
|
|
3573
3573
|
enumerable: !1,
|
|
3574
3574
|
writable: !1,
|
|
@@ -3576,40 +3576,40 @@ function jt(e, t, n) {
|
|
|
3576
3576
|
value: n
|
|
3577
3577
|
});
|
|
3578
3578
|
}
|
|
3579
|
-
function
|
|
3579
|
+
function Nt(e, t) {
|
|
3580
3580
|
var n = Object.getOwnPropertyDescriptor(e, t);
|
|
3581
3581
|
return !n || n.configurable !== !1 && n.writable !== !1;
|
|
3582
3582
|
}
|
|
3583
|
-
function
|
|
3583
|
+
function N(e, t) {
|
|
3584
3584
|
var n = "isMobX" + e;
|
|
3585
3585
|
return t.prototype[n] = !0, function(e) {
|
|
3586
|
-
return
|
|
3586
|
+
return Ot(e) && e[n] === !0;
|
|
3587
3587
|
};
|
|
3588
3588
|
}
|
|
3589
|
-
function
|
|
3589
|
+
function Pt(e) {
|
|
3590
3590
|
return e instanceof Map;
|
|
3591
3591
|
}
|
|
3592
|
-
function
|
|
3592
|
+
function Ft(e) {
|
|
3593
3593
|
return e instanceof Set;
|
|
3594
3594
|
}
|
|
3595
|
-
function
|
|
3595
|
+
function It(e) {
|
|
3596
3596
|
var t = /* @__PURE__ */ new Set();
|
|
3597
3597
|
for (var n in e) t.add(n);
|
|
3598
3598
|
return Object.getOwnPropertySymbols(e).forEach(function(n) {
|
|
3599
3599
|
Object.getOwnPropertyDescriptor(e, n).enumerable && t.add(n);
|
|
3600
3600
|
}), Array.from(t);
|
|
3601
3601
|
}
|
|
3602
|
-
function
|
|
3602
|
+
function P(e) {
|
|
3603
3603
|
return e && e.toString ? e.toString() : new String(e).toString();
|
|
3604
3604
|
}
|
|
3605
|
-
function
|
|
3605
|
+
function Lt(e) {
|
|
3606
3606
|
return e === null ? null : typeof e == "object" ? "" + e : e;
|
|
3607
3607
|
}
|
|
3608
|
-
var
|
|
3608
|
+
var Rt = typeof Reflect < "u" && Reflect.ownKeys ? Reflect.ownKeys : Object.getOwnPropertySymbols ? function(e) {
|
|
3609
3609
|
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
|
|
3610
|
-
} : /* istanbul ignore next */ Object.getOwnPropertyNames,
|
|
3610
|
+
} : /* istanbul ignore next */ Object.getOwnPropertyNames, F = Symbol("mobx administration"), zt = function() {
|
|
3611
3611
|
function e(e) {
|
|
3612
|
-
e === void 0 && (e = "Atom@" +
|
|
3612
|
+
e === void 0 && (e = "Atom@" + j()), this.name = e, this.isPendingUnobservation = !1, this.isBeingObserved = !1, this.observers = /* @__PURE__ */ new Set(), this.diffValue = 0, this.lastAccessedBy = 0, this.lowestObserverState = R.NOT_TRACKING;
|
|
3613
3613
|
}
|
|
3614
3614
|
return e.prototype.onBecomeObserved = function() {
|
|
3615
3615
|
this.onBecomeObservedListeners && this.onBecomeObservedListeners.forEach(function(e) {
|
|
@@ -3626,50 +3626,50 @@ var Lt = typeof Reflect < "u" && Reflect.ownKeys ? Reflect.ownKeys : Object.getO
|
|
|
3626
3626
|
}, e.prototype.toString = function() {
|
|
3627
3627
|
return this.name;
|
|
3628
3628
|
}, e;
|
|
3629
|
-
}(),
|
|
3630
|
-
function
|
|
3631
|
-
t === void 0 && (t =
|
|
3632
|
-
var r = new
|
|
3633
|
-
return t !==
|
|
3634
|
-
}
|
|
3635
|
-
function Vt(e, t) {
|
|
3636
|
-
return e === t;
|
|
3629
|
+
}(), Bt = N("Atom", zt);
|
|
3630
|
+
function Vt(e, t, n) {
|
|
3631
|
+
t === void 0 && (t = Et), n === void 0 && (n = Et);
|
|
3632
|
+
var r = new zt(e);
|
|
3633
|
+
return t !== Et && Ar(r, t), n !== Et && jr(r, n), r;
|
|
3637
3634
|
}
|
|
3638
3635
|
function Ht(e, t) {
|
|
3639
|
-
return
|
|
3636
|
+
return e === t;
|
|
3640
3637
|
}
|
|
3641
3638
|
function Ut(e, t) {
|
|
3642
|
-
return
|
|
3639
|
+
return Ai(e, t);
|
|
3643
3640
|
}
|
|
3644
3641
|
function Wt(e, t) {
|
|
3642
|
+
return Ai(e, t, 1);
|
|
3643
|
+
}
|
|
3644
|
+
function Gt(e, t) {
|
|
3645
3645
|
return Object.is(e, t);
|
|
3646
3646
|
}
|
|
3647
|
-
var
|
|
3648
|
-
identity:
|
|
3649
|
-
structural:
|
|
3650
|
-
default:
|
|
3651
|
-
shallow:
|
|
3652
|
-
},
|
|
3653
|
-
return
|
|
3647
|
+
var Kt = {
|
|
3648
|
+
identity: Ht,
|
|
3649
|
+
structural: Ut,
|
|
3650
|
+
default: Gt,
|
|
3651
|
+
shallow: Wt
|
|
3652
|
+
}, qt = function(e, t) {
|
|
3653
|
+
return qt = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
3654
3654
|
e.__proto__ = t;
|
|
3655
3655
|
} || function(e, t) {
|
|
3656
3656
|
for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
3657
|
-
},
|
|
3657
|
+
}, qt(e, t);
|
|
3658
3658
|
};
|
|
3659
|
-
function
|
|
3660
|
-
|
|
3659
|
+
function Jt(e, t) {
|
|
3660
|
+
qt(e, t);
|
|
3661
3661
|
function n() {
|
|
3662
3662
|
this.constructor = e;
|
|
3663
3663
|
}
|
|
3664
3664
|
e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
|
|
3665
3665
|
}
|
|
3666
|
-
var
|
|
3667
|
-
return
|
|
3666
|
+
var Yt = function() {
|
|
3667
|
+
return Yt = Object.assign || function(e) {
|
|
3668
3668
|
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
3669
3669
|
return e;
|
|
3670
|
-
},
|
|
3670
|
+
}, Yt.apply(this, arguments);
|
|
3671
3671
|
};
|
|
3672
|
-
function
|
|
3672
|
+
function I(e) {
|
|
3673
3673
|
var t = typeof Symbol == "function" && e[Symbol.iterator], n = 0;
|
|
3674
3674
|
return t ? t.call(e) : { next: function() {
|
|
3675
3675
|
return e && n >= e.length && (e = void 0), {
|
|
@@ -3678,7 +3678,7 @@ function L(e) {
|
|
|
3678
3678
|
};
|
|
3679
3679
|
} };
|
|
3680
3680
|
}
|
|
3681
|
-
function
|
|
3681
|
+
function Xt(e, t) {
|
|
3682
3682
|
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
3683
3683
|
if (!n) return e;
|
|
3684
3684
|
var r = n.call(e), i, a = [], o;
|
|
@@ -3695,33 +3695,33 @@ function Yt(e, t) {
|
|
|
3695
3695
|
}
|
|
3696
3696
|
return a;
|
|
3697
3697
|
}
|
|
3698
|
-
function
|
|
3699
|
-
for (var e = [], t = 0; t < arguments.length; t++) e = e.concat(
|
|
3698
|
+
function Zt() {
|
|
3699
|
+
for (var e = [], t = 0; t < arguments.length; t++) e = e.concat(Xt(arguments[t]));
|
|
3700
3700
|
return e;
|
|
3701
3701
|
}
|
|
3702
|
-
var
|
|
3703
|
-
function
|
|
3704
|
-
var n = t ?
|
|
3702
|
+
var Qt = Symbol("mobx did run lazy initializers"), $t = Symbol("mobx pending decorators"), en = {}, tn = {};
|
|
3703
|
+
function nn(e, t) {
|
|
3704
|
+
var n = t ? en : tn;
|
|
3705
3705
|
return n[e] || (n[e] = {
|
|
3706
3706
|
configurable: !0,
|
|
3707
3707
|
enumerable: t,
|
|
3708
3708
|
get: function() {
|
|
3709
|
-
return
|
|
3709
|
+
return rn(this), this[e];
|
|
3710
3710
|
},
|
|
3711
3711
|
set: function(t) {
|
|
3712
|
-
|
|
3712
|
+
rn(this), this[e] = t;
|
|
3713
3713
|
}
|
|
3714
3714
|
});
|
|
3715
3715
|
}
|
|
3716
|
-
function
|
|
3716
|
+
function rn(e) {
|
|
3717
3717
|
var t, n;
|
|
3718
|
-
if (e[
|
|
3719
|
-
var r = e[
|
|
3718
|
+
if (e[Qt] !== !0) {
|
|
3719
|
+
var r = e[$t];
|
|
3720
3720
|
if (r) {
|
|
3721
|
-
|
|
3722
|
-
var i =
|
|
3721
|
+
jt(e, Qt, !0);
|
|
3722
|
+
var i = Zt(Object.getOwnPropertySymbols(r), Object.keys(r));
|
|
3723
3723
|
try {
|
|
3724
|
-
for (var a =
|
|
3724
|
+
for (var a = I(i), o = a.next(); !o.done; o = a.next()) {
|
|
3725
3725
|
var s = r[o.value];
|
|
3726
3726
|
s.propertyCreator(e, s.prop, s.descriptor, s.decoratorTarget, s.decoratorArguments);
|
|
3727
3727
|
}
|
|
@@ -3737,182 +3737,182 @@ function nn(e) {
|
|
|
3737
3737
|
}
|
|
3738
3738
|
}
|
|
3739
3739
|
}
|
|
3740
|
-
function
|
|
3740
|
+
function an(e, t) {
|
|
3741
3741
|
return function() {
|
|
3742
3742
|
var n, r = function(r, i, a, o) {
|
|
3743
3743
|
if (o === !0) return t(r, i, a, r, n), null;
|
|
3744
|
-
if (!Object.prototype.hasOwnProperty.call(r,
|
|
3745
|
-
var s = r[
|
|
3746
|
-
|
|
3744
|
+
if (!Object.prototype.hasOwnProperty.call(r, $t)) {
|
|
3745
|
+
var s = r[$t];
|
|
3746
|
+
jt(r, $t, Yt({}, s));
|
|
3747
3747
|
}
|
|
3748
|
-
return r[
|
|
3748
|
+
return r[$t][i] = {
|
|
3749
3749
|
prop: i,
|
|
3750
3750
|
propertyCreator: t,
|
|
3751
3751
|
descriptor: a,
|
|
3752
3752
|
decoratorTarget: r,
|
|
3753
3753
|
decoratorArguments: n
|
|
3754
|
-
},
|
|
3754
|
+
}, nn(i, e);
|
|
3755
3755
|
};
|
|
3756
|
-
return
|
|
3756
|
+
return on(arguments) ? (n = St, r.apply(null, arguments)) : (n = Array.prototype.slice.call(arguments), r);
|
|
3757
3757
|
};
|
|
3758
3758
|
}
|
|
3759
|
-
function
|
|
3759
|
+
function on(e) {
|
|
3760
3760
|
return (e.length === 2 || e.length === 3) && (typeof e[1] == "string" || typeof e[1] == "symbol") || e.length === 4 && e[3] === !0;
|
|
3761
3761
|
}
|
|
3762
|
-
function on(e, t, n) {
|
|
3763
|
-
return Vr(e) ? e : Array.isArray(e) ? R.array(e, { name: n }) : Ot(e) ? R.object(e, void 0, { name: n }) : Nt(e) ? R.map(e, { name: n }) : Pt(e) ? R.set(e, { name: n }) : e;
|
|
3764
|
-
}
|
|
3765
3762
|
function sn(e, t, n) {
|
|
3766
|
-
return e
|
|
3763
|
+
return Vr(e) ? e : Array.isArray(e) ? L.array(e, { name: n }) : kt(e) ? L.object(e, void 0, { name: n }) : Pt(e) ? L.map(e, { name: n }) : Ft(e) ? L.set(e, { name: n }) : e;
|
|
3764
|
+
}
|
|
3765
|
+
function cn(e, t, n) {
|
|
3766
|
+
return e == null || Ti(e) || ui(e) || Q(e) || $(e) ? e : Array.isArray(e) ? L.array(e, {
|
|
3767
3767
|
name: n,
|
|
3768
3768
|
deep: !1
|
|
3769
|
-
}) :
|
|
3769
|
+
}) : kt(e) ? L.object(e, void 0, {
|
|
3770
3770
|
name: n,
|
|
3771
3771
|
deep: !1
|
|
3772
|
-
}) :
|
|
3772
|
+
}) : Pt(e) ? L.map(e, {
|
|
3773
3773
|
name: n,
|
|
3774
3774
|
deep: !1
|
|
3775
|
-
}) :
|
|
3775
|
+
}) : Ft(e) ? L.set(e, {
|
|
3776
3776
|
name: n,
|
|
3777
3777
|
deep: !1
|
|
3778
|
-
}) :
|
|
3778
|
+
}) : M(!1);
|
|
3779
3779
|
}
|
|
3780
|
-
function
|
|
3780
|
+
function ln(e) {
|
|
3781
3781
|
return e;
|
|
3782
3782
|
}
|
|
3783
|
-
function
|
|
3784
|
-
return
|
|
3783
|
+
function un(e, t, n) {
|
|
3784
|
+
return Ai(e, t) ? t : e;
|
|
3785
3785
|
}
|
|
3786
|
-
function
|
|
3787
|
-
|
|
3788
|
-
var t =
|
|
3786
|
+
function dn(e) {
|
|
3787
|
+
wt(e);
|
|
3788
|
+
var t = an(!0, function(t, n, r, i, a) {
|
|
3789
3789
|
var o = r ? r.initializer ? r.initializer.call(t) : r.value : void 0;
|
|
3790
|
-
|
|
3790
|
+
vi(t).addObservableProp(n, o, e);
|
|
3791
3791
|
}), n = (typeof process < "u" && process.env, t);
|
|
3792
3792
|
return n.enhancer = e, n;
|
|
3793
3793
|
}
|
|
3794
|
-
var
|
|
3794
|
+
var fn = {
|
|
3795
3795
|
deep: !0,
|
|
3796
3796
|
name: void 0,
|
|
3797
3797
|
defaultDecorator: void 0,
|
|
3798
3798
|
proxy: !0
|
|
3799
3799
|
};
|
|
3800
|
-
Object.freeze(
|
|
3801
|
-
function
|
|
3802
|
-
return e == null ?
|
|
3800
|
+
Object.freeze(fn);
|
|
3801
|
+
function pn(e) {
|
|
3802
|
+
return e == null ? fn : typeof e == "string" ? {
|
|
3803
3803
|
name: e,
|
|
3804
3804
|
deep: !0,
|
|
3805
3805
|
proxy: !0
|
|
3806
3806
|
} : e;
|
|
3807
3807
|
}
|
|
3808
|
-
var
|
|
3809
|
-
function
|
|
3810
|
-
return e.defaultDecorator ? e.defaultDecorator.enhancer : e.deep === !1 ?
|
|
3808
|
+
var mn = dn(sn), hn = dn(cn), gn = dn(ln), _n = dn(un);
|
|
3809
|
+
function vn(e) {
|
|
3810
|
+
return e.defaultDecorator ? e.defaultDecorator.enhancer : e.deep === !1 ? ln : sn;
|
|
3811
3811
|
}
|
|
3812
|
-
function
|
|
3813
|
-
if (typeof arguments[1] == "string" || typeof arguments[1] == "symbol") return
|
|
3812
|
+
function yn(e, t, n) {
|
|
3813
|
+
if (typeof arguments[1] == "string" || typeof arguments[1] == "symbol") return mn.apply(null, arguments);
|
|
3814
3814
|
if (Vr(e)) return e;
|
|
3815
|
-
var r =
|
|
3815
|
+
var r = kt(e) ? L.object(e, t, n) : Array.isArray(e) ? L.array(e, t) : Pt(e) ? L.map(e, t) : Ft(e) ? L.set(e, t) : e;
|
|
3816
3816
|
if (r !== e) return r;
|
|
3817
|
-
|
|
3817
|
+
M(!1);
|
|
3818
3818
|
}
|
|
3819
|
-
var
|
|
3819
|
+
var bn = {
|
|
3820
3820
|
box: function(e, t) {
|
|
3821
|
-
arguments.length > 2 &&
|
|
3822
|
-
var n =
|
|
3823
|
-
return new Gn(e,
|
|
3821
|
+
arguments.length > 2 && xn("box");
|
|
3822
|
+
var n = pn(t);
|
|
3823
|
+
return new Gn(e, vn(n), n.name, !0, n.equals);
|
|
3824
3824
|
},
|
|
3825
3825
|
array: function(e, t) {
|
|
3826
|
-
arguments.length > 2 &&
|
|
3827
|
-
var n =
|
|
3828
|
-
return
|
|
3826
|
+
arguments.length > 2 && xn("array");
|
|
3827
|
+
var n = pn(t);
|
|
3828
|
+
return si(e, vn(n), n.name);
|
|
3829
3829
|
},
|
|
3830
3830
|
map: function(e, t) {
|
|
3831
|
-
arguments.length > 2 &&
|
|
3832
|
-
var n =
|
|
3833
|
-
return new
|
|
3831
|
+
arguments.length > 2 && xn("map");
|
|
3832
|
+
var n = pn(t);
|
|
3833
|
+
return new pi(e, vn(n), n.name);
|
|
3834
3834
|
},
|
|
3835
3835
|
set: function(e, t) {
|
|
3836
|
-
arguments.length > 2 &&
|
|
3837
|
-
var n =
|
|
3838
|
-
return new
|
|
3836
|
+
arguments.length > 2 && xn("set");
|
|
3837
|
+
var n = pn(t);
|
|
3838
|
+
return new gi(e, vn(n), n.name);
|
|
3839
3839
|
},
|
|
3840
3840
|
object: function(e, t, n) {
|
|
3841
|
-
typeof arguments[1] == "string" &&
|
|
3842
|
-
var r =
|
|
3841
|
+
typeof arguments[1] == "string" && xn("object");
|
|
3842
|
+
var r = pn(n);
|
|
3843
3843
|
if (r.proxy === !1) return Pr({}, e, t, r);
|
|
3844
|
-
var i = Fr(r), a =
|
|
3844
|
+
var i = Fr(r), a = ni(Pr({}, void 0, void 0, r));
|
|
3845
3845
|
return Ir(a, e, t, i), a;
|
|
3846
3846
|
},
|
|
3847
|
-
ref:
|
|
3848
|
-
shallow:
|
|
3849
|
-
deep:
|
|
3850
|
-
struct:
|
|
3851
|
-
},
|
|
3852
|
-
Object.keys(
|
|
3853
|
-
return
|
|
3847
|
+
ref: gn,
|
|
3848
|
+
shallow: hn,
|
|
3849
|
+
deep: mn,
|
|
3850
|
+
struct: _n
|
|
3851
|
+
}, L = yn;
|
|
3852
|
+
Object.keys(bn).forEach(function(e) {
|
|
3853
|
+
return L[e] = bn[e];
|
|
3854
3854
|
});
|
|
3855
|
-
function
|
|
3856
|
-
|
|
3855
|
+
function xn(e) {
|
|
3856
|
+
M("Expected one or two arguments to observable." + e + ". Did you accidentally try to use observable." + e + " as decorator?");
|
|
3857
3857
|
}
|
|
3858
|
-
var
|
|
3858
|
+
var Sn = an(!1, function(e, t, n, r, i) {
|
|
3859
3859
|
var a = n.get, o = n.set, s = i[0] || {};
|
|
3860
|
-
|
|
3860
|
+
vi(e).addComputedProp(e, t, Yt({
|
|
3861
3861
|
get: a,
|
|
3862
3862
|
set: o,
|
|
3863
3863
|
context: e
|
|
3864
3864
|
}, s));
|
|
3865
|
-
}),
|
|
3866
|
-
if (typeof t == "string" || typeof e == "object" && e && arguments.length === 1) return
|
|
3865
|
+
}), Cn = Sn({ equals: Kt.structural }), wn = function(e, t, n) {
|
|
3866
|
+
if (typeof t == "string" || typeof e == "object" && e && arguments.length === 1) return Sn.apply(null, arguments);
|
|
3867
3867
|
var r = typeof t == "object" ? t : {};
|
|
3868
3868
|
return r.get = e, r.set = typeof t == "function" ? t : r.set, r.name = r.name || e.name || "", new qn(r);
|
|
3869
3869
|
};
|
|
3870
|
-
|
|
3871
|
-
var
|
|
3870
|
+
wn.struct = Cn;
|
|
3871
|
+
var R;
|
|
3872
3872
|
(function(e) {
|
|
3873
3873
|
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";
|
|
3874
|
-
})(
|
|
3875
|
-
var
|
|
3874
|
+
})(R || (R = {}));
|
|
3875
|
+
var z;
|
|
3876
3876
|
(function(e) {
|
|
3877
3877
|
e[e.NONE = 0] = "NONE", e[e.LOG = 1] = "LOG", e[e.BREAK = 2] = "BREAK";
|
|
3878
|
-
})(
|
|
3879
|
-
var
|
|
3878
|
+
})(z || (z = {}));
|
|
3879
|
+
var Tn = function() {
|
|
3880
3880
|
function e(e) {
|
|
3881
3881
|
this.cause = e;
|
|
3882
3882
|
}
|
|
3883
3883
|
return e;
|
|
3884
3884
|
}();
|
|
3885
|
-
function Tn(e) {
|
|
3886
|
-
return e instanceof wn;
|
|
3887
|
-
}
|
|
3888
3885
|
function En(e) {
|
|
3886
|
+
return e instanceof Tn;
|
|
3887
|
+
}
|
|
3888
|
+
function Dn(e) {
|
|
3889
3889
|
switch (e.dependenciesState) {
|
|
3890
|
-
case
|
|
3891
|
-
case
|
|
3892
|
-
case
|
|
3893
|
-
case
|
|
3894
|
-
for (var t =
|
|
3890
|
+
case R.UP_TO_DATE: return !1;
|
|
3891
|
+
case R.NOT_TRACKING:
|
|
3892
|
+
case R.STALE: return !0;
|
|
3893
|
+
case R.POSSIBLY_STALE:
|
|
3894
|
+
for (var t = Pn(!0), n = Nn(), r = e.observing, i = r.length, a = 0; a < i; a++) {
|
|
3895
3895
|
var o = r[a];
|
|
3896
3896
|
if (Jn(o)) {
|
|
3897
3897
|
if (H.disableErrorBoundaries) o.get();
|
|
3898
3898
|
else try {
|
|
3899
3899
|
o.get();
|
|
3900
3900
|
} catch {
|
|
3901
|
-
return
|
|
3901
|
+
return B(n), Fn(t), !0;
|
|
3902
3902
|
}
|
|
3903
|
-
if (e.dependenciesState ===
|
|
3903
|
+
if (e.dependenciesState === R.STALE) return B(n), Fn(t), !0;
|
|
3904
3904
|
}
|
|
3905
3905
|
}
|
|
3906
|
-
return
|
|
3906
|
+
return In(e), B(n), Fn(t), !1;
|
|
3907
3907
|
}
|
|
3908
3908
|
}
|
|
3909
|
-
function
|
|
3909
|
+
function On(e) {
|
|
3910
3910
|
var t = e.observers.size > 0;
|
|
3911
|
-
H.computationDepth > 0 && t &&
|
|
3911
|
+
H.computationDepth > 0 && t && M(!1), !H.allowStateChanges && (t || H.enforceActions === "strict") && M(!1);
|
|
3912
3912
|
}
|
|
3913
|
-
function
|
|
3914
|
-
var r =
|
|
3915
|
-
|
|
3913
|
+
function kn(e, t, n) {
|
|
3914
|
+
var r = Pn(!0);
|
|
3915
|
+
In(e), e.newObserving = Array(e.observing.length + 100), e.unboundDepsCount = 0, e.runId = ++H.runId;
|
|
3916
3916
|
var i = H.trackingDerivation;
|
|
3917
3917
|
H.trackingDerivation = e;
|
|
3918
3918
|
var a;
|
|
@@ -3920,12 +3920,12 @@ function On(e, t, n) {
|
|
|
3920
3920
|
else try {
|
|
3921
3921
|
a = t.call(n);
|
|
3922
3922
|
} catch (e) {
|
|
3923
|
-
a = new
|
|
3923
|
+
a = new Tn(e);
|
|
3924
3924
|
}
|
|
3925
|
-
return H.trackingDerivation = i,
|
|
3925
|
+
return H.trackingDerivation = i, An(e), Fn(r), a;
|
|
3926
3926
|
}
|
|
3927
|
-
function
|
|
3928
|
-
for (var t = e.observing, n = e.observing = e.newObserving, r =
|
|
3927
|
+
function An(e) {
|
|
3928
|
+
for (var t = e.observing, n = e.observing = e.newObserving, r = R.UP_TO_DATE, i = 0, a = e.unboundDepsCount, o = 0; o < a; o++) {
|
|
3929
3929
|
var s = n[o];
|
|
3930
3930
|
s.diffValue === 0 && (s.diffValue = 1, i !== o && (n[i] = s), i++), s.dependenciesState > r && (r = s.dependenciesState);
|
|
3931
3931
|
}
|
|
@@ -3937,45 +3937,45 @@ function kn(e) {
|
|
|
3937
3937
|
var s = n[i];
|
|
3938
3938
|
s.diffValue === 1 && (s.diffValue = 0, tr(s, e));
|
|
3939
3939
|
}
|
|
3940
|
-
r !==
|
|
3940
|
+
r !== R.UP_TO_DATE && (e.dependenciesState = r, e.onBecomeStale());
|
|
3941
3941
|
}
|
|
3942
|
-
function
|
|
3942
|
+
function jn(e) {
|
|
3943
3943
|
var t = e.observing;
|
|
3944
3944
|
e.observing = [];
|
|
3945
3945
|
for (var n = t.length; n--;) nr(t[n], e);
|
|
3946
|
-
e.dependenciesState =
|
|
3946
|
+
e.dependenciesState = R.NOT_TRACKING;
|
|
3947
3947
|
}
|
|
3948
|
-
function
|
|
3949
|
-
var t =
|
|
3948
|
+
function Mn(e) {
|
|
3949
|
+
var t = Nn();
|
|
3950
3950
|
try {
|
|
3951
3951
|
return e();
|
|
3952
3952
|
} finally {
|
|
3953
|
-
|
|
3953
|
+
B(t);
|
|
3954
3954
|
}
|
|
3955
3955
|
}
|
|
3956
|
-
function
|
|
3956
|
+
function Nn() {
|
|
3957
3957
|
var e = H.trackingDerivation;
|
|
3958
3958
|
return H.trackingDerivation = null, e;
|
|
3959
3959
|
}
|
|
3960
|
-
function
|
|
3960
|
+
function B(e) {
|
|
3961
3961
|
H.trackingDerivation = e;
|
|
3962
3962
|
}
|
|
3963
|
-
function
|
|
3963
|
+
function Pn(e) {
|
|
3964
3964
|
var t = H.allowStateReads;
|
|
3965
3965
|
return H.allowStateReads = e, t;
|
|
3966
3966
|
}
|
|
3967
|
-
function
|
|
3967
|
+
function Fn(e) {
|
|
3968
3968
|
H.allowStateReads = e;
|
|
3969
3969
|
}
|
|
3970
|
-
function
|
|
3971
|
-
if (e.dependenciesState !==
|
|
3972
|
-
e.dependenciesState =
|
|
3973
|
-
for (var t = e.observing, n = t.length; n--;) t[n].lowestObserverState =
|
|
3970
|
+
function In(e) {
|
|
3971
|
+
if (e.dependenciesState !== R.UP_TO_DATE) {
|
|
3972
|
+
e.dependenciesState = R.UP_TO_DATE;
|
|
3973
|
+
for (var t = e.observing, n = t.length; n--;) t[n].lowestObserverState = R.UP_TO_DATE;
|
|
3974
3974
|
}
|
|
3975
3975
|
}
|
|
3976
|
-
var
|
|
3977
|
-
|
|
3978
|
-
function
|
|
3976
|
+
var Ln = 0, Rn = 1, zn = Object.getOwnPropertyDescriptor(function() {}, "name");
|
|
3977
|
+
zn && zn.configurable;
|
|
3978
|
+
function V(e, t, n) {
|
|
3979
3979
|
var r = function() {
|
|
3980
3980
|
return Bn(e, t, n || this, arguments);
|
|
3981
3981
|
};
|
|
@@ -3992,21 +3992,21 @@ function Bn(e, t, n, r) {
|
|
|
3992
3992
|
}
|
|
3993
3993
|
}
|
|
3994
3994
|
function Vn(e, t, n) {
|
|
3995
|
-
var r = G() && !!e, i = 0, a =
|
|
3995
|
+
var r = G() && !!e, i = 0, a = Nn();
|
|
3996
3996
|
U();
|
|
3997
3997
|
var o = {
|
|
3998
3998
|
prevDerivation: a,
|
|
3999
3999
|
prevAllowStateChanges: Un(!0),
|
|
4000
|
-
prevAllowStateReads:
|
|
4000
|
+
prevAllowStateReads: Pn(!0),
|
|
4001
4001
|
notifySpy: r,
|
|
4002
4002
|
startTime: i,
|
|
4003
|
-
actionId:
|
|
4004
|
-
parentActionId:
|
|
4003
|
+
actionId: Rn++,
|
|
4004
|
+
parentActionId: Ln
|
|
4005
4005
|
};
|
|
4006
|
-
return
|
|
4006
|
+
return Ln = o.actionId, o;
|
|
4007
4007
|
}
|
|
4008
4008
|
function Hn(e) {
|
|
4009
|
-
|
|
4009
|
+
Ln !== e.actionId && M("invalid action stack. did you forget to finish an action?"), Ln = e.parentActionId, e.error !== void 0 && (H.suppressReactionErrors = !0), Wn(e.prevAllowStateChanges), Fn(e.prevAllowStateReads), W(), B(e.prevDerivation), e.notifySpy, H.suppressReactionErrors = !1;
|
|
4010
4010
|
}
|
|
4011
4011
|
function Un(e) {
|
|
4012
4012
|
var t = H.allowStateChanges;
|
|
@@ -4016,9 +4016,9 @@ function Wn(e) {
|
|
|
4016
4016
|
H.allowStateChanges = e;
|
|
4017
4017
|
}
|
|
4018
4018
|
var Gn = function(e) {
|
|
4019
|
-
|
|
4019
|
+
Jt(t, e);
|
|
4020
4020
|
function t(t, n, r, i, a) {
|
|
4021
|
-
r === void 0 && (r = "ObservableValue@" +
|
|
4021
|
+
r === void 0 && (r = "ObservableValue@" + j()), i === void 0 && (i = !0), a === void 0 && (a = Kt.default);
|
|
4022
4022
|
var o = e.call(this, r) || this;
|
|
4023
4023
|
return o.enhancer = n, o.name = r, o.equals = a, o.hasUnreportedChange = !1, o.value = n(t, void 0, r), o;
|
|
4024
4024
|
}
|
|
@@ -4027,7 +4027,7 @@ var Gn = function(e) {
|
|
|
4027
4027
|
}, t.prototype.set = function(e) {
|
|
4028
4028
|
this.value, e = this.prepareNewValue(e), e !== H.UNCHANGED && this.setNewValue(e);
|
|
4029
4029
|
}, t.prototype.prepareNewValue = function(e) {
|
|
4030
|
-
if (
|
|
4030
|
+
if (On(this), q(this)) {
|
|
4031
4031
|
var t = J(this, {
|
|
4032
4032
|
object: this,
|
|
4033
4033
|
type: "update",
|
|
@@ -4048,26 +4048,26 @@ var Gn = function(e) {
|
|
|
4048
4048
|
}, t.prototype.get = function() {
|
|
4049
4049
|
return this.reportObserved(), this.dehanceValue(this.value);
|
|
4050
4050
|
}, t.prototype.intercept = function(e) {
|
|
4051
|
-
return
|
|
4051
|
+
return ri(this, e);
|
|
4052
4052
|
}, t.prototype.observe = function(e, t) {
|
|
4053
4053
|
return t && e({
|
|
4054
4054
|
object: this,
|
|
4055
4055
|
type: "update",
|
|
4056
4056
|
newValue: this.value,
|
|
4057
4057
|
oldValue: void 0
|
|
4058
|
-
}),
|
|
4058
|
+
}), ii(this, e);
|
|
4059
4059
|
}, t.prototype.toJSON = function() {
|
|
4060
4060
|
return this.get();
|
|
4061
4061
|
}, t.prototype.toString = function() {
|
|
4062
4062
|
return this.name + "[" + this.value + "]";
|
|
4063
4063
|
}, t.prototype.valueOf = function() {
|
|
4064
|
-
return
|
|
4064
|
+
return Lt(this.get());
|
|
4065
4065
|
}, t.prototype[Symbol.toPrimitive] = function() {
|
|
4066
4066
|
return this.valueOf();
|
|
4067
4067
|
}, t;
|
|
4068
|
-
}(
|
|
4068
|
+
}(zt), Kn = N("ObservableValue", Gn), qn = function() {
|
|
4069
4069
|
function e(e) {
|
|
4070
|
-
this.dependenciesState =
|
|
4070
|
+
this.dependenciesState = R.NOT_TRACKING, this.observing = [], this.newObserving = null, this.isBeingObserved = !1, this.isPendingUnobservation = !1, this.observers = /* @__PURE__ */ new Set(), this.diffValue = 0, this.runId = 0, this.lastAccessedBy = 0, this.lowestObserverState = R.UP_TO_DATE, this.unboundDepsCount = 0, this.__mapid = "#" + j(), this.value = new Tn(null), this.isComputing = !1, this.isRunningSetter = !1, this.isTracing = z.NONE, wt(e.get, "missing option for computed: get"), this.derivation = e.get, this.name = e.name || "ComputedValue@" + j(), e.set && (this.setter = V(this.name + "-setter", e.set)), this.equals = e.equals || (e.compareStructural || e.struct ? Kt.structural : Kt.default), this.scope = e.context, this.requiresReaction = !!e.requiresReaction, this.keepAlive = !!e.keepAlive;
|
|
4071
4071
|
}
|
|
4072
4072
|
return e.prototype.onBecomeStale = function() {
|
|
4073
4073
|
sr(this);
|
|
@@ -4080,51 +4080,51 @@ var Gn = function(e) {
|
|
|
4080
4080
|
return e();
|
|
4081
4081
|
});
|
|
4082
4082
|
}, e.prototype.get = function() {
|
|
4083
|
-
this.isComputing &&
|
|
4083
|
+
this.isComputing && M("Cycle detected in computation " + this.name + ": " + this.derivation), H.inBatch === 0 && this.observers.size === 0 && !this.keepAlive ? Dn(this) && (this.warnAboutUntrackedRead(), U(), this.value = this.computeValue(!1), W()) : (ir(this), Dn(this) && this.trackAndCompute() && or(this));
|
|
4084
4084
|
var e = this.value;
|
|
4085
|
-
if (
|
|
4085
|
+
if (En(e)) throw e.cause;
|
|
4086
4086
|
return e;
|
|
4087
4087
|
}, e.prototype.peek = function() {
|
|
4088
4088
|
var e = this.computeValue(!1);
|
|
4089
|
-
if (
|
|
4089
|
+
if (En(e)) throw e.cause;
|
|
4090
4090
|
return e;
|
|
4091
4091
|
}, e.prototype.set = function(e) {
|
|
4092
4092
|
if (this.setter) {
|
|
4093
|
-
|
|
4093
|
+
wt(!this.isRunningSetter, "The setter of computed value '" + this.name + "' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"), this.isRunningSetter = !0;
|
|
4094
4094
|
try {
|
|
4095
4095
|
this.setter.call(this.scope, e);
|
|
4096
4096
|
} finally {
|
|
4097
4097
|
this.isRunningSetter = !1;
|
|
4098
4098
|
}
|
|
4099
|
-
} else
|
|
4099
|
+
} else wt(!1, !1);
|
|
4100
4100
|
}, e.prototype.trackAndCompute = function() {
|
|
4101
|
-
var e = this.value, t = this.dependenciesState ===
|
|
4101
|
+
var e = this.value, t = this.dependenciesState === R.NOT_TRACKING, n = this.computeValue(!0), r = t || En(e) || En(n) || !this.equals(e, n);
|
|
4102
4102
|
return r && (this.value = n), r;
|
|
4103
4103
|
}, e.prototype.computeValue = function(e) {
|
|
4104
4104
|
this.isComputing = !0, H.computationDepth++;
|
|
4105
4105
|
var t;
|
|
4106
|
-
if (e) t =
|
|
4106
|
+
if (e) t = kn(this, this.derivation, this.scope);
|
|
4107
4107
|
else if (H.disableErrorBoundaries === !0) t = this.derivation.call(this.scope);
|
|
4108
4108
|
else try {
|
|
4109
4109
|
t = this.derivation.call(this.scope);
|
|
4110
4110
|
} catch (e) {
|
|
4111
|
-
t = new
|
|
4111
|
+
t = new Tn(e);
|
|
4112
4112
|
}
|
|
4113
4113
|
return H.computationDepth--, this.isComputing = !1, t;
|
|
4114
4114
|
}, e.prototype.suspend = function() {
|
|
4115
|
-
this.keepAlive || (
|
|
4115
|
+
this.keepAlive || (jn(this), this.value = void 0);
|
|
4116
4116
|
}, e.prototype.observe = function(e, t) {
|
|
4117
4117
|
var n = this, r = !0, i = void 0;
|
|
4118
4118
|
return Tr(function() {
|
|
4119
4119
|
var a = n.get();
|
|
4120
4120
|
if (!r || t) {
|
|
4121
|
-
var o =
|
|
4121
|
+
var o = Nn();
|
|
4122
4122
|
e({
|
|
4123
4123
|
type: "update",
|
|
4124
4124
|
object: n,
|
|
4125
4125
|
newValue: a,
|
|
4126
4126
|
oldValue: i
|
|
4127
|
-
}),
|
|
4127
|
+
}), B(o);
|
|
4128
4128
|
}
|
|
4129
4129
|
r = !1, i = a;
|
|
4130
4130
|
});
|
|
@@ -4133,11 +4133,11 @@ var Gn = function(e) {
|
|
|
4133
4133
|
}, e.prototype.toString = function() {
|
|
4134
4134
|
return this.name + "[" + this.derivation.toString() + "]";
|
|
4135
4135
|
}, e.prototype.valueOf = function() {
|
|
4136
|
-
return
|
|
4136
|
+
return Lt(this.get());
|
|
4137
4137
|
}, e.prototype[Symbol.toPrimitive] = function() {
|
|
4138
4138
|
return this.valueOf();
|
|
4139
4139
|
}, e;
|
|
4140
|
-
}(), Jn =
|
|
4140
|
+
}(), Jn = N("ComputedValue", qn), Yn = function() {
|
|
4141
4141
|
function e() {
|
|
4142
4142
|
this.version = 5, this.UNCHANGED = {}, this.trackingDerivation = null, this.computationDepth = 0, this.runId = 0, this.mobxGuid = 0, this.inBatch = 0, this.pendingUnobservations = [], this.pendingReactions = [], this.isRunningReactions = !1, this.allowStateChanges = !0, this.allowStateReads = !0, this.enforceActions = !1, this.spyListeners = [], this.globalReactionErrorHandlers = [], this.computedRequiresReaction = !1, this.reactionRequiresObservable = !1, this.observableRequiresReaction = !1, this.computedConfigurable = !1, this.disableErrorBoundaries = !1, this.suppressReactionErrors = !1;
|
|
4143
4143
|
}
|
|
@@ -4149,11 +4149,11 @@ function Zn() {
|
|
|
4149
4149
|
var Qn = !0, $n = !1, H = (function() {
|
|
4150
4150
|
var e = Zn();
|
|
4151
4151
|
return e.__mobxInstanceCount > 0 && !e.__mobxGlobals && (Qn = !1), e.__mobxGlobals && e.__mobxGlobals.version !== new Yn().version && (Qn = !1), Qn ? e.__mobxGlobals ? (e.__mobxInstanceCount += 1, e.__mobxGlobals.UNCHANGED || (e.__mobxGlobals.UNCHANGED = {}), e.__mobxGlobals) : (e.__mobxInstanceCount = 1, e.__mobxGlobals = new Yn()) : (setTimeout(function() {
|
|
4152
|
-
$n ||
|
|
4152
|
+
$n || M("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`");
|
|
4153
4153
|
}, 1), new Yn());
|
|
4154
4154
|
})();
|
|
4155
4155
|
function er() {
|
|
4156
|
-
(H.pendingReactions.length || H.inBatch || H.isRunningReactions) &&
|
|
4156
|
+
(H.pendingReactions.length || H.inBatch || H.isRunningReactions) && M("isolateGlobalState should be called before MobX is running any reactions"), $n = !0, Qn && (--Zn().__mobxInstanceCount === 0 && (Zn().__mobxGlobals = void 0), H = new Yn());
|
|
4157
4157
|
}
|
|
4158
4158
|
function tr(e, t) {
|
|
4159
4159
|
e.observers.add(t), e.lowestObserverState > t.dependenciesState && (e.lowestObserverState = t.dependenciesState);
|
|
@@ -4182,22 +4182,22 @@ function ir(e) {
|
|
|
4182
4182
|
return t === null ? (e.observers.size === 0 && H.inBatch > 0 && rr(e), !1) : (t.runId !== e.lastAccessedBy && (e.lastAccessedBy = t.runId, t.newObserving[t.unboundDepsCount++] = e, e.isBeingObserved || (e.isBeingObserved = !0, e.onBecomeObserved())), !0);
|
|
4183
4183
|
}
|
|
4184
4184
|
function ar(e) {
|
|
4185
|
-
e.lowestObserverState !==
|
|
4186
|
-
t.dependenciesState ===
|
|
4185
|
+
e.lowestObserverState !== R.STALE && (e.lowestObserverState = R.STALE, e.observers.forEach(function(t) {
|
|
4186
|
+
t.dependenciesState === R.UP_TO_DATE && (t.isTracing !== z.NONE && cr(t, e), t.onBecomeStale()), t.dependenciesState = R.STALE;
|
|
4187
4187
|
}));
|
|
4188
4188
|
}
|
|
4189
4189
|
function or(e) {
|
|
4190
|
-
e.lowestObserverState !==
|
|
4191
|
-
t.dependenciesState ===
|
|
4190
|
+
e.lowestObserverState !== R.STALE && (e.lowestObserverState = R.STALE, e.observers.forEach(function(t) {
|
|
4191
|
+
t.dependenciesState === R.POSSIBLY_STALE ? t.dependenciesState = R.STALE : t.dependenciesState === R.UP_TO_DATE && (e.lowestObserverState = R.UP_TO_DATE);
|
|
4192
4192
|
}));
|
|
4193
4193
|
}
|
|
4194
4194
|
function sr(e) {
|
|
4195
|
-
e.lowestObserverState ===
|
|
4196
|
-
t.dependenciesState ===
|
|
4195
|
+
e.lowestObserverState === R.UP_TO_DATE && (e.lowestObserverState = R.POSSIBLY_STALE, e.observers.forEach(function(t) {
|
|
4196
|
+
t.dependenciesState === R.UP_TO_DATE && (t.dependenciesState = R.POSSIBLY_STALE, t.isTracing !== z.NONE && cr(t, e), t.onBecomeStale());
|
|
4197
4197
|
}));
|
|
4198
4198
|
}
|
|
4199
4199
|
function cr(e, t) {
|
|
4200
|
-
if (console.log("[mobx.trace] '" + e.name + "' is invalidated due to a change in: '" + t.name + "'"), e.isTracing ===
|
|
4200
|
+
if (console.log("[mobx.trace] '" + e.name + "' is invalidated due to a change in: '" + t.name + "'"), e.isTracing === z.BREAK) {
|
|
4201
4201
|
var n = [];
|
|
4202
4202
|
lr(Lr(e), n, 1), Function("debugger;\n/*\nTracing '" + e.name + "'\n\nYou are entering this break point because derivation '" + e.name + "' is being traced and '" + t.name + "' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n" + (e instanceof qn ? e.derivation.toString().replace(/[*]\//g, "/") : "") + "\n\nThe dependencies for this derivation are:\n\n" + n.join("\n") + "\n*/\n ")();
|
|
4203
4203
|
}
|
|
@@ -4213,7 +4213,7 @@ function lr(e, t, n) {
|
|
|
4213
4213
|
}
|
|
4214
4214
|
var ur = function() {
|
|
4215
4215
|
function e(e, t, n, r) {
|
|
4216
|
-
e === void 0 && (e = "Reaction@" +
|
|
4216
|
+
e === void 0 && (e = "Reaction@" + j()), r === void 0 && (r = !1), this.name = e, this.onInvalidate = t, this.errorHandler = n, this.requiresObservable = r, this.observing = [], this.newObserving = [], this.dependenciesState = R.NOT_TRACKING, this.diffValue = 0, this.runId = 0, this.unboundDepsCount = 0, this.__mapid = "#" + j(), this.isDisposed = !1, this._isScheduled = !1, this._isTrackPending = !1, this._isRunning = !1, this.isTracing = z.NONE;
|
|
4217
4217
|
}
|
|
4218
4218
|
return e.prototype.onBecomeStale = function() {
|
|
4219
4219
|
this.schedule();
|
|
@@ -4223,7 +4223,7 @@ var ur = function() {
|
|
|
4223
4223
|
return this._isScheduled;
|
|
4224
4224
|
}, e.prototype.runReaction = function() {
|
|
4225
4225
|
if (!this.isDisposed) {
|
|
4226
|
-
if (U(), this._isScheduled = !1,
|
|
4226
|
+
if (U(), this._isScheduled = !1, Dn(this)) {
|
|
4227
4227
|
this._isTrackPending = !0;
|
|
4228
4228
|
try {
|
|
4229
4229
|
this.onInvalidate(), this._isTrackPending;
|
|
@@ -4236,8 +4236,8 @@ var ur = function() {
|
|
|
4236
4236
|
}, e.prototype.track = function(e) {
|
|
4237
4237
|
if (!this.isDisposed) {
|
|
4238
4238
|
U(), this._isRunning = !0;
|
|
4239
|
-
var t =
|
|
4240
|
-
this._isRunning = !1, this._isTrackPending = !1, this.isDisposed &&
|
|
4239
|
+
var t = kn(this, e, void 0);
|
|
4240
|
+
this._isRunning = !1, this._isTrackPending = !1, this.isDisposed && jn(this), En(t) && this.reportExceptionInDerivation(t.cause), W();
|
|
4241
4241
|
}
|
|
4242
4242
|
}, e.prototype.reportExceptionInDerivation = function(e) {
|
|
4243
4243
|
var t = this;
|
|
@@ -4251,10 +4251,10 @@ var ur = function() {
|
|
|
4251
4251
|
return n(e, t);
|
|
4252
4252
|
});
|
|
4253
4253
|
}, e.prototype.dispose = function() {
|
|
4254
|
-
this.isDisposed || (this.isDisposed = !0, this._isRunning || (U(),
|
|
4254
|
+
this.isDisposed || (this.isDisposed = !0, this._isRunning || (U(), jn(this), W()));
|
|
4255
4255
|
}, e.prototype.getDisposer = function() {
|
|
4256
4256
|
var e = this.dispose.bind(this);
|
|
4257
|
-
return e[
|
|
4257
|
+
return e[F] = this, e;
|
|
4258
4258
|
}, e.prototype.toString = function() {
|
|
4259
4259
|
return "Reaction[" + this.name + "]";
|
|
4260
4260
|
}, e.prototype.trace = function(e) {
|
|
@@ -4274,7 +4274,7 @@ function mr() {
|
|
|
4274
4274
|
}
|
|
4275
4275
|
H.isRunningReactions = !1;
|
|
4276
4276
|
}
|
|
4277
|
-
var hr =
|
|
4277
|
+
var hr = N("Reaction", ur);
|
|
4278
4278
|
function gr(e) {
|
|
4279
4279
|
var t = fr;
|
|
4280
4280
|
fr = function(n) {
|
|
@@ -4290,13 +4290,13 @@ function _r(e) {
|
|
|
4290
4290
|
return console.warn("[mobx.spy] Is a no-op in production builds"), function() {};
|
|
4291
4291
|
}
|
|
4292
4292
|
function vr() {
|
|
4293
|
-
|
|
4293
|
+
M(!1);
|
|
4294
4294
|
}
|
|
4295
4295
|
function yr(e) {
|
|
4296
4296
|
return function(t, n, r) {
|
|
4297
4297
|
if (r) {
|
|
4298
4298
|
if (r.value) return {
|
|
4299
|
-
value:
|
|
4299
|
+
value: V(e, r.value),
|
|
4300
4300
|
enumerable: !1,
|
|
4301
4301
|
configurable: !0,
|
|
4302
4302
|
writable: !0
|
|
@@ -4307,7 +4307,7 @@ function yr(e) {
|
|
|
4307
4307
|
configurable: !0,
|
|
4308
4308
|
writable: !0,
|
|
4309
4309
|
initializer: function() {
|
|
4310
|
-
return
|
|
4310
|
+
return V(e, i.call(this));
|
|
4311
4311
|
}
|
|
4312
4312
|
};
|
|
4313
4313
|
}
|
|
@@ -4321,7 +4321,7 @@ function br(e) {
|
|
|
4321
4321
|
enumerable: !1,
|
|
4322
4322
|
get: function() {},
|
|
4323
4323
|
set: function(t) {
|
|
4324
|
-
|
|
4324
|
+
jt(this, n, Sr(e, t));
|
|
4325
4325
|
}
|
|
4326
4326
|
});
|
|
4327
4327
|
};
|
|
@@ -4344,10 +4344,10 @@ function xr(e, t, n, r) {
|
|
|
4344
4344
|
};
|
|
4345
4345
|
}
|
|
4346
4346
|
var Sr = function(e, t, n, r) {
|
|
4347
|
-
if (arguments.length === 1 && typeof e == "function") return
|
|
4348
|
-
if (arguments.length === 2 && typeof t == "function") return
|
|
4347
|
+
if (arguments.length === 1 && typeof e == "function") return V(e.name || "<unnamed action>", e);
|
|
4348
|
+
if (arguments.length === 2 && typeof t == "function") return V(e, t);
|
|
4349
4349
|
if (arguments.length === 1 && typeof e == "string") return yr(e);
|
|
4350
|
-
if (r === !0)
|
|
4350
|
+
if (r === !0) jt(e, t, V(e.name || t, n.value, this));
|
|
4351
4351
|
else return yr(t).apply(null, arguments);
|
|
4352
4352
|
};
|
|
4353
4353
|
Sr.bound = xr;
|
|
@@ -4355,11 +4355,11 @@ function Cr(e, t) {
|
|
|
4355
4355
|
return Bn(typeof e == "string" ? e : e.name || "<unnamed action>", typeof e == "function" ? e : t, this, void 0);
|
|
4356
4356
|
}
|
|
4357
4357
|
function wr(e, t, n) {
|
|
4358
|
-
|
|
4358
|
+
jt(e, t, V(t, n.bind(e)));
|
|
4359
4359
|
}
|
|
4360
4360
|
function Tr(e, t) {
|
|
4361
|
-
t === void 0 && (t =
|
|
4362
|
-
var n = t && t.name || e.name || "Autorun@" +
|
|
4361
|
+
t === void 0 && (t = Ct);
|
|
4362
|
+
var n = t && t.name || e.name || "Autorun@" + j(), r = !t.scheduler && !t.delay, i;
|
|
4363
4363
|
if (r) i = new ur(n, function() {
|
|
4364
4364
|
this.track(s);
|
|
4365
4365
|
}, t.onError, t.requiresObservable);
|
|
@@ -4385,8 +4385,8 @@ function Dr(e) {
|
|
|
4385
4385
|
} : Er;
|
|
4386
4386
|
}
|
|
4387
4387
|
function Or(e, t, n) {
|
|
4388
|
-
n === void 0 && (n =
|
|
4389
|
-
var r = n.name || "Reaction@" +
|
|
4388
|
+
n === void 0 && (n = Ct);
|
|
4389
|
+
var r = n.name || "Reaction@" + j(), i = Sr(r, n.onError ? kr(n.onError, t) : t), a = !n.scheduler && !n.delay, o = Dr(n), s = !0, c = !1, l, u = n.compareStructural ? Kt.structural : n.equals || Kt.default, d = new ur(r, function() {
|
|
4390
4390
|
s || a ? f() : c || (c = !0, o(f));
|
|
4391
4391
|
}, n.onError, n.requiresObservable);
|
|
4392
4392
|
function f() {
|
|
@@ -4416,11 +4416,11 @@ function jr(e, t, n) {
|
|
|
4416
4416
|
return Mr("onBecomeUnobserved", e, t, n);
|
|
4417
4417
|
}
|
|
4418
4418
|
function Mr(e, t, n, r) {
|
|
4419
|
-
var i = typeof r == "function" ?
|
|
4419
|
+
var i = typeof r == "function" ? Ei(t, n) : Ei(t), a = typeof r == "function" ? r : n, o = e + "Listeners";
|
|
4420
4420
|
return i[o] ? i[o].add(a) : i[o] = new Set([a]), typeof i[e] == "function" ? function() {
|
|
4421
4421
|
var e = i[o];
|
|
4422
4422
|
e && (e.delete(a), e.size === 0 && delete i[o]);
|
|
4423
|
-
} :
|
|
4423
|
+
} : M(!1);
|
|
4424
4424
|
}
|
|
4425
4425
|
function Nr(e) {
|
|
4426
4426
|
var t = e.enforceActions, n = e.computedRequiresReaction, r = e.computedConfigurable, i = e.disableErrorBoundaries, a = e.reactionScheduler, o = e.reactionRequiresObservable, s = e.observableRequiresReaction;
|
|
@@ -4439,29 +4439,29 @@ function Nr(e) {
|
|
|
4439
4439
|
case "always":
|
|
4440
4440
|
c = "strict";
|
|
4441
4441
|
break;
|
|
4442
|
-
default:
|
|
4442
|
+
default: M("Invalid value for 'enforceActions': '" + t + "', expected 'never', 'always' or 'observed'");
|
|
4443
4443
|
}
|
|
4444
4444
|
H.enforceActions = c, H.allowStateChanges = !(c === !0 || c === "strict");
|
|
4445
4445
|
}
|
|
4446
4446
|
n !== void 0 && (H.computedRequiresReaction = !!n), o !== void 0 && (H.reactionRequiresObservable = !!o), s !== void 0 && (H.observableRequiresReaction = !!s, H.allowStateReads = !H.observableRequiresReaction), r !== void 0 && (H.computedConfigurable = !!r), i !== void 0 && (i === !0 && console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."), H.disableErrorBoundaries = !!i), a && gr(a);
|
|
4447
4447
|
}
|
|
4448
4448
|
function Pr(e, t, n, r) {
|
|
4449
|
-
r =
|
|
4449
|
+
r = pn(r);
|
|
4450
4450
|
var i = Fr(r);
|
|
4451
|
-
return
|
|
4451
|
+
return rn(e), vi(e, r.name, i.enhancer), t && Ir(e, t, n, i), e;
|
|
4452
4452
|
}
|
|
4453
4453
|
function Fr(e) {
|
|
4454
|
-
return e.defaultDecorator || (e.deep === !1 ?
|
|
4454
|
+
return e.defaultDecorator || (e.deep === !1 ? gn : mn);
|
|
4455
4455
|
}
|
|
4456
4456
|
function Ir(e, t, n, r) {
|
|
4457
4457
|
var i, a;
|
|
4458
4458
|
if (0) var o, s;
|
|
4459
4459
|
U();
|
|
4460
4460
|
try {
|
|
4461
|
-
var o =
|
|
4461
|
+
var o = Rt(t);
|
|
4462
4462
|
try {
|
|
4463
|
-
for (var c =
|
|
4464
|
-
var s = l.value, u = Object.getOwnPropertyDescriptor(t, s), d = (n && s in n ? n[s] : u.get ?
|
|
4463
|
+
for (var c = I(o), l = c.next(); !l.done; l = c.next()) {
|
|
4464
|
+
var s = l.value, u = Object.getOwnPropertyDescriptor(t, s), d = (n && s in n ? n[s] : u.get ? Sn : r)(e, s, u, !0);
|
|
4465
4465
|
d && Object.defineProperty(e, s, d);
|
|
4466
4466
|
}
|
|
4467
4467
|
} catch (e) {
|
|
@@ -4478,26 +4478,26 @@ function Ir(e, t, n, r) {
|
|
|
4478
4478
|
}
|
|
4479
4479
|
}
|
|
4480
4480
|
function Lr(e, t) {
|
|
4481
|
-
return Rr(
|
|
4481
|
+
return Rr(Ei(e, t));
|
|
4482
4482
|
}
|
|
4483
4483
|
function Rr(e) {
|
|
4484
4484
|
var t = { name: e.name };
|
|
4485
|
-
return e.observing && e.observing.length > 0 && (t.dependencies =
|
|
4485
|
+
return e.observing && e.observing.length > 0 && (t.dependencies = Dt(e.observing).map(Rr)), t;
|
|
4486
4486
|
}
|
|
4487
4487
|
function zr() {
|
|
4488
4488
|
this.message = "FLOW_CANCELLED";
|
|
4489
4489
|
}
|
|
4490
4490
|
zr.prototype = Object.create(Error.prototype);
|
|
4491
4491
|
function Br(e, t) {
|
|
4492
|
-
return e == null ? !1 : t === void 0 ?
|
|
4492
|
+
return e == null ? !1 : t === void 0 ? Ti(e) || !!e[F] || Bt(e) || hr(e) || Jn(e) : Ti(e) ? e[F].values.has(t) : !1;
|
|
4493
4493
|
}
|
|
4494
4494
|
function Vr(e) {
|
|
4495
|
-
return arguments.length !== 1 &&
|
|
4495
|
+
return arguments.length !== 1 && M(!1), Br(e);
|
|
4496
4496
|
}
|
|
4497
4497
|
function Hr(e) {
|
|
4498
|
-
return
|
|
4498
|
+
return Ti(e) ? e[F].getKeys() : Q(e) || $(e) ? Array.from(e.keys()) : ui(e) ? e.map(function(e, t) {
|
|
4499
4499
|
return t;
|
|
4500
|
-
}) :
|
|
4500
|
+
}) : M(!1);
|
|
4501
4501
|
}
|
|
4502
4502
|
function Ur(e, t, n) {
|
|
4503
4503
|
if (arguments.length === 2 && !$(e)) {
|
|
@@ -4510,13 +4510,13 @@ function Ur(e, t, n) {
|
|
|
4510
4510
|
}
|
|
4511
4511
|
return;
|
|
4512
4512
|
}
|
|
4513
|
-
if (
|
|
4514
|
-
var a = e[
|
|
4513
|
+
if (Ti(e)) {
|
|
4514
|
+
var a = e[F];
|
|
4515
4515
|
a.values.get(t) ? a.write(t, n) : a.addObservableProp(t, n, a.defaultEnhancer);
|
|
4516
4516
|
} else if (Q(e)) e.set(t, n);
|
|
4517
4517
|
else if ($(e)) e.add(t);
|
|
4518
|
-
else if (
|
|
4519
|
-
else return
|
|
4518
|
+
else if (ui(e)) typeof t != "number" && (t = parseInt(t, 10)), wt(t >= 0, "Not a valid index: '" + t + "'"), U(), t >= e.length && (e.length = t + 1), e[t] = n, W();
|
|
4519
|
+
else return M(!1);
|
|
4520
4520
|
}
|
|
4521
4521
|
var Wr = {
|
|
4522
4522
|
detectCycles: !0,
|
|
@@ -4532,7 +4532,7 @@ function Kr(e, t, n) {
|
|
|
4532
4532
|
if (e instanceof Date) return e;
|
|
4533
4533
|
if (Kn(e)) return Kr(e.get(), t, n);
|
|
4534
4534
|
if (Vr(e) && Hr(e), t.detectCycles === !0 && e !== null && n.has(e)) return n.get(e);
|
|
4535
|
-
if (
|
|
4535
|
+
if (ui(e) || Array.isArray(e)) {
|
|
4536
4536
|
var r = Gr(n, e, [], t), i = e.map(function(e) {
|
|
4537
4537
|
return Kr(e, t, n);
|
|
4538
4538
|
});
|
|
@@ -4563,7 +4563,7 @@ function Kr(e, t, n) {
|
|
|
4563
4563
|
}), u;
|
|
4564
4564
|
}
|
|
4565
4565
|
var d = Gr(n, e, {}, t);
|
|
4566
|
-
return
|
|
4566
|
+
return It(e).forEach(function(r) {
|
|
4567
4567
|
d[r] = Kr(e[r], t, n);
|
|
4568
4568
|
}), d;
|
|
4569
4569
|
}
|
|
@@ -4576,14 +4576,14 @@ function Jr() {
|
|
|
4576
4576
|
var e = [...arguments], t = !1;
|
|
4577
4577
|
typeof e[e.length - 1] == "boolean" && (t = e.pop());
|
|
4578
4578
|
var n = Yr(e);
|
|
4579
|
-
if (!n) return
|
|
4580
|
-
n.isTracing ===
|
|
4579
|
+
if (!n) return M(!1);
|
|
4580
|
+
n.isTracing === z.NONE && console.log("[mobx.trace] '" + n.name + "' tracing enabled"), n.isTracing = t ? z.BREAK : z.LOG;
|
|
4581
4581
|
}
|
|
4582
4582
|
function Yr(e) {
|
|
4583
4583
|
switch (e.length) {
|
|
4584
4584
|
case 0: return H.trackingDerivation;
|
|
4585
|
-
case 1: return
|
|
4586
|
-
case 2: return
|
|
4585
|
+
case 1: return Ei(e[0]);
|
|
4586
|
+
case 2: return Ei(e[0], e[1]);
|
|
4587
4587
|
}
|
|
4588
4588
|
}
|
|
4589
4589
|
function K(e, t) {
|
|
@@ -4594,106 +4594,133 @@ function K(e, t) {
|
|
|
4594
4594
|
W();
|
|
4595
4595
|
}
|
|
4596
4596
|
}
|
|
4597
|
-
function Xr(e) {
|
|
4598
|
-
return e
|
|
4597
|
+
function Xr(e, t, n) {
|
|
4598
|
+
return arguments.length === 1 || t && typeof t == "object" ? Qr(e, t) : Zr(e, t, n || {});
|
|
4599
|
+
}
|
|
4600
|
+
function Zr(e, t, n) {
|
|
4601
|
+
var r;
|
|
4602
|
+
typeof n.timeout == "number" && (r = setTimeout(function() {
|
|
4603
|
+
if (!a[F].isDisposed) {
|
|
4604
|
+
a();
|
|
4605
|
+
var e = /* @__PURE__ */ Error("WHEN_TIMEOUT");
|
|
4606
|
+
if (n.onError) n.onError(e);
|
|
4607
|
+
else throw e;
|
|
4608
|
+
}
|
|
4609
|
+
}, n.timeout)), n.name = n.name || "When@" + j();
|
|
4610
|
+
var i = V(n.name + "-effect", t), a = Tr(function(t) {
|
|
4611
|
+
e() && (t.dispose(), r && clearTimeout(r), i());
|
|
4612
|
+
}, n);
|
|
4613
|
+
return a;
|
|
4614
|
+
}
|
|
4615
|
+
function Qr(e, t) {
|
|
4616
|
+
var n, r = new Promise(function(r, i) {
|
|
4617
|
+
var a = Zr(e, r, Yt(Yt({}, t), { onError: i }));
|
|
4618
|
+
n = function() {
|
|
4619
|
+
a(), i("WHEN_CANCELLED");
|
|
4620
|
+
};
|
|
4621
|
+
});
|
|
4622
|
+
return r.cancel = n, r;
|
|
4623
|
+
}
|
|
4624
|
+
function $r(e) {
|
|
4625
|
+
return e[F];
|
|
4599
4626
|
}
|
|
4600
|
-
function
|
|
4627
|
+
function ei(e) {
|
|
4601
4628
|
return typeof e == "string" || typeof e == "number" || typeof e == "symbol";
|
|
4602
4629
|
}
|
|
4603
|
-
var
|
|
4630
|
+
var ti = {
|
|
4604
4631
|
has: function(e, t) {
|
|
4605
|
-
if (t ===
|
|
4606
|
-
var n =
|
|
4607
|
-
return
|
|
4632
|
+
if (t === F || t === "constructor" || t === Qt) return !0;
|
|
4633
|
+
var n = $r(e);
|
|
4634
|
+
return ei(t) ? n.has(t) : t in e;
|
|
4608
4635
|
},
|
|
4609
4636
|
get: function(e, t) {
|
|
4610
|
-
if (t ===
|
|
4611
|
-
var n =
|
|
4612
|
-
if (r instanceof
|
|
4637
|
+
if (t === F || t === "constructor" || t === Qt) return e[t];
|
|
4638
|
+
var n = $r(e), r = n.values.get(t);
|
|
4639
|
+
if (r instanceof zt) {
|
|
4613
4640
|
var i = r.get();
|
|
4614
4641
|
return i === void 0 && n.has(t), i;
|
|
4615
4642
|
}
|
|
4616
|
-
return
|
|
4643
|
+
return ei(t) && n.has(t), e[t];
|
|
4617
4644
|
},
|
|
4618
4645
|
set: function(e, t, n) {
|
|
4619
|
-
return
|
|
4646
|
+
return ei(t) ? (Ur(e, t, n), !0) : !1;
|
|
4620
4647
|
},
|
|
4621
4648
|
deleteProperty: function(e, t) {
|
|
4622
|
-
return
|
|
4649
|
+
return ei(t) ? ($r(e).remove(t), !0) : !1;
|
|
4623
4650
|
},
|
|
4624
4651
|
ownKeys: function(e) {
|
|
4625
|
-
return
|
|
4652
|
+
return $r(e).keysAtom.reportObserved(), Reflect.ownKeys(e);
|
|
4626
4653
|
},
|
|
4627
4654
|
preventExtensions: function(e) {
|
|
4628
|
-
return
|
|
4655
|
+
return M("Dynamic observable objects cannot be frozen"), !1;
|
|
4629
4656
|
}
|
|
4630
4657
|
};
|
|
4631
|
-
function
|
|
4632
|
-
var t = new Proxy(e,
|
|
4633
|
-
return e[
|
|
4658
|
+
function ni(e) {
|
|
4659
|
+
var t = new Proxy(e, ti);
|
|
4660
|
+
return e[F].proxy = t, t;
|
|
4634
4661
|
}
|
|
4635
4662
|
function q(e) {
|
|
4636
4663
|
return e.interceptors !== void 0 && e.interceptors.length > 0;
|
|
4637
4664
|
}
|
|
4638
|
-
function
|
|
4665
|
+
function ri(e, t) {
|
|
4639
4666
|
var n = e.interceptors || (e.interceptors = []);
|
|
4640
|
-
return n.push(t),
|
|
4667
|
+
return n.push(t), Tt(function() {
|
|
4641
4668
|
var e = n.indexOf(t);
|
|
4642
4669
|
e !== -1 && n.splice(e, 1);
|
|
4643
4670
|
});
|
|
4644
4671
|
}
|
|
4645
4672
|
function J(e, t) {
|
|
4646
|
-
var n =
|
|
4673
|
+
var n = Nn();
|
|
4647
4674
|
try {
|
|
4648
|
-
for (var r =
|
|
4675
|
+
for (var r = Zt(e.interceptors || []), i = 0, a = r.length; i < a && (t = r[i](t), wt(!t || t.type, "Intercept handlers should return nothing or a change object"), t); i++);
|
|
4649
4676
|
return t;
|
|
4650
4677
|
} finally {
|
|
4651
|
-
|
|
4678
|
+
B(n);
|
|
4652
4679
|
}
|
|
4653
4680
|
}
|
|
4654
4681
|
function Y(e) {
|
|
4655
4682
|
return e.changeListeners !== void 0 && e.changeListeners.length > 0;
|
|
4656
4683
|
}
|
|
4657
|
-
function
|
|
4684
|
+
function ii(e, t) {
|
|
4658
4685
|
var n = e.changeListeners || (e.changeListeners = []);
|
|
4659
|
-
return n.push(t),
|
|
4686
|
+
return n.push(t), Tt(function() {
|
|
4660
4687
|
var e = n.indexOf(t);
|
|
4661
4688
|
e !== -1 && n.splice(e, 1);
|
|
4662
4689
|
});
|
|
4663
4690
|
}
|
|
4664
4691
|
function X(e, t) {
|
|
4665
|
-
var n =
|
|
4692
|
+
var n = Nn(), r = e.changeListeners;
|
|
4666
4693
|
if (r) {
|
|
4667
4694
|
r = r.slice();
|
|
4668
4695
|
for (var i = 0, a = r.length; i < a; i++) r[i](t);
|
|
4669
|
-
|
|
4696
|
+
B(n);
|
|
4670
4697
|
}
|
|
4671
4698
|
}
|
|
4672
|
-
var
|
|
4699
|
+
var ai = 1e4, oi = {
|
|
4673
4700
|
get: function(e, t) {
|
|
4674
|
-
return t ===
|
|
4701
|
+
return t === F ? e[F] : t === "length" ? e[F].getArrayLength() : typeof t == "number" ? Z.get.call(e, t) : typeof t == "string" && !isNaN(t) ? Z.get.call(e, parseInt(t)) : Z.hasOwnProperty(t) ? Z[t] : e[t];
|
|
4675
4702
|
},
|
|
4676
4703
|
set: function(e, t, n) {
|
|
4677
|
-
return t === "length" && e[
|
|
4704
|
+
return t === "length" && e[F].setArrayLength(n), typeof t == "number" && Z.set.call(e, t, n), typeof t == "symbol" || isNaN(t) ? e[t] = n : Z.set.call(e, parseInt(t), n), !0;
|
|
4678
4705
|
},
|
|
4679
4706
|
preventExtensions: function(e) {
|
|
4680
|
-
return
|
|
4707
|
+
return M("Observable arrays cannot be frozen"), !1;
|
|
4681
4708
|
}
|
|
4682
4709
|
};
|
|
4683
|
-
function
|
|
4684
|
-
n === void 0 && (n = "ObservableArray@" +
|
|
4685
|
-
var i = new
|
|
4686
|
-
|
|
4687
|
-
var a = new Proxy(i.values,
|
|
4710
|
+
function si(e, t, n, r) {
|
|
4711
|
+
n === void 0 && (n = "ObservableArray@" + j()), r === void 0 && (r = !1);
|
|
4712
|
+
var i = new ci(n, t, r);
|
|
4713
|
+
Mt(i.values, F, i);
|
|
4714
|
+
var a = new Proxy(i.values, oi);
|
|
4688
4715
|
if (i.proxy = a, e && e.length) {
|
|
4689
4716
|
var o = Un(!0);
|
|
4690
4717
|
i.spliceWithArray(0, 0, e), Wn(o);
|
|
4691
4718
|
}
|
|
4692
4719
|
return a;
|
|
4693
4720
|
}
|
|
4694
|
-
var
|
|
4721
|
+
var ci = function() {
|
|
4695
4722
|
function e(e, t, n) {
|
|
4696
|
-
this.owned = n, this.values = [], this.proxy = void 0, this.lastKnownLength = 0, this.atom = new
|
|
4723
|
+
this.owned = n, this.values = [], this.proxy = void 0, this.lastKnownLength = 0, this.atom = new zt(e || "ObservableArray@" + j()), this.enhancer = function(n, r) {
|
|
4697
4724
|
return t(n, r, e + "[..]");
|
|
4698
4725
|
};
|
|
4699
4726
|
}
|
|
@@ -4702,7 +4729,7 @@ var ai = function() {
|
|
|
4702
4729
|
}, e.prototype.dehanceValues = function(e) {
|
|
4703
4730
|
return this.dehancer !== void 0 && e.length > 0 ? e.map(this.dehancer) : e;
|
|
4704
4731
|
}, e.prototype.intercept = function(e) {
|
|
4705
|
-
return
|
|
4732
|
+
return ri(this, e);
|
|
4706
4733
|
}, e.prototype.observe = function(e, t) {
|
|
4707
4734
|
return t === void 0 && (t = !1), t && e({
|
|
4708
4735
|
object: this.proxy,
|
|
@@ -4712,7 +4739,7 @@ var ai = function() {
|
|
|
4712
4739
|
addedCount: this.values.length,
|
|
4713
4740
|
removed: [],
|
|
4714
4741
|
removedCount: 0
|
|
4715
|
-
}),
|
|
4742
|
+
}), ii(this, e);
|
|
4716
4743
|
}, e.prototype.getArrayLength = function() {
|
|
4717
4744
|
return this.atom.reportObserved(), this.values.length;
|
|
4718
4745
|
}, e.prototype.setArrayLength = function(e) {
|
|
@@ -4727,9 +4754,9 @@ var ai = function() {
|
|
|
4727
4754
|
this.lastKnownLength += t;
|
|
4728
4755
|
}, e.prototype.spliceWithArray = function(e, t, n) {
|
|
4729
4756
|
var r = this;
|
|
4730
|
-
|
|
4757
|
+
On(this.atom);
|
|
4731
4758
|
var i = this.values.length;
|
|
4732
|
-
if (e === void 0 ? e = 0 : e > i ? e = i : e < 0 && (e = Math.max(0, i + e)), t = arguments.length === 1 ? i - e : t == null ? 0 : Math.max(0, Math.min(t, i - e)), n === void 0 && (n =
|
|
4759
|
+
if (e === void 0 ? e = 0 : e > i ? e = i : e < 0 && (e = Math.max(0, i + e)), t = arguments.length === 1 ? i - e : t == null ? 0 : Math.max(0, Math.min(t, i - e)), n === void 0 && (n = St), q(this)) {
|
|
4733
4760
|
var a = J(this, {
|
|
4734
4761
|
object: this.proxy,
|
|
4735
4762
|
type: "splice",
|
|
@@ -4737,7 +4764,7 @@ var ai = function() {
|
|
|
4737
4764
|
removedCount: t,
|
|
4738
4765
|
added: n
|
|
4739
4766
|
});
|
|
4740
|
-
if (!a) return
|
|
4767
|
+
if (!a) return St;
|
|
4741
4768
|
t = a.removedCount, n = a.added;
|
|
4742
4769
|
}
|
|
4743
4770
|
n = n.length === 0 ? n : n.map(function(e) {
|
|
@@ -4747,7 +4774,7 @@ var ai = function() {
|
|
|
4747
4774
|
return (t !== 0 || n.length !== 0) && this.notifyArraySplice(e, n, o), this.dehanceValues(o);
|
|
4748
4775
|
}, e.prototype.spliceItemsIntoValues = function(e, t, n) {
|
|
4749
4776
|
var r;
|
|
4750
|
-
if (n.length <
|
|
4777
|
+
if (n.length < ai) return (r = this.values).splice.apply(r, Zt([e, t], n));
|
|
4751
4778
|
var i = this.values.slice(e, e + t);
|
|
4752
4779
|
return this.values = this.values.slice(0, e).concat(n, this.values.slice(e + t)), i;
|
|
4753
4780
|
}, e.prototype.notifyArrayChildUpdate = function(e, t, n) {
|
|
@@ -4773,16 +4800,16 @@ var ai = function() {
|
|
|
4773
4800
|
}, e;
|
|
4774
4801
|
}(), Z = {
|
|
4775
4802
|
intercept: function(e) {
|
|
4776
|
-
return this[
|
|
4803
|
+
return this[F].intercept(e);
|
|
4777
4804
|
},
|
|
4778
4805
|
observe: function(e, t) {
|
|
4779
|
-
return t === void 0 && (t = !1), this[
|
|
4806
|
+
return t === void 0 && (t = !1), this[F].observe(e, t);
|
|
4780
4807
|
},
|
|
4781
4808
|
clear: function() {
|
|
4782
4809
|
return this.splice(0);
|
|
4783
4810
|
},
|
|
4784
4811
|
replace: function(e) {
|
|
4785
|
-
var t = this[
|
|
4812
|
+
var t = this[F];
|
|
4786
4813
|
return t.spliceWithArray(0, t.values.length, e);
|
|
4787
4814
|
},
|
|
4788
4815
|
toJS: function() {
|
|
@@ -4792,7 +4819,7 @@ var ai = function() {
|
|
|
4792
4819
|
return this.toJS();
|
|
4793
4820
|
},
|
|
4794
4821
|
splice: function(e, t) {
|
|
4795
|
-
var n = [...arguments].slice(2), r = this[
|
|
4822
|
+
var n = [...arguments].slice(2), r = this[F];
|
|
4796
4823
|
switch (arguments.length) {
|
|
4797
4824
|
case 0: return [];
|
|
4798
4825
|
case 1: return r.spliceWithArray(e);
|
|
@@ -4801,20 +4828,20 @@ var ai = function() {
|
|
|
4801
4828
|
return r.spliceWithArray(e, t, n);
|
|
4802
4829
|
},
|
|
4803
4830
|
spliceWithArray: function(e, t, n) {
|
|
4804
|
-
return this[
|
|
4831
|
+
return this[F].spliceWithArray(e, t, n);
|
|
4805
4832
|
},
|
|
4806
4833
|
push: function() {
|
|
4807
|
-
var e = [...arguments], t = this[
|
|
4834
|
+
var e = [...arguments], t = this[F];
|
|
4808
4835
|
return t.spliceWithArray(t.values.length, 0, e), t.values.length;
|
|
4809
4836
|
},
|
|
4810
4837
|
pop: function() {
|
|
4811
|
-
return this.splice(Math.max(this[
|
|
4838
|
+
return this.splice(Math.max(this[F].values.length - 1, 0), 1)[0];
|
|
4812
4839
|
},
|
|
4813
4840
|
shift: function() {
|
|
4814
4841
|
return this.splice(0, 1)[0];
|
|
4815
4842
|
},
|
|
4816
4843
|
unshift: function() {
|
|
4817
|
-
var e = [...arguments], t = this[
|
|
4844
|
+
var e = [...arguments], t = this[F];
|
|
4818
4845
|
return t.spliceWithArray(0, 0, e), t.values.length;
|
|
4819
4846
|
},
|
|
4820
4847
|
reverse: function() {
|
|
@@ -4826,20 +4853,20 @@ var ai = function() {
|
|
|
4826
4853
|
return t.sort.apply(t, arguments);
|
|
4827
4854
|
},
|
|
4828
4855
|
remove: function(e) {
|
|
4829
|
-
var t = this[
|
|
4856
|
+
var t = this[F], n = t.dehanceValues(t.values).indexOf(e);
|
|
4830
4857
|
return n > -1 ? (this.splice(n, 1), !0) : !1;
|
|
4831
4858
|
},
|
|
4832
4859
|
get: function(e) {
|
|
4833
|
-
var t = this[
|
|
4860
|
+
var t = this[F];
|
|
4834
4861
|
if (t) {
|
|
4835
4862
|
if (e < t.values.length) return t.atom.reportObserved(), t.dehanceValue(t.values[e]);
|
|
4836
4863
|
console.warn("[mobx.array] Attempt to read an array index (" + e + ") that is out of bounds (" + t.values.length + "). Please check length first. Out of bound indices will not be tracked by MobX");
|
|
4837
4864
|
}
|
|
4838
4865
|
},
|
|
4839
4866
|
set: function(e, t) {
|
|
4840
|
-
var n = this[
|
|
4867
|
+
var n = this[F], r = n.values;
|
|
4841
4868
|
if (e < r.length) {
|
|
4842
|
-
|
|
4869
|
+
On(n.atom);
|
|
4843
4870
|
var i = r[e];
|
|
4844
4871
|
if (q(n)) {
|
|
4845
4872
|
var a = J(n, {
|
|
@@ -4868,7 +4895,7 @@ var ai = function() {
|
|
|
4868
4895
|
"toLocaleString"
|
|
4869
4896
|
].forEach(function(e) {
|
|
4870
4897
|
typeof Array.prototype[e] == "function" && (Z[e] = function() {
|
|
4871
|
-
var t = this[
|
|
4898
|
+
var t = this[F];
|
|
4872
4899
|
t.atom.reportObserved();
|
|
4873
4900
|
var n = t.dehanceValues(t.values);
|
|
4874
4901
|
return n[e].apply(n, arguments);
|
|
@@ -4884,14 +4911,14 @@ var ai = function() {
|
|
|
4884
4911
|
"some"
|
|
4885
4912
|
].forEach(function(e) {
|
|
4886
4913
|
typeof Array.prototype[e] == "function" && (Z[e] = function(t, n) {
|
|
4887
|
-
var r = this, i = this[
|
|
4914
|
+
var r = this, i = this[F];
|
|
4888
4915
|
return i.atom.reportObserved(), i.dehanceValues(i.values)[e](function(e, i) {
|
|
4889
4916
|
return t.call(n, e, i, r);
|
|
4890
4917
|
}, n);
|
|
4891
4918
|
});
|
|
4892
4919
|
}), ["reduce", "reduceRight"].forEach(function(e) {
|
|
4893
4920
|
Z[e] = function() {
|
|
4894
|
-
var t = this, n = this[
|
|
4921
|
+
var t = this, n = this[F];
|
|
4895
4922
|
n.atom.reportObserved();
|
|
4896
4923
|
var r = arguments[0];
|
|
4897
4924
|
return arguments[0] = function(e, i, a) {
|
|
@@ -4899,13 +4926,13 @@ var ai = function() {
|
|
|
4899
4926
|
}, n.values[e].apply(n.values, arguments);
|
|
4900
4927
|
};
|
|
4901
4928
|
});
|
|
4902
|
-
var
|
|
4903
|
-
function
|
|
4904
|
-
return
|
|
4929
|
+
var li = N("ObservableArrayAdministration", ci);
|
|
4930
|
+
function ui(e) {
|
|
4931
|
+
return Ot(e) && li(e[F]);
|
|
4905
4932
|
}
|
|
4906
|
-
var
|
|
4933
|
+
var di, fi = {}, pi = function() {
|
|
4907
4934
|
function e(e, t, n) {
|
|
4908
|
-
if (t === void 0 && (t =
|
|
4935
|
+
if (t === void 0 && (t = sn), n === void 0 && (n = "ObservableMap@" + j()), this.enhancer = t, this.name = n, this[di] = fi, this._keysAtom = Vt(this.name + ".keys()"), this[Symbol.toStringTag] = "Map", typeof Map != "function") throw Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");
|
|
4909
4936
|
this._data = /* @__PURE__ */ new Map(), this._hasMap = /* @__PURE__ */ new Map(), this.merge(e);
|
|
4910
4937
|
}
|
|
4911
4938
|
return e.prototype._has = function(e) {
|
|
@@ -4915,7 +4942,7 @@ var ci, li = {}, ui = function() {
|
|
|
4915
4942
|
if (!H.trackingDerivation) return this._has(e);
|
|
4916
4943
|
var n = this._hasMap.get(e);
|
|
4917
4944
|
if (!n) {
|
|
4918
|
-
var r = n = new Gn(this._has(e),
|
|
4945
|
+
var r = n = new Gn(this._has(e), ln, this.name + "." + P(e) + "?", !1);
|
|
4919
4946
|
this._hasMap.set(e, r), jr(r, function() {
|
|
4920
4947
|
return t._hasMap.delete(e);
|
|
4921
4948
|
});
|
|
@@ -4936,7 +4963,7 @@ var ci, li = {}, ui = function() {
|
|
|
4936
4963
|
return n ? this._updateValue(e, t) : this._addValue(e, t), this;
|
|
4937
4964
|
}, e.prototype.delete = function(e) {
|
|
4938
4965
|
var t = this;
|
|
4939
|
-
if (
|
|
4966
|
+
if (On(this._keysAtom), q(this)) {
|
|
4940
4967
|
var n = J(this, {
|
|
4941
4968
|
type: "delete",
|
|
4942
4969
|
object: this,
|
|
@@ -4973,8 +5000,8 @@ var ci, li = {}, ui = function() {
|
|
|
4973
5000
|
}
|
|
4974
5001
|
}, e.prototype._addValue = function(e, t) {
|
|
4975
5002
|
var n = this;
|
|
4976
|
-
|
|
4977
|
-
var r = new Gn(t, n.enhancer, n.name + "." +
|
|
5003
|
+
On(this._keysAtom), K(function() {
|
|
5004
|
+
var r = new Gn(t, n.enhancer, n.name + "." + P(e), !1);
|
|
4978
5005
|
n._data.set(e, r), t = r.value, n._updateHasMapEntry(e, !0), n._keysAtom.reportChanged();
|
|
4979
5006
|
});
|
|
4980
5007
|
var r = G(), i = Y(this), a = i || r ? {
|
|
@@ -4992,7 +5019,7 @@ var ci, li = {}, ui = function() {
|
|
|
4992
5019
|
return this._keysAtom.reportObserved(), this._data.keys();
|
|
4993
5020
|
}, e.prototype.values = function() {
|
|
4994
5021
|
var e = this, t = this.keys();
|
|
4995
|
-
return
|
|
5022
|
+
return Pi({ next: function() {
|
|
4996
5023
|
var n = t.next(), r = n.done, i = n.value;
|
|
4997
5024
|
return {
|
|
4998
5025
|
done: r,
|
|
@@ -5001,20 +5028,20 @@ var ci, li = {}, ui = function() {
|
|
|
5001
5028
|
} });
|
|
5002
5029
|
}, e.prototype.entries = function() {
|
|
5003
5030
|
var e = this, t = this.keys();
|
|
5004
|
-
return
|
|
5031
|
+
return Pi({ next: function() {
|
|
5005
5032
|
var n = t.next(), r = n.done, i = n.value;
|
|
5006
5033
|
return {
|
|
5007
5034
|
done: r,
|
|
5008
5035
|
value: r ? void 0 : [i, e.get(i)]
|
|
5009
5036
|
};
|
|
5010
5037
|
} });
|
|
5011
|
-
}, e.prototype[
|
|
5038
|
+
}, e.prototype[di = F, Symbol.iterator] = function() {
|
|
5012
5039
|
return this.entries();
|
|
5013
5040
|
}, e.prototype.forEach = function(e, t) {
|
|
5014
5041
|
var n, r;
|
|
5015
5042
|
try {
|
|
5016
|
-
for (var i =
|
|
5017
|
-
var o =
|
|
5043
|
+
for (var i = I(this), a = i.next(); !a.done; a = i.next()) {
|
|
5044
|
+
var o = Xt(a.value, 2), s = o[0], c = o[1];
|
|
5018
5045
|
e.call(t, c, s, this);
|
|
5019
5046
|
}
|
|
5020
5047
|
} catch (e) {
|
|
@@ -5031,14 +5058,14 @@ var ci, li = {}, ui = function() {
|
|
|
5031
5058
|
return Q(e) && (e = e.toJS()), K(function() {
|
|
5032
5059
|
var n = Un(!0);
|
|
5033
5060
|
try {
|
|
5034
|
-
|
|
5061
|
+
kt(e) ? It(e).forEach(function(n) {
|
|
5035
5062
|
return t.set(n, e[n]);
|
|
5036
5063
|
}) : Array.isArray(e) ? e.forEach(function(e) {
|
|
5037
|
-
var n =
|
|
5064
|
+
var n = Xt(e, 2), r = n[0], i = n[1];
|
|
5038
5065
|
return t.set(r, i);
|
|
5039
|
-
}) :
|
|
5066
|
+
}) : Pt(e) ? (e.constructor !== Map && M("Cannot initialize from classes that inherit from Map: " + e.constructor.name), e.forEach(function(e, n) {
|
|
5040
5067
|
return t.set(n, e);
|
|
5041
|
-
})) : e != null &&
|
|
5068
|
+
})) : e != null && M("Cannot initialize map from " + e);
|
|
5042
5069
|
} finally {
|
|
5043
5070
|
Wn(n);
|
|
5044
5071
|
}
|
|
@@ -5046,10 +5073,10 @@ var ci, li = {}, ui = function() {
|
|
|
5046
5073
|
}, e.prototype.clear = function() {
|
|
5047
5074
|
var e = this;
|
|
5048
5075
|
K(function() {
|
|
5049
|
-
|
|
5076
|
+
Mn(function() {
|
|
5050
5077
|
var t, n;
|
|
5051
5078
|
try {
|
|
5052
|
-
for (var r =
|
|
5079
|
+
for (var r = I(e.keys()), i = r.next(); !i.done; i = r.next()) {
|
|
5053
5080
|
var a = i.value;
|
|
5054
5081
|
e.delete(a);
|
|
5055
5082
|
}
|
|
@@ -5067,9 +5094,9 @@ var ci, li = {}, ui = function() {
|
|
|
5067
5094
|
}, e.prototype.replace = function(e) {
|
|
5068
5095
|
var t = this;
|
|
5069
5096
|
return K(function() {
|
|
5070
|
-
var n, r, i, a, o =
|
|
5097
|
+
var n, r, i, a, o = At(e), s = /* @__PURE__ */ new Map(), c = !1;
|
|
5071
5098
|
try {
|
|
5072
|
-
for (var l =
|
|
5099
|
+
for (var l = I(t._data.keys()), u = l.next(); !u.done; u = l.next()) {
|
|
5073
5100
|
var d = u.value;
|
|
5074
5101
|
if (!o.has(d)) if (t.delete(d)) c = !0;
|
|
5075
5102
|
else {
|
|
@@ -5087,8 +5114,8 @@ var ci, li = {}, ui = function() {
|
|
|
5087
5114
|
}
|
|
5088
5115
|
}
|
|
5089
5116
|
try {
|
|
5090
|
-
for (var p =
|
|
5091
|
-
var h =
|
|
5117
|
+
for (var p = I(o.entries()), m = p.next(); !m.done; m = p.next()) {
|
|
5118
|
+
var h = Xt(m.value, 2), d = h[0], f = h[1], g = t._data.has(d);
|
|
5092
5119
|
if (t.set(d, f), t._data.has(d)) {
|
|
5093
5120
|
var _ = t._data.get(d);
|
|
5094
5121
|
s.set(d, _), g || (c = !0);
|
|
@@ -5122,9 +5149,9 @@ var ci, li = {}, ui = function() {
|
|
|
5122
5149
|
}), e.prototype.toPOJO = function() {
|
|
5123
5150
|
var e, t, n = {};
|
|
5124
5151
|
try {
|
|
5125
|
-
for (var r =
|
|
5126
|
-
var a =
|
|
5127
|
-
n[typeof o == "symbol" ? o :
|
|
5152
|
+
for (var r = I(this), i = r.next(); !i.done; i = r.next()) {
|
|
5153
|
+
var a = Xt(i.value, 2), o = a[0], s = a[1];
|
|
5154
|
+
n[typeof o == "symbol" ? o : P(o)] = s;
|
|
5128
5155
|
}
|
|
5129
5156
|
} catch (t) {
|
|
5130
5157
|
e = { error: t };
|
|
@@ -5143,16 +5170,16 @@ var ci, li = {}, ui = function() {
|
|
|
5143
5170
|
}, e.prototype.toString = function() {
|
|
5144
5171
|
var e = this;
|
|
5145
5172
|
return this.name + "[{ " + Array.from(this.keys()).map(function(t) {
|
|
5146
|
-
return
|
|
5173
|
+
return P(t) + ": " + ("" + e.get(t));
|
|
5147
5174
|
}).join(", ") + " }]";
|
|
5148
5175
|
}, e.prototype.observe = function(e, t) {
|
|
5149
|
-
return
|
|
5176
|
+
return ii(this, e);
|
|
5150
5177
|
}, e.prototype.intercept = function(e) {
|
|
5151
|
-
return
|
|
5178
|
+
return ri(this, e);
|
|
5152
5179
|
}, e;
|
|
5153
|
-
}(), Q =
|
|
5180
|
+
}(), Q = N("ObservableMap", pi), mi, hi = {}, gi = function() {
|
|
5154
5181
|
function e(e, t, n) {
|
|
5155
|
-
if (t === void 0 && (t =
|
|
5182
|
+
if (t === void 0 && (t = sn), n === void 0 && (n = "ObservableSet@" + j()), this.name = n, this[mi] = hi, this._data = /* @__PURE__ */ new Set(), this._atom = Vt(this.name), this[Symbol.toStringTag] = "Set", typeof Set != "function") throw Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");
|
|
5156
5183
|
this.enhancer = function(e, r) {
|
|
5157
5184
|
return t(e, r, n);
|
|
5158
5185
|
}, e && this.replace(e);
|
|
@@ -5162,10 +5189,10 @@ var ci, li = {}, ui = function() {
|
|
|
5162
5189
|
}, e.prototype.clear = function() {
|
|
5163
5190
|
var e = this;
|
|
5164
5191
|
K(function() {
|
|
5165
|
-
|
|
5192
|
+
Mn(function() {
|
|
5166
5193
|
var t, n;
|
|
5167
5194
|
try {
|
|
5168
|
-
for (var r =
|
|
5195
|
+
for (var r = I(e._data.values()), i = r.next(); !i.done; i = r.next()) {
|
|
5169
5196
|
var a = i.value;
|
|
5170
5197
|
e.delete(a);
|
|
5171
5198
|
}
|
|
@@ -5183,7 +5210,7 @@ var ci, li = {}, ui = function() {
|
|
|
5183
5210
|
}, e.prototype.forEach = function(e, t) {
|
|
5184
5211
|
var n, r;
|
|
5185
5212
|
try {
|
|
5186
|
-
for (var i =
|
|
5213
|
+
for (var i = I(this), a = i.next(); !a.done; a = i.next()) {
|
|
5187
5214
|
var o = a.value;
|
|
5188
5215
|
e.call(t, o, o, this);
|
|
5189
5216
|
}
|
|
@@ -5204,7 +5231,7 @@ var ci, li = {}, ui = function() {
|
|
|
5204
5231
|
configurable: !0
|
|
5205
5232
|
}), e.prototype.add = function(e) {
|
|
5206
5233
|
var t = this;
|
|
5207
|
-
if (
|
|
5234
|
+
if (On(this._atom), q(this)) {
|
|
5208
5235
|
var n = J(this, {
|
|
5209
5236
|
type: "add",
|
|
5210
5237
|
object: this,
|
|
@@ -5249,7 +5276,7 @@ var ci, li = {}, ui = function() {
|
|
|
5249
5276
|
return this._atom.reportObserved(), this._data.has(this.dehanceValue(e));
|
|
5250
5277
|
}, e.prototype.entries = function() {
|
|
5251
5278
|
var e = 0, t = Array.from(this.keys()), n = Array.from(this.values());
|
|
5252
|
-
return
|
|
5279
|
+
return Pi({ next: function() {
|
|
5253
5280
|
var r = e;
|
|
5254
5281
|
return e += 1, r < n.length ? {
|
|
5255
5282
|
value: [t[r], n[r]],
|
|
@@ -5261,7 +5288,7 @@ var ci, li = {}, ui = function() {
|
|
|
5261
5288
|
}, e.prototype.values = function() {
|
|
5262
5289
|
this._atom.reportObserved();
|
|
5263
5290
|
var e = this, t = 0, n = Array.from(this._data.values());
|
|
5264
|
-
return
|
|
5291
|
+
return Pi({ next: function() {
|
|
5265
5292
|
return t < n.length ? {
|
|
5266
5293
|
value: e.dehanceValue(n[t++]),
|
|
5267
5294
|
done: !1
|
|
@@ -5272,27 +5299,27 @@ var ci, li = {}, ui = function() {
|
|
|
5272
5299
|
return $(e) && (e = e.toJS()), K(function() {
|
|
5273
5300
|
var n = Un(!0);
|
|
5274
5301
|
try {
|
|
5275
|
-
Array.isArray(e) ||
|
|
5302
|
+
Array.isArray(e) || Ft(e) ? (t.clear(), e.forEach(function(e) {
|
|
5276
5303
|
return t.add(e);
|
|
5277
|
-
})) : e != null &&
|
|
5304
|
+
})) : e != null && M("Cannot initialize set from " + e);
|
|
5278
5305
|
} finally {
|
|
5279
5306
|
Wn(n);
|
|
5280
5307
|
}
|
|
5281
5308
|
}), this;
|
|
5282
5309
|
}, e.prototype.observe = function(e, t) {
|
|
5283
|
-
return
|
|
5310
|
+
return ii(this, e);
|
|
5284
5311
|
}, e.prototype.intercept = function(e) {
|
|
5285
|
-
return
|
|
5312
|
+
return ri(this, e);
|
|
5286
5313
|
}, e.prototype.toJS = function() {
|
|
5287
5314
|
return new Set(this);
|
|
5288
5315
|
}, e.prototype.toString = function() {
|
|
5289
5316
|
return this.name + "[ " + Array.from(this).join(", ") + " ]";
|
|
5290
|
-
}, e.prototype[
|
|
5317
|
+
}, e.prototype[mi = F, Symbol.iterator] = function() {
|
|
5291
5318
|
return this.values();
|
|
5292
5319
|
}, e;
|
|
5293
|
-
}(), $ =
|
|
5320
|
+
}(), $ = N("ObservableSet", gi), _i = function() {
|
|
5294
5321
|
function e(e, t, n, r) {
|
|
5295
|
-
t === void 0 && (t = /* @__PURE__ */ new Map()), this.target = e, this.values = t, this.name = n, this.defaultEnhancer = r, this.keysAtom = new
|
|
5322
|
+
t === void 0 && (t = /* @__PURE__ */ new Map()), this.target = e, this.values = t, this.name = n, this.defaultEnhancer = r, this.keysAtom = new zt(n + ".keys");
|
|
5296
5323
|
}
|
|
5297
5324
|
return e.prototype.read = function(e) {
|
|
5298
5325
|
return this.values.get(e).get();
|
|
@@ -5324,7 +5351,7 @@ var ci, li = {}, ui = function() {
|
|
|
5324
5351
|
}
|
|
5325
5352
|
}, e.prototype.has = function(e) {
|
|
5326
5353
|
var t = this.pendingKeys || (this.pendingKeys = /* @__PURE__ */ new Map()), n = t.get(e);
|
|
5327
|
-
return n ? n.get() : (n = new Gn(!!this.values.get(e),
|
|
5354
|
+
return n ? n.get() : (n = new Gn(!!this.values.get(e), ln, this.name + "." + P(e) + "?", !1), t.set(e, n), n.get());
|
|
5328
5355
|
}, e.prototype.addObservableProp = function(e, t, n) {
|
|
5329
5356
|
n === void 0 && (n = this.defaultEnhancer);
|
|
5330
5357
|
var r = this.target;
|
|
@@ -5338,11 +5365,11 @@ var ci, li = {}, ui = function() {
|
|
|
5338
5365
|
if (!i) return;
|
|
5339
5366
|
t = i.newValue;
|
|
5340
5367
|
}
|
|
5341
|
-
var a = new Gn(t, n, this.name + "." +
|
|
5342
|
-
this.values.set(e, a), t = a.value, Object.defineProperty(r, e,
|
|
5368
|
+
var a = new Gn(t, n, this.name + "." + P(e), !1);
|
|
5369
|
+
this.values.set(e, a), t = a.value, Object.defineProperty(r, e, xi(e)), this.notifyPropertyAddition(e, t);
|
|
5343
5370
|
}, e.prototype.addComputedProp = function(e, t, n) {
|
|
5344
5371
|
var r = this.target;
|
|
5345
|
-
n.name = n.name || this.name + "." +
|
|
5372
|
+
n.name = n.name || this.name + "." + P(t), this.values.set(t, new qn(n)), (e === r || Nt(e, t)) && Object.defineProperty(e, t, Ci(t));
|
|
5346
5373
|
}, e.prototype.remove = function(e) {
|
|
5347
5374
|
if (this.values.has(e)) {
|
|
5348
5375
|
var t = this.target;
|
|
@@ -5376,9 +5403,9 @@ var ci, li = {}, ui = function() {
|
|
|
5376
5403
|
}, e.prototype.illegalAccess = function(e, t) {
|
|
5377
5404
|
console.warn("Property '" + t + "' of '" + e + "' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner");
|
|
5378
5405
|
}, e.prototype.observe = function(e, t) {
|
|
5379
|
-
return
|
|
5406
|
+
return ii(this, e);
|
|
5380
5407
|
}, e.prototype.intercept = function(e) {
|
|
5381
|
-
return
|
|
5408
|
+
return ri(this, e);
|
|
5382
5409
|
}, e.prototype.notifyPropertyAddition = function(e, t) {
|
|
5383
5410
|
var n = Y(this), r = G(), i = n || r ? {
|
|
5384
5411
|
type: "add",
|
|
@@ -5396,8 +5423,8 @@ var ci, li = {}, ui = function() {
|
|
|
5396
5423
|
this.keysAtom.reportObserved();
|
|
5397
5424
|
var n = [];
|
|
5398
5425
|
try {
|
|
5399
|
-
for (var r =
|
|
5400
|
-
var a =
|
|
5426
|
+
for (var r = I(this.values), i = r.next(); !i.done; i = r.next()) {
|
|
5427
|
+
var a = Xt(i.value, 2), o = a[0];
|
|
5401
5428
|
a[1] instanceof Gn && n.push(o);
|
|
5402
5429
|
}
|
|
5403
5430
|
} catch (t) {
|
|
@@ -5412,84 +5439,84 @@ var ci, li = {}, ui = function() {
|
|
|
5412
5439
|
return n;
|
|
5413
5440
|
}, e;
|
|
5414
5441
|
}();
|
|
5415
|
-
function
|
|
5416
|
-
if (t === void 0 && (t = ""), n === void 0 && (n =
|
|
5417
|
-
|
|
5418
|
-
var r = new
|
|
5419
|
-
return
|
|
5420
|
-
}
|
|
5421
|
-
var
|
|
5422
|
-
function
|
|
5423
|
-
return
|
|
5442
|
+
function vi(e, t, n) {
|
|
5443
|
+
if (t === void 0 && (t = ""), n === void 0 && (n = sn), Object.prototype.hasOwnProperty.call(e, F)) return e[F];
|
|
5444
|
+
kt(e) || (t = (e.constructor.name || "ObservableObject") + "@" + j()), t || (t = "ObservableObject@" + j());
|
|
5445
|
+
var r = new _i(e, /* @__PURE__ */ new Map(), P(t), n);
|
|
5446
|
+
return jt(e, F, r), r;
|
|
5447
|
+
}
|
|
5448
|
+
var yi = Object.create(null), bi = Object.create(null);
|
|
5449
|
+
function xi(e) {
|
|
5450
|
+
return yi[e] || (yi[e] = {
|
|
5424
5451
|
configurable: !0,
|
|
5425
5452
|
enumerable: !0,
|
|
5426
5453
|
get: function() {
|
|
5427
|
-
return this[
|
|
5454
|
+
return this[F].read(e);
|
|
5428
5455
|
},
|
|
5429
5456
|
set: function(t) {
|
|
5430
|
-
this[
|
|
5457
|
+
this[F].write(e, t);
|
|
5431
5458
|
}
|
|
5432
5459
|
});
|
|
5433
5460
|
}
|
|
5434
|
-
function
|
|
5435
|
-
return e[
|
|
5461
|
+
function Si(e) {
|
|
5462
|
+
return e[F] || (rn(e), e[F]);
|
|
5436
5463
|
}
|
|
5437
|
-
function
|
|
5438
|
-
return
|
|
5464
|
+
function Ci(e) {
|
|
5465
|
+
return bi[e] || (bi[e] = {
|
|
5439
5466
|
configurable: H.computedConfigurable,
|
|
5440
5467
|
enumerable: !1,
|
|
5441
5468
|
get: function() {
|
|
5442
|
-
return
|
|
5469
|
+
return Si(this).read(e);
|
|
5443
5470
|
},
|
|
5444
5471
|
set: function(t) {
|
|
5445
|
-
|
|
5472
|
+
Si(this).write(e, t);
|
|
5446
5473
|
}
|
|
5447
5474
|
});
|
|
5448
5475
|
}
|
|
5449
|
-
var
|
|
5450
|
-
function
|
|
5451
|
-
return
|
|
5476
|
+
var wi = N("ObservableObjectAdministration", _i);
|
|
5477
|
+
function Ti(e) {
|
|
5478
|
+
return Ot(e) ? (rn(e), wi(e[F])) : !1;
|
|
5452
5479
|
}
|
|
5453
|
-
function
|
|
5480
|
+
function Ei(e, t) {
|
|
5454
5481
|
if (typeof e == "object" && e) {
|
|
5455
|
-
if (
|
|
5456
|
-
if ($(e)) return e[
|
|
5482
|
+
if (ui(e)) return t !== void 0 && M(!1), e[F].atom;
|
|
5483
|
+
if ($(e)) return e[F];
|
|
5457
5484
|
if (Q(e)) {
|
|
5458
5485
|
var n = e;
|
|
5459
5486
|
if (t === void 0) return n._keysAtom;
|
|
5460
5487
|
var r = n._data.get(t) || n._hasMap.get(t);
|
|
5461
|
-
return r ||
|
|
5488
|
+
return r || M(!1), r;
|
|
5462
5489
|
}
|
|
5463
|
-
if (
|
|
5464
|
-
if (!t) return
|
|
5465
|
-
var r = e[
|
|
5466
|
-
return r ||
|
|
5490
|
+
if (rn(e), t && !e[F] && e[t], Ti(e)) {
|
|
5491
|
+
if (!t) return M(!1);
|
|
5492
|
+
var r = e[F].values.get(t);
|
|
5493
|
+
return r || M(!1), r;
|
|
5467
5494
|
}
|
|
5468
|
-
if (
|
|
5469
|
-
} else if (typeof e == "function" && hr(e[
|
|
5470
|
-
return
|
|
5495
|
+
if (Bt(e) || Jn(e) || hr(e)) return e;
|
|
5496
|
+
} else if (typeof e == "function" && hr(e[F])) return e[F];
|
|
5497
|
+
return M(!1);
|
|
5471
5498
|
}
|
|
5472
|
-
function
|
|
5473
|
-
if (e ||
|
|
5474
|
-
if (
|
|
5475
|
-
if (
|
|
5476
|
-
|
|
5499
|
+
function Di(e, t) {
|
|
5500
|
+
if (e || M("Expecting some object"), t !== void 0) return Di(Ei(e, t));
|
|
5501
|
+
if (Bt(e) || Jn(e) || hr(e) || Q(e) || $(e)) return e;
|
|
5502
|
+
if (rn(e), e[F]) return e[F];
|
|
5503
|
+
M(!1);
|
|
5477
5504
|
}
|
|
5478
|
-
function
|
|
5479
|
-
return (t === void 0 ?
|
|
5505
|
+
function Oi(e, t) {
|
|
5506
|
+
return (t === void 0 ? Ti(e) || Q(e) || $(e) ? Di(e) : Ei(e) : Ei(e, t)).name;
|
|
5480
5507
|
}
|
|
5481
|
-
var
|
|
5482
|
-
function
|
|
5483
|
-
return n === void 0 && (n = -1),
|
|
5508
|
+
var ki = Object.prototype.toString;
|
|
5509
|
+
function Ai(e, t, n) {
|
|
5510
|
+
return n === void 0 && (n = -1), ji(e, t, n);
|
|
5484
5511
|
}
|
|
5485
|
-
function
|
|
5512
|
+
function ji(e, t, n, r, i) {
|
|
5486
5513
|
if (e === t) return e !== 0 || 1 / e == 1 / t;
|
|
5487
5514
|
if (e == null || t == null) return !1;
|
|
5488
5515
|
if (e !== e) return t !== t;
|
|
5489
5516
|
var a = typeof e;
|
|
5490
5517
|
if (a !== "function" && a !== "object" && typeof t != "object") return !1;
|
|
5491
|
-
var o =
|
|
5492
|
-
if (o !==
|
|
5518
|
+
var o = ki.call(e);
|
|
5519
|
+
if (o !== ki.call(t)) return !1;
|
|
5493
5520
|
switch (o) {
|
|
5494
5521
|
case "[object RegExp]":
|
|
5495
5522
|
case "[object String]": return "" + e == "" + t;
|
|
@@ -5502,7 +5529,7 @@ function Oi(e, t, n, r, i) {
|
|
|
5502
5529
|
n >= 0 && n++;
|
|
5503
5530
|
break;
|
|
5504
5531
|
}
|
|
5505
|
-
e =
|
|
5532
|
+
e = Mi(e), t = Mi(t);
|
|
5506
5533
|
var s = o === "[object Array]";
|
|
5507
5534
|
if (!s) {
|
|
5508
5535
|
if (typeof e != "object" || typeof t != "object") return !1;
|
|
@@ -5514,24 +5541,24 @@ function Oi(e, t, n, r, i) {
|
|
|
5514
5541
|
for (var u = r.length; u--;) if (r[u] === e) return i[u] === t;
|
|
5515
5542
|
if (r.push(e), i.push(t), s) {
|
|
5516
5543
|
if (u = e.length, u !== t.length) return !1;
|
|
5517
|
-
for (; u--;) if (!
|
|
5544
|
+
for (; u--;) if (!ji(e[u], t[u], n - 1, r, i)) return !1;
|
|
5518
5545
|
} else {
|
|
5519
5546
|
var d = Object.keys(e), f = void 0;
|
|
5520
5547
|
if (u = d.length, Object.keys(t).length !== u) return !1;
|
|
5521
|
-
for (; u--;) if (f = d[u], !(
|
|
5548
|
+
for (; u--;) if (f = d[u], !(Ni(t, f) && ji(e[f], t[f], n - 1, r, i))) return !1;
|
|
5522
5549
|
}
|
|
5523
5550
|
return r.pop(), i.pop(), !0;
|
|
5524
5551
|
}
|
|
5525
|
-
function
|
|
5526
|
-
return
|
|
5552
|
+
function Mi(e) {
|
|
5553
|
+
return ui(e) ? e.slice() : Pt(e) || Q(e) || Ft(e) || $(e) ? Array.from(e.entries()) : e;
|
|
5527
5554
|
}
|
|
5528
|
-
function
|
|
5555
|
+
function Ni(e, t) {
|
|
5529
5556
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
5530
5557
|
}
|
|
5531
|
-
function
|
|
5532
|
-
return e[Symbol.iterator] =
|
|
5558
|
+
function Pi(e) {
|
|
5559
|
+
return e[Symbol.iterator] = Fi, e;
|
|
5533
5560
|
}
|
|
5534
|
-
function
|
|
5561
|
+
function Fi() {
|
|
5535
5562
|
return this;
|
|
5536
5563
|
}
|
|
5537
5564
|
if (typeof Proxy > "u" || typeof Symbol > "u") throw Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");
|
|
@@ -5540,19 +5567,19 @@ if (typeof Proxy > "u" || typeof Symbol > "u") throw Error("[mobx] MobX 5+ requi
|
|
|
5540
5567
|
e.name;
|
|
5541
5568
|
})(), typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ == "object" && __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({
|
|
5542
5569
|
spy: _r,
|
|
5543
|
-
extras: { getDebugName:
|
|
5544
|
-
$mobx:
|
|
5570
|
+
extras: { getDebugName: Oi },
|
|
5571
|
+
$mobx: F
|
|
5545
5572
|
});
|
|
5546
5573
|
//#endregion
|
|
5547
5574
|
//#region src/utils/localStorage.ts
|
|
5548
|
-
function
|
|
5575
|
+
function Ii() {
|
|
5549
5576
|
try {
|
|
5550
5577
|
return localStorage.setItem("test", "test"), localStorage.removeItem("test"), !0;
|
|
5551
5578
|
} catch {
|
|
5552
5579
|
return !1;
|
|
5553
5580
|
}
|
|
5554
5581
|
}
|
|
5555
|
-
var
|
|
5582
|
+
var Li = Ii(), Ri = {
|
|
5556
5583
|
de: "Deutsch",
|
|
5557
5584
|
en: "English",
|
|
5558
5585
|
es: "Español",
|
|
@@ -5574,40 +5601,40 @@ var Pi = Ni(), Fi = {
|
|
|
5574
5601
|
pl: "Polski",
|
|
5575
5602
|
mn: "Монгол",
|
|
5576
5603
|
da: "Dansk"
|
|
5577
|
-
},
|
|
5578
|
-
if (!
|
|
5579
|
-
let e = localStorage.getItem(
|
|
5580
|
-
return t && localStorage.removeItem(
|
|
5581
|
-
},
|
|
5604
|
+
}, zi = "en", Bi = "efp-locale", Vi = "language", Hi = L.box(zi), Ui = L.array([], { deep: !1 }), Wi = (e) => Oe(`${me}locales/${e}.json`), Gi = () => {
|
|
5605
|
+
if (!Li) return null;
|
|
5606
|
+
let e = localStorage.getItem(Bi), t = localStorage.getItem(Vi);
|
|
5607
|
+
return t && localStorage.removeItem(Vi), e || (t && localStorage.setItem(Bi, t), t);
|
|
5608
|
+
}, Ki = () => {
|
|
5582
5609
|
var e;
|
|
5583
|
-
let t = window.__data, n = ((e = navigator.languages) == null ? void 0 : e[0]) || navigator.language, r = Object.keys(
|
|
5584
|
-
return (
|
|
5585
|
-
},
|
|
5586
|
-
|
|
5610
|
+
let t = window.__data, n = ((e = navigator.languages) == null ? void 0 : e[0]) || navigator.language, r = Object.keys(Ri).find((e) => n.startsWith(e));
|
|
5611
|
+
return (Gi() || (t == null ? void 0 : t.locale) || r || zi).toLowerCase();
|
|
5612
|
+
}, qi = () => Hi.get(), Ji = () => Ui, Yi = (e) => Ui.some((t) => t.id === e), Xi = (e, t) => (Hi.get(), bt.t(e, t)), Zi = async () => {
|
|
5613
|
+
Ui.replace(Object.entries(Ri).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => ({
|
|
5587
5614
|
id: e,
|
|
5588
5615
|
name: t,
|
|
5589
5616
|
entity: { type: te }
|
|
5590
5617
|
})));
|
|
5591
|
-
let e =
|
|
5592
|
-
if (e !==
|
|
5593
|
-
t[e] = { translation: await
|
|
5618
|
+
let e = Ki(), t = {};
|
|
5619
|
+
if (e !== zi) try {
|
|
5620
|
+
t[e] = { translation: await Wi(e) };
|
|
5594
5621
|
} catch (t) {
|
|
5595
|
-
console.error(`Unable to load "${e}" localization, falling back to "${
|
|
5622
|
+
console.error(`Unable to load "${e}" localization, falling back to "${zi}".`, t), e = zi;
|
|
5596
5623
|
}
|
|
5597
|
-
return
|
|
5624
|
+
return Hi.set(e), bt.init({
|
|
5598
5625
|
resources: t,
|
|
5599
5626
|
lng: e,
|
|
5600
5627
|
keySeparator: !1,
|
|
5601
|
-
saveMissing: e !==
|
|
5628
|
+
saveMissing: e !== zi,
|
|
5602
5629
|
missingKeyHandler: (e, t, n, r) => console.debug(`i18n missing key: '${e[0]}:${t}:${n}', fallback: '${r}'`)
|
|
5603
5630
|
});
|
|
5604
|
-
},
|
|
5631
|
+
}, Qi = async (e) => {
|
|
5605
5632
|
let t = e.toLowerCase();
|
|
5606
5633
|
try {
|
|
5607
|
-
t !==
|
|
5634
|
+
t !== zi && !bt.hasResourceBundle(t, "translation") && bt.addResourceBundle(t, "translation", await Wi(t), !0, !0), await bt.changeLanguage(t), Hi.set(t), Li && localStorage.setItem(Bi, t);
|
|
5608
5635
|
} catch (e) {
|
|
5609
5636
|
console.error(`Failed to switch language to "${t}":`, e);
|
|
5610
5637
|
}
|
|
5611
|
-
},
|
|
5638
|
+
}, $i = async () => (Li && (localStorage.removeItem(Bi), localStorage.removeItem(Vi)), Qi(Ki()));
|
|
5612
5639
|
//#endregion
|
|
5613
|
-
export {
|
|
5640
|
+
export { c as $, ve as A, le as B, He as C, je as D, Ne as E, h as F, S as G, ce as H, g as I, x as J, m as K, ae as L, d as M, _ as N, Ae as O, ee as P, u as Q, oe as R, Xr as S, ke as T, f as U, se as V, te as W, v as X, b as Y, y as Z, Or as _, $i as a, de as at, qr as b, Li as c, o as ct, Tr as d, l as et, Kt as f, L as g, Lr as h, Zi as i, ie as it, me as j, ye as k, ur as l, Nr as m, Ji as n, ne as nt, Qi as o, fe as ot, wn as p, ue as q, Yi as r, re as rt, Xi as s, s as st, qi as t, p as tt, Sr as u, Cr as v, ze as w, K as x, _r as y, C as z };
|