@expofp/floorplan 3.11.12 → 3.12.1
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/{Button-CdChKHNd.js → Button-CxYYwdV3.js} +6 -6
- package/dist/browser/CookieConsent-Cltod-AQ.js +38 -0
- package/dist/browser/{Debug-BQJRkSVw.js → Debug-DnZLaoNY.js} +14 -14
- package/dist/browser/{Demo-Dh5hQ00u.js → Demo-CbuT3wW6.js} +14 -14
- package/dist/browser/{Free-Be0wdt8h.js → Free-CVEJPdaI.js} +16 -16
- package/dist/browser/{Gallery-DsC-3InH.js → Gallery-D2dTKIqn.js} +24 -24
- package/dist/browser/{GpsLoader-l-DhiN5_.js → GpsLoader-Bpn0jys4.js} +51 -50
- package/dist/browser/{KioskStore-hBGigttj.js → KioskStore-Bf3tKr77.js} +31 -31
- package/dist/browser/{MaplibreAdapter-B2PgQxAb.js → MaplibreAdapter-D6Fqdelu.js} +2360 -2331
- package/dist/browser/{ModalContainer-DngQzOVE.js → ModalContainer-C7E4QKwY.js} +13 -13
- package/dist/browser/{PermissionNotice-Bstp1Ig2.js → PermissionNotice-CTckXfzd.js} +7 -7
- package/dist/browser/{SetKioskMode-BXTIENxU.js → SetKioskMode-BPvChiTX.js} +9 -9
- package/dist/browser/ShowKiosk-97iuNiDq.js +33 -0
- package/dist/browser/{TouchHand-CZ4-CE4e.js → TouchHand-BEPM0Ix6.js} +5 -5
- package/dist/browser/{ViewerMenuPanel-Dc7XYnXW.js → ViewerMenuPanel-CTDMmojE.js} +25 -25
- package/dist/browser/{add-debug-secret-listener-DOVFjqJo.js → add-debug-secret-listener-rtzwkssg.js} +1 -1
- package/dist/browser/{boolean-editor-B-S4WhPP.js → boolean-editor-Buj1Gh2Q.js} +10 -10
- package/dist/browser/{bootIntercom-D41iCVYM.js → bootIntercom-CLXK1aCU.js} +3 -3
- package/dist/browser/{booth-by-xy-S_lLb4ur.js → booth-by-xy-DYsVPBrO.js} +292 -295
- package/dist/browser/bundle.json +78 -63
- package/dist/browser/{classnames-BeH2kA4o.js → classnames-C7JqIDkz.js} +2 -2
- package/dist/browser/{client-Be_UxAZT.js → client-DRCaFfyq.js} +5 -5
- package/dist/browser/{components-RZNETvKi.js → components-CoSFc4pe.js} +1369 -1316
- package/dist/browser/{debug-overlay-DjwfpG69.js → debug-overlay-l2O5ATYR.js} +415 -415
- package/dist/browser/{debug-ui-D_afzMrh.js → debug-ui-fkLeLMTN.js} +7 -7
- package/dist/browser/{dist-B-m8ZFBo.js → dist-B8Jegpa2.js} +4 -4
- package/dist/browser/{dist-CZz9piI4.js → dist-Br0u22MB.js} +6 -6
- package/dist/browser/{dist-DKu24Nie.js → dist-DQ04vk8X.js} +7 -7
- package/dist/browser/{browser-pQxW93uF.js → efp-debug-init-DolwvXvu.js} +61 -14
- package/dist/browser/enum-editor-BRlr42ZG.js +34 -0
- package/dist/browser/{es5-DPnfG3EX.js → es5-hugWWUki.js} +2 -2
- package/dist/browser/{event-not-found-CE2zhFPJ.js → event-not-found-DrCgFYgQ.js} +1 -1
- package/dist/browser/{exports-BtXbxSeU.js → exports-DY1Pe4xZ.js} +1 -1
- package/dist/browser/{favicon-B7xwIKyS.js → favicon-v6HqMJRd.js} +1 -1
- package/dist/browser/{fetch-retry.umd-BiAebF_i.js → fetch-retry.umd-CtpzesBT.js} +2 -2
- package/dist/browser/{flex-DGirEfRz.js → flex-5lvsJlaO.js} +6 -6
- package/dist/browser/{floorplan.loader-DSx2rwZS.js → floorplan.loader-D4AZdgsy.js} +890 -902
- package/dist/browser/floorplan.ready-BnsAv7j1.js +1326 -0
- package/dist/browser/{fuse-BuZwVNBr.js → fuse-BWnB1Pgo.js} +2 -2
- package/dist/browser/i18n-wZml67KB.js +8659 -0
- package/dist/browser/index.js +49 -117
- package/dist/browser/{index.module-BktNOlw2.js → index.module-GNnIO9vr.js} +23 -23
- package/dist/browser/integrateKiosk-uxqH2FgD.js +28 -0
- package/dist/browser/{is-webview-DxtfBbGj.js → is-webview-BlxQlyaS.js} +1 -1
- package/dist/browser/{jsx-runtime-DftMjMlZ.js → jsx-runtime-xVcN9g8F.js} +2 -2
- package/dist/browser/{lib-_QD5dt19.js → lib-CIYjsvFB.js} +5 -5
- package/dist/browser/loadImage-DZxHBSrL.js +58 -0
- package/dist/browser/{logDeviceInfo-CiCKGxKy.js → logDeviceInfo-BQn3HG5l.js} +9 -9
- package/dist/browser/{main-C6h73Uc5.js → main-DKRaY1QU.js} +1 -1
- package/dist/browser/mobx-rpWRRJB9.js +24 -0
- package/dist/browser/optional-boolean-editor-fWgfIGvs.js +20 -0
- package/dist/browser/optional-enum-editor-CQ8-ut60.js +34 -0
- package/dist/browser/optional-string-editor-BP4b7LsR.js +30 -0
- package/dist/browser/{particles.min-CiLQfUCo.js → particles.min-D-VdW4Qr.js} +2 -2
- package/dist/browser/{prop-types-8E5fCOgQ.js → prop-types-CE7JeEE-.js} +2 -2
- package/dist/browser/{react-B9lmaQYI.js → react-DxSEhu-j.js} +2 -2
- package/dist/browser/{react-dom-CPWfZdj5.js → react-dom-CqQZIZ5q.js} +4 -4
- package/dist/browser/reset-all-settings--GzHxj4F.js +190 -0
- package/dist/browser/{rolldown-runtime-CJax_ib9.js → rolldown-runtime-Ik1ocWLm.js} +1 -1
- package/dist/browser/{enum-editor-BtYkUhft.js → select-DQmL3TsB.js} +261 -283
- package/dist/browser/{settings-BufKqYwI.js → settings-BndqjdZx.js} +3 -3
- package/dist/browser/{settings-item-D3AzjjoO.js → settings-item-5zzAH3FT.js} +7 -7
- package/dist/browser/{store-DGdGzsa_.js → store-CgXKlx2n.js} +7328 -7646
- package/dist/browser/string-editor-Bxbp0JHl.js +30 -0
- package/dist/browser/text-field-ySWl7XqC.js +88 -0
- package/dist/browser/{theme-DvIMSzdB.js → theme-ByGstXaJ.js} +9 -9
- package/dist/browser/ui-LJGsaayP.js +43 -0
- package/dist/browser/{useRenderTarget-hqd7cVeW.js → useRenderTarget-DaUlOis9.js} +5 -5
- package/dist/esm/components/Booth/Booth.js +1 -1
- package/dist/esm/components/EntityListRow.js +1 -1
- package/dist/esm/components/Exhibitor.js +1 -1
- package/dist/esm/components/Kiosk/ShowKiosk.js +1 -1
- package/dist/esm/components/LanguageRowContainer.d.ts +1 -0
- package/dist/esm/components/Layout.d.ts +2 -1
- package/dist/esm/components/Layout.js +1 -1
- package/dist/esm/components/LogoOverlay.js +1 -1
- package/dist/esm/components/Map/Map.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-bg.d.ts +1 -1
- package/dist/esm/components/Map/drawing/config/config-booth-badge.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-booth-bg.d.ts +1 -1
- package/dist/esm/components/Map/drawing/config/config-booth-bg.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-booth-bookmark.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-booth-labels-special.js +2 -2
- package/dist/esm/components/Map/drawing/config/config-booth-labels.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-load-layer.js +1 -1
- package/dist/esm/components/Map/drawing/config/loadBoothsImages.js +1 -1
- package/dist/esm/components/Maplibre/MaplibreAdapter.js +1 -1
- package/dist/esm/components/Maplibre/MaplibreWrapper.js +1 -1
- package/dist/esm/components/Maplibre/utils/resolve-map-style.d.ts +15 -0
- package/dist/esm/components/Maplibre/utils/resolve-map-style.js +1 -0
- package/dist/esm/components/Menu.d.ts +3 -2
- package/dist/esm/components/Menu.js +1 -1
- package/dist/esm/components/OverlayContainer.d.ts +2 -1
- package/dist/esm/components/OverlayContainer.js +1 -1
- package/dist/esm/components/Ws.js +1 -1
- package/dist/esm/constants.d.ts +7 -13
- package/dist/esm/constants.js +1 -1
- package/dist/esm/data/fp-payloads.d.ts +27 -0
- package/dist/esm/data/fp-payloads.js +1 -0
- package/dist/esm/data/fpGeo.js +1 -1
- package/dist/esm/data/index.d.ts +8 -2
- package/dist/esm/data/index.js +1 -1
- package/dist/esm/data/svg.d.ts +4 -1
- package/dist/esm/data/svg.js +1 -1
- package/dist/esm/floorplan.loader.d.ts +13 -4
- package/dist/esm/floorplan.loader.js +1 -1
- package/dist/esm/floorplan.ready.d.ts +8 -0
- package/dist/esm/floorplan.ready.js +1 -1
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/intercom/shouldLoad.d.ts +2 -2
- package/dist/esm/intercom/shouldLoad.js +1 -1
- package/dist/esm/load-dev.d.ts +44 -0
- package/dist/esm/load-dev.js +1 -0
- package/dist/esm/load.d.ts +3 -3
- package/dist/esm/load.js +3 -3
- package/dist/esm/renderer/engine-core/fonts.js +1 -1
- package/dist/esm/services/URLFilterManager.d.ts +15 -0
- package/dist/esm/services/URLFilterManager.js +1 -1
- package/dist/esm/services/multi-slug.d.ts +20 -0
- package/dist/esm/services/multi-slug.js +1 -0
- package/dist/esm/services/url-dispatch.d.ts +24 -0
- package/dist/esm/services/url-dispatch.js +1 -0
- package/dist/esm/services/url-sync.d.ts +36 -0
- package/dist/esm/services/url-sync.js +1 -0
- package/dist/esm/store/BoothStore.d.ts +2 -1
- package/dist/esm/store/ExhibitorStore.d.ts +3 -2
- package/dist/esm/store/ExhibitorStore.js +1 -1
- package/dist/esm/store/LayerStore.js +1 -1
- package/dist/esm/store/MaplibreStore.js +1 -1
- package/dist/esm/store/PoiTypeStore.d.ts +1 -1
- package/dist/esm/store/SearchStore.js +1 -1
- package/dist/esm/store/UIState.d.ts +1 -5
- package/dist/esm/store/UIState.js +1 -1
- package/dist/esm/store/init/init-bookmarks.d.ts +2 -0
- package/dist/esm/store/init/init-booths.js +1 -1
- package/dist/esm/store/init/init-categories.js +1 -1
- package/dist/esm/store/init/init-events.js +1 -1
- package/dist/esm/store/init/init-exhibitors.js +1 -1
- package/dist/esm/store/init/init-layers.js +1 -1
- package/dist/esm/store/types.d.ts +2 -1
- package/dist/esm/tools/event-not-found.d.ts +4 -3
- package/dist/esm/tools/gtag.d.ts +3 -2
- package/dist/esm/tools/gtag.js +1 -1
- package/dist/esm/tools/handleDebugMode.d.ts +17 -0
- package/dist/esm/tools/handleDebugMode.js +1 -1
- package/dist/esm/tools/loaders.d.ts +0 -2
- package/dist/esm/tools/loaders.js +1 -1
- package/dist/esm/tools/rebookingUrl.js +1 -1
- package/dist/esm/tools/reset.js +1 -1
- package/dist/esm/tools/settings.js +1 -1
- package/dist/esm/tools/track-event.js +1 -1
- package/dist/esm/types/drawing.types.d.ts +18 -0
- package/dist/esm/types.d.ts +52 -38
- package/dist/esm/utils/areLayersEnabled.js +1 -1
- package/dist/esm/utils/camera-map-settings.d.ts +20 -0
- package/dist/esm/utils/camera-map-settings.js +1 -0
- package/dist/esm/utils/customCommands.js +1 -1
- package/dist/esm/utils/getLogoUrl.d.ts +8 -1
- package/dist/esm/utils/getLogoUrl.js +1 -1
- package/dist/esm/utils/heatmap-enabled.d.ts +13 -0
- package/dist/esm/utils/heatmap-enabled.js +1 -0
- package/dist/esm/utils/i18n.js +1 -1
- package/dist/esm/utils/imageloader.js +1 -1
- package/dist/esm/utils/is-debug.d.ts +0 -8
- package/dist/esm/utils/is-debug.js +1 -1
- package/dist/esm/utils/legacy-storage-keys.d.ts +16 -0
- package/dist/esm/utils/legacy-storage-keys.js +1 -0
- package/dist/esm/utils/loadCustomCss.d.ts +2 -2
- package/dist/esm/utils/mapEntity.d.ts +1 -0
- package/dist/esm/utils/preview-exhibitor.d.ts +1 -1
- package/dist/esm/wayfinding/adapters/graphDataSource.d.ts +1 -1
- package/dist/esm/wayfinding/adapters/graphDataSource.js +1 -1
- package/package.json +8 -5
- package/dist/browser/CookieConsent-DmWcbyRQ.js +0 -38
- package/dist/browser/ShowKiosk-CpIQKRDF.js +0 -28
- package/dist/browser/efp-debug-init-B-EZE_S2.js +0 -42
- package/dist/browser/floorplan.ready-CX4L0Qyc.js +0 -1406
- package/dist/browser/i18n-BqlnpLSm.js +0 -3942
- package/dist/browser/loadImage-CvnSDOL0.js +0 -121
- package/dist/browser/mobx-71cpvuRe.js +0 -24
- package/dist/browser/reset-all-settings-CAVnp-HU.js +0 -141
- package/dist/browser/string-editor-BEBEF1X7.js +0 -108
- package/dist/browser/ui-DIQ3vheI.js +0 -43
- package/dist/esm/_NEW_types.d.ts +0 -6
- package/dist/esm/_NEW_types.js +0 -1
- package/dist/esm/_misc_to_move/manifest.d.ts +0 -14
- package/dist/esm/_misc_to_move/ref.d.ts +0 -6
- package/dist/esm/_misc_to_move/ref.js +0 -1
- package/dist/esm/data/Flags.d.ts +0 -23
- package/dist/esm/data/Flags.js +0 -1
- package/dist/esm/data/validate-data.d.ts +0 -3
- package/dist/esm/data/validate-data.js +0 -1
- package/dist/esm/services/routing.d.ts +0 -7
- package/dist/esm/services/routing.js +0 -1
- package/dist/esm/utils/mergeExhibitors.d.ts +0 -3
- package/dist/esm/utils/mergeExhibitors.js +0 -1
- /package/dist/esm/{_misc_to_move/manifest.js → types/drawing.types.js} +0 -0
|
@@ -1,3942 +0,0 @@
|
|
|
1
|
-
(function() {
|
|
2
|
-
try {
|
|
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.11.12" };
|
|
5
|
-
var t = new e.Error().stack;
|
|
6
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "5e5292c9-cc0b-4bb4-bfb4-17c709828a18", e._sentryDebugIdIdentifier = "sentry-dbid-5e5292c9-cc0b-4bb4-bfb4-17c709828a18");
|
|
7
|
-
} catch {}
|
|
8
|
-
})();
|
|
9
|
-
import { r as e, t } from "./rolldown-runtime-CJax_ib9.js";
|
|
10
|
-
import { t as n } from "./browser-pQxW93uF.js";
|
|
11
|
-
import { t as r } from "./es5-DPnfG3EX.js";
|
|
12
|
-
//#region src/tools/logger.ts
|
|
13
|
-
var i = /* @__PURE__ */ e(n(), 1), a = class {
|
|
14
|
-
constructor() {
|
|
15
|
-
this.messages = [];
|
|
16
|
-
}
|
|
17
|
-
log(...e) {
|
|
18
|
-
this.push("DEBUG", e), (0, i.default)("efp:floorplan:debug")(...e);
|
|
19
|
-
}
|
|
20
|
-
error(...e) {
|
|
21
|
-
this.push("ERROR", e), o(console.error, e);
|
|
22
|
-
}
|
|
23
|
-
warn(...e) {
|
|
24
|
-
this.push("WARN", e), o(console.warn, e);
|
|
25
|
-
}
|
|
26
|
-
info(...e) {
|
|
27
|
-
this.push("INFO", e), (0, i.default)("efp:floorplan:info")(...e);
|
|
28
|
-
}
|
|
29
|
-
push(e, t) {
|
|
30
|
-
let n = t.map((e) => {
|
|
31
|
-
if (typeof e == "object") try {
|
|
32
|
-
return JSON.stringify(e);
|
|
33
|
-
} catch (e) {
|
|
34
|
-
return e.message;
|
|
35
|
-
}
|
|
36
|
-
return e;
|
|
37
|
-
}), r = e + " " + (/* @__PURE__ */ new Date()).toISOString() + " " + n.join("; ");
|
|
38
|
-
this.messages.push(r);
|
|
39
|
-
let i = 1e3;
|
|
40
|
-
this.messages.length > i && this.messages.splice(0, i / 2);
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
function o(e, t) {
|
|
44
|
-
try {
|
|
45
|
-
e.apply(e, t);
|
|
46
|
-
} catch {}
|
|
47
|
-
}
|
|
48
|
-
var s = new a(), c = "___visibility", l = "previewMode", u = "___preview_mode", d = "data-preview-mode", f = "booths", p = "kiosk", m = "setkiosk", h = "expofp-map-settings", g = "debug", _ = "efp:debug", v = "build-route", y = "planner", b = "source", x = "from", ee = "pathway", S = 1e3, te = "lang", ne = "language", re = "uiscale", ie = "resetuiscale", ae = "___ui-scale", oe = "--expofp-font-face", se = "--expofp-booth-main-weight", C = "--expofp-booth-details-weight", ce = "--expofp-exhibitor-main-weight", le = "--expofp-exhibitor-details-weight", ue = "--expofp-booth-special-weight", de = "efp-compass-permission-granted", fe = "viewermode", pe = "___viewer_mode", me = new URL(
|
|
49
|
-
/* @vite-ignore */
|
|
50
|
-
".",
|
|
51
|
-
import.meta.url
|
|
52
|
-
).href;
|
|
53
|
-
me.endsWith("/") || (me += "/");
|
|
54
|
-
var he = me, ge = /* @__PURE__ */ t(((e, t) => {
|
|
55
|
-
(function() {
|
|
56
|
-
function e(e, t) {
|
|
57
|
-
document.addEventListener ? e.addEventListener("scroll", t, !1) : e.attachEvent("scroll", t);
|
|
58
|
-
}
|
|
59
|
-
function n(e) {
|
|
60
|
-
document.body ? e() : document.addEventListener ? document.addEventListener("DOMContentLoaded", function t() {
|
|
61
|
-
document.removeEventListener("DOMContentLoaded", t), e();
|
|
62
|
-
}) : document.attachEvent("onreadystatechange", function t() {
|
|
63
|
-
(document.readyState == "interactive" || document.readyState == "complete") && (document.detachEvent("onreadystatechange", t), e());
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
function r(e) {
|
|
67
|
-
this.g = document.createElement("div"), this.g.setAttribute("aria-hidden", "true"), this.g.appendChild(document.createTextNode(e)), this.h = document.createElement("span"), this.i = document.createElement("span"), this.m = document.createElement("span"), this.j = document.createElement("span"), this.l = -1, this.h.style.cssText = "max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;", this.i.style.cssText = "max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;", this.j.style.cssText = "max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;", this.m.style.cssText = "display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;", this.h.appendChild(this.m), this.i.appendChild(this.j), this.g.appendChild(this.h), this.g.appendChild(this.i);
|
|
68
|
-
}
|
|
69
|
-
function i(e, t) {
|
|
70
|
-
e.g.style.cssText = "max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:" + t + ";";
|
|
71
|
-
}
|
|
72
|
-
function a(e) {
|
|
73
|
-
var t = e.g.offsetWidth, n = t + 100;
|
|
74
|
-
return e.j.style.width = n + "px", e.i.scrollLeft = n, e.h.scrollLeft = e.h.scrollWidth + 100, e.l === t ? !1 : (e.l = t, !0);
|
|
75
|
-
}
|
|
76
|
-
function o(t, n) {
|
|
77
|
-
function r() {
|
|
78
|
-
var e = i;
|
|
79
|
-
a(e) && e.g.parentNode !== null && n(e.l);
|
|
80
|
-
}
|
|
81
|
-
var i = t;
|
|
82
|
-
e(t.h, r), e(t.i, r), a(t);
|
|
83
|
-
}
|
|
84
|
-
function s(e, t, n) {
|
|
85
|
-
t = t || {}, n = n || window, this.family = e, this.style = t.style || "normal", this.weight = t.weight || "normal", this.stretch = t.stretch || "normal", this.context = n;
|
|
86
|
-
}
|
|
87
|
-
var c = null, l = null, u = null, d = null;
|
|
88
|
-
function f(e) {
|
|
89
|
-
return l === null && (p(e) && /Apple/.test(window.navigator.vendor) ? (e = /AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(window.navigator.userAgent), l = !!e && 603 > parseInt(e[1], 10)) : l = !1), l;
|
|
90
|
-
}
|
|
91
|
-
function p(e) {
|
|
92
|
-
return d === null && (d = !!e.document.fonts), d;
|
|
93
|
-
}
|
|
94
|
-
function m(e, t) {
|
|
95
|
-
var n = e.style, r = e.weight;
|
|
96
|
-
if (u === null) {
|
|
97
|
-
var i = document.createElement("div");
|
|
98
|
-
try {
|
|
99
|
-
i.style.font = "condensed 100px sans-serif";
|
|
100
|
-
} catch {}
|
|
101
|
-
u = i.style.font !== "";
|
|
102
|
-
}
|
|
103
|
-
return [
|
|
104
|
-
n,
|
|
105
|
-
r,
|
|
106
|
-
u ? e.stretch : "",
|
|
107
|
-
"100px",
|
|
108
|
-
t
|
|
109
|
-
].join(" ");
|
|
110
|
-
}
|
|
111
|
-
s.prototype.load = function(e, t) {
|
|
112
|
-
var a = this, s = e || "BESbswy", l = 0, u = t || 3e3, d = (/* @__PURE__ */ new Date()).getTime();
|
|
113
|
-
return new Promise(function(e, t) {
|
|
114
|
-
if (p(a.context) && !f(a.context)) {
|
|
115
|
-
var h = new Promise(function(e, t) {
|
|
116
|
-
function n() {
|
|
117
|
-
(/* @__PURE__ */ new Date()).getTime() - d >= u ? t(Error("" + u + "ms timeout exceeded")) : a.context.document.fonts.load(m(a, "\"" + a.family + "\""), s).then(function(t) {
|
|
118
|
-
1 <= t.length ? e() : setTimeout(n, 25);
|
|
119
|
-
}, t);
|
|
120
|
-
}
|
|
121
|
-
n();
|
|
122
|
-
}), g = new Promise(function(e, t) {
|
|
123
|
-
l = setTimeout(function() {
|
|
124
|
-
t(Error("" + u + "ms timeout exceeded"));
|
|
125
|
-
}, u);
|
|
126
|
-
});
|
|
127
|
-
Promise.race([g, h]).then(function() {
|
|
128
|
-
clearTimeout(l), e(a);
|
|
129
|
-
}, t);
|
|
130
|
-
} else n(function() {
|
|
131
|
-
function n() {
|
|
132
|
-
var t;
|
|
133
|
-
(t = _ != -1 && v != -1 || _ != -1 && y != -1 || v != -1 && y != -1) && ((t = _ != v && _ != y && v != y) || (c === null && (t = /AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent), c = !!t && (536 > parseInt(t[1], 10) || parseInt(t[1], 10) === 536 && 11 >= parseInt(t[2], 10))), t = c && (_ == b && v == b && y == b || _ == x && v == x && y == x || _ == ee && v == ee && y == ee)), t = !t), t && (S.parentNode !== null && S.parentNode.removeChild(S), clearTimeout(l), e(a));
|
|
134
|
-
}
|
|
135
|
-
function f() {
|
|
136
|
-
if ((/* @__PURE__ */ new Date()).getTime() - d >= u) S.parentNode !== null && S.parentNode.removeChild(S), t(Error("" + u + "ms timeout exceeded"));
|
|
137
|
-
else {
|
|
138
|
-
var e = a.context.document.hidden;
|
|
139
|
-
(!0 === e || e === void 0) && (_ = p.g.offsetWidth, v = h.g.offsetWidth, y = g.g.offsetWidth, n()), l = setTimeout(f, 50);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
var p = new r(s), h = new r(s), g = new r(s), _ = -1, v = -1, y = -1, b = -1, x = -1, ee = -1, S = document.createElement("div");
|
|
143
|
-
S.dir = "ltr", i(p, m(a, "sans-serif")), i(h, m(a, "serif")), i(g, m(a, "monospace")), S.appendChild(p.g), S.appendChild(h.g), S.appendChild(g.g), a.context.document.body.appendChild(S), b = p.g.offsetWidth, x = h.g.offsetWidth, ee = g.g.offsetWidth, f(), o(p, function(e) {
|
|
144
|
-
_ = e, n();
|
|
145
|
-
}), i(p, m(a, "\"" + a.family + "\",sans-serif")), o(h, function(e) {
|
|
146
|
-
v = e, n();
|
|
147
|
-
}), i(h, m(a, "\"" + a.family + "\",serif")), o(g, function(e) {
|
|
148
|
-
y = e, n();
|
|
149
|
-
}), i(g, m(a, "\"" + a.family + "\",monospace"));
|
|
150
|
-
});
|
|
151
|
-
});
|
|
152
|
-
}, typeof t == "object" ? t.exports = s : (window.FontFaceObserver = s, window.FontFaceObserver.prototype.load = s.prototype.load);
|
|
153
|
-
})();
|
|
154
|
-
})), _e = { randomUUID: typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto) }, ve, ye = /* @__PURE__ */ new Uint8Array(16);
|
|
155
|
-
function be() {
|
|
156
|
-
if (!ve && (ve = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !ve)) throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
157
|
-
return ve(ye);
|
|
158
|
-
}
|
|
159
|
-
//#endregion
|
|
160
|
-
//#region ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/stringify.js
|
|
161
|
-
var w = [];
|
|
162
|
-
for (let e = 0; e < 256; ++e) w.push((e + 256).toString(16).slice(1));
|
|
163
|
-
function xe(e, t = 0) {
|
|
164
|
-
return w[e[t + 0]] + w[e[t + 1]] + w[e[t + 2]] + w[e[t + 3]] + "-" + w[e[t + 4]] + w[e[t + 5]] + "-" + w[e[t + 6]] + w[e[t + 7]] + "-" + w[e[t + 8]] + w[e[t + 9]] + "-" + w[e[t + 10]] + w[e[t + 11]] + w[e[t + 12]] + w[e[t + 13]] + w[e[t + 14]] + w[e[t + 15]];
|
|
165
|
-
}
|
|
166
|
-
//#endregion
|
|
167
|
-
//#region ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/v4.js
|
|
168
|
-
function Se(e, t, n) {
|
|
169
|
-
if (_e.randomUUID && !t && !e) return _e.randomUUID();
|
|
170
|
-
e = e || {};
|
|
171
|
-
let r = e.random || (e.rng || be)();
|
|
172
|
-
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
|
|
173
|
-
n = n || 0;
|
|
174
|
-
for (let e = 0; e < 16; ++e) t[n + e] = r[e];
|
|
175
|
-
return t;
|
|
176
|
-
}
|
|
177
|
-
return xe(r);
|
|
178
|
-
}
|
|
179
|
-
//#endregion
|
|
180
|
-
//#region src/utils/browser.ts
|
|
181
|
-
var Ce = /* @__PURE__ */ e(ge(), 1), we = /* @__PURE__ */ e(r(), 1), Te = window.navigator.userAgent, Ee = we.default.getParser(Te), De = document.referrer && (document.referrer.indexOf("app.expofp.com") > -1 || document.referrer.indexOf("app-show.expofp.com") > -1);
|
|
182
|
-
//#endregion
|
|
183
|
-
//#region src/tools/loaders.ts
|
|
184
|
-
async function Oe(e) {
|
|
185
|
-
return await (await fetch(e, { credentials: "same-origin" })).json();
|
|
186
|
-
}
|
|
187
|
-
function ke(e, t) {
|
|
188
|
-
let n = document.createElement("link");
|
|
189
|
-
n.rel = "stylesheet", n.href = e, n.setAttribute("fetchpriority", "high"), t.appendChild(n);
|
|
190
|
-
}
|
|
191
|
-
async function Ae(e) {
|
|
192
|
-
return e = De && e.indexOf("?") === -1 ? `${e}?v=${(/* @__PURE__ */ new Date()).getMilliseconds()}` : e, new Promise(function(t, n) {
|
|
193
|
-
let r = document.createElement("script");
|
|
194
|
-
r.src = Pe(e), r.setAttribute("fetchpriority", "high"), r.onload = t, r.onerror = t, s.log("Injecting script:", r.src), document.head.appendChild(r);
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
async function je(e, t, n) {
|
|
198
|
-
var r;
|
|
199
|
-
n = {
|
|
200
|
-
style: "normal",
|
|
201
|
-
weight: "normal",
|
|
202
|
-
...n || {}
|
|
203
|
-
};
|
|
204
|
-
let i = `url("${t}")`;
|
|
205
|
-
if (!window.FontFace) return e.startsWith("Font Awesome") || Me(e, i, n), Promise.resolve();
|
|
206
|
-
e.indexOf(" ") !== -1 && ((r = Ee.getEngine()) == null ? void 0 : r.name) === "Gecko" && (e = `'${e}'`);
|
|
207
|
-
let a;
|
|
208
|
-
try {
|
|
209
|
-
a = new FontFace(e, i, n);
|
|
210
|
-
} catch {
|
|
211
|
-
a = new FontFace(`'${e}'`, i, n);
|
|
212
|
-
}
|
|
213
|
-
return document.fonts.add(a), a.load();
|
|
214
|
-
}
|
|
215
|
-
function Me(e, t, n) {
|
|
216
|
-
let r = document.createElement("style");
|
|
217
|
-
r.appendChild(document.createTextNode(`@font-face { font-family: ${e}; font-weight: ${n.weight}; font-style: ${n.style}; src: ${t} format('woff2'); font-display: swap; }`)), document.head.appendChild(r);
|
|
218
|
-
let i = document.createElement("div");
|
|
219
|
-
i.setAttribute("style", `font-family: oswald; font-weight: ${n.weight}; position: fixed; left: -1000px; top: 0; visibility: hidden`), i.innerHTML = "Oswald", document.body.appendChild(i);
|
|
220
|
-
}
|
|
221
|
-
async function Ne(e) {
|
|
222
|
-
var t;
|
|
223
|
-
let n = getComputedStyle(document.documentElement).getPropertyValue("--expofp-font-face") || ((t = e.match(/--expofp-font-face:\s*([^;]*)/)) == null ? void 0 : t[1]);
|
|
224
|
-
if (!n) return;
|
|
225
|
-
let r = n.replace(/"/g, "").split(", ").map((e) => e.trim()).map((e) => new Ce.default(e).load());
|
|
226
|
-
return Promise.allSettled(r);
|
|
227
|
-
}
|
|
228
|
-
function Pe(e) {
|
|
229
|
-
try {
|
|
230
|
-
let t = window.__fpDataVersion;
|
|
231
|
-
t || (t = Se().replace(/\D/g, ""));
|
|
232
|
-
let [n, r = ""] = e.split("?"), i = new URLSearchParams(r);
|
|
233
|
-
if (i.has("v")) return e;
|
|
234
|
-
i.set("v", t);
|
|
235
|
-
let a = i.toString();
|
|
236
|
-
return a ? `${n}?${a}` : n;
|
|
237
|
-
} catch (t) {
|
|
238
|
-
return console.warn(t), e;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
//#endregion
|
|
242
|
-
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
243
|
-
function T(e) {
|
|
244
|
-
"@babel/helpers - typeof";
|
|
245
|
-
return T = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
246
|
-
return typeof e;
|
|
247
|
-
} : function(e) {
|
|
248
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
249
|
-
}, T(e);
|
|
250
|
-
}
|
|
251
|
-
//#endregion
|
|
252
|
-
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
|
253
|
-
function Fe(e, t) {
|
|
254
|
-
if (T(e) != "object" || !e) return e;
|
|
255
|
-
var n = e[Symbol.toPrimitive];
|
|
256
|
-
if (n !== void 0) {
|
|
257
|
-
var r = n.call(e, t || "default");
|
|
258
|
-
if (T(r) != "object") return r;
|
|
259
|
-
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
260
|
-
}
|
|
261
|
-
return (t === "string" ? String : Number)(e);
|
|
262
|
-
}
|
|
263
|
-
//#endregion
|
|
264
|
-
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
265
|
-
function Ie(e) {
|
|
266
|
-
var t = Fe(e, "string");
|
|
267
|
-
return T(t) == "symbol" ? t : t + "";
|
|
268
|
-
}
|
|
269
|
-
//#endregion
|
|
270
|
-
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
271
|
-
function Le(e, t, n) {
|
|
272
|
-
return (t = Ie(t)) in e ? Object.defineProperty(e, t, {
|
|
273
|
-
value: n,
|
|
274
|
-
enumerable: !0,
|
|
275
|
-
configurable: !0,
|
|
276
|
-
writable: !0
|
|
277
|
-
}) : e[t] = n, e;
|
|
278
|
-
}
|
|
279
|
-
//#endregion
|
|
280
|
-
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectSpread.js
|
|
281
|
-
function E(e) {
|
|
282
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
283
|
-
var n = arguments[t] == null ? {} : Object(arguments[t]), r = Object.keys(n);
|
|
284
|
-
typeof Object.getOwnPropertySymbols == "function" && r.push.apply(r, Object.getOwnPropertySymbols(n).filter(function(e) {
|
|
285
|
-
return Object.getOwnPropertyDescriptor(n, e).enumerable;
|
|
286
|
-
})), r.forEach(function(t) {
|
|
287
|
-
Le(e, t, n[t]);
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
return e;
|
|
291
|
-
}
|
|
292
|
-
//#endregion
|
|
293
|
-
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
294
|
-
function D(e, t) {
|
|
295
|
-
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
296
|
-
}
|
|
297
|
-
//#endregion
|
|
298
|
-
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
299
|
-
function Re(e, t) {
|
|
300
|
-
for (var n = 0; n < t.length; n++) {
|
|
301
|
-
var r = t[n];
|
|
302
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, Ie(r.key), r);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
function O(e, t, n) {
|
|
306
|
-
return t && Re(e.prototype, t), n && Re(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
307
|
-
}
|
|
308
|
-
//#endregion
|
|
309
|
-
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
|
|
310
|
-
function ze(e) {
|
|
311
|
-
if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
312
|
-
return e;
|
|
313
|
-
}
|
|
314
|
-
//#endregion
|
|
315
|
-
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
|
|
316
|
-
function Be(e, t) {
|
|
317
|
-
if (t && (T(t) == "object" || typeof t == "function")) return t;
|
|
318
|
-
if (t !== void 0) throw TypeError("Derived constructors may only return object or undefined");
|
|
319
|
-
return ze(e);
|
|
320
|
-
}
|
|
321
|
-
//#endregion
|
|
322
|
-
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
|
|
323
|
-
function Ve(e) {
|
|
324
|
-
return Ve = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
325
|
-
return e.__proto__ || Object.getPrototypeOf(e);
|
|
326
|
-
}, Ve(e);
|
|
327
|
-
}
|
|
328
|
-
//#endregion
|
|
329
|
-
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
|
330
|
-
function He(e, t) {
|
|
331
|
-
return He = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
332
|
-
return e.__proto__ = t, e;
|
|
333
|
-
}, He(e, t);
|
|
334
|
-
}
|
|
335
|
-
//#endregion
|
|
336
|
-
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inherits.js
|
|
337
|
-
function Ue(e, t) {
|
|
338
|
-
if (typeof t != "function" && t !== null) throw TypeError("Super expression must either be null or a function");
|
|
339
|
-
e.prototype = Object.create(t && t.prototype, { constructor: {
|
|
340
|
-
value: e,
|
|
341
|
-
writable: !0,
|
|
342
|
-
configurable: !0
|
|
343
|
-
} }), Object.defineProperty(e, "prototype", { writable: !1 }), t && He(e, t);
|
|
344
|
-
}
|
|
345
|
-
//#endregion
|
|
346
|
-
//#region ../../node_modules/.pnpm/i18next@19.9.2/node_modules/i18next/dist/esm/i18next.js
|
|
347
|
-
var We = {
|
|
348
|
-
type: "logger",
|
|
349
|
-
log: function(e) {
|
|
350
|
-
this.output("log", e);
|
|
351
|
-
},
|
|
352
|
-
warn: function(e) {
|
|
353
|
-
this.output("warn", e);
|
|
354
|
-
},
|
|
355
|
-
error: function(e) {
|
|
356
|
-
this.output("error", e);
|
|
357
|
-
},
|
|
358
|
-
output: function(e, t) {
|
|
359
|
-
console && console[e] && console[e].apply(console, t);
|
|
360
|
-
}
|
|
361
|
-
}, k = new (function() {
|
|
362
|
-
function e(t) {
|
|
363
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
364
|
-
D(this, e), this.init(t, n);
|
|
365
|
-
}
|
|
366
|
-
return O(e, [
|
|
367
|
-
{
|
|
368
|
-
key: "init",
|
|
369
|
-
value: function(e) {
|
|
370
|
-
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
371
|
-
this.prefix = t.prefix || "i18next:", this.logger = e || We, this.options = t, this.debug = t.debug;
|
|
372
|
-
}
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
key: "setDebug",
|
|
376
|
-
value: function(e) {
|
|
377
|
-
this.debug = e;
|
|
378
|
-
}
|
|
379
|
-
},
|
|
380
|
-
{
|
|
381
|
-
key: "log",
|
|
382
|
-
value: function() {
|
|
383
|
-
var e = [...arguments];
|
|
384
|
-
return this.forward(e, "log", "", !0);
|
|
385
|
-
}
|
|
386
|
-
},
|
|
387
|
-
{
|
|
388
|
-
key: "warn",
|
|
389
|
-
value: function() {
|
|
390
|
-
var e = [...arguments];
|
|
391
|
-
return this.forward(e, "warn", "", !0);
|
|
392
|
-
}
|
|
393
|
-
},
|
|
394
|
-
{
|
|
395
|
-
key: "error",
|
|
396
|
-
value: function() {
|
|
397
|
-
var e = [...arguments];
|
|
398
|
-
return this.forward(e, "error", "");
|
|
399
|
-
}
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
key: "deprecate",
|
|
403
|
-
value: function() {
|
|
404
|
-
var e = [...arguments];
|
|
405
|
-
return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
|
|
406
|
-
}
|
|
407
|
-
},
|
|
408
|
-
{
|
|
409
|
-
key: "forward",
|
|
410
|
-
value: function(e, t, n, r) {
|
|
411
|
-
return r && !this.debug ? null : (typeof e[0] == "string" && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
412
|
-
}
|
|
413
|
-
},
|
|
414
|
-
{
|
|
415
|
-
key: "create",
|
|
416
|
-
value: function(t) {
|
|
417
|
-
return new e(this.logger, E({}, { prefix: `${this.prefix}:${t}:` }, this.options));
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
]), e;
|
|
421
|
-
}())(), A = function() {
|
|
422
|
-
function e() {
|
|
423
|
-
D(this, e), this.observers = {};
|
|
424
|
-
}
|
|
425
|
-
return O(e, [
|
|
426
|
-
{
|
|
427
|
-
key: "on",
|
|
428
|
-
value: function(e, t) {
|
|
429
|
-
var n = this;
|
|
430
|
-
return e.split(" ").forEach(function(e) {
|
|
431
|
-
n.observers[e] = n.observers[e] || [], n.observers[e].push(t);
|
|
432
|
-
}), this;
|
|
433
|
-
}
|
|
434
|
-
},
|
|
435
|
-
{
|
|
436
|
-
key: "off",
|
|
437
|
-
value: function(e, t) {
|
|
438
|
-
if (this.observers[e]) {
|
|
439
|
-
if (!t) {
|
|
440
|
-
delete this.observers[e];
|
|
441
|
-
return;
|
|
442
|
-
}
|
|
443
|
-
this.observers[e] = this.observers[e].filter(function(e) {
|
|
444
|
-
return e !== t;
|
|
445
|
-
});
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
},
|
|
449
|
-
{
|
|
450
|
-
key: "emit",
|
|
451
|
-
value: function(e) {
|
|
452
|
-
var t = [...arguments].slice(1);
|
|
453
|
-
this.observers[e] && [].concat(this.observers[e]).forEach(function(e) {
|
|
454
|
-
e.apply(void 0, t);
|
|
455
|
-
}), this.observers["*"] && [].concat(this.observers["*"]).forEach(function(n) {
|
|
456
|
-
n.apply(n, [e].concat(t));
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
]), e;
|
|
461
|
-
}();
|
|
462
|
-
function Ge() {
|
|
463
|
-
var e, t, n = new Promise(function(n, r) {
|
|
464
|
-
e = n, t = r;
|
|
465
|
-
});
|
|
466
|
-
return n.resolve = e, n.reject = t, n;
|
|
467
|
-
}
|
|
468
|
-
function Ke(e) {
|
|
469
|
-
return e == null ? "" : "" + e;
|
|
470
|
-
}
|
|
471
|
-
function qe(e, t, n) {
|
|
472
|
-
e.forEach(function(e) {
|
|
473
|
-
t[e] && (n[e] = t[e]);
|
|
474
|
-
});
|
|
475
|
-
}
|
|
476
|
-
function Je(e, t, n) {
|
|
477
|
-
function r(e) {
|
|
478
|
-
return e && e.indexOf("###") > -1 ? e.replace(/###/g, ".") : e;
|
|
479
|
-
}
|
|
480
|
-
function i() {
|
|
481
|
-
return !e || typeof e == "string";
|
|
482
|
-
}
|
|
483
|
-
for (var a = typeof t == "string" ? t.split(".") : [].concat(t); a.length > 1;) {
|
|
484
|
-
if (i()) return {};
|
|
485
|
-
var o = r(a.shift());
|
|
486
|
-
!e[o] && n && (e[o] = new n()), e = Object.prototype.hasOwnProperty.call(e, o) ? e[o] : {};
|
|
487
|
-
}
|
|
488
|
-
return i() ? {} : {
|
|
489
|
-
obj: e,
|
|
490
|
-
k: r(a.shift())
|
|
491
|
-
};
|
|
492
|
-
}
|
|
493
|
-
function Ye(e, t, n) {
|
|
494
|
-
var r = Je(e, t, Object), i = r.obj, a = r.k;
|
|
495
|
-
i[a] = n;
|
|
496
|
-
}
|
|
497
|
-
function Xe(e, t, n, r) {
|
|
498
|
-
var i = Je(e, t, Object), a = i.obj, o = i.k;
|
|
499
|
-
a[o] = a[o] || [], r && (a[o] = a[o].concat(n)), r || a[o].push(n);
|
|
500
|
-
}
|
|
501
|
-
function Ze(e, t) {
|
|
502
|
-
var n = Je(e, t), r = n.obj, i = n.k;
|
|
503
|
-
if (r) return r[i];
|
|
504
|
-
}
|
|
505
|
-
function Qe(e, t, n) {
|
|
506
|
-
var r = Ze(e, n);
|
|
507
|
-
return r === void 0 ? Ze(t, n) : r;
|
|
508
|
-
}
|
|
509
|
-
function $e(e, t, n) {
|
|
510
|
-
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]);
|
|
511
|
-
return e;
|
|
512
|
-
}
|
|
513
|
-
function et(e) {
|
|
514
|
-
return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
515
|
-
}
|
|
516
|
-
var tt = {
|
|
517
|
-
"&": "&",
|
|
518
|
-
"<": "<",
|
|
519
|
-
">": ">",
|
|
520
|
-
"\"": """,
|
|
521
|
-
"'": "'",
|
|
522
|
-
"/": "/"
|
|
523
|
-
};
|
|
524
|
-
function nt(e) {
|
|
525
|
-
return typeof e == "string" ? e.replace(/[&<>"'\/]/g, function(e) {
|
|
526
|
-
return tt[e];
|
|
527
|
-
}) : e;
|
|
528
|
-
}
|
|
529
|
-
var rt = typeof window < "u" && window.navigator && window.navigator.userAgent && window.navigator.userAgent.indexOf("MSIE") > -1, it = function(e) {
|
|
530
|
-
Ue(t, e);
|
|
531
|
-
function t(e) {
|
|
532
|
-
var n, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
533
|
-
ns: ["translation"],
|
|
534
|
-
defaultNS: "translation"
|
|
535
|
-
};
|
|
536
|
-
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;
|
|
537
|
-
}
|
|
538
|
-
return O(t, [
|
|
539
|
-
{
|
|
540
|
-
key: "addNamespaces",
|
|
541
|
-
value: function(e) {
|
|
542
|
-
this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
|
|
543
|
-
}
|
|
544
|
-
},
|
|
545
|
-
{
|
|
546
|
-
key: "removeNamespaces",
|
|
547
|
-
value: function(e) {
|
|
548
|
-
var t = this.options.ns.indexOf(e);
|
|
549
|
-
t > -1 && this.options.ns.splice(t, 1);
|
|
550
|
-
}
|
|
551
|
-
},
|
|
552
|
-
{
|
|
553
|
-
key: "getResource",
|
|
554
|
-
value: function(e, t, n) {
|
|
555
|
-
var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, i = r.keySeparator === void 0 ? this.options.keySeparator : r.keySeparator, a = [e, t];
|
|
556
|
-
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);
|
|
557
|
-
}
|
|
558
|
-
},
|
|
559
|
-
{
|
|
560
|
-
key: "addResource",
|
|
561
|
-
value: function(e, t, n, r) {
|
|
562
|
-
var i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : { silent: !1 }, a = this.options.keySeparator;
|
|
563
|
-
a === void 0 && (a = ".");
|
|
564
|
-
var o = [e, t];
|
|
565
|
-
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);
|
|
566
|
-
}
|
|
567
|
-
},
|
|
568
|
-
{
|
|
569
|
-
key: "addResources",
|
|
570
|
-
value: function(e, t, n) {
|
|
571
|
-
var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : { silent: !1 };
|
|
572
|
-
for (var i in n) (typeof n[i] == "string" || Object.prototype.toString.apply(n[i]) === "[object Array]") && this.addResource(e, t, i, n[i], { silent: !0 });
|
|
573
|
-
r.silent || this.emit("added", e, t, n);
|
|
574
|
-
}
|
|
575
|
-
},
|
|
576
|
-
{
|
|
577
|
-
key: "addResourceBundle",
|
|
578
|
-
value: function(e, t, n, r, i) {
|
|
579
|
-
var a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : { silent: !1 }, o = [e, t];
|
|
580
|
-
e.indexOf(".") > -1 && (o = e.split("."), r = n, n = t, t = o[1]), this.addNamespaces(t);
|
|
581
|
-
var s = Ze(this.data, o) || {};
|
|
582
|
-
r ? $e(s, n, i) : s = E({}, s, n), Ye(this.data, o, s), a.silent || this.emit("added", e, t, n);
|
|
583
|
-
}
|
|
584
|
-
},
|
|
585
|
-
{
|
|
586
|
-
key: "removeResourceBundle",
|
|
587
|
-
value: function(e, t) {
|
|
588
|
-
this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
|
|
589
|
-
}
|
|
590
|
-
},
|
|
591
|
-
{
|
|
592
|
-
key: "hasResourceBundle",
|
|
593
|
-
value: function(e, t) {
|
|
594
|
-
return this.getResource(e, t) !== void 0;
|
|
595
|
-
}
|
|
596
|
-
},
|
|
597
|
-
{
|
|
598
|
-
key: "getResourceBundle",
|
|
599
|
-
value: function(e, t) {
|
|
600
|
-
return t || (t = this.options.defaultNS), this.options.compatibilityAPI === "v1" ? E({}, {}, this.getResource(e, t)) : this.getResource(e, t);
|
|
601
|
-
}
|
|
602
|
-
},
|
|
603
|
-
{
|
|
604
|
-
key: "getDataByLanguage",
|
|
605
|
-
value: function(e) {
|
|
606
|
-
return this.data[e];
|
|
607
|
-
}
|
|
608
|
-
},
|
|
609
|
-
{
|
|
610
|
-
key: "toJSON",
|
|
611
|
-
value: function() {
|
|
612
|
-
return this.data;
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
]), t;
|
|
616
|
-
}(A), at = {
|
|
617
|
-
processors: {},
|
|
618
|
-
addPostProcessor: function(e) {
|
|
619
|
-
this.processors[e.name] = e;
|
|
620
|
-
},
|
|
621
|
-
handle: function(e, t, n, r, i) {
|
|
622
|
-
var a = this;
|
|
623
|
-
return e.forEach(function(e) {
|
|
624
|
-
a.processors[e] && (t = a.processors[e].process(t, n, r, i));
|
|
625
|
-
}), t;
|
|
626
|
-
}
|
|
627
|
-
}, ot = {}, st = function(e) {
|
|
628
|
-
Ue(t, e);
|
|
629
|
-
function t(e) {
|
|
630
|
-
var n, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
631
|
-
return D(this, t), n = Be(this, Ve(t).call(this)), rt && A.call(ze(n)), qe([
|
|
632
|
-
"resourceStore",
|
|
633
|
-
"languageUtils",
|
|
634
|
-
"pluralResolver",
|
|
635
|
-
"interpolator",
|
|
636
|
-
"backendConnector",
|
|
637
|
-
"i18nFormat",
|
|
638
|
-
"utils"
|
|
639
|
-
], e, ze(n)), n.options = r, n.options.keySeparator === void 0 && (n.options.keySeparator = "."), n.logger = k.create("translator"), n;
|
|
640
|
-
}
|
|
641
|
-
return O(t, [
|
|
642
|
-
{
|
|
643
|
-
key: "changeLanguage",
|
|
644
|
-
value: function(e) {
|
|
645
|
-
e && (this.language = e);
|
|
646
|
-
}
|
|
647
|
-
},
|
|
648
|
-
{
|
|
649
|
-
key: "exists",
|
|
650
|
-
value: function(e) {
|
|
651
|
-
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : { interpolation: {} }, n = this.resolve(e, t);
|
|
652
|
-
return n && n.res !== void 0;
|
|
653
|
-
}
|
|
654
|
-
},
|
|
655
|
-
{
|
|
656
|
-
key: "extractFromKey",
|
|
657
|
-
value: function(e, t) {
|
|
658
|
-
var n = t.nsSeparator === void 0 ? this.options.nsSeparator : t.nsSeparator;
|
|
659
|
-
n === void 0 && (n = ":");
|
|
660
|
-
var r = t.keySeparator === void 0 ? this.options.keySeparator : t.keySeparator, i = t.ns || this.options.defaultNS;
|
|
661
|
-
if (n && e.indexOf(n) > -1) {
|
|
662
|
-
var a = e.match(this.interpolator.nestingRegexp);
|
|
663
|
-
if (a && a.length > 0) return {
|
|
664
|
-
key: e,
|
|
665
|
-
namespaces: i
|
|
666
|
-
};
|
|
667
|
-
var o = e.split(n);
|
|
668
|
-
(n !== r || n === r && this.options.ns.indexOf(o[0]) > -1) && (i = o.shift()), e = o.join(r);
|
|
669
|
-
}
|
|
670
|
-
return typeof i == "string" && (i = [i]), {
|
|
671
|
-
key: e,
|
|
672
|
-
namespaces: i
|
|
673
|
-
};
|
|
674
|
-
}
|
|
675
|
-
},
|
|
676
|
-
{
|
|
677
|
-
key: "translate",
|
|
678
|
-
value: function(e, n, r) {
|
|
679
|
-
var i = this;
|
|
680
|
-
if (T(n) !== "object" && this.options.overloadTranslationOptionHandler && (n = this.options.overloadTranslationOptionHandler(arguments)), n || (n = {}), e == null) return "";
|
|
681
|
-
Array.isArray(e) || (e = [String(e)]);
|
|
682
|
-
var a = n.keySeparator === void 0 ? this.options.keySeparator : n.keySeparator, o = this.extractFromKey(e[e.length - 1], n), s = o.key, c = o.namespaces, l = c[c.length - 1], u = n.lng || this.language, d = n.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
683
|
-
if (u && u.toLowerCase() === "cimode") return d ? l + (n.nsSeparator || this.options.nsSeparator) + s : s;
|
|
684
|
-
var f = this.resolve(e, n), p = f && f.res, m = f && f.usedKey || s, h = f && f.exactUsedKey || s, g = Object.prototype.toString.apply(p), _ = [
|
|
685
|
-
"[object Number]",
|
|
686
|
-
"[object Function]",
|
|
687
|
-
"[object RegExp]"
|
|
688
|
-
], v = n.joinArrays === void 0 ? this.options.joinArrays : n.joinArrays, y = !this.i18nFormat || this.i18nFormat.handleAsObject;
|
|
689
|
-
if (y && p && typeof p != "string" && typeof p != "boolean" && typeof p != "number" && _.indexOf(g) < 0 && !(typeof v == "string" && g === "[object Array]")) {
|
|
690
|
-
if (!n.returnObjects && !this.options.returnObjects) return this.logger.warn("accessing an object - but returnObjects options is not enabled!"), this.options.returnedObjectHandler ? this.options.returnedObjectHandler(m, p, n) : `key '${s} (${this.language})' returned an object instead of string.`;
|
|
691
|
-
if (a) {
|
|
692
|
-
var b = g === "[object Array]", x = b ? [] : {}, ee = b ? h : m;
|
|
693
|
-
for (var S in p) if (Object.prototype.hasOwnProperty.call(p, S)) {
|
|
694
|
-
var te = `${ee}${a}${S}`;
|
|
695
|
-
x[S] = this.translate(te, E({}, n, {
|
|
696
|
-
joinArrays: !1,
|
|
697
|
-
ns: c
|
|
698
|
-
})), x[S] === te && (x[S] = p[S]);
|
|
699
|
-
}
|
|
700
|
-
p = x;
|
|
701
|
-
}
|
|
702
|
-
} else if (y && typeof v == "string" && g === "[object Array]") p = p.join(v), p && (p = this.extendTranslation(p, e, n, r));
|
|
703
|
-
else {
|
|
704
|
-
var ne = !1, re = !1, ie = n.count !== void 0 && typeof n.count != "string", ae = t.hasDefaultValue(n), oe = ie ? this.pluralResolver.getSuffix(u, n.count) : "", se = n[`defaultValue${oe}`] || n.defaultValue;
|
|
705
|
-
!this.isValidLookup(p) && ae && (ne = !0, p = se), this.isValidLookup(p) || (re = !0, p = s);
|
|
706
|
-
var C = ae && se !== p && this.options.updateMissing;
|
|
707
|
-
if (re || ne || C) {
|
|
708
|
-
if (this.logger.log(C ? "updateKey" : "missingKey", u, l, s, C ? se : p), a) {
|
|
709
|
-
var ce = this.resolve(s, E({}, n, { keySeparator: !1 }));
|
|
710
|
-
ce && ce.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
|
|
711
|
-
}
|
|
712
|
-
var le = [], ue = this.languageUtils.getFallbackCodes(this.options.fallbackLng, n.lng || this.language);
|
|
713
|
-
if (this.options.saveMissingTo === "fallback" && ue && ue[0]) for (var de = 0; de < ue.length; de++) le.push(ue[de]);
|
|
714
|
-
else this.options.saveMissingTo === "all" ? le = this.languageUtils.toResolveHierarchy(n.lng || this.language) : le.push(n.lng || this.language);
|
|
715
|
-
var fe = function(e, t, r) {
|
|
716
|
-
i.options.missingKeyHandler ? i.options.missingKeyHandler(e, l, t, C ? r : p, C, n) : i.backendConnector && i.backendConnector.saveMissing && i.backendConnector.saveMissing(e, l, t, C ? r : p, C, n), i.emit("missingKey", e, l, t, p);
|
|
717
|
-
};
|
|
718
|
-
this.options.saveMissing && (this.options.saveMissingPlurals && ie ? le.forEach(function(e) {
|
|
719
|
-
i.pluralResolver.getSuffixes(e).forEach(function(t) {
|
|
720
|
-
fe([e], s + t, n[`defaultValue${t}`] || se);
|
|
721
|
-
});
|
|
722
|
-
}) : fe(le, s, se));
|
|
723
|
-
}
|
|
724
|
-
p = this.extendTranslation(p, e, n, f, r), re && p === s && this.options.appendNamespaceToMissingKey && (p = `${l}:${s}`), re && this.options.parseMissingKeyHandler && (p = this.options.parseMissingKeyHandler(p));
|
|
725
|
-
}
|
|
726
|
-
return p;
|
|
727
|
-
}
|
|
728
|
-
},
|
|
729
|
-
{
|
|
730
|
-
key: "extendTranslation",
|
|
731
|
-
value: function(e, t, n, r, i) {
|
|
732
|
-
var a = this;
|
|
733
|
-
if (this.i18nFormat && this.i18nFormat.parse) e = this.i18nFormat.parse(e, n, r.usedLng, r.usedNS, r.usedKey, { resolved: r });
|
|
734
|
-
else if (!n.skipInterpolation) {
|
|
735
|
-
n.interpolation && this.interpolator.init(E({}, n, { interpolation: E({}, this.options.interpolation, n.interpolation) }));
|
|
736
|
-
var o = n.interpolation && n.interpolation.skipOnVariables || this.options.interpolation.skipOnVariables, s;
|
|
737
|
-
if (o) {
|
|
738
|
-
var c = e.match(this.interpolator.nestingRegexp);
|
|
739
|
-
s = c && c.length;
|
|
740
|
-
}
|
|
741
|
-
var l = n.replace && typeof n.replace != "string" ? n.replace : n;
|
|
742
|
-
if (this.options.interpolation.defaultVariables && (l = E({}, this.options.interpolation.defaultVariables, l)), e = this.interpolator.interpolate(e, l, n.lng || this.language, n), o) {
|
|
743
|
-
var u = e.match(this.interpolator.nestingRegexp), d = u && u.length;
|
|
744
|
-
s < d && (n.nest = !1);
|
|
745
|
-
}
|
|
746
|
-
n.nest !== !1 && (e = this.interpolator.nest(e, function() {
|
|
747
|
-
var e = [...arguments];
|
|
748
|
-
return i && i[0] === e[0] && !n.context ? (a.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`), null) : a.translate.apply(a, e.concat([t]));
|
|
749
|
-
}, n)), n.interpolation && this.interpolator.reset();
|
|
750
|
-
}
|
|
751
|
-
var f = n.postProcess || this.options.postProcess, p = typeof f == "string" ? [f] : f;
|
|
752
|
-
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;
|
|
753
|
-
}
|
|
754
|
-
},
|
|
755
|
-
{
|
|
756
|
-
key: "resolve",
|
|
757
|
-
value: function(e) {
|
|
758
|
-
var t = this, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r, i, a, o, s;
|
|
759
|
-
return typeof e == "string" && (e = [e]), e.forEach(function(e) {
|
|
760
|
-
if (!t.isValidLookup(r)) {
|
|
761
|
-
var c = t.extractFromKey(e, n), l = c.key;
|
|
762
|
-
i = l;
|
|
763
|
-
var u = c.namespaces;
|
|
764
|
-
t.options.fallbackNS && (u = u.concat(t.options.fallbackNS));
|
|
765
|
-
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);
|
|
766
|
-
u.forEach(function(e) {
|
|
767
|
-
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) {
|
|
768
|
-
if (!t.isValidLookup(r)) {
|
|
769
|
-
o = i;
|
|
770
|
-
var s = l, c = [s];
|
|
771
|
-
if (t.i18nFormat && t.i18nFormat.addLookupKeys) t.i18nFormat.addLookupKeys(c, l, i, e, n);
|
|
772
|
-
else {
|
|
773
|
-
var u;
|
|
774
|
-
d && (u = t.pluralResolver.getSuffix(i, n.count)), d && f && c.push(s + u), f && c.push(s += `${t.options.contextSeparator}${n.context}`), d && c.push(s += u);
|
|
775
|
-
}
|
|
776
|
-
for (var p; p = c.pop();) t.isValidLookup(r) || (a = p, r = t.getResource(i, e, p, n));
|
|
777
|
-
}
|
|
778
|
-
}));
|
|
779
|
-
});
|
|
780
|
-
}
|
|
781
|
-
}), {
|
|
782
|
-
res: r,
|
|
783
|
-
usedKey: i,
|
|
784
|
-
exactUsedKey: a,
|
|
785
|
-
usedLng: o,
|
|
786
|
-
usedNS: s
|
|
787
|
-
};
|
|
788
|
-
}
|
|
789
|
-
},
|
|
790
|
-
{
|
|
791
|
-
key: "isValidLookup",
|
|
792
|
-
value: function(e) {
|
|
793
|
-
return e !== void 0 && !(!this.options.returnNull && e === null) && !(!this.options.returnEmptyString && e === "");
|
|
794
|
-
}
|
|
795
|
-
},
|
|
796
|
-
{
|
|
797
|
-
key: "getResource",
|
|
798
|
-
value: function(e, t, n) {
|
|
799
|
-
var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
800
|
-
return this.i18nFormat && this.i18nFormat.getResource ? this.i18nFormat.getResource(e, t, n, r) : this.resourceStore.getResource(e, t, n, r);
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
], [{
|
|
804
|
-
key: "hasDefaultValue",
|
|
805
|
-
value: function(e) {
|
|
806
|
-
var t = "defaultValue";
|
|
807
|
-
for (var n in e) if (Object.prototype.hasOwnProperty.call(e, n) && t === n.substring(0, t.length) && e[n] !== void 0) return !0;
|
|
808
|
-
return !1;
|
|
809
|
-
}
|
|
810
|
-
}]), t;
|
|
811
|
-
}(A);
|
|
812
|
-
function ct(e) {
|
|
813
|
-
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
814
|
-
}
|
|
815
|
-
var lt = function() {
|
|
816
|
-
function e(t) {
|
|
817
|
-
D(this, e), this.options = t, this.whitelist = this.options.supportedLngs || !1, this.supportedLngs = this.options.supportedLngs || !1, this.logger = k.create("languageUtils");
|
|
818
|
-
}
|
|
819
|
-
return O(e, [
|
|
820
|
-
{
|
|
821
|
-
key: "getScriptPartFromCode",
|
|
822
|
-
value: function(e) {
|
|
823
|
-
if (!e || e.indexOf("-") < 0) return null;
|
|
824
|
-
var t = e.split("-");
|
|
825
|
-
return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
|
|
826
|
-
}
|
|
827
|
-
},
|
|
828
|
-
{
|
|
829
|
-
key: "getLanguagePartFromCode",
|
|
830
|
-
value: function(e) {
|
|
831
|
-
if (!e || e.indexOf("-") < 0) return e;
|
|
832
|
-
var t = e.split("-");
|
|
833
|
-
return this.formatLanguageCode(t[0]);
|
|
834
|
-
}
|
|
835
|
-
},
|
|
836
|
-
{
|
|
837
|
-
key: "formatLanguageCode",
|
|
838
|
-
value: function(e) {
|
|
839
|
-
if (typeof e == "string" && e.indexOf("-") > -1) {
|
|
840
|
-
var t = [
|
|
841
|
-
"hans",
|
|
842
|
-
"hant",
|
|
843
|
-
"latn",
|
|
844
|
-
"cyrl",
|
|
845
|
-
"cans",
|
|
846
|
-
"mong",
|
|
847
|
-
"arab"
|
|
848
|
-
], n = e.split("-");
|
|
849
|
-
return this.options.lowerCaseLng ? n = n.map(function(e) {
|
|
850
|
-
return e.toLowerCase();
|
|
851
|
-
}) : 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("-");
|
|
852
|
-
}
|
|
853
|
-
return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e;
|
|
854
|
-
}
|
|
855
|
-
},
|
|
856
|
-
{
|
|
857
|
-
key: "isWhitelisted",
|
|
858
|
-
value: function(e) {
|
|
859
|
-
return this.logger.deprecate("languageUtils.isWhitelisted", "function \"isWhitelisted\" will be renamed to \"isSupportedCode\" in the next major - please make sure to rename it's usage asap."), this.isSupportedCode(e);
|
|
860
|
-
}
|
|
861
|
-
},
|
|
862
|
-
{
|
|
863
|
-
key: "isSupportedCode",
|
|
864
|
-
value: function(e) {
|
|
865
|
-
return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (e = this.getLanguagePartFromCode(e)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(e) > -1;
|
|
866
|
-
}
|
|
867
|
-
},
|
|
868
|
-
{
|
|
869
|
-
key: "getBestMatchFromCodes",
|
|
870
|
-
value: function(e) {
|
|
871
|
-
var t = this;
|
|
872
|
-
if (!e) return null;
|
|
873
|
-
var n;
|
|
874
|
-
return e.forEach(function(e) {
|
|
875
|
-
if (!n) {
|
|
876
|
-
var r = t.formatLanguageCode(e);
|
|
877
|
-
(!t.options.supportedLngs || t.isSupportedCode(r)) && (n = r);
|
|
878
|
-
}
|
|
879
|
-
}), !n && this.options.supportedLngs && e.forEach(function(e) {
|
|
880
|
-
if (!n) {
|
|
881
|
-
var r = t.getLanguagePartFromCode(e);
|
|
882
|
-
if (t.isSupportedCode(r)) return n = r;
|
|
883
|
-
n = t.options.supportedLngs.find(function(e) {
|
|
884
|
-
if (e.indexOf(r) === 0) return e;
|
|
885
|
-
});
|
|
886
|
-
}
|
|
887
|
-
}), n || (n = this.getFallbackCodes(this.options.fallbackLng)[0]), n;
|
|
888
|
-
}
|
|
889
|
-
},
|
|
890
|
-
{
|
|
891
|
-
key: "getFallbackCodes",
|
|
892
|
-
value: function(e, t) {
|
|
893
|
-
if (!e) return [];
|
|
894
|
-
if (typeof e == "function" && (e = e(t)), typeof e == "string" && (e = [e]), Object.prototype.toString.apply(e) === "[object Array]") return e;
|
|
895
|
-
if (!t) return e.default || [];
|
|
896
|
-
var n = e[t];
|
|
897
|
-
return n || (n = e[this.getScriptPartFromCode(t)]), n || (n = e[this.formatLanguageCode(t)]), n || (n = e[this.getLanguagePartFromCode(t)]), n || (n = e.default), n || [];
|
|
898
|
-
}
|
|
899
|
-
},
|
|
900
|
-
{
|
|
901
|
-
key: "toResolveHierarchy",
|
|
902
|
-
value: function(e, t) {
|
|
903
|
-
var n = this, r = this.getFallbackCodes(t || this.options.fallbackLng || [], e), i = [], a = function(e) {
|
|
904
|
-
e && (n.isSupportedCode(e) ? i.push(e) : n.logger.warn(`rejecting language code not found in supportedLngs: ${e}`));
|
|
905
|
-
};
|
|
906
|
-
return typeof e == "string" && e.indexOf("-") > -1 ? (this.options.load !== "languageOnly" && a(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && a(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && a(this.getLanguagePartFromCode(e))) : typeof e == "string" && a(this.formatLanguageCode(e)), r.forEach(function(e) {
|
|
907
|
-
i.indexOf(e) < 0 && a(n.formatLanguageCode(e));
|
|
908
|
-
}), i;
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
]), e;
|
|
912
|
-
}(), ut = [
|
|
913
|
-
{
|
|
914
|
-
lngs: [
|
|
915
|
-
"ach",
|
|
916
|
-
"ak",
|
|
917
|
-
"am",
|
|
918
|
-
"arn",
|
|
919
|
-
"br",
|
|
920
|
-
"fil",
|
|
921
|
-
"gun",
|
|
922
|
-
"ln",
|
|
923
|
-
"mfe",
|
|
924
|
-
"mg",
|
|
925
|
-
"mi",
|
|
926
|
-
"oc",
|
|
927
|
-
"pt",
|
|
928
|
-
"pt-BR",
|
|
929
|
-
"tg",
|
|
930
|
-
"tl",
|
|
931
|
-
"ti",
|
|
932
|
-
"tr",
|
|
933
|
-
"uz",
|
|
934
|
-
"wa"
|
|
935
|
-
],
|
|
936
|
-
nr: [1, 2],
|
|
937
|
-
fc: 1
|
|
938
|
-
},
|
|
939
|
-
{
|
|
940
|
-
lngs: /* @__PURE__ */ "af.an.ast.az.bg.bn.ca.da.de.dev.el.en.eo.es.et.eu.fi.fo.fur.fy.gl.gu.ha.hi.hu.hy.ia.it.kn.ku.lb.mai.ml.mn.mr.nah.nap.nb.ne.nl.nn.no.nso.pa.pap.pms.ps.pt-PT.rm.sco.se.si.so.son.sq.sv.sw.ta.te.tk.ur.yo".split("."),
|
|
941
|
-
nr: [1, 2],
|
|
942
|
-
fc: 2
|
|
943
|
-
},
|
|
944
|
-
{
|
|
945
|
-
lngs: [
|
|
946
|
-
"ay",
|
|
947
|
-
"bo",
|
|
948
|
-
"cgg",
|
|
949
|
-
"fa",
|
|
950
|
-
"ht",
|
|
951
|
-
"id",
|
|
952
|
-
"ja",
|
|
953
|
-
"jbo",
|
|
954
|
-
"ka",
|
|
955
|
-
"kk",
|
|
956
|
-
"km",
|
|
957
|
-
"ko",
|
|
958
|
-
"ky",
|
|
959
|
-
"lo",
|
|
960
|
-
"ms",
|
|
961
|
-
"sah",
|
|
962
|
-
"su",
|
|
963
|
-
"th",
|
|
964
|
-
"tt",
|
|
965
|
-
"ug",
|
|
966
|
-
"vi",
|
|
967
|
-
"wo",
|
|
968
|
-
"zh"
|
|
969
|
-
],
|
|
970
|
-
nr: [1],
|
|
971
|
-
fc: 3
|
|
972
|
-
},
|
|
973
|
-
{
|
|
974
|
-
lngs: [
|
|
975
|
-
"be",
|
|
976
|
-
"bs",
|
|
977
|
-
"cnr",
|
|
978
|
-
"dz",
|
|
979
|
-
"hr",
|
|
980
|
-
"ru",
|
|
981
|
-
"sr",
|
|
982
|
-
"uk"
|
|
983
|
-
],
|
|
984
|
-
nr: [
|
|
985
|
-
1,
|
|
986
|
-
2,
|
|
987
|
-
5
|
|
988
|
-
],
|
|
989
|
-
fc: 4
|
|
990
|
-
},
|
|
991
|
-
{
|
|
992
|
-
lngs: ["ar"],
|
|
993
|
-
nr: [
|
|
994
|
-
0,
|
|
995
|
-
1,
|
|
996
|
-
2,
|
|
997
|
-
3,
|
|
998
|
-
11,
|
|
999
|
-
100
|
|
1000
|
-
],
|
|
1001
|
-
fc: 5
|
|
1002
|
-
},
|
|
1003
|
-
{
|
|
1004
|
-
lngs: ["cs", "sk"],
|
|
1005
|
-
nr: [
|
|
1006
|
-
1,
|
|
1007
|
-
2,
|
|
1008
|
-
5
|
|
1009
|
-
],
|
|
1010
|
-
fc: 6
|
|
1011
|
-
},
|
|
1012
|
-
{
|
|
1013
|
-
lngs: ["csb", "pl"],
|
|
1014
|
-
nr: [
|
|
1015
|
-
1,
|
|
1016
|
-
2,
|
|
1017
|
-
5
|
|
1018
|
-
],
|
|
1019
|
-
fc: 7
|
|
1020
|
-
},
|
|
1021
|
-
{
|
|
1022
|
-
lngs: ["cy"],
|
|
1023
|
-
nr: [
|
|
1024
|
-
1,
|
|
1025
|
-
2,
|
|
1026
|
-
3,
|
|
1027
|
-
8
|
|
1028
|
-
],
|
|
1029
|
-
fc: 8
|
|
1030
|
-
},
|
|
1031
|
-
{
|
|
1032
|
-
lngs: ["fr"],
|
|
1033
|
-
nr: [1, 2],
|
|
1034
|
-
fc: 9
|
|
1035
|
-
},
|
|
1036
|
-
{
|
|
1037
|
-
lngs: ["ga"],
|
|
1038
|
-
nr: [
|
|
1039
|
-
1,
|
|
1040
|
-
2,
|
|
1041
|
-
3,
|
|
1042
|
-
7,
|
|
1043
|
-
11
|
|
1044
|
-
],
|
|
1045
|
-
fc: 10
|
|
1046
|
-
},
|
|
1047
|
-
{
|
|
1048
|
-
lngs: ["gd"],
|
|
1049
|
-
nr: [
|
|
1050
|
-
1,
|
|
1051
|
-
2,
|
|
1052
|
-
3,
|
|
1053
|
-
20
|
|
1054
|
-
],
|
|
1055
|
-
fc: 11
|
|
1056
|
-
},
|
|
1057
|
-
{
|
|
1058
|
-
lngs: ["is"],
|
|
1059
|
-
nr: [1, 2],
|
|
1060
|
-
fc: 12
|
|
1061
|
-
},
|
|
1062
|
-
{
|
|
1063
|
-
lngs: ["jv"],
|
|
1064
|
-
nr: [0, 1],
|
|
1065
|
-
fc: 13
|
|
1066
|
-
},
|
|
1067
|
-
{
|
|
1068
|
-
lngs: ["kw"],
|
|
1069
|
-
nr: [
|
|
1070
|
-
1,
|
|
1071
|
-
2,
|
|
1072
|
-
3,
|
|
1073
|
-
4
|
|
1074
|
-
],
|
|
1075
|
-
fc: 14
|
|
1076
|
-
},
|
|
1077
|
-
{
|
|
1078
|
-
lngs: ["lt"],
|
|
1079
|
-
nr: [
|
|
1080
|
-
1,
|
|
1081
|
-
2,
|
|
1082
|
-
10
|
|
1083
|
-
],
|
|
1084
|
-
fc: 15
|
|
1085
|
-
},
|
|
1086
|
-
{
|
|
1087
|
-
lngs: ["lv"],
|
|
1088
|
-
nr: [
|
|
1089
|
-
1,
|
|
1090
|
-
2,
|
|
1091
|
-
0
|
|
1092
|
-
],
|
|
1093
|
-
fc: 16
|
|
1094
|
-
},
|
|
1095
|
-
{
|
|
1096
|
-
lngs: ["mk"],
|
|
1097
|
-
nr: [1, 2],
|
|
1098
|
-
fc: 17
|
|
1099
|
-
},
|
|
1100
|
-
{
|
|
1101
|
-
lngs: ["mnk"],
|
|
1102
|
-
nr: [
|
|
1103
|
-
0,
|
|
1104
|
-
1,
|
|
1105
|
-
2
|
|
1106
|
-
],
|
|
1107
|
-
fc: 18
|
|
1108
|
-
},
|
|
1109
|
-
{
|
|
1110
|
-
lngs: ["mt"],
|
|
1111
|
-
nr: [
|
|
1112
|
-
1,
|
|
1113
|
-
2,
|
|
1114
|
-
11,
|
|
1115
|
-
20
|
|
1116
|
-
],
|
|
1117
|
-
fc: 19
|
|
1118
|
-
},
|
|
1119
|
-
{
|
|
1120
|
-
lngs: ["or"],
|
|
1121
|
-
nr: [2, 1],
|
|
1122
|
-
fc: 2
|
|
1123
|
-
},
|
|
1124
|
-
{
|
|
1125
|
-
lngs: ["ro"],
|
|
1126
|
-
nr: [
|
|
1127
|
-
1,
|
|
1128
|
-
2,
|
|
1129
|
-
20
|
|
1130
|
-
],
|
|
1131
|
-
fc: 20
|
|
1132
|
-
},
|
|
1133
|
-
{
|
|
1134
|
-
lngs: ["sl"],
|
|
1135
|
-
nr: [
|
|
1136
|
-
5,
|
|
1137
|
-
1,
|
|
1138
|
-
2,
|
|
1139
|
-
3
|
|
1140
|
-
],
|
|
1141
|
-
fc: 21
|
|
1142
|
-
},
|
|
1143
|
-
{
|
|
1144
|
-
lngs: ["he", "iw"],
|
|
1145
|
-
nr: [
|
|
1146
|
-
1,
|
|
1147
|
-
2,
|
|
1148
|
-
20,
|
|
1149
|
-
21
|
|
1150
|
-
],
|
|
1151
|
-
fc: 22
|
|
1152
|
-
}
|
|
1153
|
-
], dt = {
|
|
1154
|
-
1: function(e) {
|
|
1155
|
-
return Number(e > 1);
|
|
1156
|
-
},
|
|
1157
|
-
2: function(e) {
|
|
1158
|
-
return Number(e != 1);
|
|
1159
|
-
},
|
|
1160
|
-
3: function(e) {
|
|
1161
|
-
return 0;
|
|
1162
|
-
},
|
|
1163
|
-
4: function(e) {
|
|
1164
|
-
return Number(e % 10 == 1 && e % 100 != 11 ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2);
|
|
1165
|
-
},
|
|
1166
|
-
5: function(e) {
|
|
1167
|
-
return Number(e == 0 ? 0 : e == 1 ? 1 : e == 2 ? 2 : e % 100 >= 3 && e % 100 <= 10 ? 3 : e % 100 >= 11 ? 4 : 5);
|
|
1168
|
-
},
|
|
1169
|
-
6: function(e) {
|
|
1170
|
-
return Number(e == 1 ? 0 : e >= 2 && e <= 4 ? 1 : 2);
|
|
1171
|
-
},
|
|
1172
|
-
7: function(e) {
|
|
1173
|
-
return Number(e == 1 ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2);
|
|
1174
|
-
},
|
|
1175
|
-
8: function(e) {
|
|
1176
|
-
return Number(e == 1 ? 0 : e == 2 ? 1 : e != 8 && e != 11 ? 2 : 3);
|
|
1177
|
-
},
|
|
1178
|
-
9: function(e) {
|
|
1179
|
-
return Number(e >= 2);
|
|
1180
|
-
},
|
|
1181
|
-
10: function(e) {
|
|
1182
|
-
return Number(e == 1 ? 0 : e == 2 ? 1 : e < 7 ? 2 : e < 11 ? 3 : 4);
|
|
1183
|
-
},
|
|
1184
|
-
11: function(e) {
|
|
1185
|
-
return Number(e == 1 || e == 11 ? 0 : e == 2 || e == 12 ? 1 : e > 2 && e < 20 ? 2 : 3);
|
|
1186
|
-
},
|
|
1187
|
-
12: function(e) {
|
|
1188
|
-
return Number(e % 10 != 1 || e % 100 == 11);
|
|
1189
|
-
},
|
|
1190
|
-
13: function(e) {
|
|
1191
|
-
return Number(e !== 0);
|
|
1192
|
-
},
|
|
1193
|
-
14: function(e) {
|
|
1194
|
-
return Number(e == 1 ? 0 : e == 2 ? 1 : e == 3 ? 2 : 3);
|
|
1195
|
-
},
|
|
1196
|
-
15: function(e) {
|
|
1197
|
-
return Number(e % 10 == 1 && e % 100 != 11 ? 0 : e % 10 >= 2 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2);
|
|
1198
|
-
},
|
|
1199
|
-
16: function(e) {
|
|
1200
|
-
return Number(e % 10 == 1 && e % 100 != 11 ? 0 : e === 0 ? 2 : 1);
|
|
1201
|
-
},
|
|
1202
|
-
17: function(e) {
|
|
1203
|
-
return Number(e == 1 || e % 10 == 1 && e % 100 != 11 ? 0 : 1);
|
|
1204
|
-
},
|
|
1205
|
-
18: function(e) {
|
|
1206
|
-
return Number(e == 0 ? 0 : e == 1 ? 1 : 2);
|
|
1207
|
-
},
|
|
1208
|
-
19: function(e) {
|
|
1209
|
-
return Number(e == 1 ? 0 : e == 0 || e % 100 > 1 && e % 100 < 11 ? 1 : e % 100 > 10 && e % 100 < 20 ? 2 : 3);
|
|
1210
|
-
},
|
|
1211
|
-
20: function(e) {
|
|
1212
|
-
return Number(e == 1 ? 0 : e == 0 || e % 100 > 0 && e % 100 < 20 ? 1 : 2);
|
|
1213
|
-
},
|
|
1214
|
-
21: function(e) {
|
|
1215
|
-
return Number(e % 100 == 1 ? 1 : e % 100 == 2 ? 2 : e % 100 == 3 || e % 100 == 4 ? 3 : 0);
|
|
1216
|
-
},
|
|
1217
|
-
22: function(e) {
|
|
1218
|
-
return Number(e == 1 ? 0 : e == 2 ? 1 : (e < 0 || e > 10) && e % 10 == 0 ? 2 : 3);
|
|
1219
|
-
}
|
|
1220
|
-
};
|
|
1221
|
-
function ft() {
|
|
1222
|
-
var e = {};
|
|
1223
|
-
return ut.forEach(function(t) {
|
|
1224
|
-
t.lngs.forEach(function(n) {
|
|
1225
|
-
e[n] = {
|
|
1226
|
-
numbers: t.nr,
|
|
1227
|
-
plurals: dt[t.fc]
|
|
1228
|
-
};
|
|
1229
|
-
});
|
|
1230
|
-
}), e;
|
|
1231
|
-
}
|
|
1232
|
-
var pt = function() {
|
|
1233
|
-
function e(t) {
|
|
1234
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1235
|
-
D(this, e), this.languageUtils = t, this.options = n, this.logger = k.create("pluralResolver"), this.rules = ft();
|
|
1236
|
-
}
|
|
1237
|
-
return O(e, [
|
|
1238
|
-
{
|
|
1239
|
-
key: "addRule",
|
|
1240
|
-
value: function(e, t) {
|
|
1241
|
-
this.rules[e] = t;
|
|
1242
|
-
}
|
|
1243
|
-
},
|
|
1244
|
-
{
|
|
1245
|
-
key: "getRule",
|
|
1246
|
-
value: function(e) {
|
|
1247
|
-
return this.rules[e] || this.rules[this.languageUtils.getLanguagePartFromCode(e)];
|
|
1248
|
-
}
|
|
1249
|
-
},
|
|
1250
|
-
{
|
|
1251
|
-
key: "needsPlural",
|
|
1252
|
-
value: function(e) {
|
|
1253
|
-
var t = this.getRule(e);
|
|
1254
|
-
return t && t.numbers.length > 1;
|
|
1255
|
-
}
|
|
1256
|
-
},
|
|
1257
|
-
{
|
|
1258
|
-
key: "getPluralFormsOfKey",
|
|
1259
|
-
value: function(e, t) {
|
|
1260
|
-
return this.getSuffixes(e).map(function(e) {
|
|
1261
|
-
return t + e;
|
|
1262
|
-
});
|
|
1263
|
-
}
|
|
1264
|
-
},
|
|
1265
|
-
{
|
|
1266
|
-
key: "getSuffixes",
|
|
1267
|
-
value: function(e) {
|
|
1268
|
-
var t = this, n = this.getRule(e);
|
|
1269
|
-
return n ? n.numbers.map(function(n) {
|
|
1270
|
-
return t.getSuffix(e, n);
|
|
1271
|
-
}) : [];
|
|
1272
|
-
}
|
|
1273
|
-
},
|
|
1274
|
-
{
|
|
1275
|
-
key: "getSuffix",
|
|
1276
|
-
value: function(e, t) {
|
|
1277
|
-
var n = this, r = this.getRule(e);
|
|
1278
|
-
if (r) {
|
|
1279
|
-
var i = r.noAbs ? r.plurals(t) : r.plurals(Math.abs(t)), a = r.numbers[i];
|
|
1280
|
-
this.options.simplifyPluralSuffix && r.numbers.length === 2 && r.numbers[0] === 1 && (a === 2 ? a = "plural" : a === 1 && (a = ""));
|
|
1281
|
-
var o = function() {
|
|
1282
|
-
return n.options.prepend && a.toString() ? n.options.prepend + a.toString() : a.toString();
|
|
1283
|
-
};
|
|
1284
|
-
return this.options.compatibilityJSON === "v1" ? a === 1 ? "" : typeof a == "number" ? `_plural_${a.toString()}` : o() : this.options.compatibilityJSON === "v2" || this.options.simplifyPluralSuffix && r.numbers.length === 2 && r.numbers[0] === 1 ? o() : this.options.prepend && i.toString() ? this.options.prepend + i.toString() : i.toString();
|
|
1285
|
-
}
|
|
1286
|
-
return this.logger.warn(`no plural rule found for: ${e}`), "";
|
|
1287
|
-
}
|
|
1288
|
-
}
|
|
1289
|
-
]), e;
|
|
1290
|
-
}(), mt = function() {
|
|
1291
|
-
function e() {
|
|
1292
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1293
|
-
D(this, e), this.logger = k.create("interpolator"), this.options = t, this.format = t.interpolation && t.interpolation.format || function(e) {
|
|
1294
|
-
return e;
|
|
1295
|
-
}, this.init(t);
|
|
1296
|
-
}
|
|
1297
|
-
return O(e, [
|
|
1298
|
-
{
|
|
1299
|
-
key: "init",
|
|
1300
|
-
value: function() {
|
|
1301
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1302
|
-
e.interpolation || (e.interpolation = { escapeValue: !0 });
|
|
1303
|
-
var t = e.interpolation;
|
|
1304
|
-
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();
|
|
1305
|
-
}
|
|
1306
|
-
},
|
|
1307
|
-
{
|
|
1308
|
-
key: "reset",
|
|
1309
|
-
value: function() {
|
|
1310
|
-
this.options && this.init(this.options);
|
|
1311
|
-
}
|
|
1312
|
-
},
|
|
1313
|
-
{
|
|
1314
|
-
key: "resetRegExp",
|
|
1315
|
-
value: function() {
|
|
1316
|
-
var e = `${this.prefix}(.+?)${this.suffix}`;
|
|
1317
|
-
this.regexp = new RegExp(e, "g");
|
|
1318
|
-
var t = `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;
|
|
1319
|
-
this.regexpUnescape = new RegExp(t, "g");
|
|
1320
|
-
var n = `${this.nestingPrefix}(.+?)${this.nestingSuffix}`;
|
|
1321
|
-
this.nestingRegexp = new RegExp(n, "g");
|
|
1322
|
-
}
|
|
1323
|
-
},
|
|
1324
|
-
{
|
|
1325
|
-
key: "interpolate",
|
|
1326
|
-
value: function(e, t, n, r) {
|
|
1327
|
-
var i = this, a, o, s, c = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
|
|
1328
|
-
function l(e) {
|
|
1329
|
-
return e.replace(/\$/g, "$$$$");
|
|
1330
|
-
}
|
|
1331
|
-
var u = function(e) {
|
|
1332
|
-
if (e.indexOf(i.formatSeparator) < 0) {
|
|
1333
|
-
var a = Qe(t, c, e);
|
|
1334
|
-
return i.alwaysFormat ? i.format(a, void 0, n) : a;
|
|
1335
|
-
}
|
|
1336
|
-
var o = e.split(i.formatSeparator), s = o.shift().trim(), l = o.join(i.formatSeparator).trim();
|
|
1337
|
-
return i.format(Qe(t, c, s), l, n, r);
|
|
1338
|
-
};
|
|
1339
|
-
this.resetRegExp();
|
|
1340
|
-
var d = r && r.missingInterpolationHandler || this.options.missingInterpolationHandler, f = r && r.interpolation && r.interpolation.skipOnVariables || this.options.interpolation.skipOnVariables;
|
|
1341
|
-
return [{
|
|
1342
|
-
regex: this.regexpUnescape,
|
|
1343
|
-
safeValue: function(e) {
|
|
1344
|
-
return l(e);
|
|
1345
|
-
}
|
|
1346
|
-
}, {
|
|
1347
|
-
regex: this.regexp,
|
|
1348
|
-
safeValue: function(e) {
|
|
1349
|
-
return i.escapeValue ? l(i.escape(e)) : l(e);
|
|
1350
|
-
}
|
|
1351
|
-
}].forEach(function(t) {
|
|
1352
|
-
for (s = 0; a = t.regex.exec(e);) {
|
|
1353
|
-
if (o = u(a[1].trim()), o === void 0) if (typeof d == "function") {
|
|
1354
|
-
var n = d(e, a, r);
|
|
1355
|
-
o = typeof n == "string" ? n : "";
|
|
1356
|
-
} else if (f) {
|
|
1357
|
-
o = a[0];
|
|
1358
|
-
continue;
|
|
1359
|
-
} else i.logger.warn(`missed to pass in variable ${a[1]} for interpolating ${e}`), o = "";
|
|
1360
|
-
else typeof o != "string" && !i.useRawValueToEscape && (o = Ke(o));
|
|
1361
|
-
if (e = e.replace(a[0], t.safeValue(o)), t.regex.lastIndex = 0, s++, s >= i.maxReplaces) break;
|
|
1362
|
-
}
|
|
1363
|
-
}), e;
|
|
1364
|
-
}
|
|
1365
|
-
},
|
|
1366
|
-
{
|
|
1367
|
-
key: "nest",
|
|
1368
|
-
value: function(e, t) {
|
|
1369
|
-
var n = this, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i, a, o = E({}, r);
|
|
1370
|
-
o.applyPostProcessor = !1, delete o.defaultValue;
|
|
1371
|
-
function s(e, t) {
|
|
1372
|
-
var n = this.nestingOptionsSeparator;
|
|
1373
|
-
if (e.indexOf(n) < 0) return e;
|
|
1374
|
-
var r = e.split(RegExp(`${n}[ ]*{`)), i = `{${r[1]}`;
|
|
1375
|
-
e = r[0], i = this.interpolate(i, o), i = i.replace(/'/g, "\"");
|
|
1376
|
-
try {
|
|
1377
|
-
o = JSON.parse(i), t && (o = E({}, t, o));
|
|
1378
|
-
} catch (t) {
|
|
1379
|
-
return this.logger.warn(`failed parsing options string in nesting for key ${e}`, t), `${e}${n}${i}`;
|
|
1380
|
-
}
|
|
1381
|
-
return delete o.defaultValue, e;
|
|
1382
|
-
}
|
|
1383
|
-
for (; i = this.nestingRegexp.exec(e);) {
|
|
1384
|
-
var c = [], l = !1;
|
|
1385
|
-
if (i[0].includes(this.formatSeparator) && !/{.*}/.test(i[1])) {
|
|
1386
|
-
var u = i[1].split(this.formatSeparator).map(function(e) {
|
|
1387
|
-
return e.trim();
|
|
1388
|
-
});
|
|
1389
|
-
i[1] = u.shift(), c = u, l = !0;
|
|
1390
|
-
}
|
|
1391
|
-
if (a = t(s.call(this, i[1].trim(), o), o), a && i[0] === e && typeof a != "string") return a;
|
|
1392
|
-
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) {
|
|
1393
|
-
return n.format(e, t, r.lng, r);
|
|
1394
|
-
}, a.trim())), e = e.replace(i[0], a), this.regexp.lastIndex = 0;
|
|
1395
|
-
}
|
|
1396
|
-
return e;
|
|
1397
|
-
}
|
|
1398
|
-
}
|
|
1399
|
-
]), e;
|
|
1400
|
-
}();
|
|
1401
|
-
function ht(e, t) {
|
|
1402
|
-
for (var n = e.indexOf(t); n !== -1;) e.splice(n, 1), n = e.indexOf(t);
|
|
1403
|
-
}
|
|
1404
|
-
var gt = function(e) {
|
|
1405
|
-
Ue(t, e);
|
|
1406
|
-
function t(e, n, r) {
|
|
1407
|
-
var i, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
1408
|
-
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;
|
|
1409
|
-
}
|
|
1410
|
-
return O(t, [
|
|
1411
|
-
{
|
|
1412
|
-
key: "queueLoad",
|
|
1413
|
-
value: function(e, t, n, r) {
|
|
1414
|
-
var i = this, a = [], o = [], s = [], c = [];
|
|
1415
|
-
return e.forEach(function(e) {
|
|
1416
|
-
var r = !0;
|
|
1417
|
-
t.forEach(function(t) {
|
|
1418
|
-
var s = `${e}|${t}`;
|
|
1419
|
-
!n.reload && i.store.hasResourceBundle(e, t) ? i.state[s] = 2 : i.state[s] < 0 || (i.state[s] === 1 ? o.indexOf(s) < 0 && o.push(s) : (i.state[s] = 1, r = !1, o.indexOf(s) < 0 && o.push(s), a.indexOf(s) < 0 && a.push(s), c.indexOf(t) < 0 && c.push(t)));
|
|
1420
|
-
}), r || s.push(e);
|
|
1421
|
-
}), (a.length || o.length) && this.queue.push({
|
|
1422
|
-
pending: o,
|
|
1423
|
-
loaded: {},
|
|
1424
|
-
errors: [],
|
|
1425
|
-
callback: r
|
|
1426
|
-
}), {
|
|
1427
|
-
toLoad: a,
|
|
1428
|
-
pending: o,
|
|
1429
|
-
toLoadLanguages: s,
|
|
1430
|
-
toLoadNamespaces: c
|
|
1431
|
-
};
|
|
1432
|
-
}
|
|
1433
|
-
},
|
|
1434
|
-
{
|
|
1435
|
-
key: "loaded",
|
|
1436
|
-
value: function(e, t, n) {
|
|
1437
|
-
var r = e.split("|"), i = r[0], a = r[1];
|
|
1438
|
-
t && this.emit("failedLoading", i, a, t), n && this.store.addResourceBundle(i, a, n), this.state[e] = t ? -1 : 2;
|
|
1439
|
-
var o = {};
|
|
1440
|
-
this.queue.forEach(function(n) {
|
|
1441
|
-
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) {
|
|
1442
|
-
o[e] || (o[e] = []), n.loaded[e].length && n.loaded[e].forEach(function(t) {
|
|
1443
|
-
o[e].indexOf(t) < 0 && o[e].push(t);
|
|
1444
|
-
});
|
|
1445
|
-
}), n.done = !0, n.errors.length ? n.callback(n.errors) : n.callback());
|
|
1446
|
-
}), this.emit("loaded", o), this.queue = this.queue.filter(function(e) {
|
|
1447
|
-
return !e.done;
|
|
1448
|
-
});
|
|
1449
|
-
}
|
|
1450
|
-
},
|
|
1451
|
-
{
|
|
1452
|
-
key: "read",
|
|
1453
|
-
value: function(e, t, n) {
|
|
1454
|
-
var r = this, i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 350, o = arguments.length > 5 ? arguments[5] : void 0;
|
|
1455
|
-
return e.length ? this.backend[n](e, t, function(s, c) {
|
|
1456
|
-
if (s && c && i < 5) {
|
|
1457
|
-
setTimeout(function() {
|
|
1458
|
-
r.read.call(r, e, t, n, i + 1, a * 2, o);
|
|
1459
|
-
}, a);
|
|
1460
|
-
return;
|
|
1461
|
-
}
|
|
1462
|
-
o(s, c);
|
|
1463
|
-
}) : o(null, {});
|
|
1464
|
-
}
|
|
1465
|
-
},
|
|
1466
|
-
{
|
|
1467
|
-
key: "prepareLoading",
|
|
1468
|
-
value: function(e, t) {
|
|
1469
|
-
var n = this, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = arguments.length > 3 ? arguments[3] : void 0;
|
|
1470
|
-
if (!this.backend) return this.logger.warn("No backend was added via i18next.use. Will not load resources."), i && i();
|
|
1471
|
-
typeof e == "string" && (e = this.languageUtils.toResolveHierarchy(e)), typeof t == "string" && (t = [t]);
|
|
1472
|
-
var a = this.queueLoad(e, t, r, i);
|
|
1473
|
-
if (!a.toLoad.length) return a.pending.length || i(), null;
|
|
1474
|
-
a.toLoad.forEach(function(e) {
|
|
1475
|
-
n.loadOne(e);
|
|
1476
|
-
});
|
|
1477
|
-
}
|
|
1478
|
-
},
|
|
1479
|
-
{
|
|
1480
|
-
key: "load",
|
|
1481
|
-
value: function(e, t, n) {
|
|
1482
|
-
this.prepareLoading(e, t, {}, n);
|
|
1483
|
-
}
|
|
1484
|
-
},
|
|
1485
|
-
{
|
|
1486
|
-
key: "reload",
|
|
1487
|
-
value: function(e, t, n) {
|
|
1488
|
-
this.prepareLoading(e, t, { reload: !0 }, n);
|
|
1489
|
-
}
|
|
1490
|
-
},
|
|
1491
|
-
{
|
|
1492
|
-
key: "loadOne",
|
|
1493
|
-
value: function(e) {
|
|
1494
|
-
var t = this, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", r = e.split("|"), i = r[0], a = r[1];
|
|
1495
|
-
this.read(i, a, "read", void 0, void 0, function(r, o) {
|
|
1496
|
-
r && t.logger.warn(`${n}loading namespace ${a} for language ${i} failed`, r), !r && o && t.logger.log(`${n}loaded namespace ${a} for language ${i}`, o), t.loaded(e, r, o);
|
|
1497
|
-
});
|
|
1498
|
-
}
|
|
1499
|
-
},
|
|
1500
|
-
{
|
|
1501
|
-
key: "saveMissing",
|
|
1502
|
-
value: function(e, t, n, r, i) {
|
|
1503
|
-
var a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
|
|
1504
|
-
if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(t)) {
|
|
1505
|
-
this.logger.warn(`did not save key "${n}" as the namespace "${t}" 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!!!");
|
|
1506
|
-
return;
|
|
1507
|
-
}
|
|
1508
|
-
n == null || n === "" || (this.backend && this.backend.create && this.backend.create(e, t, n, r, null, E({}, a, { isUpdate: i })), !(!e || !e[0]) && this.store.addResource(e[0], t, n, r));
|
|
1509
|
-
}
|
|
1510
|
-
}
|
|
1511
|
-
]), t;
|
|
1512
|
-
}(A);
|
|
1513
|
-
function _t() {
|
|
1514
|
-
return {
|
|
1515
|
-
debug: !1,
|
|
1516
|
-
initImmediate: !0,
|
|
1517
|
-
ns: ["translation"],
|
|
1518
|
-
defaultNS: ["translation"],
|
|
1519
|
-
fallbackLng: ["dev"],
|
|
1520
|
-
fallbackNS: !1,
|
|
1521
|
-
whitelist: !1,
|
|
1522
|
-
nonExplicitWhitelist: !1,
|
|
1523
|
-
supportedLngs: !1,
|
|
1524
|
-
nonExplicitSupportedLngs: !1,
|
|
1525
|
-
load: "all",
|
|
1526
|
-
preload: !1,
|
|
1527
|
-
simplifyPluralSuffix: !0,
|
|
1528
|
-
keySeparator: ".",
|
|
1529
|
-
nsSeparator: ":",
|
|
1530
|
-
pluralSeparator: "_",
|
|
1531
|
-
contextSeparator: "_",
|
|
1532
|
-
partialBundledLanguages: !1,
|
|
1533
|
-
saveMissing: !1,
|
|
1534
|
-
updateMissing: !1,
|
|
1535
|
-
saveMissingTo: "fallback",
|
|
1536
|
-
saveMissingPlurals: !0,
|
|
1537
|
-
missingKeyHandler: !1,
|
|
1538
|
-
missingInterpolationHandler: !1,
|
|
1539
|
-
postProcess: !1,
|
|
1540
|
-
postProcessPassResolved: !1,
|
|
1541
|
-
returnNull: !0,
|
|
1542
|
-
returnEmptyString: !0,
|
|
1543
|
-
returnObjects: !1,
|
|
1544
|
-
joinArrays: !1,
|
|
1545
|
-
returnedObjectHandler: !1,
|
|
1546
|
-
parseMissingKeyHandler: !1,
|
|
1547
|
-
appendNamespaceToMissingKey: !1,
|
|
1548
|
-
appendNamespaceToCIMode: !1,
|
|
1549
|
-
overloadTranslationOptionHandler: function(e) {
|
|
1550
|
-
var t = {};
|
|
1551
|
-
if (T(e[1]) === "object" && (t = e[1]), typeof e[1] == "string" && (t.defaultValue = e[1]), typeof e[2] == "string" && (t.tDescription = e[2]), T(e[2]) === "object" || T(e[3]) === "object") {
|
|
1552
|
-
var n = e[3] || e[2];
|
|
1553
|
-
Object.keys(n).forEach(function(e) {
|
|
1554
|
-
t[e] = n[e];
|
|
1555
|
-
});
|
|
1556
|
-
}
|
|
1557
|
-
return t;
|
|
1558
|
-
},
|
|
1559
|
-
interpolation: {
|
|
1560
|
-
escapeValue: !0,
|
|
1561
|
-
format: function(e, t, n, r) {
|
|
1562
|
-
return e;
|
|
1563
|
-
},
|
|
1564
|
-
prefix: "{{",
|
|
1565
|
-
suffix: "}}",
|
|
1566
|
-
formatSeparator: ",",
|
|
1567
|
-
unescapePrefix: "-",
|
|
1568
|
-
nestingPrefix: "$t(",
|
|
1569
|
-
nestingSuffix: ")",
|
|
1570
|
-
nestingOptionsSeparator: ",",
|
|
1571
|
-
maxReplaces: 1e3,
|
|
1572
|
-
skipOnVariables: !1
|
|
1573
|
-
}
|
|
1574
|
-
};
|
|
1575
|
-
}
|
|
1576
|
-
function vt(e) {
|
|
1577
|
-
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;
|
|
1578
|
-
}
|
|
1579
|
-
function yt() {}
|
|
1580
|
-
var bt = new (function(e) {
|
|
1581
|
-
Ue(t, e);
|
|
1582
|
-
function t() {
|
|
1583
|
-
var e, n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 ? arguments[1] : void 0;
|
|
1584
|
-
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) {
|
|
1585
|
-
if (!e.options.initImmediate) return e.init(n, r), Be(e, ze(e));
|
|
1586
|
-
setTimeout(function() {
|
|
1587
|
-
e.init(n, r);
|
|
1588
|
-
}, 0);
|
|
1589
|
-
}
|
|
1590
|
-
return e;
|
|
1591
|
-
}
|
|
1592
|
-
return O(t, [
|
|
1593
|
-
{
|
|
1594
|
-
key: "init",
|
|
1595
|
-
value: function() {
|
|
1596
|
-
var e = this, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 ? arguments[1] : void 0;
|
|
1597
|
-
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);
|
|
1598
|
-
function r(e) {
|
|
1599
|
-
return e ? typeof e == "function" ? new e() : e : null;
|
|
1600
|
-
}
|
|
1601
|
-
if (!this.options.isClone) {
|
|
1602
|
-
this.modules.logger ? k.init(r(this.modules.logger), this.options) : k.init(null, this.options);
|
|
1603
|
-
var i = new lt(this.options);
|
|
1604
|
-
this.store = new it(this.options.resources, this.options);
|
|
1605
|
-
var a = this.services;
|
|
1606
|
-
a.logger = k, a.resourceStore = this.store, a.languageUtils = i, a.pluralResolver = new pt(i, {
|
|
1607
|
-
prepend: this.options.pluralSeparator,
|
|
1608
|
-
compatibilityJSON: this.options.compatibilityJSON,
|
|
1609
|
-
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
1610
|
-
}), 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) {
|
|
1611
|
-
var n = [...arguments].slice(1);
|
|
1612
|
-
e.emit.apply(e, [t].concat(n));
|
|
1613
|
-
}), 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) {
|
|
1614
|
-
var n = [...arguments].slice(1);
|
|
1615
|
-
e.emit.apply(e, [t].concat(n));
|
|
1616
|
-
}), this.modules.external.forEach(function(t) {
|
|
1617
|
-
t.init && t.init(e);
|
|
1618
|
-
});
|
|
1619
|
-
}
|
|
1620
|
-
if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
1621
|
-
var o = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
1622
|
-
o.length > 0 && o[0] !== "dev" && (this.options.lng = o[0]);
|
|
1623
|
-
}
|
|
1624
|
-
!this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), [
|
|
1625
|
-
"getResource",
|
|
1626
|
-
"hasResourceBundle",
|
|
1627
|
-
"getResourceBundle",
|
|
1628
|
-
"getDataByLanguage"
|
|
1629
|
-
].forEach(function(t) {
|
|
1630
|
-
e[t] = function() {
|
|
1631
|
-
var n;
|
|
1632
|
-
return (n = e.store)[t].apply(n, arguments);
|
|
1633
|
-
};
|
|
1634
|
-
}), [
|
|
1635
|
-
"addResource",
|
|
1636
|
-
"addResources",
|
|
1637
|
-
"addResourceBundle",
|
|
1638
|
-
"removeResourceBundle"
|
|
1639
|
-
].forEach(function(t) {
|
|
1640
|
-
e[t] = function() {
|
|
1641
|
-
var n;
|
|
1642
|
-
return (n = e.store)[t].apply(n, arguments), e;
|
|
1643
|
-
};
|
|
1644
|
-
});
|
|
1645
|
-
var s = Ge(), c = function() {
|
|
1646
|
-
var t = function(t, r) {
|
|
1647
|
-
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);
|
|
1648
|
-
};
|
|
1649
|
-
if (e.languages && e.options.compatibilityAPI !== "v1" && !e.isInitialized) return t(null, e.t.bind(e));
|
|
1650
|
-
e.changeLanguage(e.options.lng, t);
|
|
1651
|
-
};
|
|
1652
|
-
return this.options.resources || !this.options.initImmediate ? c() : setTimeout(c, 0), s;
|
|
1653
|
-
}
|
|
1654
|
-
},
|
|
1655
|
-
{
|
|
1656
|
-
key: "loadResources",
|
|
1657
|
-
value: function(e) {
|
|
1658
|
-
var t = this, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : yt, r = typeof e == "string" ? e : this.language;
|
|
1659
|
-
if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
1660
|
-
if (r && r.toLowerCase() === "cimode") return n();
|
|
1661
|
-
var i = [], a = function(e) {
|
|
1662
|
-
e && t.services.languageUtils.toResolveHierarchy(e).forEach(function(e) {
|
|
1663
|
-
i.indexOf(e) < 0 && i.push(e);
|
|
1664
|
-
});
|
|
1665
|
-
};
|
|
1666
|
-
r ? a(r) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e) {
|
|
1667
|
-
return a(e);
|
|
1668
|
-
}), this.options.preload && this.options.preload.forEach(function(e) {
|
|
1669
|
-
return a(e);
|
|
1670
|
-
}), this.services.backendConnector.load(i, this.options.ns, n);
|
|
1671
|
-
} else n(null);
|
|
1672
|
-
}
|
|
1673
|
-
},
|
|
1674
|
-
{
|
|
1675
|
-
key: "reloadResources",
|
|
1676
|
-
value: function(e, t, n) {
|
|
1677
|
-
var r = Ge();
|
|
1678
|
-
return e || (e = this.languages), t || (t = this.options.ns), n || (n = yt), this.services.backendConnector.reload(e, t, function(e) {
|
|
1679
|
-
r.resolve(), n(e);
|
|
1680
|
-
}), r;
|
|
1681
|
-
}
|
|
1682
|
-
},
|
|
1683
|
-
{
|
|
1684
|
-
key: "use",
|
|
1685
|
-
value: function(e) {
|
|
1686
|
-
if (!e) throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
|
|
1687
|
-
if (!e.type) throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
|
|
1688
|
-
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;
|
|
1689
|
-
}
|
|
1690
|
-
},
|
|
1691
|
-
{
|
|
1692
|
-
key: "changeLanguage",
|
|
1693
|
-
value: function(e, t) {
|
|
1694
|
-
var n = this;
|
|
1695
|
-
this.isLanguageChangingTo = e;
|
|
1696
|
-
var r = Ge();
|
|
1697
|
-
this.emit("languageChanging", e);
|
|
1698
|
-
var i = function(e, i) {
|
|
1699
|
-
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() {
|
|
1700
|
-
return n.t.apply(n, arguments);
|
|
1701
|
-
}), t && t(e, function() {
|
|
1702
|
-
return n.t.apply(n, arguments);
|
|
1703
|
-
});
|
|
1704
|
-
}, a = function(e) {
|
|
1705
|
-
var t = typeof e == "string" ? e : n.services.languageUtils.getBestMatchFromCodes(e);
|
|
1706
|
-
t && (n.language || (n.language = t, n.languages = n.services.languageUtils.toResolveHierarchy(t)), n.translator.language || n.translator.changeLanguage(t), n.services.languageDetector && n.services.languageDetector.cacheUserLanguage(t)), n.loadResources(t, function(e) {
|
|
1707
|
-
i(e, t);
|
|
1708
|
-
});
|
|
1709
|
-
};
|
|
1710
|
-
return !e && this.services.languageDetector && !this.services.languageDetector.async ? a(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect(a) : a(e), r;
|
|
1711
|
-
}
|
|
1712
|
-
},
|
|
1713
|
-
{
|
|
1714
|
-
key: "getFixedT",
|
|
1715
|
-
value: function(e, t) {
|
|
1716
|
-
var n = this, r = function e(t, r) {
|
|
1717
|
-
var i;
|
|
1718
|
-
if (T(r) !== "object") {
|
|
1719
|
-
var a = [...arguments].slice(2);
|
|
1720
|
-
i = n.options.overloadTranslationOptionHandler([t, r].concat(a));
|
|
1721
|
-
} else i = E({}, r);
|
|
1722
|
-
return i.lng = i.lng || e.lng, i.lngs = i.lngs || e.lngs, i.ns = i.ns || e.ns, n.t(t, i);
|
|
1723
|
-
};
|
|
1724
|
-
return typeof e == "string" ? r.lng = e : r.lngs = e, r.ns = t, r;
|
|
1725
|
-
}
|
|
1726
|
-
},
|
|
1727
|
-
{
|
|
1728
|
-
key: "t",
|
|
1729
|
-
value: function() {
|
|
1730
|
-
var e;
|
|
1731
|
-
return this.translator && (e = this.translator).translate.apply(e, arguments);
|
|
1732
|
-
}
|
|
1733
|
-
},
|
|
1734
|
-
{
|
|
1735
|
-
key: "exists",
|
|
1736
|
-
value: function() {
|
|
1737
|
-
var e;
|
|
1738
|
-
return this.translator && (e = this.translator).exists.apply(e, arguments);
|
|
1739
|
-
}
|
|
1740
|
-
},
|
|
1741
|
-
{
|
|
1742
|
-
key: "setDefaultNamespace",
|
|
1743
|
-
value: function(e) {
|
|
1744
|
-
this.options.defaultNS = e;
|
|
1745
|
-
}
|
|
1746
|
-
},
|
|
1747
|
-
{
|
|
1748
|
-
key: "hasLoadedNamespace",
|
|
1749
|
-
value: function(e) {
|
|
1750
|
-
var t = this, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1751
|
-
if (!this.isInitialized) return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
|
|
1752
|
-
if (!this.languages || !this.languages.length) return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
|
|
1753
|
-
var r = this.languages[0], i = this.options ? this.options.fallbackLng : !1, a = this.languages[this.languages.length - 1];
|
|
1754
|
-
if (r.toLowerCase() === "cimode") return !0;
|
|
1755
|
-
var o = function(e, n) {
|
|
1756
|
-
var r = t.services.backendConnector.state[`${e}|${n}`];
|
|
1757
|
-
return r === -1 || r === 2;
|
|
1758
|
-
};
|
|
1759
|
-
if (n.precheck) {
|
|
1760
|
-
var s = n.precheck(this, o);
|
|
1761
|
-
if (s !== void 0) return s;
|
|
1762
|
-
}
|
|
1763
|
-
return !!(this.hasResourceBundle(r, e) || !this.services.backendConnector.backend || o(r, e) && (!i || o(a, e)));
|
|
1764
|
-
}
|
|
1765
|
-
},
|
|
1766
|
-
{
|
|
1767
|
-
key: "loadNamespaces",
|
|
1768
|
-
value: function(e, t) {
|
|
1769
|
-
var n = this, r = Ge();
|
|
1770
|
-
return this.options.ns ? (typeof e == "string" && (e = [e]), e.forEach(function(e) {
|
|
1771
|
-
n.options.ns.indexOf(e) < 0 && n.options.ns.push(e);
|
|
1772
|
-
}), this.loadResources(function(e) {
|
|
1773
|
-
r.resolve(), t && t(e);
|
|
1774
|
-
}), r) : (t && t(), Promise.resolve());
|
|
1775
|
-
}
|
|
1776
|
-
},
|
|
1777
|
-
{
|
|
1778
|
-
key: "loadLanguages",
|
|
1779
|
-
value: function(e, t) {
|
|
1780
|
-
var n = Ge();
|
|
1781
|
-
typeof e == "string" && (e = [e]);
|
|
1782
|
-
var r = this.options.preload || [], i = e.filter(function(e) {
|
|
1783
|
-
return r.indexOf(e) < 0;
|
|
1784
|
-
});
|
|
1785
|
-
return i.length ? (this.options.preload = r.concat(i), this.loadResources(function(e) {
|
|
1786
|
-
n.resolve(), t && t(e);
|
|
1787
|
-
}), n) : (t && t(), Promise.resolve());
|
|
1788
|
-
}
|
|
1789
|
-
},
|
|
1790
|
-
{
|
|
1791
|
-
key: "dir",
|
|
1792
|
-
value: function(e) {
|
|
1793
|
-
return e || (e = this.languages && this.languages.length > 0 ? this.languages[0] : this.language), e ? (/* @__PURE__ */ "ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam".split(".")).indexOf(this.services.languageUtils.getLanguagePartFromCode(e)) >= 0 ? "rtl" : "ltr" : "rtl";
|
|
1794
|
-
}
|
|
1795
|
-
},
|
|
1796
|
-
{
|
|
1797
|
-
key: "createInstance",
|
|
1798
|
-
value: function() {
|
|
1799
|
-
return new t(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, arguments.length > 1 ? arguments[1] : void 0);
|
|
1800
|
-
}
|
|
1801
|
-
},
|
|
1802
|
-
{
|
|
1803
|
-
key: "cloneInstance",
|
|
1804
|
-
value: function() {
|
|
1805
|
-
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);
|
|
1806
|
-
return [
|
|
1807
|
-
"store",
|
|
1808
|
-
"services",
|
|
1809
|
-
"language"
|
|
1810
|
-
].forEach(function(t) {
|
|
1811
|
-
a[t] = e[t];
|
|
1812
|
-
}), 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) {
|
|
1813
|
-
var t = [...arguments].slice(1);
|
|
1814
|
-
a.emit.apply(a, [e].concat(t));
|
|
1815
|
-
}), a.init(i, r), a.translator.options = a.options, a.translator.backendConnector.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, a;
|
|
1816
|
-
}
|
|
1817
|
-
}
|
|
1818
|
-
]), t;
|
|
1819
|
-
}(A))(), xt = "An invariant failed, however the error is obfuscated because this is a production build.", St = [];
|
|
1820
|
-
Object.freeze(St);
|
|
1821
|
-
var Ct = {};
|
|
1822
|
-
Object.freeze(Ct);
|
|
1823
|
-
function j() {
|
|
1824
|
-
return ++V.mobxGuid;
|
|
1825
|
-
}
|
|
1826
|
-
function M(e) {
|
|
1827
|
-
throw wt(!1, e), "X";
|
|
1828
|
-
}
|
|
1829
|
-
function wt(e, t) {
|
|
1830
|
-
if (!e) throw Error("[mobx] " + (t || xt));
|
|
1831
|
-
}
|
|
1832
|
-
function Tt(e) {
|
|
1833
|
-
var t = !1;
|
|
1834
|
-
return function() {
|
|
1835
|
-
if (!t) return t = !0, e.apply(this, arguments);
|
|
1836
|
-
};
|
|
1837
|
-
}
|
|
1838
|
-
var Et = function() {};
|
|
1839
|
-
function Dt(e) {
|
|
1840
|
-
var t = [];
|
|
1841
|
-
return e.forEach(function(e) {
|
|
1842
|
-
t.indexOf(e) === -1 && t.push(e);
|
|
1843
|
-
}), t;
|
|
1844
|
-
}
|
|
1845
|
-
function Ot(e) {
|
|
1846
|
-
return typeof e == "object" && !!e;
|
|
1847
|
-
}
|
|
1848
|
-
function kt(e) {
|
|
1849
|
-
if (typeof e != "object" || !e) return !1;
|
|
1850
|
-
var t = Object.getPrototypeOf(e);
|
|
1851
|
-
return t === Object.prototype || t === null;
|
|
1852
|
-
}
|
|
1853
|
-
function At(e) {
|
|
1854
|
-
if (Pt(e) || Z(e)) return e;
|
|
1855
|
-
if (Array.isArray(e)) return new Map(e);
|
|
1856
|
-
if (kt(e)) {
|
|
1857
|
-
var t = /* @__PURE__ */ new Map();
|
|
1858
|
-
for (var n in e) t.set(n, e[n]);
|
|
1859
|
-
return t;
|
|
1860
|
-
} else return M("Cannot convert to map from '" + e + "'");
|
|
1861
|
-
}
|
|
1862
|
-
function jt(e, t, n) {
|
|
1863
|
-
Object.defineProperty(e, t, {
|
|
1864
|
-
enumerable: !1,
|
|
1865
|
-
writable: !0,
|
|
1866
|
-
configurable: !0,
|
|
1867
|
-
value: n
|
|
1868
|
-
});
|
|
1869
|
-
}
|
|
1870
|
-
function Mt(e, t, n) {
|
|
1871
|
-
Object.defineProperty(e, t, {
|
|
1872
|
-
enumerable: !1,
|
|
1873
|
-
writable: !1,
|
|
1874
|
-
configurable: !0,
|
|
1875
|
-
value: n
|
|
1876
|
-
});
|
|
1877
|
-
}
|
|
1878
|
-
function Nt(e, t) {
|
|
1879
|
-
var n = Object.getOwnPropertyDescriptor(e, t);
|
|
1880
|
-
return !n || n.configurable !== !1 && n.writable !== !1;
|
|
1881
|
-
}
|
|
1882
|
-
function N(e, t) {
|
|
1883
|
-
var n = "isMobX" + e;
|
|
1884
|
-
return t.prototype[n] = !0, function(e) {
|
|
1885
|
-
return Ot(e) && e[n] === !0;
|
|
1886
|
-
};
|
|
1887
|
-
}
|
|
1888
|
-
function Pt(e) {
|
|
1889
|
-
return e instanceof Map;
|
|
1890
|
-
}
|
|
1891
|
-
function Ft(e) {
|
|
1892
|
-
return e instanceof Set;
|
|
1893
|
-
}
|
|
1894
|
-
function It(e) {
|
|
1895
|
-
var t = /* @__PURE__ */ new Set();
|
|
1896
|
-
for (var n in e) t.add(n);
|
|
1897
|
-
return Object.getOwnPropertySymbols(e).forEach(function(n) {
|
|
1898
|
-
Object.getOwnPropertyDescriptor(e, n).enumerable && t.add(n);
|
|
1899
|
-
}), Array.from(t);
|
|
1900
|
-
}
|
|
1901
|
-
function P(e) {
|
|
1902
|
-
return e && e.toString ? e.toString() : new String(e).toString();
|
|
1903
|
-
}
|
|
1904
|
-
function Lt(e) {
|
|
1905
|
-
return e === null ? null : typeof e == "object" ? "" + e : e;
|
|
1906
|
-
}
|
|
1907
|
-
var Rt = typeof Reflect < "u" && Reflect.ownKeys ? Reflect.ownKeys : Object.getOwnPropertySymbols ? function(e) {
|
|
1908
|
-
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
|
|
1909
|
-
} : /* istanbul ignore next */ Object.getOwnPropertyNames, F = Symbol("mobx administration"), zt = function() {
|
|
1910
|
-
function e(e) {
|
|
1911
|
-
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;
|
|
1912
|
-
}
|
|
1913
|
-
return e.prototype.onBecomeObserved = function() {
|
|
1914
|
-
this.onBecomeObservedListeners && this.onBecomeObservedListeners.forEach(function(e) {
|
|
1915
|
-
return e();
|
|
1916
|
-
});
|
|
1917
|
-
}, e.prototype.onBecomeUnobserved = function() {
|
|
1918
|
-
this.onBecomeUnobservedListeners && this.onBecomeUnobservedListeners.forEach(function(e) {
|
|
1919
|
-
return e();
|
|
1920
|
-
});
|
|
1921
|
-
}, e.prototype.reportObserved = function() {
|
|
1922
|
-
return ar(this);
|
|
1923
|
-
}, e.prototype.reportChanged = function() {
|
|
1924
|
-
H(), or(this), U();
|
|
1925
|
-
}, e.prototype.toString = function() {
|
|
1926
|
-
return this.name;
|
|
1927
|
-
}, e;
|
|
1928
|
-
}(), Bt = N("Atom", zt);
|
|
1929
|
-
function Vt(e, t, n) {
|
|
1930
|
-
t === void 0 && (t = Et), n === void 0 && (n = Et);
|
|
1931
|
-
var r = new zt(e);
|
|
1932
|
-
return t !== Et && jr(r, t), n !== Et && Mr(r, n), r;
|
|
1933
|
-
}
|
|
1934
|
-
function Ht(e, t) {
|
|
1935
|
-
return e === t;
|
|
1936
|
-
}
|
|
1937
|
-
function Ut(e, t) {
|
|
1938
|
-
return Ai(e, t);
|
|
1939
|
-
}
|
|
1940
|
-
function Wt(e, t) {
|
|
1941
|
-
return Ai(e, t, 1);
|
|
1942
|
-
}
|
|
1943
|
-
function Gt(e, t) {
|
|
1944
|
-
return Object.is(e, t);
|
|
1945
|
-
}
|
|
1946
|
-
var Kt = {
|
|
1947
|
-
identity: Ht,
|
|
1948
|
-
structural: Ut,
|
|
1949
|
-
default: Gt,
|
|
1950
|
-
shallow: Wt
|
|
1951
|
-
}, qt = function(e, t) {
|
|
1952
|
-
return qt = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
1953
|
-
e.__proto__ = t;
|
|
1954
|
-
} || function(e, t) {
|
|
1955
|
-
for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
1956
|
-
}, qt(e, t);
|
|
1957
|
-
};
|
|
1958
|
-
function Jt(e, t) {
|
|
1959
|
-
qt(e, t);
|
|
1960
|
-
function n() {
|
|
1961
|
-
this.constructor = e;
|
|
1962
|
-
}
|
|
1963
|
-
e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
|
|
1964
|
-
}
|
|
1965
|
-
var Yt = function() {
|
|
1966
|
-
return Yt = Object.assign || function(e) {
|
|
1967
|
-
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]);
|
|
1968
|
-
return e;
|
|
1969
|
-
}, Yt.apply(this, arguments);
|
|
1970
|
-
};
|
|
1971
|
-
function I(e) {
|
|
1972
|
-
var t = typeof Symbol == "function" && e[Symbol.iterator], n = 0;
|
|
1973
|
-
return t ? t.call(e) : { next: function() {
|
|
1974
|
-
return e && n >= e.length && (e = void 0), {
|
|
1975
|
-
value: e && e[n++],
|
|
1976
|
-
done: !e
|
|
1977
|
-
};
|
|
1978
|
-
} };
|
|
1979
|
-
}
|
|
1980
|
-
function Xt(e, t) {
|
|
1981
|
-
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
1982
|
-
if (!n) return e;
|
|
1983
|
-
var r = n.call(e), i, a = [], o;
|
|
1984
|
-
try {
|
|
1985
|
-
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
|
|
1986
|
-
} catch (e) {
|
|
1987
|
-
o = { error: e };
|
|
1988
|
-
} finally {
|
|
1989
|
-
try {
|
|
1990
|
-
i && !i.done && (n = r.return) && n.call(r);
|
|
1991
|
-
} finally {
|
|
1992
|
-
if (o) throw o.error;
|
|
1993
|
-
}
|
|
1994
|
-
}
|
|
1995
|
-
return a;
|
|
1996
|
-
}
|
|
1997
|
-
function Zt() {
|
|
1998
|
-
for (var e = [], t = 0; t < arguments.length; t++) e = e.concat(Xt(arguments[t]));
|
|
1999
|
-
return e;
|
|
2000
|
-
}
|
|
2001
|
-
var Qt = Symbol("mobx did run lazy initializers"), $t = Symbol("mobx pending decorators"), en = {}, tn = {};
|
|
2002
|
-
function nn(e, t) {
|
|
2003
|
-
var n = t ? en : tn;
|
|
2004
|
-
return n[e] || (n[e] = {
|
|
2005
|
-
configurable: !0,
|
|
2006
|
-
enumerable: t,
|
|
2007
|
-
get: function() {
|
|
2008
|
-
return rn(this), this[e];
|
|
2009
|
-
},
|
|
2010
|
-
set: function(t) {
|
|
2011
|
-
rn(this), this[e] = t;
|
|
2012
|
-
}
|
|
2013
|
-
});
|
|
2014
|
-
}
|
|
2015
|
-
function rn(e) {
|
|
2016
|
-
var t, n;
|
|
2017
|
-
if (e[Qt] !== !0) {
|
|
2018
|
-
var r = e[$t];
|
|
2019
|
-
if (r) {
|
|
2020
|
-
jt(e, Qt, !0);
|
|
2021
|
-
var i = Zt(Object.getOwnPropertySymbols(r), Object.keys(r));
|
|
2022
|
-
try {
|
|
2023
|
-
for (var a = I(i), o = a.next(); !o.done; o = a.next()) {
|
|
2024
|
-
var s = r[o.value];
|
|
2025
|
-
s.propertyCreator(e, s.prop, s.descriptor, s.decoratorTarget, s.decoratorArguments);
|
|
2026
|
-
}
|
|
2027
|
-
} catch (e) {
|
|
2028
|
-
t = { error: e };
|
|
2029
|
-
} finally {
|
|
2030
|
-
try {
|
|
2031
|
-
o && !o.done && (n = a.return) && n.call(a);
|
|
2032
|
-
} finally {
|
|
2033
|
-
if (t) throw t.error;
|
|
2034
|
-
}
|
|
2035
|
-
}
|
|
2036
|
-
}
|
|
2037
|
-
}
|
|
2038
|
-
}
|
|
2039
|
-
function an(e, t) {
|
|
2040
|
-
return function() {
|
|
2041
|
-
var n, r = function(r, i, a, o) {
|
|
2042
|
-
if (o === !0) return t(r, i, a, r, n), null;
|
|
2043
|
-
if (!Object.prototype.hasOwnProperty.call(r, $t)) {
|
|
2044
|
-
var s = r[$t];
|
|
2045
|
-
jt(r, $t, Yt({}, s));
|
|
2046
|
-
}
|
|
2047
|
-
return r[$t][i] = {
|
|
2048
|
-
prop: i,
|
|
2049
|
-
propertyCreator: t,
|
|
2050
|
-
descriptor: a,
|
|
2051
|
-
decoratorTarget: r,
|
|
2052
|
-
decoratorArguments: n
|
|
2053
|
-
}, nn(i, e);
|
|
2054
|
-
};
|
|
2055
|
-
return on(arguments) ? (n = St, r.apply(null, arguments)) : (n = Array.prototype.slice.call(arguments), r);
|
|
2056
|
-
};
|
|
2057
|
-
}
|
|
2058
|
-
function on(e) {
|
|
2059
|
-
return (e.length === 2 || e.length === 3) && (typeof e[1] == "string" || typeof e[1] == "symbol") || e.length === 4 && e[3] === !0;
|
|
2060
|
-
}
|
|
2061
|
-
function sn(e, t, n) {
|
|
2062
|
-
return Hr(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;
|
|
2063
|
-
}
|
|
2064
|
-
function cn(e, t, n) {
|
|
2065
|
-
return e == null || Ei(e) || di(e) || Z(e) || Q(e) ? e : Array.isArray(e) ? L.array(e, {
|
|
2066
|
-
name: n,
|
|
2067
|
-
deep: !1
|
|
2068
|
-
}) : kt(e) ? L.object(e, void 0, {
|
|
2069
|
-
name: n,
|
|
2070
|
-
deep: !1
|
|
2071
|
-
}) : Pt(e) ? L.map(e, {
|
|
2072
|
-
name: n,
|
|
2073
|
-
deep: !1
|
|
2074
|
-
}) : Ft(e) ? L.set(e, {
|
|
2075
|
-
name: n,
|
|
2076
|
-
deep: !1
|
|
2077
|
-
}) : M(!1);
|
|
2078
|
-
}
|
|
2079
|
-
function ln(e) {
|
|
2080
|
-
return e;
|
|
2081
|
-
}
|
|
2082
|
-
function un(e, t, n) {
|
|
2083
|
-
return Ai(e, t) ? t : e;
|
|
2084
|
-
}
|
|
2085
|
-
function dn(e) {
|
|
2086
|
-
wt(e);
|
|
2087
|
-
var t = an(!0, function(t, n, r, i, a) {
|
|
2088
|
-
var o = r ? r.initializer ? r.initializer.call(t) : r.value : void 0;
|
|
2089
|
-
yi(t).addObservableProp(n, o, e);
|
|
2090
|
-
}), n = (typeof process < "u" && process.env, t);
|
|
2091
|
-
return n.enhancer = e, n;
|
|
2092
|
-
}
|
|
2093
|
-
var fn = {
|
|
2094
|
-
deep: !0,
|
|
2095
|
-
name: void 0,
|
|
2096
|
-
defaultDecorator: void 0,
|
|
2097
|
-
proxy: !0
|
|
2098
|
-
};
|
|
2099
|
-
Object.freeze(fn);
|
|
2100
|
-
function pn(e) {
|
|
2101
|
-
return e == null ? fn : typeof e == "string" ? {
|
|
2102
|
-
name: e,
|
|
2103
|
-
deep: !0,
|
|
2104
|
-
proxy: !0
|
|
2105
|
-
} : e;
|
|
2106
|
-
}
|
|
2107
|
-
var mn = dn(sn), hn = dn(cn), gn = dn(ln), _n = dn(un);
|
|
2108
|
-
function vn(e) {
|
|
2109
|
-
return e.defaultDecorator ? e.defaultDecorator.enhancer : e.deep === !1 ? ln : sn;
|
|
2110
|
-
}
|
|
2111
|
-
function yn(e, t, n) {
|
|
2112
|
-
if (typeof arguments[1] == "string" || typeof arguments[1] == "symbol") return mn.apply(null, arguments);
|
|
2113
|
-
if (Hr(e)) return e;
|
|
2114
|
-
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;
|
|
2115
|
-
if (r !== e) return r;
|
|
2116
|
-
M(!1);
|
|
2117
|
-
}
|
|
2118
|
-
var bn = {
|
|
2119
|
-
box: function(e, t) {
|
|
2120
|
-
arguments.length > 2 && xn("box");
|
|
2121
|
-
var n = pn(t);
|
|
2122
|
-
return new Kn(e, vn(n), n.name, !0, n.equals);
|
|
2123
|
-
},
|
|
2124
|
-
array: function(e, t) {
|
|
2125
|
-
arguments.length > 2 && xn("array");
|
|
2126
|
-
var n = pn(t);
|
|
2127
|
-
return ci(e, vn(n), n.name);
|
|
2128
|
-
},
|
|
2129
|
-
map: function(e, t) {
|
|
2130
|
-
arguments.length > 2 && xn("map");
|
|
2131
|
-
var n = pn(t);
|
|
2132
|
-
return new mi(e, vn(n), n.name);
|
|
2133
|
-
},
|
|
2134
|
-
set: function(e, t) {
|
|
2135
|
-
arguments.length > 2 && xn("set");
|
|
2136
|
-
var n = pn(t);
|
|
2137
|
-
return new _i(e, vn(n), n.name);
|
|
2138
|
-
},
|
|
2139
|
-
object: function(e, t, n) {
|
|
2140
|
-
typeof arguments[1] == "string" && xn("object");
|
|
2141
|
-
var r = pn(n);
|
|
2142
|
-
if (r.proxy === !1) return Fr({}, e, t, r);
|
|
2143
|
-
var i = Ir(r), a = ri(Fr({}, void 0, void 0, r));
|
|
2144
|
-
return Lr(a, e, t, i), a;
|
|
2145
|
-
},
|
|
2146
|
-
ref: gn,
|
|
2147
|
-
shallow: hn,
|
|
2148
|
-
deep: mn,
|
|
2149
|
-
struct: _n
|
|
2150
|
-
}, L = yn;
|
|
2151
|
-
Object.keys(bn).forEach(function(e) {
|
|
2152
|
-
return L[e] = bn[e];
|
|
2153
|
-
});
|
|
2154
|
-
function xn(e) {
|
|
2155
|
-
M("Expected one or two arguments to observable." + e + ". Did you accidentally try to use observable." + e + " as decorator?");
|
|
2156
|
-
}
|
|
2157
|
-
var Sn = an(!1, function(e, t, n, r, i) {
|
|
2158
|
-
var a = n.get, o = n.set, s = i[0] || {};
|
|
2159
|
-
yi(e).addComputedProp(e, t, Yt({
|
|
2160
|
-
get: a,
|
|
2161
|
-
set: o,
|
|
2162
|
-
context: e
|
|
2163
|
-
}, s));
|
|
2164
|
-
}), Cn = Sn({ equals: Kt.structural }), wn = function(e, t, n) {
|
|
2165
|
-
if (typeof t == "string" || typeof e == "object" && e && arguments.length === 1) return Sn.apply(null, arguments);
|
|
2166
|
-
var r = typeof t == "object" ? t : {};
|
|
2167
|
-
return r.get = e, r.set = typeof t == "function" ? t : r.set, r.name = r.name || e.name || "", new Jn(r);
|
|
2168
|
-
};
|
|
2169
|
-
wn.struct = Cn;
|
|
2170
|
-
var R;
|
|
2171
|
-
(function(e) {
|
|
2172
|
-
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";
|
|
2173
|
-
})(R || (R = {}));
|
|
2174
|
-
var z;
|
|
2175
|
-
(function(e) {
|
|
2176
|
-
e[e.NONE = 0] = "NONE", e[e.LOG = 1] = "LOG", e[e.BREAK = 2] = "BREAK";
|
|
2177
|
-
})(z || (z = {}));
|
|
2178
|
-
var Tn = function() {
|
|
2179
|
-
function e(e) {
|
|
2180
|
-
this.cause = e;
|
|
2181
|
-
}
|
|
2182
|
-
return e;
|
|
2183
|
-
}();
|
|
2184
|
-
function En(e) {
|
|
2185
|
-
return e instanceof Tn;
|
|
2186
|
-
}
|
|
2187
|
-
function Dn(e) {
|
|
2188
|
-
switch (e.dependenciesState) {
|
|
2189
|
-
case R.UP_TO_DATE: return !1;
|
|
2190
|
-
case R.NOT_TRACKING:
|
|
2191
|
-
case R.STALE: return !0;
|
|
2192
|
-
case R.POSSIBLY_STALE:
|
|
2193
|
-
for (var t = Pn(!0), n = Nn(), r = e.observing, i = r.length, a = 0; a < i; a++) {
|
|
2194
|
-
var o = r[a];
|
|
2195
|
-
if (Yn(o)) {
|
|
2196
|
-
if (V.disableErrorBoundaries) o.get();
|
|
2197
|
-
else try {
|
|
2198
|
-
o.get();
|
|
2199
|
-
} catch {
|
|
2200
|
-
return B(n), Fn(t), !0;
|
|
2201
|
-
}
|
|
2202
|
-
if (e.dependenciesState === R.STALE) return B(n), Fn(t), !0;
|
|
2203
|
-
}
|
|
2204
|
-
}
|
|
2205
|
-
return In(e), B(n), Fn(t), !1;
|
|
2206
|
-
}
|
|
2207
|
-
}
|
|
2208
|
-
function On(e) {
|
|
2209
|
-
var t = e.observers.size > 0;
|
|
2210
|
-
V.computationDepth > 0 && t && M(!1), !V.allowStateChanges && (t || V.enforceActions === "strict") && M(!1);
|
|
2211
|
-
}
|
|
2212
|
-
function kn(e, t, n) {
|
|
2213
|
-
var r = Pn(!0);
|
|
2214
|
-
In(e), e.newObserving = Array(e.observing.length + 100), e.unboundDepsCount = 0, e.runId = ++V.runId;
|
|
2215
|
-
var i = V.trackingDerivation;
|
|
2216
|
-
V.trackingDerivation = e;
|
|
2217
|
-
var a;
|
|
2218
|
-
if (V.disableErrorBoundaries === !0) a = t.call(n);
|
|
2219
|
-
else try {
|
|
2220
|
-
a = t.call(n);
|
|
2221
|
-
} catch (e) {
|
|
2222
|
-
a = new Tn(e);
|
|
2223
|
-
}
|
|
2224
|
-
return V.trackingDerivation = i, An(e), Fn(r), a;
|
|
2225
|
-
}
|
|
2226
|
-
function An(e) {
|
|
2227
|
-
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++) {
|
|
2228
|
-
var s = n[o];
|
|
2229
|
-
s.diffValue === 0 && (s.diffValue = 1, i !== o && (n[i] = s), i++), s.dependenciesState > r && (r = s.dependenciesState);
|
|
2230
|
-
}
|
|
2231
|
-
for (n.length = i, e.newObserving = null, a = t.length; a--;) {
|
|
2232
|
-
var s = t[a];
|
|
2233
|
-
s.diffValue === 0 && rr(s, e), s.diffValue = 0;
|
|
2234
|
-
}
|
|
2235
|
-
for (; i--;) {
|
|
2236
|
-
var s = n[i];
|
|
2237
|
-
s.diffValue === 1 && (s.diffValue = 0, nr(s, e));
|
|
2238
|
-
}
|
|
2239
|
-
r !== R.UP_TO_DATE && (e.dependenciesState = r, e.onBecomeStale());
|
|
2240
|
-
}
|
|
2241
|
-
function jn(e) {
|
|
2242
|
-
var t = e.observing;
|
|
2243
|
-
e.observing = [];
|
|
2244
|
-
for (var n = t.length; n--;) rr(t[n], e);
|
|
2245
|
-
e.dependenciesState = R.NOT_TRACKING;
|
|
2246
|
-
}
|
|
2247
|
-
function Mn(e) {
|
|
2248
|
-
var t = Nn();
|
|
2249
|
-
try {
|
|
2250
|
-
return e();
|
|
2251
|
-
} finally {
|
|
2252
|
-
B(t);
|
|
2253
|
-
}
|
|
2254
|
-
}
|
|
2255
|
-
function Nn() {
|
|
2256
|
-
var e = V.trackingDerivation;
|
|
2257
|
-
return V.trackingDerivation = null, e;
|
|
2258
|
-
}
|
|
2259
|
-
function B(e) {
|
|
2260
|
-
V.trackingDerivation = e;
|
|
2261
|
-
}
|
|
2262
|
-
function Pn(e) {
|
|
2263
|
-
var t = V.allowStateReads;
|
|
2264
|
-
return V.allowStateReads = e, t;
|
|
2265
|
-
}
|
|
2266
|
-
function Fn(e) {
|
|
2267
|
-
V.allowStateReads = e;
|
|
2268
|
-
}
|
|
2269
|
-
function In(e) {
|
|
2270
|
-
if (e.dependenciesState !== R.UP_TO_DATE) {
|
|
2271
|
-
e.dependenciesState = R.UP_TO_DATE;
|
|
2272
|
-
for (var t = e.observing, n = t.length; n--;) t[n].lowestObserverState = R.UP_TO_DATE;
|
|
2273
|
-
}
|
|
2274
|
-
}
|
|
2275
|
-
var Ln = 0, Rn = 1, zn = Object.getOwnPropertyDescriptor(function() {}, "name");
|
|
2276
|
-
zn && zn.configurable;
|
|
2277
|
-
function Bn(e, t, n) {
|
|
2278
|
-
var r = function() {
|
|
2279
|
-
return Vn(e, t, n || this, arguments);
|
|
2280
|
-
};
|
|
2281
|
-
return r.isMobxAction = !0, r;
|
|
2282
|
-
}
|
|
2283
|
-
function Vn(e, t, n, r) {
|
|
2284
|
-
var i = Hn(e, n, r);
|
|
2285
|
-
try {
|
|
2286
|
-
return t.apply(n, r);
|
|
2287
|
-
} catch (e) {
|
|
2288
|
-
throw i.error = e, e;
|
|
2289
|
-
} finally {
|
|
2290
|
-
Un(i);
|
|
2291
|
-
}
|
|
2292
|
-
}
|
|
2293
|
-
function Hn(e, t, n) {
|
|
2294
|
-
var r = W() && !!e, i = 0, a = Nn();
|
|
2295
|
-
H();
|
|
2296
|
-
var o = {
|
|
2297
|
-
prevDerivation: a,
|
|
2298
|
-
prevAllowStateChanges: Wn(!0),
|
|
2299
|
-
prevAllowStateReads: Pn(!0),
|
|
2300
|
-
notifySpy: r,
|
|
2301
|
-
startTime: i,
|
|
2302
|
-
actionId: Rn++,
|
|
2303
|
-
parentActionId: Ln
|
|
2304
|
-
};
|
|
2305
|
-
return Ln = o.actionId, o;
|
|
2306
|
-
}
|
|
2307
|
-
function Un(e) {
|
|
2308
|
-
Ln !== e.actionId && M("invalid action stack. did you forget to finish an action?"), Ln = e.parentActionId, e.error !== void 0 && (V.suppressReactionErrors = !0), Gn(e.prevAllowStateChanges), Fn(e.prevAllowStateReads), U(), B(e.prevDerivation), e.notifySpy, V.suppressReactionErrors = !1;
|
|
2309
|
-
}
|
|
2310
|
-
function Wn(e) {
|
|
2311
|
-
var t = V.allowStateChanges;
|
|
2312
|
-
return V.allowStateChanges = e, t;
|
|
2313
|
-
}
|
|
2314
|
-
function Gn(e) {
|
|
2315
|
-
V.allowStateChanges = e;
|
|
2316
|
-
}
|
|
2317
|
-
var Kn = function(e) {
|
|
2318
|
-
Jt(t, e);
|
|
2319
|
-
function t(t, n, r, i, a) {
|
|
2320
|
-
r === void 0 && (r = "ObservableValue@" + j()), i === void 0 && (i = !0), a === void 0 && (a = Kt.default);
|
|
2321
|
-
var o = e.call(this, r) || this;
|
|
2322
|
-
return o.enhancer = n, o.name = r, o.equals = a, o.hasUnreportedChange = !1, o.value = n(t, void 0, r), o;
|
|
2323
|
-
}
|
|
2324
|
-
return t.prototype.dehanceValue = function(e) {
|
|
2325
|
-
return this.dehancer === void 0 ? e : this.dehancer(e);
|
|
2326
|
-
}, t.prototype.set = function(e) {
|
|
2327
|
-
this.value, e = this.prepareNewValue(e), e !== V.UNCHANGED && this.setNewValue(e);
|
|
2328
|
-
}, t.prototype.prepareNewValue = function(e) {
|
|
2329
|
-
if (On(this), K(this)) {
|
|
2330
|
-
var t = q(this, {
|
|
2331
|
-
object: this,
|
|
2332
|
-
type: "update",
|
|
2333
|
-
newValue: e
|
|
2334
|
-
});
|
|
2335
|
-
if (!t) return V.UNCHANGED;
|
|
2336
|
-
e = t.newValue;
|
|
2337
|
-
}
|
|
2338
|
-
return e = this.enhancer(e, this.value, this.name), this.equals(this.value, e) ? V.UNCHANGED : e;
|
|
2339
|
-
}, t.prototype.setNewValue = function(e) {
|
|
2340
|
-
var t = this.value;
|
|
2341
|
-
this.value = e, this.reportChanged(), J(this) && Y(this, {
|
|
2342
|
-
type: "update",
|
|
2343
|
-
object: this,
|
|
2344
|
-
newValue: e,
|
|
2345
|
-
oldValue: t
|
|
2346
|
-
});
|
|
2347
|
-
}, t.prototype.get = function() {
|
|
2348
|
-
return this.reportObserved(), this.dehanceValue(this.value);
|
|
2349
|
-
}, t.prototype.intercept = function(e) {
|
|
2350
|
-
return ii(this, e);
|
|
2351
|
-
}, t.prototype.observe = function(e, t) {
|
|
2352
|
-
return t && e({
|
|
2353
|
-
object: this,
|
|
2354
|
-
type: "update",
|
|
2355
|
-
newValue: this.value,
|
|
2356
|
-
oldValue: void 0
|
|
2357
|
-
}), ai(this, e);
|
|
2358
|
-
}, t.prototype.toJSON = function() {
|
|
2359
|
-
return this.get();
|
|
2360
|
-
}, t.prototype.toString = function() {
|
|
2361
|
-
return this.name + "[" + this.value + "]";
|
|
2362
|
-
}, t.prototype.valueOf = function() {
|
|
2363
|
-
return Lt(this.get());
|
|
2364
|
-
}, t.prototype[Symbol.toPrimitive] = function() {
|
|
2365
|
-
return this.valueOf();
|
|
2366
|
-
}, t;
|
|
2367
|
-
}(zt), qn = N("ObservableValue", Kn), Jn = function() {
|
|
2368
|
-
function e(e) {
|
|
2369
|
-
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 = Bn(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;
|
|
2370
|
-
}
|
|
2371
|
-
return e.prototype.onBecomeStale = function() {
|
|
2372
|
-
cr(this);
|
|
2373
|
-
}, e.prototype.onBecomeObserved = function() {
|
|
2374
|
-
this.onBecomeObservedListeners && this.onBecomeObservedListeners.forEach(function(e) {
|
|
2375
|
-
return e();
|
|
2376
|
-
});
|
|
2377
|
-
}, e.prototype.onBecomeUnobserved = function() {
|
|
2378
|
-
this.onBecomeUnobservedListeners && this.onBecomeUnobservedListeners.forEach(function(e) {
|
|
2379
|
-
return e();
|
|
2380
|
-
});
|
|
2381
|
-
}, e.prototype.get = function() {
|
|
2382
|
-
this.isComputing && M("Cycle detected in computation " + this.name + ": " + this.derivation), V.inBatch === 0 && this.observers.size === 0 && !this.keepAlive ? Dn(this) && (this.warnAboutUntrackedRead(), H(), this.value = this.computeValue(!1), U()) : (ar(this), Dn(this) && this.trackAndCompute() && sr(this));
|
|
2383
|
-
var e = this.value;
|
|
2384
|
-
if (En(e)) throw e.cause;
|
|
2385
|
-
return e;
|
|
2386
|
-
}, e.prototype.peek = function() {
|
|
2387
|
-
var e = this.computeValue(!1);
|
|
2388
|
-
if (En(e)) throw e.cause;
|
|
2389
|
-
return e;
|
|
2390
|
-
}, e.prototype.set = function(e) {
|
|
2391
|
-
if (this.setter) {
|
|
2392
|
-
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;
|
|
2393
|
-
try {
|
|
2394
|
-
this.setter.call(this.scope, e);
|
|
2395
|
-
} finally {
|
|
2396
|
-
this.isRunningSetter = !1;
|
|
2397
|
-
}
|
|
2398
|
-
} else wt(!1, !1);
|
|
2399
|
-
}, e.prototype.trackAndCompute = function() {
|
|
2400
|
-
var e = this.value, t = this.dependenciesState === R.NOT_TRACKING, n = this.computeValue(!0), r = t || En(e) || En(n) || !this.equals(e, n);
|
|
2401
|
-
return r && (this.value = n), r;
|
|
2402
|
-
}, e.prototype.computeValue = function(e) {
|
|
2403
|
-
this.isComputing = !0, V.computationDepth++;
|
|
2404
|
-
var t;
|
|
2405
|
-
if (e) t = kn(this, this.derivation, this.scope);
|
|
2406
|
-
else if (V.disableErrorBoundaries === !0) t = this.derivation.call(this.scope);
|
|
2407
|
-
else try {
|
|
2408
|
-
t = this.derivation.call(this.scope);
|
|
2409
|
-
} catch (e) {
|
|
2410
|
-
t = new Tn(e);
|
|
2411
|
-
}
|
|
2412
|
-
return V.computationDepth--, this.isComputing = !1, t;
|
|
2413
|
-
}, e.prototype.suspend = function() {
|
|
2414
|
-
this.keepAlive || (jn(this), this.value = void 0);
|
|
2415
|
-
}, e.prototype.observe = function(e, t) {
|
|
2416
|
-
var n = this, r = !0, i = void 0;
|
|
2417
|
-
return Er(function() {
|
|
2418
|
-
var a = n.get();
|
|
2419
|
-
if (!r || t) {
|
|
2420
|
-
var o = Nn();
|
|
2421
|
-
e({
|
|
2422
|
-
type: "update",
|
|
2423
|
-
object: n,
|
|
2424
|
-
newValue: a,
|
|
2425
|
-
oldValue: i
|
|
2426
|
-
}), B(o);
|
|
2427
|
-
}
|
|
2428
|
-
r = !1, i = a;
|
|
2429
|
-
});
|
|
2430
|
-
}, e.prototype.warnAboutUntrackedRead = function() {}, e.prototype.toJSON = function() {
|
|
2431
|
-
return this.get();
|
|
2432
|
-
}, e.prototype.toString = function() {
|
|
2433
|
-
return this.name + "[" + this.derivation.toString() + "]";
|
|
2434
|
-
}, e.prototype.valueOf = function() {
|
|
2435
|
-
return Lt(this.get());
|
|
2436
|
-
}, e.prototype[Symbol.toPrimitive] = function() {
|
|
2437
|
-
return this.valueOf();
|
|
2438
|
-
}, e;
|
|
2439
|
-
}(), Yn = N("ComputedValue", Jn), Xn = function() {
|
|
2440
|
-
function e() {
|
|
2441
|
-
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;
|
|
2442
|
-
}
|
|
2443
|
-
return e;
|
|
2444
|
-
}(), Zn = {};
|
|
2445
|
-
function Qn() {
|
|
2446
|
-
return typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : Zn;
|
|
2447
|
-
}
|
|
2448
|
-
var $n = !0, er = !1, V = (function() {
|
|
2449
|
-
var e = Qn();
|
|
2450
|
-
return e.__mobxInstanceCount > 0 && !e.__mobxGlobals && ($n = !1), e.__mobxGlobals && e.__mobxGlobals.version !== new Xn().version && ($n = !1), $n ? e.__mobxGlobals ? (e.__mobxInstanceCount += 1, e.__mobxGlobals.UNCHANGED || (e.__mobxGlobals.UNCHANGED = {}), e.__mobxGlobals) : (e.__mobxInstanceCount = 1, e.__mobxGlobals = new Xn()) : (setTimeout(function() {
|
|
2451
|
-
er || M("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`");
|
|
2452
|
-
}, 1), new Xn());
|
|
2453
|
-
})();
|
|
2454
|
-
function tr() {
|
|
2455
|
-
(V.pendingReactions.length || V.inBatch || V.isRunningReactions) && M("isolateGlobalState should be called before MobX is running any reactions"), er = !0, $n && (--Qn().__mobxInstanceCount === 0 && (Qn().__mobxGlobals = void 0), V = new Xn());
|
|
2456
|
-
}
|
|
2457
|
-
function nr(e, t) {
|
|
2458
|
-
e.observers.add(t), e.lowestObserverState > t.dependenciesState && (e.lowestObserverState = t.dependenciesState);
|
|
2459
|
-
}
|
|
2460
|
-
function rr(e, t) {
|
|
2461
|
-
e.observers.delete(t), e.observers.size === 0 && ir(e);
|
|
2462
|
-
}
|
|
2463
|
-
function ir(e) {
|
|
2464
|
-
e.isPendingUnobservation === !1 && (e.isPendingUnobservation = !0, V.pendingUnobservations.push(e));
|
|
2465
|
-
}
|
|
2466
|
-
function H() {
|
|
2467
|
-
V.inBatch++;
|
|
2468
|
-
}
|
|
2469
|
-
function U() {
|
|
2470
|
-
if (--V.inBatch === 0) {
|
|
2471
|
-
mr();
|
|
2472
|
-
for (var e = V.pendingUnobservations, t = 0; t < e.length; t++) {
|
|
2473
|
-
var n = e[t];
|
|
2474
|
-
n.isPendingUnobservation = !1, n.observers.size === 0 && (n.isBeingObserved && (n.isBeingObserved = !1, n.onBecomeUnobserved()), n instanceof Jn && n.suspend());
|
|
2475
|
-
}
|
|
2476
|
-
V.pendingUnobservations = [];
|
|
2477
|
-
}
|
|
2478
|
-
}
|
|
2479
|
-
function ar(e) {
|
|
2480
|
-
var t = V.trackingDerivation;
|
|
2481
|
-
return t === null ? (e.observers.size === 0 && V.inBatch > 0 && ir(e), !1) : (t.runId !== e.lastAccessedBy && (e.lastAccessedBy = t.runId, t.newObserving[t.unboundDepsCount++] = e, e.isBeingObserved || (e.isBeingObserved = !0, e.onBecomeObserved())), !0);
|
|
2482
|
-
}
|
|
2483
|
-
function or(e) {
|
|
2484
|
-
e.lowestObserverState !== R.STALE && (e.lowestObserverState = R.STALE, e.observers.forEach(function(t) {
|
|
2485
|
-
t.dependenciesState === R.UP_TO_DATE && (t.isTracing !== z.NONE && lr(t, e), t.onBecomeStale()), t.dependenciesState = R.STALE;
|
|
2486
|
-
}));
|
|
2487
|
-
}
|
|
2488
|
-
function sr(e) {
|
|
2489
|
-
e.lowestObserverState !== R.STALE && (e.lowestObserverState = R.STALE, e.observers.forEach(function(t) {
|
|
2490
|
-
t.dependenciesState === R.POSSIBLY_STALE ? t.dependenciesState = R.STALE : t.dependenciesState === R.UP_TO_DATE && (e.lowestObserverState = R.UP_TO_DATE);
|
|
2491
|
-
}));
|
|
2492
|
-
}
|
|
2493
|
-
function cr(e) {
|
|
2494
|
-
e.lowestObserverState === R.UP_TO_DATE && (e.lowestObserverState = R.POSSIBLY_STALE, e.observers.forEach(function(t) {
|
|
2495
|
-
t.dependenciesState === R.UP_TO_DATE && (t.dependenciesState = R.POSSIBLY_STALE, t.isTracing !== z.NONE && lr(t, e), t.onBecomeStale());
|
|
2496
|
-
}));
|
|
2497
|
-
}
|
|
2498
|
-
function lr(e, t) {
|
|
2499
|
-
if (console.log("[mobx.trace] '" + e.name + "' is invalidated due to a change in: '" + t.name + "'"), e.isTracing === z.BREAK) {
|
|
2500
|
-
var n = [];
|
|
2501
|
-
ur(Rr(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 Jn ? e.derivation.toString().replace(/[*]\//g, "/") : "") + "\n\nThe dependencies for this derivation are:\n\n" + n.join("\n") + "\n*/\n ")();
|
|
2502
|
-
}
|
|
2503
|
-
}
|
|
2504
|
-
function ur(e, t, n) {
|
|
2505
|
-
if (t.length >= 1e3) {
|
|
2506
|
-
t.push("(and many more)");
|
|
2507
|
-
return;
|
|
2508
|
-
}
|
|
2509
|
-
t.push("" + Array(n).join(" ") + e.name), e.dependencies && e.dependencies.forEach(function(e) {
|
|
2510
|
-
return ur(e, t, n + 1);
|
|
2511
|
-
});
|
|
2512
|
-
}
|
|
2513
|
-
var dr = function() {
|
|
2514
|
-
function e(e, t, n, r) {
|
|
2515
|
-
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;
|
|
2516
|
-
}
|
|
2517
|
-
return e.prototype.onBecomeStale = function() {
|
|
2518
|
-
this.schedule();
|
|
2519
|
-
}, e.prototype.schedule = function() {
|
|
2520
|
-
this._isScheduled || (this._isScheduled = !0, V.pendingReactions.push(this), mr());
|
|
2521
|
-
}, e.prototype.isScheduled = function() {
|
|
2522
|
-
return this._isScheduled;
|
|
2523
|
-
}, e.prototype.runReaction = function() {
|
|
2524
|
-
if (!this.isDisposed) {
|
|
2525
|
-
if (H(), this._isScheduled = !1, Dn(this)) {
|
|
2526
|
-
this._isTrackPending = !0;
|
|
2527
|
-
try {
|
|
2528
|
-
this.onInvalidate(), this._isTrackPending;
|
|
2529
|
-
} catch (e) {
|
|
2530
|
-
this.reportExceptionInDerivation(e);
|
|
2531
|
-
}
|
|
2532
|
-
}
|
|
2533
|
-
U();
|
|
2534
|
-
}
|
|
2535
|
-
}, e.prototype.track = function(e) {
|
|
2536
|
-
if (!this.isDisposed) {
|
|
2537
|
-
H(), this._isRunning = !0;
|
|
2538
|
-
var t = kn(this, e, void 0);
|
|
2539
|
-
this._isRunning = !1, this._isTrackPending = !1, this.isDisposed && jn(this), En(t) && this.reportExceptionInDerivation(t.cause), U();
|
|
2540
|
-
}
|
|
2541
|
-
}, e.prototype.reportExceptionInDerivation = function(e) {
|
|
2542
|
-
var t = this;
|
|
2543
|
-
if (this.errorHandler) {
|
|
2544
|
-
this.errorHandler(e, this);
|
|
2545
|
-
return;
|
|
2546
|
-
}
|
|
2547
|
-
if (V.disableErrorBoundaries) throw e;
|
|
2548
|
-
var n = "[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '" + this + "'";
|
|
2549
|
-
V.suppressReactionErrors ? console.warn("[mobx] (error in reaction '" + this.name + "' suppressed, fix error of causing action below)") : console.error(n, e), W() && (this.name, "" + e), V.globalReactionErrorHandlers.forEach(function(n) {
|
|
2550
|
-
return n(e, t);
|
|
2551
|
-
});
|
|
2552
|
-
}, e.prototype.dispose = function() {
|
|
2553
|
-
this.isDisposed || (this.isDisposed = !0, this._isRunning || (H(), jn(this), U()));
|
|
2554
|
-
}, e.prototype.getDisposer = function() {
|
|
2555
|
-
var e = this.dispose.bind(this);
|
|
2556
|
-
return e[F] = this, e;
|
|
2557
|
-
}, e.prototype.toString = function() {
|
|
2558
|
-
return "Reaction[" + this.name + "]";
|
|
2559
|
-
}, e.prototype.trace = function(e) {
|
|
2560
|
-
e === void 0 && (e = !1), Yr(this, e);
|
|
2561
|
-
}, e;
|
|
2562
|
-
}(), fr = 100, pr = function(e) {
|
|
2563
|
-
return e();
|
|
2564
|
-
};
|
|
2565
|
-
function mr() {
|
|
2566
|
-
V.inBatch > 0 || V.isRunningReactions || pr(hr);
|
|
2567
|
-
}
|
|
2568
|
-
function hr() {
|
|
2569
|
-
V.isRunningReactions = !0;
|
|
2570
|
-
for (var e = V.pendingReactions, t = 0; e.length > 0;) {
|
|
2571
|
-
++t === fr && (console.error("Reaction doesn't converge to a stable state after " + fr + " iterations." + (" Probably there is a cycle in the reactive function: " + e[0])), e.splice(0));
|
|
2572
|
-
for (var n = e.splice(0), r = 0, i = n.length; r < i; r++) n[r].runReaction();
|
|
2573
|
-
}
|
|
2574
|
-
V.isRunningReactions = !1;
|
|
2575
|
-
}
|
|
2576
|
-
var gr = N("Reaction", dr);
|
|
2577
|
-
function _r(e) {
|
|
2578
|
-
var t = pr;
|
|
2579
|
-
pr = function(n) {
|
|
2580
|
-
return e(function() {
|
|
2581
|
-
return t(n);
|
|
2582
|
-
});
|
|
2583
|
-
};
|
|
2584
|
-
}
|
|
2585
|
-
function W() {
|
|
2586
|
-
return !1;
|
|
2587
|
-
}
|
|
2588
|
-
function vr(e) {
|
|
2589
|
-
return console.warn("[mobx.spy] Is a no-op in production builds"), function() {};
|
|
2590
|
-
}
|
|
2591
|
-
function yr() {
|
|
2592
|
-
M(!1);
|
|
2593
|
-
}
|
|
2594
|
-
function br(e) {
|
|
2595
|
-
return function(t, n, r) {
|
|
2596
|
-
if (r) {
|
|
2597
|
-
if (r.value) return {
|
|
2598
|
-
value: Bn(e, r.value),
|
|
2599
|
-
enumerable: !1,
|
|
2600
|
-
configurable: !0,
|
|
2601
|
-
writable: !0
|
|
2602
|
-
};
|
|
2603
|
-
var i = r.initializer;
|
|
2604
|
-
return {
|
|
2605
|
-
enumerable: !1,
|
|
2606
|
-
configurable: !0,
|
|
2607
|
-
writable: !0,
|
|
2608
|
-
initializer: function() {
|
|
2609
|
-
return Bn(e, i.call(this));
|
|
2610
|
-
}
|
|
2611
|
-
};
|
|
2612
|
-
}
|
|
2613
|
-
return xr(e).apply(this, arguments);
|
|
2614
|
-
};
|
|
2615
|
-
}
|
|
2616
|
-
function xr(e) {
|
|
2617
|
-
return function(t, n, r) {
|
|
2618
|
-
Object.defineProperty(t, n, {
|
|
2619
|
-
configurable: !0,
|
|
2620
|
-
enumerable: !1,
|
|
2621
|
-
get: function() {},
|
|
2622
|
-
set: function(t) {
|
|
2623
|
-
jt(this, n, Cr(e, t));
|
|
2624
|
-
}
|
|
2625
|
-
});
|
|
2626
|
-
};
|
|
2627
|
-
}
|
|
2628
|
-
function Sr(e, t, n, r) {
|
|
2629
|
-
return r === !0 ? (Tr(e, t, n.value), null) : n ? {
|
|
2630
|
-
configurable: !0,
|
|
2631
|
-
enumerable: !1,
|
|
2632
|
-
get: function() {
|
|
2633
|
-
return Tr(this, t, n.value || n.initializer.call(this)), this[t];
|
|
2634
|
-
},
|
|
2635
|
-
set: yr
|
|
2636
|
-
} : {
|
|
2637
|
-
enumerable: !1,
|
|
2638
|
-
configurable: !0,
|
|
2639
|
-
set: function(e) {
|
|
2640
|
-
Tr(this, t, e);
|
|
2641
|
-
},
|
|
2642
|
-
get: function() {}
|
|
2643
|
-
};
|
|
2644
|
-
}
|
|
2645
|
-
var Cr = function(e, t, n, r) {
|
|
2646
|
-
if (arguments.length === 1 && typeof e == "function") return Bn(e.name || "<unnamed action>", e);
|
|
2647
|
-
if (arguments.length === 2 && typeof t == "function") return Bn(e, t);
|
|
2648
|
-
if (arguments.length === 1 && typeof e == "string") return br(e);
|
|
2649
|
-
if (r === !0) jt(e, t, Bn(e.name || t, n.value, this));
|
|
2650
|
-
else return br(t).apply(null, arguments);
|
|
2651
|
-
};
|
|
2652
|
-
Cr.bound = Sr;
|
|
2653
|
-
function wr(e, t) {
|
|
2654
|
-
return Vn(typeof e == "string" ? e : e.name || "<unnamed action>", typeof e == "function" ? e : t, this, void 0);
|
|
2655
|
-
}
|
|
2656
|
-
function Tr(e, t, n) {
|
|
2657
|
-
jt(e, t, Bn(t, n.bind(e)));
|
|
2658
|
-
}
|
|
2659
|
-
function Er(e, t) {
|
|
2660
|
-
t === void 0 && (t = Ct);
|
|
2661
|
-
var n = t && t.name || e.name || "Autorun@" + j(), r = !t.scheduler && !t.delay, i;
|
|
2662
|
-
if (r) i = new dr(n, function() {
|
|
2663
|
-
this.track(s);
|
|
2664
|
-
}, t.onError, t.requiresObservable);
|
|
2665
|
-
else {
|
|
2666
|
-
var a = Or(t), o = !1;
|
|
2667
|
-
i = new dr(n, function() {
|
|
2668
|
-
o || (o = !0, a(function() {
|
|
2669
|
-
o = !1, i.isDisposed || i.track(s);
|
|
2670
|
-
}));
|
|
2671
|
-
}, t.onError, t.requiresObservable);
|
|
2672
|
-
}
|
|
2673
|
-
function s() {
|
|
2674
|
-
e(i);
|
|
2675
|
-
}
|
|
2676
|
-
return i.schedule(), i.getDisposer();
|
|
2677
|
-
}
|
|
2678
|
-
var Dr = function(e) {
|
|
2679
|
-
return e();
|
|
2680
|
-
};
|
|
2681
|
-
function Or(e) {
|
|
2682
|
-
return e.scheduler ? e.scheduler : e.delay ? function(t) {
|
|
2683
|
-
return setTimeout(t, e.delay);
|
|
2684
|
-
} : Dr;
|
|
2685
|
-
}
|
|
2686
|
-
function kr(e, t, n) {
|
|
2687
|
-
n === void 0 && (n = Ct);
|
|
2688
|
-
var r = n.name || "Reaction@" + j(), i = Cr(r, n.onError ? Ar(n.onError, t) : t), a = !n.scheduler && !n.delay, o = Or(n), s = !0, c = !1, l, u = n.compareStructural ? Kt.structural : n.equals || Kt.default, d = new dr(r, function() {
|
|
2689
|
-
s || a ? f() : c || (c = !0, o(f));
|
|
2690
|
-
}, n.onError, n.requiresObservable);
|
|
2691
|
-
function f() {
|
|
2692
|
-
if (c = !1, !d.isDisposed) {
|
|
2693
|
-
var t = !1;
|
|
2694
|
-
d.track(function() {
|
|
2695
|
-
var n = e(d);
|
|
2696
|
-
t = s || !u(l, n), l = n;
|
|
2697
|
-
}), s && n.fireImmediately && i(l, d), !s && t === !0 && i(l, d), s && (s = !1);
|
|
2698
|
-
}
|
|
2699
|
-
}
|
|
2700
|
-
return d.schedule(), d.getDisposer();
|
|
2701
|
-
}
|
|
2702
|
-
function Ar(e, t) {
|
|
2703
|
-
return function() {
|
|
2704
|
-
try {
|
|
2705
|
-
return t.apply(this, arguments);
|
|
2706
|
-
} catch (t) {
|
|
2707
|
-
e.call(this, t);
|
|
2708
|
-
}
|
|
2709
|
-
};
|
|
2710
|
-
}
|
|
2711
|
-
function jr(e, t, n) {
|
|
2712
|
-
return Nr("onBecomeObserved", e, t, n);
|
|
2713
|
-
}
|
|
2714
|
-
function Mr(e, t, n) {
|
|
2715
|
-
return Nr("onBecomeUnobserved", e, t, n);
|
|
2716
|
-
}
|
|
2717
|
-
function Nr(e, t, n, r) {
|
|
2718
|
-
var i = typeof r == "function" ? $(t, n) : $(t), a = typeof r == "function" ? r : n, o = e + "Listeners";
|
|
2719
|
-
return i[o] ? i[o].add(a) : i[o] = /* @__PURE__ */ new Set([a]), typeof i[e] == "function" ? function() {
|
|
2720
|
-
var e = i[o];
|
|
2721
|
-
e && (e.delete(a), e.size === 0 && delete i[o]);
|
|
2722
|
-
} : M(!1);
|
|
2723
|
-
}
|
|
2724
|
-
function Pr(e) {
|
|
2725
|
-
var t = e.enforceActions, n = e.computedRequiresReaction, r = e.computedConfigurable, i = e.disableErrorBoundaries, a = e.reactionScheduler, o = e.reactionRequiresObservable, s = e.observableRequiresReaction;
|
|
2726
|
-
if (e.isolateGlobalState === !0 && tr(), t !== void 0) {
|
|
2727
|
-
var c = void 0;
|
|
2728
|
-
switch (t) {
|
|
2729
|
-
case !0:
|
|
2730
|
-
case "observed":
|
|
2731
|
-
c = !0;
|
|
2732
|
-
break;
|
|
2733
|
-
case !1:
|
|
2734
|
-
case "never":
|
|
2735
|
-
c = !1;
|
|
2736
|
-
break;
|
|
2737
|
-
case "strict":
|
|
2738
|
-
case "always":
|
|
2739
|
-
c = "strict";
|
|
2740
|
-
break;
|
|
2741
|
-
default: M("Invalid value for 'enforceActions': '" + t + "', expected 'never', 'always' or 'observed'");
|
|
2742
|
-
}
|
|
2743
|
-
V.enforceActions = c, V.allowStateChanges = !(c === !0 || c === "strict");
|
|
2744
|
-
}
|
|
2745
|
-
n !== void 0 && (V.computedRequiresReaction = !!n), o !== void 0 && (V.reactionRequiresObservable = !!o), s !== void 0 && (V.observableRequiresReaction = !!s, V.allowStateReads = !V.observableRequiresReaction), r !== void 0 && (V.computedConfigurable = !!r), i !== void 0 && (i === !0 && console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."), V.disableErrorBoundaries = !!i), a && _r(a);
|
|
2746
|
-
}
|
|
2747
|
-
function Fr(e, t, n, r) {
|
|
2748
|
-
r = pn(r);
|
|
2749
|
-
var i = Ir(r);
|
|
2750
|
-
return rn(e), yi(e, r.name, i.enhancer), t && Lr(e, t, n, i), e;
|
|
2751
|
-
}
|
|
2752
|
-
function Ir(e) {
|
|
2753
|
-
return e.defaultDecorator || (e.deep === !1 ? gn : mn);
|
|
2754
|
-
}
|
|
2755
|
-
function Lr(e, t, n, r) {
|
|
2756
|
-
var i, a;
|
|
2757
|
-
if (0) var o, s, c, l;
|
|
2758
|
-
H();
|
|
2759
|
-
try {
|
|
2760
|
-
var o = Rt(t);
|
|
2761
|
-
try {
|
|
2762
|
-
for (var u = I(o), d = u.next(); !d.done; d = u.next()) {
|
|
2763
|
-
var l = d.value, f = Object.getOwnPropertyDescriptor(t, l), p = (n && l in n ? n[l] : f.get ? Sn : r)(e, l, f, !0);
|
|
2764
|
-
p && Object.defineProperty(e, l, p);
|
|
2765
|
-
}
|
|
2766
|
-
} catch (e) {
|
|
2767
|
-
i = { error: e };
|
|
2768
|
-
} finally {
|
|
2769
|
-
try {
|
|
2770
|
-
d && !d.done && (a = u.return) && a.call(u);
|
|
2771
|
-
} finally {
|
|
2772
|
-
if (i) throw i.error;
|
|
2773
|
-
}
|
|
2774
|
-
}
|
|
2775
|
-
} finally {
|
|
2776
|
-
U();
|
|
2777
|
-
}
|
|
2778
|
-
}
|
|
2779
|
-
function Rr(e, t) {
|
|
2780
|
-
return zr($(e, t));
|
|
2781
|
-
}
|
|
2782
|
-
function zr(e) {
|
|
2783
|
-
var t = { name: e.name };
|
|
2784
|
-
return e.observing && e.observing.length > 0 && (t.dependencies = Dt(e.observing).map(zr)), t;
|
|
2785
|
-
}
|
|
2786
|
-
function Br() {
|
|
2787
|
-
this.message = "FLOW_CANCELLED";
|
|
2788
|
-
}
|
|
2789
|
-
Br.prototype = Object.create(Error.prototype);
|
|
2790
|
-
function Vr(e, t) {
|
|
2791
|
-
return e == null ? !1 : t === void 0 ? Ei(e) || !!e[F] || Bt(e) || gr(e) || Yn(e) : Ei(e) ? e[F].values.has(t) : !1;
|
|
2792
|
-
}
|
|
2793
|
-
function Hr(e) {
|
|
2794
|
-
return arguments.length !== 1 && M(!1), Vr(e);
|
|
2795
|
-
}
|
|
2796
|
-
function Ur(e) {
|
|
2797
|
-
return Ei(e) ? e[F].getKeys() : Z(e) || Q(e) ? Array.from(e.keys()) : di(e) ? e.map(function(e, t) {
|
|
2798
|
-
return t;
|
|
2799
|
-
}) : M(!1);
|
|
2800
|
-
}
|
|
2801
|
-
function Wr(e, t, n) {
|
|
2802
|
-
if (arguments.length === 2 && !Q(e)) {
|
|
2803
|
-
H();
|
|
2804
|
-
var r = t;
|
|
2805
|
-
try {
|
|
2806
|
-
for (var i in r) Wr(e, i, r[i]);
|
|
2807
|
-
} finally {
|
|
2808
|
-
U();
|
|
2809
|
-
}
|
|
2810
|
-
return;
|
|
2811
|
-
}
|
|
2812
|
-
if (Ei(e)) {
|
|
2813
|
-
var a = e[F];
|
|
2814
|
-
a.values.get(t) ? a.write(t, n) : a.addObservableProp(t, n, a.defaultEnhancer);
|
|
2815
|
-
} else if (Z(e)) e.set(t, n);
|
|
2816
|
-
else if (Q(e)) e.add(t);
|
|
2817
|
-
else if (di(e)) typeof t != "number" && (t = parseInt(t, 10)), wt(t >= 0, "Not a valid index: '" + t + "'"), H(), t >= e.length && (e.length = t + 1), e[t] = n, U();
|
|
2818
|
-
else return M(!1);
|
|
2819
|
-
}
|
|
2820
|
-
var Gr = {
|
|
2821
|
-
detectCycles: !0,
|
|
2822
|
-
exportMapsAsObjects: !0,
|
|
2823
|
-
recurseEverything: !1
|
|
2824
|
-
};
|
|
2825
|
-
function Kr(e, t, n, r) {
|
|
2826
|
-
return r.detectCycles && e.set(t, n), n;
|
|
2827
|
-
}
|
|
2828
|
-
function qr(e, t, n) {
|
|
2829
|
-
if (!t.recurseEverything && !Hr(e) || typeof e != "object") return e;
|
|
2830
|
-
if (e === null) return null;
|
|
2831
|
-
if (e instanceof Date) return e;
|
|
2832
|
-
if (qn(e)) return qr(e.get(), t, n);
|
|
2833
|
-
if (Hr(e) && Ur(e), t.detectCycles === !0 && e !== null && n.has(e)) return n.get(e);
|
|
2834
|
-
if (di(e) || Array.isArray(e)) {
|
|
2835
|
-
var r = Kr(n, e, [], t), i = e.map(function(e) {
|
|
2836
|
-
return qr(e, t, n);
|
|
2837
|
-
});
|
|
2838
|
-
r.length = i.length;
|
|
2839
|
-
for (var a = 0, o = i.length; a < o; a++) r[a] = i[a];
|
|
2840
|
-
return r;
|
|
2841
|
-
}
|
|
2842
|
-
if (Q(e) || Object.getPrototypeOf(e) === Set.prototype) if (t.exportMapsAsObjects === !1) {
|
|
2843
|
-
var s = Kr(n, e, /* @__PURE__ */ new Set(), t);
|
|
2844
|
-
return e.forEach(function(e) {
|
|
2845
|
-
s.add(qr(e, t, n));
|
|
2846
|
-
}), s;
|
|
2847
|
-
} else {
|
|
2848
|
-
var c = Kr(n, e, [], t);
|
|
2849
|
-
return e.forEach(function(e) {
|
|
2850
|
-
c.push(qr(e, t, n));
|
|
2851
|
-
}), c;
|
|
2852
|
-
}
|
|
2853
|
-
if (Z(e) || Object.getPrototypeOf(e) === Map.prototype) if (t.exportMapsAsObjects === !1) {
|
|
2854
|
-
var l = Kr(n, e, /* @__PURE__ */ new Map(), t);
|
|
2855
|
-
return e.forEach(function(e, r) {
|
|
2856
|
-
l.set(r, qr(e, t, n));
|
|
2857
|
-
}), l;
|
|
2858
|
-
} else {
|
|
2859
|
-
var u = Kr(n, e, {}, t);
|
|
2860
|
-
return e.forEach(function(e, r) {
|
|
2861
|
-
u[r] = qr(e, t, n);
|
|
2862
|
-
}), u;
|
|
2863
|
-
}
|
|
2864
|
-
var d = Kr(n, e, {}, t);
|
|
2865
|
-
return It(e).forEach(function(r) {
|
|
2866
|
-
d[r] = qr(e[r], t, n);
|
|
2867
|
-
}), d;
|
|
2868
|
-
}
|
|
2869
|
-
function Jr(e, t) {
|
|
2870
|
-
typeof t == "boolean" && (t = { detectCycles: t }), t || (t = Gr), t.detectCycles = t.detectCycles === void 0 ? t.recurseEverything === !0 : t.detectCycles === !0;
|
|
2871
|
-
var n;
|
|
2872
|
-
return t.detectCycles && (n = /* @__PURE__ */ new Map()), qr(e, t, n);
|
|
2873
|
-
}
|
|
2874
|
-
function Yr() {
|
|
2875
|
-
var e = [...arguments], t = !1;
|
|
2876
|
-
typeof e[e.length - 1] == "boolean" && (t = e.pop());
|
|
2877
|
-
var n = Xr(e);
|
|
2878
|
-
if (!n) return M(!1);
|
|
2879
|
-
n.isTracing === z.NONE && console.log("[mobx.trace] '" + n.name + "' tracing enabled"), n.isTracing = t ? z.BREAK : z.LOG;
|
|
2880
|
-
}
|
|
2881
|
-
function Xr(e) {
|
|
2882
|
-
switch (e.length) {
|
|
2883
|
-
case 0: return V.trackingDerivation;
|
|
2884
|
-
case 1: return $(e[0]);
|
|
2885
|
-
case 2: return $(e[0], e[1]);
|
|
2886
|
-
}
|
|
2887
|
-
}
|
|
2888
|
-
function G(e, t) {
|
|
2889
|
-
t === void 0 && (t = void 0), H();
|
|
2890
|
-
try {
|
|
2891
|
-
return e.apply(t);
|
|
2892
|
-
} finally {
|
|
2893
|
-
U();
|
|
2894
|
-
}
|
|
2895
|
-
}
|
|
2896
|
-
function Zr(e, t, n) {
|
|
2897
|
-
return arguments.length === 1 || t && typeof t == "object" ? $r(e, t) : Qr(e, t, n || {});
|
|
2898
|
-
}
|
|
2899
|
-
function Qr(e, t, n) {
|
|
2900
|
-
var r;
|
|
2901
|
-
typeof n.timeout == "number" && (r = setTimeout(function() {
|
|
2902
|
-
if (!a[F].isDisposed) {
|
|
2903
|
-
a();
|
|
2904
|
-
var e = /* @__PURE__ */ Error("WHEN_TIMEOUT");
|
|
2905
|
-
if (n.onError) n.onError(e);
|
|
2906
|
-
else throw e;
|
|
2907
|
-
}
|
|
2908
|
-
}, n.timeout)), n.name = n.name || "When@" + j();
|
|
2909
|
-
var i = Bn(n.name + "-effect", t), a = Er(function(t) {
|
|
2910
|
-
e() && (t.dispose(), r && clearTimeout(r), i());
|
|
2911
|
-
}, n);
|
|
2912
|
-
return a;
|
|
2913
|
-
}
|
|
2914
|
-
function $r(e, t) {
|
|
2915
|
-
var n, r = new Promise(function(r, i) {
|
|
2916
|
-
var a = Qr(e, r, Yt(Yt({}, t), { onError: i }));
|
|
2917
|
-
n = function() {
|
|
2918
|
-
a(), i("WHEN_CANCELLED");
|
|
2919
|
-
};
|
|
2920
|
-
});
|
|
2921
|
-
return r.cancel = n, r;
|
|
2922
|
-
}
|
|
2923
|
-
function ei(e) {
|
|
2924
|
-
return e[F];
|
|
2925
|
-
}
|
|
2926
|
-
function ti(e) {
|
|
2927
|
-
return typeof e == "string" || typeof e == "number" || typeof e == "symbol";
|
|
2928
|
-
}
|
|
2929
|
-
var ni = {
|
|
2930
|
-
has: function(e, t) {
|
|
2931
|
-
if (t === F || t === "constructor" || t === Qt) return !0;
|
|
2932
|
-
var n = ei(e);
|
|
2933
|
-
return ti(t) ? n.has(t) : t in e;
|
|
2934
|
-
},
|
|
2935
|
-
get: function(e, t) {
|
|
2936
|
-
if (t === F || t === "constructor" || t === Qt) return e[t];
|
|
2937
|
-
var n = ei(e), r = n.values.get(t);
|
|
2938
|
-
if (r instanceof zt) {
|
|
2939
|
-
var i = r.get();
|
|
2940
|
-
return i === void 0 && n.has(t), i;
|
|
2941
|
-
}
|
|
2942
|
-
return ti(t) && n.has(t), e[t];
|
|
2943
|
-
},
|
|
2944
|
-
set: function(e, t, n) {
|
|
2945
|
-
return ti(t) ? (Wr(e, t, n), !0) : !1;
|
|
2946
|
-
},
|
|
2947
|
-
deleteProperty: function(e, t) {
|
|
2948
|
-
return ti(t) ? (ei(e).remove(t), !0) : !1;
|
|
2949
|
-
},
|
|
2950
|
-
ownKeys: function(e) {
|
|
2951
|
-
return ei(e).keysAtom.reportObserved(), Reflect.ownKeys(e);
|
|
2952
|
-
},
|
|
2953
|
-
preventExtensions: function(e) {
|
|
2954
|
-
return M("Dynamic observable objects cannot be frozen"), !1;
|
|
2955
|
-
}
|
|
2956
|
-
};
|
|
2957
|
-
function ri(e) {
|
|
2958
|
-
var t = new Proxy(e, ni);
|
|
2959
|
-
return e[F].proxy = t, t;
|
|
2960
|
-
}
|
|
2961
|
-
function K(e) {
|
|
2962
|
-
return e.interceptors !== void 0 && e.interceptors.length > 0;
|
|
2963
|
-
}
|
|
2964
|
-
function ii(e, t) {
|
|
2965
|
-
var n = e.interceptors || (e.interceptors = []);
|
|
2966
|
-
return n.push(t), Tt(function() {
|
|
2967
|
-
var e = n.indexOf(t);
|
|
2968
|
-
e !== -1 && n.splice(e, 1);
|
|
2969
|
-
});
|
|
2970
|
-
}
|
|
2971
|
-
function q(e, t) {
|
|
2972
|
-
var n = Nn();
|
|
2973
|
-
try {
|
|
2974
|
-
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++);
|
|
2975
|
-
return t;
|
|
2976
|
-
} finally {
|
|
2977
|
-
B(n);
|
|
2978
|
-
}
|
|
2979
|
-
}
|
|
2980
|
-
function J(e) {
|
|
2981
|
-
return e.changeListeners !== void 0 && e.changeListeners.length > 0;
|
|
2982
|
-
}
|
|
2983
|
-
function ai(e, t) {
|
|
2984
|
-
var n = e.changeListeners || (e.changeListeners = []);
|
|
2985
|
-
return n.push(t), Tt(function() {
|
|
2986
|
-
var e = n.indexOf(t);
|
|
2987
|
-
e !== -1 && n.splice(e, 1);
|
|
2988
|
-
});
|
|
2989
|
-
}
|
|
2990
|
-
function Y(e, t) {
|
|
2991
|
-
var n = Nn(), r = e.changeListeners;
|
|
2992
|
-
if (r) {
|
|
2993
|
-
r = r.slice();
|
|
2994
|
-
for (var i = 0, a = r.length; i < a; i++) r[i](t);
|
|
2995
|
-
B(n);
|
|
2996
|
-
}
|
|
2997
|
-
}
|
|
2998
|
-
var oi = 1e4, si = {
|
|
2999
|
-
get: function(e, t) {
|
|
3000
|
-
return t === F ? e[F] : t === "length" ? e[F].getArrayLength() : typeof t == "number" ? X.get.call(e, t) : typeof t == "string" && !isNaN(t) ? X.get.call(e, parseInt(t)) : X.hasOwnProperty(t) ? X[t] : e[t];
|
|
3001
|
-
},
|
|
3002
|
-
set: function(e, t, n) {
|
|
3003
|
-
return t === "length" && e[F].setArrayLength(n), typeof t == "number" && X.set.call(e, t, n), typeof t == "symbol" || isNaN(t) ? e[t] = n : X.set.call(e, parseInt(t), n), !0;
|
|
3004
|
-
},
|
|
3005
|
-
preventExtensions: function(e) {
|
|
3006
|
-
return M("Observable arrays cannot be frozen"), !1;
|
|
3007
|
-
}
|
|
3008
|
-
};
|
|
3009
|
-
function ci(e, t, n, r) {
|
|
3010
|
-
n === void 0 && (n = "ObservableArray@" + j()), r === void 0 && (r = !1);
|
|
3011
|
-
var i = new li(n, t, r);
|
|
3012
|
-
Mt(i.values, F, i);
|
|
3013
|
-
var a = new Proxy(i.values, si);
|
|
3014
|
-
if (i.proxy = a, e && e.length) {
|
|
3015
|
-
var o = Wn(!0);
|
|
3016
|
-
i.spliceWithArray(0, 0, e), Gn(o);
|
|
3017
|
-
}
|
|
3018
|
-
return a;
|
|
3019
|
-
}
|
|
3020
|
-
var li = function() {
|
|
3021
|
-
function e(e, t, n) {
|
|
3022
|
-
this.owned = n, this.values = [], this.proxy = void 0, this.lastKnownLength = 0, this.atom = new zt(e || "ObservableArray@" + j()), this.enhancer = function(n, r) {
|
|
3023
|
-
return t(n, r, e + "[..]");
|
|
3024
|
-
};
|
|
3025
|
-
}
|
|
3026
|
-
return e.prototype.dehanceValue = function(e) {
|
|
3027
|
-
return this.dehancer === void 0 ? e : this.dehancer(e);
|
|
3028
|
-
}, e.prototype.dehanceValues = function(e) {
|
|
3029
|
-
return this.dehancer !== void 0 && e.length > 0 ? e.map(this.dehancer) : e;
|
|
3030
|
-
}, e.prototype.intercept = function(e) {
|
|
3031
|
-
return ii(this, e);
|
|
3032
|
-
}, e.prototype.observe = function(e, t) {
|
|
3033
|
-
return t === void 0 && (t = !1), t && e({
|
|
3034
|
-
object: this.proxy,
|
|
3035
|
-
type: "splice",
|
|
3036
|
-
index: 0,
|
|
3037
|
-
added: this.values.slice(),
|
|
3038
|
-
addedCount: this.values.length,
|
|
3039
|
-
removed: [],
|
|
3040
|
-
removedCount: 0
|
|
3041
|
-
}), ai(this, e);
|
|
3042
|
-
}, e.prototype.getArrayLength = function() {
|
|
3043
|
-
return this.atom.reportObserved(), this.values.length;
|
|
3044
|
-
}, e.prototype.setArrayLength = function(e) {
|
|
3045
|
-
if (typeof e != "number" || e < 0) throw Error("[mobx.array] Out of range: " + e);
|
|
3046
|
-
var t = this.values.length;
|
|
3047
|
-
if (e !== t) if (e > t) {
|
|
3048
|
-
for (var n = Array(e - t), r = 0; r < e - t; r++) n[r] = void 0;
|
|
3049
|
-
this.spliceWithArray(t, 0, n);
|
|
3050
|
-
} else this.spliceWithArray(e, t - e);
|
|
3051
|
-
}, e.prototype.updateArrayLength = function(e, t) {
|
|
3052
|
-
if (e !== this.lastKnownLength) throw Error("[mobx] Modification exception: the internal structure of an observable array was changed.");
|
|
3053
|
-
this.lastKnownLength += t;
|
|
3054
|
-
}, e.prototype.spliceWithArray = function(e, t, n) {
|
|
3055
|
-
var r = this;
|
|
3056
|
-
On(this.atom);
|
|
3057
|
-
var i = this.values.length;
|
|
3058
|
-
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), K(this)) {
|
|
3059
|
-
var a = q(this, {
|
|
3060
|
-
object: this.proxy,
|
|
3061
|
-
type: "splice",
|
|
3062
|
-
index: e,
|
|
3063
|
-
removedCount: t,
|
|
3064
|
-
added: n
|
|
3065
|
-
});
|
|
3066
|
-
if (!a) return St;
|
|
3067
|
-
t = a.removedCount, n = a.added;
|
|
3068
|
-
}
|
|
3069
|
-
n = n.length === 0 ? n : n.map(function(e) {
|
|
3070
|
-
return r.enhancer(e, void 0);
|
|
3071
|
-
});
|
|
3072
|
-
var o = this.spliceItemsIntoValues(e, t, n);
|
|
3073
|
-
return (t !== 0 || n.length !== 0) && this.notifyArraySplice(e, n, o), this.dehanceValues(o);
|
|
3074
|
-
}, e.prototype.spliceItemsIntoValues = function(e, t, n) {
|
|
3075
|
-
var r;
|
|
3076
|
-
if (n.length < oi) return (r = this.values).splice.apply(r, Zt([e, t], n));
|
|
3077
|
-
var i = this.values.slice(e, e + t);
|
|
3078
|
-
return this.values = this.values.slice(0, e).concat(n, this.values.slice(e + t)), i;
|
|
3079
|
-
}, e.prototype.notifyArrayChildUpdate = function(e, t, n) {
|
|
3080
|
-
var r = !this.owned && W(), i = J(this), a = i || r ? {
|
|
3081
|
-
object: this.proxy,
|
|
3082
|
-
type: "update",
|
|
3083
|
-
index: e,
|
|
3084
|
-
newValue: t,
|
|
3085
|
-
oldValue: n
|
|
3086
|
-
} : null;
|
|
3087
|
-
this.atom.reportChanged(), i && Y(this, a);
|
|
3088
|
-
}, e.prototype.notifyArraySplice = function(e, t, n) {
|
|
3089
|
-
var r = !this.owned && W(), i = J(this), a = i || r ? {
|
|
3090
|
-
object: this.proxy,
|
|
3091
|
-
type: "splice",
|
|
3092
|
-
index: e,
|
|
3093
|
-
removed: n,
|
|
3094
|
-
added: t,
|
|
3095
|
-
removedCount: n.length,
|
|
3096
|
-
addedCount: t.length
|
|
3097
|
-
} : null;
|
|
3098
|
-
this.atom.reportChanged(), i && Y(this, a);
|
|
3099
|
-
}, e;
|
|
3100
|
-
}(), X = {
|
|
3101
|
-
intercept: function(e) {
|
|
3102
|
-
return this[F].intercept(e);
|
|
3103
|
-
},
|
|
3104
|
-
observe: function(e, t) {
|
|
3105
|
-
return t === void 0 && (t = !1), this[F].observe(e, t);
|
|
3106
|
-
},
|
|
3107
|
-
clear: function() {
|
|
3108
|
-
return this.splice(0);
|
|
3109
|
-
},
|
|
3110
|
-
replace: function(e) {
|
|
3111
|
-
var t = this[F];
|
|
3112
|
-
return t.spliceWithArray(0, t.values.length, e);
|
|
3113
|
-
},
|
|
3114
|
-
toJS: function() {
|
|
3115
|
-
return this.slice();
|
|
3116
|
-
},
|
|
3117
|
-
toJSON: function() {
|
|
3118
|
-
return this.toJS();
|
|
3119
|
-
},
|
|
3120
|
-
splice: function(e, t) {
|
|
3121
|
-
var n = [...arguments].slice(2), r = this[F];
|
|
3122
|
-
switch (arguments.length) {
|
|
3123
|
-
case 0: return [];
|
|
3124
|
-
case 1: return r.spliceWithArray(e);
|
|
3125
|
-
case 2: return r.spliceWithArray(e, t);
|
|
3126
|
-
}
|
|
3127
|
-
return r.spliceWithArray(e, t, n);
|
|
3128
|
-
},
|
|
3129
|
-
spliceWithArray: function(e, t, n) {
|
|
3130
|
-
return this[F].spliceWithArray(e, t, n);
|
|
3131
|
-
},
|
|
3132
|
-
push: function() {
|
|
3133
|
-
var e = [...arguments], t = this[F];
|
|
3134
|
-
return t.spliceWithArray(t.values.length, 0, e), t.values.length;
|
|
3135
|
-
},
|
|
3136
|
-
pop: function() {
|
|
3137
|
-
return this.splice(Math.max(this[F].values.length - 1, 0), 1)[0];
|
|
3138
|
-
},
|
|
3139
|
-
shift: function() {
|
|
3140
|
-
return this.splice(0, 1)[0];
|
|
3141
|
-
},
|
|
3142
|
-
unshift: function() {
|
|
3143
|
-
var e = [...arguments], t = this[F];
|
|
3144
|
-
return t.spliceWithArray(0, 0, e), t.values.length;
|
|
3145
|
-
},
|
|
3146
|
-
reverse: function() {
|
|
3147
|
-
var e = this.slice();
|
|
3148
|
-
return e.reverse.apply(e, arguments);
|
|
3149
|
-
},
|
|
3150
|
-
sort: function(e) {
|
|
3151
|
-
var t = this.slice();
|
|
3152
|
-
return t.sort.apply(t, arguments);
|
|
3153
|
-
},
|
|
3154
|
-
remove: function(e) {
|
|
3155
|
-
var t = this[F], n = t.dehanceValues(t.values).indexOf(e);
|
|
3156
|
-
return n > -1 ? (this.splice(n, 1), !0) : !1;
|
|
3157
|
-
},
|
|
3158
|
-
get: function(e) {
|
|
3159
|
-
var t = this[F];
|
|
3160
|
-
if (t) {
|
|
3161
|
-
if (e < t.values.length) return t.atom.reportObserved(), t.dehanceValue(t.values[e]);
|
|
3162
|
-
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");
|
|
3163
|
-
}
|
|
3164
|
-
},
|
|
3165
|
-
set: function(e, t) {
|
|
3166
|
-
var n = this[F], r = n.values;
|
|
3167
|
-
if (e < r.length) {
|
|
3168
|
-
On(n.atom);
|
|
3169
|
-
var i = r[e];
|
|
3170
|
-
if (K(n)) {
|
|
3171
|
-
var a = q(n, {
|
|
3172
|
-
type: "update",
|
|
3173
|
-
object: n.proxy,
|
|
3174
|
-
index: e,
|
|
3175
|
-
newValue: t
|
|
3176
|
-
});
|
|
3177
|
-
if (!a) return;
|
|
3178
|
-
t = a.newValue;
|
|
3179
|
-
}
|
|
3180
|
-
t = n.enhancer(t, i), t !== i && (r[e] = t, n.notifyArrayChildUpdate(e, t, i));
|
|
3181
|
-
} else if (e === r.length) n.spliceWithArray(e, 0, [t]);
|
|
3182
|
-
else throw Error("[mobx.array] Index out of bounds, " + e + " is larger than " + r.length);
|
|
3183
|
-
}
|
|
3184
|
-
};
|
|
3185
|
-
[
|
|
3186
|
-
"concat",
|
|
3187
|
-
"flat",
|
|
3188
|
-
"includes",
|
|
3189
|
-
"indexOf",
|
|
3190
|
-
"join",
|
|
3191
|
-
"lastIndexOf",
|
|
3192
|
-
"slice",
|
|
3193
|
-
"toString",
|
|
3194
|
-
"toLocaleString"
|
|
3195
|
-
].forEach(function(e) {
|
|
3196
|
-
typeof Array.prototype[e] == "function" && (X[e] = function() {
|
|
3197
|
-
var t = this[F];
|
|
3198
|
-
t.atom.reportObserved();
|
|
3199
|
-
var n = t.dehanceValues(t.values);
|
|
3200
|
-
return n[e].apply(n, arguments);
|
|
3201
|
-
});
|
|
3202
|
-
}), [
|
|
3203
|
-
"every",
|
|
3204
|
-
"filter",
|
|
3205
|
-
"find",
|
|
3206
|
-
"findIndex",
|
|
3207
|
-
"flatMap",
|
|
3208
|
-
"forEach",
|
|
3209
|
-
"map",
|
|
3210
|
-
"some"
|
|
3211
|
-
].forEach(function(e) {
|
|
3212
|
-
typeof Array.prototype[e] == "function" && (X[e] = function(t, n) {
|
|
3213
|
-
var r = this, i = this[F];
|
|
3214
|
-
return i.atom.reportObserved(), i.dehanceValues(i.values)[e](function(e, i) {
|
|
3215
|
-
return t.call(n, e, i, r);
|
|
3216
|
-
}, n);
|
|
3217
|
-
});
|
|
3218
|
-
}), ["reduce", "reduceRight"].forEach(function(e) {
|
|
3219
|
-
X[e] = function() {
|
|
3220
|
-
var t = this, n = this[F];
|
|
3221
|
-
n.atom.reportObserved();
|
|
3222
|
-
var r = arguments[0];
|
|
3223
|
-
return arguments[0] = function(e, i, a) {
|
|
3224
|
-
return i = n.dehanceValue(i), r(e, i, a, t);
|
|
3225
|
-
}, n.values[e].apply(n.values, arguments);
|
|
3226
|
-
};
|
|
3227
|
-
});
|
|
3228
|
-
var ui = N("ObservableArrayAdministration", li);
|
|
3229
|
-
function di(e) {
|
|
3230
|
-
return Ot(e) && ui(e[F]);
|
|
3231
|
-
}
|
|
3232
|
-
var fi, pi = {}, mi = function() {
|
|
3233
|
-
function e(e, t, n) {
|
|
3234
|
-
if (t === void 0 && (t = sn), n === void 0 && (n = "ObservableMap@" + j()), this.enhancer = t, this.name = n, this[fi] = pi, 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");
|
|
3235
|
-
this._data = /* @__PURE__ */ new Map(), this._hasMap = /* @__PURE__ */ new Map(), this.merge(e);
|
|
3236
|
-
}
|
|
3237
|
-
return e.prototype._has = function(e) {
|
|
3238
|
-
return this._data.has(e);
|
|
3239
|
-
}, e.prototype.has = function(e) {
|
|
3240
|
-
var t = this;
|
|
3241
|
-
if (!V.trackingDerivation) return this._has(e);
|
|
3242
|
-
var n = this._hasMap.get(e);
|
|
3243
|
-
if (!n) {
|
|
3244
|
-
var r = n = new Kn(this._has(e), ln, this.name + "." + P(e) + "?", !1);
|
|
3245
|
-
this._hasMap.set(e, r), Mr(r, function() {
|
|
3246
|
-
return t._hasMap.delete(e);
|
|
3247
|
-
});
|
|
3248
|
-
}
|
|
3249
|
-
return n.get();
|
|
3250
|
-
}, e.prototype.set = function(e, t) {
|
|
3251
|
-
var n = this._has(e);
|
|
3252
|
-
if (K(this)) {
|
|
3253
|
-
var r = q(this, {
|
|
3254
|
-
type: n ? "update" : "add",
|
|
3255
|
-
object: this,
|
|
3256
|
-
newValue: t,
|
|
3257
|
-
name: e
|
|
3258
|
-
});
|
|
3259
|
-
if (!r) return this;
|
|
3260
|
-
t = r.newValue;
|
|
3261
|
-
}
|
|
3262
|
-
return n ? this._updateValue(e, t) : this._addValue(e, t), this;
|
|
3263
|
-
}, e.prototype.delete = function(e) {
|
|
3264
|
-
var t = this;
|
|
3265
|
-
if (On(this._keysAtom), K(this)) {
|
|
3266
|
-
var n = q(this, {
|
|
3267
|
-
type: "delete",
|
|
3268
|
-
object: this,
|
|
3269
|
-
name: e
|
|
3270
|
-
});
|
|
3271
|
-
if (!n) return !1;
|
|
3272
|
-
}
|
|
3273
|
-
if (this._has(e)) {
|
|
3274
|
-
var r = W(), i = J(this), n = i || r ? {
|
|
3275
|
-
type: "delete",
|
|
3276
|
-
object: this,
|
|
3277
|
-
oldValue: this._data.get(e).value,
|
|
3278
|
-
name: e
|
|
3279
|
-
} : null;
|
|
3280
|
-
return G(function() {
|
|
3281
|
-
t._keysAtom.reportChanged(), t._updateHasMapEntry(e, !1), t._data.get(e).setNewValue(void 0), t._data.delete(e);
|
|
3282
|
-
}), i && Y(this, n), !0;
|
|
3283
|
-
}
|
|
3284
|
-
return !1;
|
|
3285
|
-
}, e.prototype._updateHasMapEntry = function(e, t) {
|
|
3286
|
-
var n = this._hasMap.get(e);
|
|
3287
|
-
n && n.setNewValue(t);
|
|
3288
|
-
}, e.prototype._updateValue = function(e, t) {
|
|
3289
|
-
var n = this._data.get(e);
|
|
3290
|
-
if (t = n.prepareNewValue(t), t !== V.UNCHANGED) {
|
|
3291
|
-
var r = W(), i = J(this), a = i || r ? {
|
|
3292
|
-
type: "update",
|
|
3293
|
-
object: this,
|
|
3294
|
-
oldValue: n.value,
|
|
3295
|
-
name: e,
|
|
3296
|
-
newValue: t
|
|
3297
|
-
} : null;
|
|
3298
|
-
n.setNewValue(t), i && Y(this, a);
|
|
3299
|
-
}
|
|
3300
|
-
}, e.prototype._addValue = function(e, t) {
|
|
3301
|
-
var n = this;
|
|
3302
|
-
On(this._keysAtom), G(function() {
|
|
3303
|
-
var r = new Kn(t, n.enhancer, n.name + "." + P(e), !1);
|
|
3304
|
-
n._data.set(e, r), t = r.value, n._updateHasMapEntry(e, !0), n._keysAtom.reportChanged();
|
|
3305
|
-
});
|
|
3306
|
-
var r = W(), i = J(this), a = i || r ? {
|
|
3307
|
-
type: "add",
|
|
3308
|
-
object: this,
|
|
3309
|
-
name: e,
|
|
3310
|
-
newValue: t
|
|
3311
|
-
} : null;
|
|
3312
|
-
i && Y(this, a);
|
|
3313
|
-
}, e.prototype.get = function(e) {
|
|
3314
|
-
return this.has(e) ? this.dehanceValue(this._data.get(e).get()) : this.dehanceValue(void 0);
|
|
3315
|
-
}, e.prototype.dehanceValue = function(e) {
|
|
3316
|
-
return this.dehancer === void 0 ? e : this.dehancer(e);
|
|
3317
|
-
}, e.prototype.keys = function() {
|
|
3318
|
-
return this._keysAtom.reportObserved(), this._data.keys();
|
|
3319
|
-
}, e.prototype.values = function() {
|
|
3320
|
-
var e = this, t = this.keys();
|
|
3321
|
-
return Pi({ next: function() {
|
|
3322
|
-
var n = t.next(), r = n.done, i = n.value;
|
|
3323
|
-
return {
|
|
3324
|
-
done: r,
|
|
3325
|
-
value: r ? void 0 : e.get(i)
|
|
3326
|
-
};
|
|
3327
|
-
} });
|
|
3328
|
-
}, e.prototype.entries = function() {
|
|
3329
|
-
var e = this, t = this.keys();
|
|
3330
|
-
return Pi({ next: function() {
|
|
3331
|
-
var n = t.next(), r = n.done, i = n.value;
|
|
3332
|
-
return {
|
|
3333
|
-
done: r,
|
|
3334
|
-
value: r ? void 0 : [i, e.get(i)]
|
|
3335
|
-
};
|
|
3336
|
-
} });
|
|
3337
|
-
}, e.prototype[fi = F, Symbol.iterator] = function() {
|
|
3338
|
-
return this.entries();
|
|
3339
|
-
}, e.prototype.forEach = function(e, t) {
|
|
3340
|
-
var n, r;
|
|
3341
|
-
try {
|
|
3342
|
-
for (var i = I(this), a = i.next(); !a.done; a = i.next()) {
|
|
3343
|
-
var o = Xt(a.value, 2), s = o[0], c = o[1];
|
|
3344
|
-
e.call(t, c, s, this);
|
|
3345
|
-
}
|
|
3346
|
-
} catch (e) {
|
|
3347
|
-
n = { error: e };
|
|
3348
|
-
} finally {
|
|
3349
|
-
try {
|
|
3350
|
-
a && !a.done && (r = i.return) && r.call(i);
|
|
3351
|
-
} finally {
|
|
3352
|
-
if (n) throw n.error;
|
|
3353
|
-
}
|
|
3354
|
-
}
|
|
3355
|
-
}, e.prototype.merge = function(e) {
|
|
3356
|
-
var t = this;
|
|
3357
|
-
return Z(e) && (e = e.toJS()), G(function() {
|
|
3358
|
-
var n = Wn(!0);
|
|
3359
|
-
try {
|
|
3360
|
-
kt(e) ? It(e).forEach(function(n) {
|
|
3361
|
-
return t.set(n, e[n]);
|
|
3362
|
-
}) : Array.isArray(e) ? e.forEach(function(e) {
|
|
3363
|
-
var n = Xt(e, 2), r = n[0], i = n[1];
|
|
3364
|
-
return t.set(r, i);
|
|
3365
|
-
}) : Pt(e) ? (e.constructor !== Map && M("Cannot initialize from classes that inherit from Map: " + e.constructor.name), e.forEach(function(e, n) {
|
|
3366
|
-
return t.set(n, e);
|
|
3367
|
-
})) : e != null && M("Cannot initialize map from " + e);
|
|
3368
|
-
} finally {
|
|
3369
|
-
Gn(n);
|
|
3370
|
-
}
|
|
3371
|
-
}), this;
|
|
3372
|
-
}, e.prototype.clear = function() {
|
|
3373
|
-
var e = this;
|
|
3374
|
-
G(function() {
|
|
3375
|
-
Mn(function() {
|
|
3376
|
-
var t, n;
|
|
3377
|
-
try {
|
|
3378
|
-
for (var r = I(e.keys()), i = r.next(); !i.done; i = r.next()) {
|
|
3379
|
-
var a = i.value;
|
|
3380
|
-
e.delete(a);
|
|
3381
|
-
}
|
|
3382
|
-
} catch (e) {
|
|
3383
|
-
t = { error: e };
|
|
3384
|
-
} finally {
|
|
3385
|
-
try {
|
|
3386
|
-
i && !i.done && (n = r.return) && n.call(r);
|
|
3387
|
-
} finally {
|
|
3388
|
-
if (t) throw t.error;
|
|
3389
|
-
}
|
|
3390
|
-
}
|
|
3391
|
-
});
|
|
3392
|
-
});
|
|
3393
|
-
}, e.prototype.replace = function(e) {
|
|
3394
|
-
var t = this;
|
|
3395
|
-
return G(function() {
|
|
3396
|
-
var n, r, i, a, o = At(e), s = /* @__PURE__ */ new Map(), c = !1;
|
|
3397
|
-
try {
|
|
3398
|
-
for (var l = I(t._data.keys()), u = l.next(); !u.done; u = l.next()) {
|
|
3399
|
-
var d = u.value;
|
|
3400
|
-
if (!o.has(d)) if (t.delete(d)) c = !0;
|
|
3401
|
-
else {
|
|
3402
|
-
var f = t._data.get(d);
|
|
3403
|
-
s.set(d, f);
|
|
3404
|
-
}
|
|
3405
|
-
}
|
|
3406
|
-
} catch (e) {
|
|
3407
|
-
n = { error: e };
|
|
3408
|
-
} finally {
|
|
3409
|
-
try {
|
|
3410
|
-
u && !u.done && (r = l.return) && r.call(l);
|
|
3411
|
-
} finally {
|
|
3412
|
-
if (n) throw n.error;
|
|
3413
|
-
}
|
|
3414
|
-
}
|
|
3415
|
-
try {
|
|
3416
|
-
for (var p = I(o.entries()), m = p.next(); !m.done; m = p.next()) {
|
|
3417
|
-
var h = Xt(m.value, 2), d = h[0], f = h[1], g = t._data.has(d);
|
|
3418
|
-
if (t.set(d, f), t._data.has(d)) {
|
|
3419
|
-
var _ = t._data.get(d);
|
|
3420
|
-
s.set(d, _), g || (c = !0);
|
|
3421
|
-
}
|
|
3422
|
-
}
|
|
3423
|
-
} catch (e) {
|
|
3424
|
-
i = { error: e };
|
|
3425
|
-
} finally {
|
|
3426
|
-
try {
|
|
3427
|
-
m && !m.done && (a = p.return) && a.call(p);
|
|
3428
|
-
} finally {
|
|
3429
|
-
if (i) throw i.error;
|
|
3430
|
-
}
|
|
3431
|
-
}
|
|
3432
|
-
if (!c) if (t._data.size !== s.size) t._keysAtom.reportChanged();
|
|
3433
|
-
else for (var v = t._data.keys(), y = s.keys(), b = v.next(), x = y.next(); !b.done;) {
|
|
3434
|
-
if (b.value !== x.value) {
|
|
3435
|
-
t._keysAtom.reportChanged();
|
|
3436
|
-
break;
|
|
3437
|
-
}
|
|
3438
|
-
b = v.next(), x = y.next();
|
|
3439
|
-
}
|
|
3440
|
-
t._data = s;
|
|
3441
|
-
}), this;
|
|
3442
|
-
}, Object.defineProperty(e.prototype, "size", {
|
|
3443
|
-
get: function() {
|
|
3444
|
-
return this._keysAtom.reportObserved(), this._data.size;
|
|
3445
|
-
},
|
|
3446
|
-
enumerable: !0,
|
|
3447
|
-
configurable: !0
|
|
3448
|
-
}), e.prototype.toPOJO = function() {
|
|
3449
|
-
var e, t, n = {};
|
|
3450
|
-
try {
|
|
3451
|
-
for (var r = I(this), i = r.next(); !i.done; i = r.next()) {
|
|
3452
|
-
var a = Xt(i.value, 2), o = a[0], s = a[1];
|
|
3453
|
-
n[typeof o == "symbol" ? o : P(o)] = s;
|
|
3454
|
-
}
|
|
3455
|
-
} catch (t) {
|
|
3456
|
-
e = { error: t };
|
|
3457
|
-
} finally {
|
|
3458
|
-
try {
|
|
3459
|
-
i && !i.done && (t = r.return) && t.call(r);
|
|
3460
|
-
} finally {
|
|
3461
|
-
if (e) throw e.error;
|
|
3462
|
-
}
|
|
3463
|
-
}
|
|
3464
|
-
return n;
|
|
3465
|
-
}, e.prototype.toJS = function() {
|
|
3466
|
-
return new Map(this);
|
|
3467
|
-
}, e.prototype.toJSON = function() {
|
|
3468
|
-
return this.toPOJO();
|
|
3469
|
-
}, e.prototype.toString = function() {
|
|
3470
|
-
var e = this;
|
|
3471
|
-
return this.name + "[{ " + Array.from(this.keys()).map(function(t) {
|
|
3472
|
-
return P(t) + ": " + ("" + e.get(t));
|
|
3473
|
-
}).join(", ") + " }]";
|
|
3474
|
-
}, e.prototype.observe = function(e, t) {
|
|
3475
|
-
return ai(this, e);
|
|
3476
|
-
}, e.prototype.intercept = function(e) {
|
|
3477
|
-
return ii(this, e);
|
|
3478
|
-
}, e;
|
|
3479
|
-
}(), Z = N("ObservableMap", mi), hi, gi = {}, _i = function() {
|
|
3480
|
-
function e(e, t, n) {
|
|
3481
|
-
if (t === void 0 && (t = sn), n === void 0 && (n = "ObservableSet@" + j()), this.name = n, this[hi] = gi, 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");
|
|
3482
|
-
this.enhancer = function(e, r) {
|
|
3483
|
-
return t(e, r, n);
|
|
3484
|
-
}, e && this.replace(e);
|
|
3485
|
-
}
|
|
3486
|
-
return e.prototype.dehanceValue = function(e) {
|
|
3487
|
-
return this.dehancer === void 0 ? e : this.dehancer(e);
|
|
3488
|
-
}, e.prototype.clear = function() {
|
|
3489
|
-
var e = this;
|
|
3490
|
-
G(function() {
|
|
3491
|
-
Mn(function() {
|
|
3492
|
-
var t, n;
|
|
3493
|
-
try {
|
|
3494
|
-
for (var r = I(e._data.values()), i = r.next(); !i.done; i = r.next()) {
|
|
3495
|
-
var a = i.value;
|
|
3496
|
-
e.delete(a);
|
|
3497
|
-
}
|
|
3498
|
-
} catch (e) {
|
|
3499
|
-
t = { error: e };
|
|
3500
|
-
} finally {
|
|
3501
|
-
try {
|
|
3502
|
-
i && !i.done && (n = r.return) && n.call(r);
|
|
3503
|
-
} finally {
|
|
3504
|
-
if (t) throw t.error;
|
|
3505
|
-
}
|
|
3506
|
-
}
|
|
3507
|
-
});
|
|
3508
|
-
});
|
|
3509
|
-
}, e.prototype.forEach = function(e, t) {
|
|
3510
|
-
var n, r;
|
|
3511
|
-
try {
|
|
3512
|
-
for (var i = I(this), a = i.next(); !a.done; a = i.next()) {
|
|
3513
|
-
var o = a.value;
|
|
3514
|
-
e.call(t, o, o, this);
|
|
3515
|
-
}
|
|
3516
|
-
} catch (e) {
|
|
3517
|
-
n = { error: e };
|
|
3518
|
-
} finally {
|
|
3519
|
-
try {
|
|
3520
|
-
a && !a.done && (r = i.return) && r.call(i);
|
|
3521
|
-
} finally {
|
|
3522
|
-
if (n) throw n.error;
|
|
3523
|
-
}
|
|
3524
|
-
}
|
|
3525
|
-
}, Object.defineProperty(e.prototype, "size", {
|
|
3526
|
-
get: function() {
|
|
3527
|
-
return this._atom.reportObserved(), this._data.size;
|
|
3528
|
-
},
|
|
3529
|
-
enumerable: !0,
|
|
3530
|
-
configurable: !0
|
|
3531
|
-
}), e.prototype.add = function(e) {
|
|
3532
|
-
var t = this;
|
|
3533
|
-
if (On(this._atom), K(this)) {
|
|
3534
|
-
var n = q(this, {
|
|
3535
|
-
type: "add",
|
|
3536
|
-
object: this,
|
|
3537
|
-
newValue: e
|
|
3538
|
-
});
|
|
3539
|
-
if (!n) return this;
|
|
3540
|
-
}
|
|
3541
|
-
if (!this.has(e)) {
|
|
3542
|
-
G(function() {
|
|
3543
|
-
t._data.add(t.enhancer(e, void 0)), t._atom.reportChanged();
|
|
3544
|
-
});
|
|
3545
|
-
var r = W(), i = J(this), n = i || r ? {
|
|
3546
|
-
type: "add",
|
|
3547
|
-
object: this,
|
|
3548
|
-
newValue: e
|
|
3549
|
-
} : null;
|
|
3550
|
-
i && Y(this, n);
|
|
3551
|
-
}
|
|
3552
|
-
return this;
|
|
3553
|
-
}, e.prototype.delete = function(e) {
|
|
3554
|
-
var t = this;
|
|
3555
|
-
if (K(this)) {
|
|
3556
|
-
var n = q(this, {
|
|
3557
|
-
type: "delete",
|
|
3558
|
-
object: this,
|
|
3559
|
-
oldValue: e
|
|
3560
|
-
});
|
|
3561
|
-
if (!n) return !1;
|
|
3562
|
-
}
|
|
3563
|
-
if (this.has(e)) {
|
|
3564
|
-
var r = W(), i = J(this), n = i || r ? {
|
|
3565
|
-
type: "delete",
|
|
3566
|
-
object: this,
|
|
3567
|
-
oldValue: e
|
|
3568
|
-
} : null;
|
|
3569
|
-
return G(function() {
|
|
3570
|
-
t._atom.reportChanged(), t._data.delete(e);
|
|
3571
|
-
}), i && Y(this, n), !0;
|
|
3572
|
-
}
|
|
3573
|
-
return !1;
|
|
3574
|
-
}, e.prototype.has = function(e) {
|
|
3575
|
-
return this._atom.reportObserved(), this._data.has(this.dehanceValue(e));
|
|
3576
|
-
}, e.prototype.entries = function() {
|
|
3577
|
-
var e = 0, t = Array.from(this.keys()), n = Array.from(this.values());
|
|
3578
|
-
return Pi({ next: function() {
|
|
3579
|
-
var r = e;
|
|
3580
|
-
return e += 1, r < n.length ? {
|
|
3581
|
-
value: [t[r], n[r]],
|
|
3582
|
-
done: !1
|
|
3583
|
-
} : { done: !0 };
|
|
3584
|
-
} });
|
|
3585
|
-
}, e.prototype.keys = function() {
|
|
3586
|
-
return this.values();
|
|
3587
|
-
}, e.prototype.values = function() {
|
|
3588
|
-
this._atom.reportObserved();
|
|
3589
|
-
var e = this, t = 0, n = Array.from(this._data.values());
|
|
3590
|
-
return Pi({ next: function() {
|
|
3591
|
-
return t < n.length ? {
|
|
3592
|
-
value: e.dehanceValue(n[t++]),
|
|
3593
|
-
done: !1
|
|
3594
|
-
} : { done: !0 };
|
|
3595
|
-
} });
|
|
3596
|
-
}, e.prototype.replace = function(e) {
|
|
3597
|
-
var t = this;
|
|
3598
|
-
return Q(e) && (e = e.toJS()), G(function() {
|
|
3599
|
-
var n = Wn(!0);
|
|
3600
|
-
try {
|
|
3601
|
-
Array.isArray(e) || Ft(e) ? (t.clear(), e.forEach(function(e) {
|
|
3602
|
-
return t.add(e);
|
|
3603
|
-
})) : e != null && M("Cannot initialize set from " + e);
|
|
3604
|
-
} finally {
|
|
3605
|
-
Gn(n);
|
|
3606
|
-
}
|
|
3607
|
-
}), this;
|
|
3608
|
-
}, e.prototype.observe = function(e, t) {
|
|
3609
|
-
return ai(this, e);
|
|
3610
|
-
}, e.prototype.intercept = function(e) {
|
|
3611
|
-
return ii(this, e);
|
|
3612
|
-
}, e.prototype.toJS = function() {
|
|
3613
|
-
return new Set(this);
|
|
3614
|
-
}, e.prototype.toString = function() {
|
|
3615
|
-
return this.name + "[ " + Array.from(this).join(", ") + " ]";
|
|
3616
|
-
}, e.prototype[hi = F, Symbol.iterator] = function() {
|
|
3617
|
-
return this.values();
|
|
3618
|
-
}, e;
|
|
3619
|
-
}(), Q = N("ObservableSet", _i), vi = function() {
|
|
3620
|
-
function e(e, t, n, r) {
|
|
3621
|
-
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");
|
|
3622
|
-
}
|
|
3623
|
-
return e.prototype.read = function(e) {
|
|
3624
|
-
return this.values.get(e).get();
|
|
3625
|
-
}, e.prototype.write = function(e, t) {
|
|
3626
|
-
var n = this.target, r = this.values.get(e);
|
|
3627
|
-
if (r instanceof Jn) {
|
|
3628
|
-
r.set(t);
|
|
3629
|
-
return;
|
|
3630
|
-
}
|
|
3631
|
-
if (K(this)) {
|
|
3632
|
-
var i = q(this, {
|
|
3633
|
-
type: "update",
|
|
3634
|
-
object: this.proxy || n,
|
|
3635
|
-
name: e,
|
|
3636
|
-
newValue: t
|
|
3637
|
-
});
|
|
3638
|
-
if (!i) return;
|
|
3639
|
-
t = i.newValue;
|
|
3640
|
-
}
|
|
3641
|
-
if (t = r.prepareNewValue(t), t !== V.UNCHANGED) {
|
|
3642
|
-
var a = J(this), o = W(), i = a || o ? {
|
|
3643
|
-
type: "update",
|
|
3644
|
-
object: this.proxy || n,
|
|
3645
|
-
oldValue: r.value,
|
|
3646
|
-
name: e,
|
|
3647
|
-
newValue: t
|
|
3648
|
-
} : null;
|
|
3649
|
-
r.setNewValue(t), a && Y(this, i);
|
|
3650
|
-
}
|
|
3651
|
-
}, e.prototype.has = function(e) {
|
|
3652
|
-
var t = this.pendingKeys || (this.pendingKeys = /* @__PURE__ */ new Map()), n = t.get(e);
|
|
3653
|
-
return n ? n.get() : (n = new Kn(!!this.values.get(e), ln, this.name + "." + P(e) + "?", !1), t.set(e, n), n.get());
|
|
3654
|
-
}, e.prototype.addObservableProp = function(e, t, n) {
|
|
3655
|
-
n === void 0 && (n = this.defaultEnhancer);
|
|
3656
|
-
var r = this.target;
|
|
3657
|
-
if (K(this)) {
|
|
3658
|
-
var i = q(this, {
|
|
3659
|
-
object: this.proxy || r,
|
|
3660
|
-
name: e,
|
|
3661
|
-
type: "add",
|
|
3662
|
-
newValue: t
|
|
3663
|
-
});
|
|
3664
|
-
if (!i) return;
|
|
3665
|
-
t = i.newValue;
|
|
3666
|
-
}
|
|
3667
|
-
var a = new Kn(t, n, this.name + "." + P(e), !1);
|
|
3668
|
-
this.values.set(e, a), t = a.value, Object.defineProperty(r, e, Si(e)), this.notifyPropertyAddition(e, t);
|
|
3669
|
-
}, e.prototype.addComputedProp = function(e, t, n) {
|
|
3670
|
-
var r = this.target;
|
|
3671
|
-
n.name = n.name || this.name + "." + P(t), this.values.set(t, new Jn(n)), (e === r || Nt(e, t)) && Object.defineProperty(e, t, wi(t));
|
|
3672
|
-
}, e.prototype.remove = function(e) {
|
|
3673
|
-
if (this.values.has(e)) {
|
|
3674
|
-
var t = this.target;
|
|
3675
|
-
if (K(this)) {
|
|
3676
|
-
var n = q(this, {
|
|
3677
|
-
object: this.proxy || t,
|
|
3678
|
-
name: e,
|
|
3679
|
-
type: "remove"
|
|
3680
|
-
});
|
|
3681
|
-
if (!n) return;
|
|
3682
|
-
}
|
|
3683
|
-
try {
|
|
3684
|
-
H();
|
|
3685
|
-
var r = J(this), i = W(), a = this.values.get(e), o = a && a.get();
|
|
3686
|
-
if (a && a.set(void 0), this.keysAtom.reportChanged(), this.values.delete(e), this.pendingKeys) {
|
|
3687
|
-
var s = this.pendingKeys.get(e);
|
|
3688
|
-
s && s.set(!1);
|
|
3689
|
-
}
|
|
3690
|
-
delete this.target[e];
|
|
3691
|
-
var n = r || i ? {
|
|
3692
|
-
type: "remove",
|
|
3693
|
-
object: this.proxy || t,
|
|
3694
|
-
oldValue: o,
|
|
3695
|
-
name: e
|
|
3696
|
-
} : null;
|
|
3697
|
-
r && Y(this, n);
|
|
3698
|
-
} finally {
|
|
3699
|
-
U();
|
|
3700
|
-
}
|
|
3701
|
-
}
|
|
3702
|
-
}, e.prototype.illegalAccess = function(e, t) {
|
|
3703
|
-
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");
|
|
3704
|
-
}, e.prototype.observe = function(e, t) {
|
|
3705
|
-
return ai(this, e);
|
|
3706
|
-
}, e.prototype.intercept = function(e) {
|
|
3707
|
-
return ii(this, e);
|
|
3708
|
-
}, e.prototype.notifyPropertyAddition = function(e, t) {
|
|
3709
|
-
var n = J(this), r = W(), i = n || r ? {
|
|
3710
|
-
type: "add",
|
|
3711
|
-
object: this.proxy || this.target,
|
|
3712
|
-
name: e,
|
|
3713
|
-
newValue: t
|
|
3714
|
-
} : null;
|
|
3715
|
-
if (n && Y(this, i), this.pendingKeys) {
|
|
3716
|
-
var a = this.pendingKeys.get(e);
|
|
3717
|
-
a && a.set(!0);
|
|
3718
|
-
}
|
|
3719
|
-
this.keysAtom.reportChanged();
|
|
3720
|
-
}, e.prototype.getKeys = function() {
|
|
3721
|
-
var e, t;
|
|
3722
|
-
this.keysAtom.reportObserved();
|
|
3723
|
-
var n = [];
|
|
3724
|
-
try {
|
|
3725
|
-
for (var r = I(this.values), i = r.next(); !i.done; i = r.next()) {
|
|
3726
|
-
var a = Xt(i.value, 2), o = a[0];
|
|
3727
|
-
a[1] instanceof Kn && n.push(o);
|
|
3728
|
-
}
|
|
3729
|
-
} catch (t) {
|
|
3730
|
-
e = { error: t };
|
|
3731
|
-
} finally {
|
|
3732
|
-
try {
|
|
3733
|
-
i && !i.done && (t = r.return) && t.call(r);
|
|
3734
|
-
} finally {
|
|
3735
|
-
if (e) throw e.error;
|
|
3736
|
-
}
|
|
3737
|
-
}
|
|
3738
|
-
return n;
|
|
3739
|
-
}, e;
|
|
3740
|
-
}();
|
|
3741
|
-
function yi(e, t, n) {
|
|
3742
|
-
if (t === void 0 && (t = ""), n === void 0 && (n = sn), Object.prototype.hasOwnProperty.call(e, F)) return e[F];
|
|
3743
|
-
kt(e) || (t = (e.constructor.name || "ObservableObject") + "@" + j()), t || (t = "ObservableObject@" + j());
|
|
3744
|
-
var r = new vi(e, /* @__PURE__ */ new Map(), P(t), n);
|
|
3745
|
-
return jt(e, F, r), r;
|
|
3746
|
-
}
|
|
3747
|
-
var bi = Object.create(null), xi = Object.create(null);
|
|
3748
|
-
function Si(e) {
|
|
3749
|
-
return bi[e] || (bi[e] = {
|
|
3750
|
-
configurable: !0,
|
|
3751
|
-
enumerable: !0,
|
|
3752
|
-
get: function() {
|
|
3753
|
-
return this[F].read(e);
|
|
3754
|
-
},
|
|
3755
|
-
set: function(t) {
|
|
3756
|
-
this[F].write(e, t);
|
|
3757
|
-
}
|
|
3758
|
-
});
|
|
3759
|
-
}
|
|
3760
|
-
function Ci(e) {
|
|
3761
|
-
return e[F] || (rn(e), e[F]);
|
|
3762
|
-
}
|
|
3763
|
-
function wi(e) {
|
|
3764
|
-
return xi[e] || (xi[e] = {
|
|
3765
|
-
configurable: V.computedConfigurable,
|
|
3766
|
-
enumerable: !1,
|
|
3767
|
-
get: function() {
|
|
3768
|
-
return Ci(this).read(e);
|
|
3769
|
-
},
|
|
3770
|
-
set: function(t) {
|
|
3771
|
-
Ci(this).write(e, t);
|
|
3772
|
-
}
|
|
3773
|
-
});
|
|
3774
|
-
}
|
|
3775
|
-
var Ti = N("ObservableObjectAdministration", vi);
|
|
3776
|
-
function Ei(e) {
|
|
3777
|
-
return Ot(e) ? (rn(e), Ti(e[F])) : !1;
|
|
3778
|
-
}
|
|
3779
|
-
function $(e, t) {
|
|
3780
|
-
if (typeof e == "object" && e) {
|
|
3781
|
-
if (di(e)) return t !== void 0 && M(!1), e[F].atom;
|
|
3782
|
-
if (Q(e)) return e[F];
|
|
3783
|
-
if (Z(e)) {
|
|
3784
|
-
var n = e;
|
|
3785
|
-
if (t === void 0) return n._keysAtom;
|
|
3786
|
-
var r = n._data.get(t) || n._hasMap.get(t);
|
|
3787
|
-
return r || M(!1), r;
|
|
3788
|
-
}
|
|
3789
|
-
if (rn(e), t && !e[F] && e[t], Ei(e)) {
|
|
3790
|
-
if (!t) return M(!1);
|
|
3791
|
-
var r = e[F].values.get(t);
|
|
3792
|
-
return r || M(!1), r;
|
|
3793
|
-
}
|
|
3794
|
-
if (Bt(e) || Yn(e) || gr(e)) return e;
|
|
3795
|
-
} else if (typeof e == "function" && gr(e[F])) return e[F];
|
|
3796
|
-
return M(!1);
|
|
3797
|
-
}
|
|
3798
|
-
function Di(e, t) {
|
|
3799
|
-
if (e || M("Expecting some object"), t !== void 0) return Di($(e, t));
|
|
3800
|
-
if (Bt(e) || Yn(e) || gr(e) || Z(e) || Q(e)) return e;
|
|
3801
|
-
if (rn(e), e[F]) return e[F];
|
|
3802
|
-
M(!1);
|
|
3803
|
-
}
|
|
3804
|
-
function Oi(e, t) {
|
|
3805
|
-
return (t === void 0 ? Ei(e) || Z(e) || Q(e) ? Di(e) : $(e) : $(e, t)).name;
|
|
3806
|
-
}
|
|
3807
|
-
var ki = Object.prototype.toString;
|
|
3808
|
-
function Ai(e, t, n) {
|
|
3809
|
-
return n === void 0 && (n = -1), ji(e, t, n);
|
|
3810
|
-
}
|
|
3811
|
-
function ji(e, t, n, r, i) {
|
|
3812
|
-
if (e === t) return e !== 0 || 1 / e == 1 / t;
|
|
3813
|
-
if (e == null || t == null) return !1;
|
|
3814
|
-
if (e !== e) return t !== t;
|
|
3815
|
-
var a = typeof e;
|
|
3816
|
-
if (a !== "function" && a !== "object" && typeof t != "object") return !1;
|
|
3817
|
-
var o = ki.call(e);
|
|
3818
|
-
if (o !== ki.call(t)) return !1;
|
|
3819
|
-
switch (o) {
|
|
3820
|
-
case "[object RegExp]":
|
|
3821
|
-
case "[object String]": return "" + e == "" + t;
|
|
3822
|
-
case "[object Number]": return +e == +e ? +e == 0 ? 1 / e == 1 / t : +e == +t : +t != +t;
|
|
3823
|
-
case "[object Date]":
|
|
3824
|
-
case "[object Boolean]": return +e == +t;
|
|
3825
|
-
case "[object Symbol]": return typeof Symbol < "u" && Symbol.valueOf.call(e) === Symbol.valueOf.call(t);
|
|
3826
|
-
case "[object Map]":
|
|
3827
|
-
case "[object Set]":
|
|
3828
|
-
n >= 0 && n++;
|
|
3829
|
-
break;
|
|
3830
|
-
}
|
|
3831
|
-
e = Mi(e), t = Mi(t);
|
|
3832
|
-
var s = o === "[object Array]";
|
|
3833
|
-
if (!s) {
|
|
3834
|
-
if (typeof e != "object" || typeof t != "object") return !1;
|
|
3835
|
-
var c = e.constructor, l = t.constructor;
|
|
3836
|
-
if (c !== l && !(typeof c == "function" && c instanceof c && typeof l == "function" && l instanceof l) && "constructor" in e && "constructor" in t) return !1;
|
|
3837
|
-
}
|
|
3838
|
-
if (n === 0) return !1;
|
|
3839
|
-
n < 0 && (n = -1), r = r || [], i = i || [];
|
|
3840
|
-
for (var u = r.length; u--;) if (r[u] === e) return i[u] === t;
|
|
3841
|
-
if (r.push(e), i.push(t), s) {
|
|
3842
|
-
if (u = e.length, u !== t.length) return !1;
|
|
3843
|
-
for (; u--;) if (!ji(e[u], t[u], n - 1, r, i)) return !1;
|
|
3844
|
-
} else {
|
|
3845
|
-
var d = Object.keys(e), f = void 0;
|
|
3846
|
-
if (u = d.length, Object.keys(t).length !== u) return !1;
|
|
3847
|
-
for (; u--;) if (f = d[u], !(Ni(t, f) && ji(e[f], t[f], n - 1, r, i))) return !1;
|
|
3848
|
-
}
|
|
3849
|
-
return r.pop(), i.pop(), !0;
|
|
3850
|
-
}
|
|
3851
|
-
function Mi(e) {
|
|
3852
|
-
return di(e) ? e.slice() : Pt(e) || Z(e) || Ft(e) || Q(e) ? Array.from(e.entries()) : e;
|
|
3853
|
-
}
|
|
3854
|
-
function Ni(e, t) {
|
|
3855
|
-
return Object.prototype.hasOwnProperty.call(e, t);
|
|
3856
|
-
}
|
|
3857
|
-
function Pi(e) {
|
|
3858
|
-
return e[Symbol.iterator] = Fi, e;
|
|
3859
|
-
}
|
|
3860
|
-
function Fi() {
|
|
3861
|
-
return this;
|
|
3862
|
-
}
|
|
3863
|
-
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.");
|
|
3864
|
-
(function() {
|
|
3865
|
-
function e() {}
|
|
3866
|
-
e.name;
|
|
3867
|
-
})(), typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ == "object" && __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({
|
|
3868
|
-
spy: vr,
|
|
3869
|
-
extras: { getDebugName: Oi },
|
|
3870
|
-
$mobx: F
|
|
3871
|
-
});
|
|
3872
|
-
//#endregion
|
|
3873
|
-
//#region src/locales.ts
|
|
3874
|
-
var Ii = {
|
|
3875
|
-
de: "Deutsch",
|
|
3876
|
-
en: "English",
|
|
3877
|
-
es: "Español",
|
|
3878
|
-
fr: "Français",
|
|
3879
|
-
it: "Italiano",
|
|
3880
|
-
ko: "한국어",
|
|
3881
|
-
nl: "Nederlands",
|
|
3882
|
-
pt: "Português",
|
|
3883
|
-
ru: "Русский",
|
|
3884
|
-
tr: "Türkçe",
|
|
3885
|
-
zh: "中文",
|
|
3886
|
-
sv: "Svenska",
|
|
3887
|
-
ar: "العربية",
|
|
3888
|
-
th: "ไทย",
|
|
3889
|
-
vi: "Tiếng Việt",
|
|
3890
|
-
uk: "Українська",
|
|
3891
|
-
he: "עברית",
|
|
3892
|
-
kk: "Қазақша",
|
|
3893
|
-
pl: "Polski",
|
|
3894
|
-
mn: "Монгол",
|
|
3895
|
-
da: "Dansk"
|
|
3896
|
-
};
|
|
3897
|
-
//#endregion
|
|
3898
|
-
//#region src/utils/localStorage.ts
|
|
3899
|
-
function Li() {
|
|
3900
|
-
try {
|
|
3901
|
-
return localStorage.setItem("test", "test"), localStorage.removeItem("test"), !0;
|
|
3902
|
-
} catch {
|
|
3903
|
-
return !1;
|
|
3904
|
-
}
|
|
3905
|
-
}
|
|
3906
|
-
var Ri = Li(), zi = "en", Bi = "efp-locale", Vi = "language", Hi = L.box(zi), Ui = L.array([], { deep: !1 }), Wi = (e) => Oe(`${he}locales/${e}.json`), Gi = () => {
|
|
3907
|
-
if (!Ri) return null;
|
|
3908
|
-
let e = localStorage.getItem(Bi), t = localStorage.getItem(Vi);
|
|
3909
|
-
return t && localStorage.removeItem(Vi), e || (t && localStorage.setItem(Bi, t), t);
|
|
3910
|
-
}, Ki = () => {
|
|
3911
|
-
var e;
|
|
3912
|
-
let t = window.__data, n = ((e = navigator.languages) == null ? void 0 : e[0]) || navigator.language, r = Object.keys(Ii).find((e) => n.startsWith(e));
|
|
3913
|
-
return (Gi() || (t == null ? void 0 : t.locale) || r || zi).toLowerCase();
|
|
3914
|
-
}, qi = () => Hi.get(), Ji = () => Ui, Yi = (e) => Ui.some((t) => t.id === e), Xi = (e, t) => (Hi.get(), bt.t(e, t)), Zi = (e, t) => (Hi.get(), bt.exists(e, t) ? bt.t(e, t) : e), Qi = async () => {
|
|
3915
|
-
Ui.replace(Object.entries(Ii).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => ({
|
|
3916
|
-
id: e,
|
|
3917
|
-
name: t,
|
|
3918
|
-
entity: { type: ne }
|
|
3919
|
-
})));
|
|
3920
|
-
let e = Ki(), t = {};
|
|
3921
|
-
if (e !== zi) try {
|
|
3922
|
-
t[e] = { translation: await Wi(e) };
|
|
3923
|
-
} catch (t) {
|
|
3924
|
-
console.error(`Unable to load "${e}" localization, falling back to "${zi}".`, t), e = zi;
|
|
3925
|
-
}
|
|
3926
|
-
return Hi.set(e), bt.init({
|
|
3927
|
-
resources: t,
|
|
3928
|
-
lng: e,
|
|
3929
|
-
keySeparator: !1,
|
|
3930
|
-
saveMissing: e !== zi,
|
|
3931
|
-
missingKeyHandler: (e, t, n, r) => console.debug(`i18n missing key: '${e[0]}:${t}:${n}', fallback: '${r}'`)
|
|
3932
|
-
});
|
|
3933
|
-
}, $i = async (e) => {
|
|
3934
|
-
let t = e.toLowerCase();
|
|
3935
|
-
try {
|
|
3936
|
-
t !== zi && !bt.hasResourceBundle(t, "translation") && bt.addResourceBundle(t, "translation", await Wi(t), !0, !0), await bt.changeLanguage(t), Hi.set(t), Ri && localStorage.setItem(Bi, t);
|
|
3937
|
-
} catch (e) {
|
|
3938
|
-
console.error(`Failed to switch language to "${t}":`, e);
|
|
3939
|
-
}
|
|
3940
|
-
}, ea = async () => (Ri && (localStorage.removeItem(Bi), localStorage.removeItem(Vi)), $i(Ki()));
|
|
3941
|
-
//#endregion
|
|
3942
|
-
export { d as $, De as A, ce as B, Zr as C, Ne as D, ke as E, S as F, ne as G, C as H, g as I, de as J, te as K, _ as L, he as M, f as N, je as O, v as P, b as Q, oe as R, G as S, ze as T, le as U, ue as V, p as W, x as X, ee as Y, y as Z, L as _, ea as a, ae as at, vr as b, Zi as c, c as ct, Cr as d, l as et, Er as f, Rr as g, Pr as h, Qi as i, ie as it, Ee as j, Ae as k, Ri as l, s as lt, wn as m, Ji as n, m as nt, $i as o, fe as ot, Kt as p, h as q, Yi as r, re as rt, Xi as s, pe as st, qi as t, u as tt, dr as u, kr as v, He as w, Jr as x, wr as y, se as z };
|