dara-core 1.13.1__py3-none-any.whl → 1.14.0a1__py3-none-any.whl
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.
- dara/core/auth/base.py +21 -1
- dara/core/auth/routes.py +65 -1
- dara/core/auth/utils.py +8 -3
- dara/core/internal/routing.py +6 -3
- dara/core/umd/dara.core.umd.js +631 -468
- {dara_core-1.13.1.dist-info → dara_core-1.14.0a1.dist-info}/METADATA +10 -10
- {dara_core-1.13.1.dist-info → dara_core-1.14.0a1.dist-info}/RECORD +10 -10
- {dara_core-1.13.1.dist-info → dara_core-1.14.0a1.dist-info}/LICENSE +0 -0
- {dara_core-1.13.1.dist-info → dara_core-1.14.0a1.dist-info}/WHEEL +0 -0
- {dara_core-1.13.1.dist-info → dara_core-1.14.0a1.dist-info}/entry_points.txt +0 -0
dara/core/umd/dara.core.umd.js
CHANGED
|
@@ -30,10 +30,14 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
30
30
|
return __privateGet(obj, member, getter);
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
|
+
var __privateMethod = (obj, member, method) => {
|
|
34
|
+
__accessCheck(obj, member, "access private method");
|
|
35
|
+
return method;
|
|
36
|
+
};
|
|
33
37
|
(function(global2, factory) {
|
|
34
38
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("@tanstack/react-query"), require("react-dom"), require("styled-components")) : typeof define === "function" && define.amd ? define(["exports", "react", "@tanstack/react-query", "react-dom", "styled-components"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory((global2.dara = global2.dara || {}, global2.dara.core = {}), global2.React, global2.ReactQuery, global2.ReactDOM, global2.styled));
|
|
35
39
|
})(this, function(exports, React, reactQuery, ReactDOM, styled) {
|
|
36
|
-
var _pingInterval, _socketUrl, _reconnectCount, _events$, _parentBus, _instance, _observers;
|
|
40
|
+
var _state, _locks, _subscribers, _notify, notify_fn, _pingInterval, _socketUrl, _reconnectCount, _events$, _parentBus, _instance, _observers;
|
|
37
41
|
"use strict";
|
|
38
42
|
const _interopDefaultLegacy = (e3) => e3 && typeof e3 === "object" && "default" in e3 ? e3 : { default: e3 };
|
|
39
43
|
function _interopNamespace(e3) {
|
|
@@ -1196,7 +1200,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
1196
1200
|
* This source code is licensed under the MIT license found in the
|
|
1197
1201
|
* LICENSE file in the root directory of this source tree.
|
|
1198
1202
|
*/
|
|
1199
|
-
var b$1 = "function" === typeof Symbol && Symbol.for, c$1 = b$1 ? Symbol.for("react.element") : 60103, d$2 = b$1 ? Symbol.for("react.portal") : 60106, e$
|
|
1203
|
+
var b$1 = "function" === typeof Symbol && Symbol.for, c$1 = b$1 ? Symbol.for("react.element") : 60103, d$2 = b$1 ? Symbol.for("react.portal") : 60106, e$3 = b$1 ? Symbol.for("react.fragment") : 60107, f$2 = b$1 ? Symbol.for("react.strict_mode") : 60108, g$1 = b$1 ? Symbol.for("react.profiler") : 60114, h$1 = b$1 ? Symbol.for("react.provider") : 60109, k$2 = b$1 ? Symbol.for("react.context") : 60110, l$3 = b$1 ? Symbol.for("react.async_mode") : 60111, m$2 = b$1 ? Symbol.for("react.concurrent_mode") : 60111, n$4 = b$1 ? Symbol.for("react.forward_ref") : 60112, p$3 = b$1 ? Symbol.for("react.suspense") : 60113, q$2 = b$1 ? Symbol.for("react.suspense_list") : 60120, r$3 = b$1 ? Symbol.for("react.memo") : 60115, t$2 = b$1 ? Symbol.for("react.lazy") : 60116, v$1 = b$1 ? Symbol.for("react.block") : 60121, w$2 = b$1 ? Symbol.for("react.fundamental") : 60117, x$1 = b$1 ? Symbol.for("react.responder") : 60118, y$1 = b$1 ? Symbol.for("react.scope") : 60119;
|
|
1200
1204
|
function z$1(a2) {
|
|
1201
1205
|
if ("object" === typeof a2 && null !== a2) {
|
|
1202
1206
|
var u2 = a2.$$typeof;
|
|
@@ -1205,7 +1209,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
1205
1209
|
switch (a2 = a2.type, a2) {
|
|
1206
1210
|
case l$3:
|
|
1207
1211
|
case m$2:
|
|
1208
|
-
case e$
|
|
1212
|
+
case e$3:
|
|
1209
1213
|
case g$1:
|
|
1210
1214
|
case f$2:
|
|
1211
1215
|
case p$3:
|
|
@@ -1213,9 +1217,9 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
1213
1217
|
default:
|
|
1214
1218
|
switch (a2 = a2 && a2.$$typeof, a2) {
|
|
1215
1219
|
case k$2:
|
|
1216
|
-
case n$
|
|
1217
|
-
case t$
|
|
1218
|
-
case r$
|
|
1220
|
+
case n$4:
|
|
1221
|
+
case t$2:
|
|
1222
|
+
case r$3:
|
|
1219
1223
|
case h$1:
|
|
1220
1224
|
return a2;
|
|
1221
1225
|
default:
|
|
@@ -1235,10 +1239,10 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
1235
1239
|
reactIs_production_min$1.ContextConsumer = k$2;
|
|
1236
1240
|
reactIs_production_min$1.ContextProvider = h$1;
|
|
1237
1241
|
reactIs_production_min$1.Element = c$1;
|
|
1238
|
-
reactIs_production_min$1.ForwardRef = n$
|
|
1239
|
-
reactIs_production_min$1.Fragment = e$
|
|
1240
|
-
reactIs_production_min$1.Lazy = t$
|
|
1241
|
-
reactIs_production_min$1.Memo = r$
|
|
1242
|
+
reactIs_production_min$1.ForwardRef = n$4;
|
|
1243
|
+
reactIs_production_min$1.Fragment = e$3;
|
|
1244
|
+
reactIs_production_min$1.Lazy = t$2;
|
|
1245
|
+
reactIs_production_min$1.Memo = r$3;
|
|
1242
1246
|
reactIs_production_min$1.Portal = d$2;
|
|
1243
1247
|
reactIs_production_min$1.Profiler = g$1;
|
|
1244
1248
|
reactIs_production_min$1.StrictMode = f$2;
|
|
@@ -1257,16 +1261,16 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
1257
1261
|
return "object" === typeof a2 && null !== a2 && a2.$$typeof === c$1;
|
|
1258
1262
|
};
|
|
1259
1263
|
reactIs_production_min$1.isForwardRef = function(a2) {
|
|
1260
|
-
return z$1(a2) === n$
|
|
1264
|
+
return z$1(a2) === n$4;
|
|
1261
1265
|
};
|
|
1262
1266
|
reactIs_production_min$1.isFragment = function(a2) {
|
|
1263
|
-
return z$1(a2) === e$
|
|
1267
|
+
return z$1(a2) === e$3;
|
|
1264
1268
|
};
|
|
1265
1269
|
reactIs_production_min$1.isLazy = function(a2) {
|
|
1266
|
-
return z$1(a2) === t$
|
|
1270
|
+
return z$1(a2) === t$2;
|
|
1267
1271
|
};
|
|
1268
1272
|
reactIs_production_min$1.isMemo = function(a2) {
|
|
1269
|
-
return z$1(a2) === r$
|
|
1273
|
+
return z$1(a2) === r$3;
|
|
1270
1274
|
};
|
|
1271
1275
|
reactIs_production_min$1.isPortal = function(a2) {
|
|
1272
1276
|
return z$1(a2) === d$2;
|
|
@@ -1281,7 +1285,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
1281
1285
|
return z$1(a2) === p$3;
|
|
1282
1286
|
};
|
|
1283
1287
|
reactIs_production_min$1.isValidElementType = function(a2) {
|
|
1284
|
-
return "string" === typeof a2 || "function" === typeof a2 || a2 === e$
|
|
1288
|
+
return "string" === typeof a2 || "function" === typeof a2 || a2 === e$3 || a2 === m$2 || a2 === g$1 || a2 === f$2 || a2 === p$3 || a2 === q$2 || "object" === typeof a2 && null !== a2 && (a2.$$typeof === t$2 || a2.$$typeof === r$3 || a2.$$typeof === h$1 || a2.$$typeof === k$2 || a2.$$typeof === n$4 || a2.$$typeof === w$2 || a2.$$typeof === x$1 || a2.$$typeof === y$1 || a2.$$typeof === v$1);
|
|
1285
1289
|
};
|
|
1286
1290
|
reactIs_production_min$1.typeOf = z$1;
|
|
1287
1291
|
(function(module2) {
|
|
@@ -3381,22 +3385,22 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3381
3385
|
}
|
|
3382
3386
|
}
|
|
3383
3387
|
}
|
|
3384
|
-
function saveDepsToStore(key, deps,
|
|
3388
|
+
function saveDepsToStore(key, deps, store2, version) {
|
|
3385
3389
|
var _storeState$nextTree, _storeState$previousT, _storeState$previousT2, _storeState$previousT3;
|
|
3386
|
-
const storeState =
|
|
3390
|
+
const storeState = store2.getState();
|
|
3387
3391
|
if (!(version === storeState.currentTree.version || version === ((_storeState$nextTree = storeState.nextTree) === null || _storeState$nextTree === void 0 ? void 0 : _storeState$nextTree.version) || version === ((_storeState$previousT = storeState.previousTree) === null || _storeState$previousT === void 0 ? void 0 : _storeState$previousT.version)))
|
|
3388
3392
|
;
|
|
3389
|
-
const graph2 =
|
|
3393
|
+
const graph2 = store2.getGraph(version);
|
|
3390
3394
|
mergeDepsIntoGraph(key, deps, graph2);
|
|
3391
3395
|
if (version === ((_storeState$previousT2 = storeState.previousTree) === null || _storeState$previousT2 === void 0 ? void 0 : _storeState$previousT2.version)) {
|
|
3392
|
-
const currentGraph =
|
|
3396
|
+
const currentGraph = store2.getGraph(storeState.currentTree.version);
|
|
3393
3397
|
mergeDepsIntoGraph(key, deps, currentGraph, graph2);
|
|
3394
3398
|
}
|
|
3395
3399
|
if (version === ((_storeState$previousT3 = storeState.previousTree) === null || _storeState$previousT3 === void 0 ? void 0 : _storeState$previousT3.version) || version === storeState.currentTree.version) {
|
|
3396
3400
|
var _storeState$nextTree2;
|
|
3397
3401
|
const nextVersion = (_storeState$nextTree2 = storeState.nextTree) === null || _storeState$nextTree2 === void 0 ? void 0 : _storeState$nextTree2.version;
|
|
3398
3402
|
if (nextVersion !== void 0) {
|
|
3399
|
-
const nextGraph =
|
|
3403
|
+
const nextGraph = store2.getGraph(nextVersion);
|
|
3400
3404
|
mergeDepsIntoGraph(key, deps, nextGraph, graph2);
|
|
3401
3405
|
}
|
|
3402
3406
|
}
|
|
@@ -3550,13 +3554,13 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3550
3554
|
const emptySet = Object.freeze(/* @__PURE__ */ new Set());
|
|
3551
3555
|
class ReadOnlyRecoilValueError extends Error {
|
|
3552
3556
|
}
|
|
3553
|
-
function initializeRetentionForNode(
|
|
3557
|
+
function initializeRetentionForNode(store2, nodeKey, retainedBy) {
|
|
3554
3558
|
if (!Recoil_gkx("recoil_memory_managament_2020")) {
|
|
3555
3559
|
return () => void 0;
|
|
3556
3560
|
}
|
|
3557
3561
|
const {
|
|
3558
3562
|
nodesRetainedByZone: nodesRetainedByZone2
|
|
3559
|
-
} =
|
|
3563
|
+
} = store2.getState().retention;
|
|
3560
3564
|
function addToZone(zone) {
|
|
3561
3565
|
let set2 = nodesRetainedByZone2.get(zone);
|
|
3562
3566
|
if (!set2) {
|
|
@@ -3577,7 +3581,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3577
3581
|
}
|
|
3578
3582
|
const {
|
|
3579
3583
|
retention
|
|
3580
|
-
} =
|
|
3584
|
+
} = store2.getState();
|
|
3581
3585
|
function deleteFromZone(zone) {
|
|
3582
3586
|
const set2 = retention.nodesRetainedByZone.get(zone);
|
|
3583
3587
|
set2 === null || set2 === void 0 ? void 0 : set2.delete(nodeKey);
|
|
@@ -3594,34 +3598,34 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3594
3598
|
}
|
|
3595
3599
|
};
|
|
3596
3600
|
}
|
|
3597
|
-
function initializeNodeIfNewToStore(
|
|
3598
|
-
const storeState =
|
|
3601
|
+
function initializeNodeIfNewToStore(store2, treeState, key, trigger) {
|
|
3602
|
+
const storeState = store2.getState();
|
|
3599
3603
|
if (storeState.nodeCleanupFunctions.has(key)) {
|
|
3600
3604
|
return;
|
|
3601
3605
|
}
|
|
3602
3606
|
const node = getNode$1(key);
|
|
3603
|
-
const retentionCleanup = initializeRetentionForNode(
|
|
3604
|
-
const nodeCleanup = node.init(
|
|
3607
|
+
const retentionCleanup = initializeRetentionForNode(store2, key, node.retainedBy);
|
|
3608
|
+
const nodeCleanup = node.init(store2, treeState, trigger);
|
|
3605
3609
|
storeState.nodeCleanupFunctions.set(key, () => {
|
|
3606
3610
|
nodeCleanup();
|
|
3607
3611
|
retentionCleanup();
|
|
3608
3612
|
});
|
|
3609
3613
|
}
|
|
3610
|
-
function initializeNode(
|
|
3611
|
-
initializeNodeIfNewToStore(
|
|
3614
|
+
function initializeNode(store2, key, trigger) {
|
|
3615
|
+
initializeNodeIfNewToStore(store2, store2.getState().currentTree, key, trigger);
|
|
3612
3616
|
}
|
|
3613
|
-
function cleanUpNode(
|
|
3617
|
+
function cleanUpNode(store2, key) {
|
|
3614
3618
|
var _state$nodeCleanupFun;
|
|
3615
|
-
const state =
|
|
3619
|
+
const state = store2.getState();
|
|
3616
3620
|
(_state$nodeCleanupFun = state.nodeCleanupFunctions.get(key)) === null || _state$nodeCleanupFun === void 0 ? void 0 : _state$nodeCleanupFun();
|
|
3617
3621
|
state.nodeCleanupFunctions.delete(key);
|
|
3618
3622
|
}
|
|
3619
|
-
function getNodeLoadable(
|
|
3620
|
-
initializeNodeIfNewToStore(
|
|
3621
|
-
return getNode$1(key).get(
|
|
3623
|
+
function getNodeLoadable(store2, state, key) {
|
|
3624
|
+
initializeNodeIfNewToStore(store2, state, key, "get");
|
|
3625
|
+
return getNode$1(key).get(store2, state);
|
|
3622
3626
|
}
|
|
3623
|
-
function peekNodeLoadable(
|
|
3624
|
-
return getNode$1(key).peek(
|
|
3627
|
+
function peekNodeLoadable(store2, state, key) {
|
|
3628
|
+
return getNode$1(key).peek(store2, state);
|
|
3625
3629
|
}
|
|
3626
3630
|
function setUnvalidatedAtomValue_DEPRECATED(state, key, newValue) {
|
|
3627
3631
|
var _node$invalidate;
|
|
@@ -3634,23 +3638,23 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3634
3638
|
dirtyAtoms: setByAddingToSet$1(state.dirtyAtoms, key)
|
|
3635
3639
|
};
|
|
3636
3640
|
}
|
|
3637
|
-
function setNodeValue(
|
|
3641
|
+
function setNodeValue(store2, state, key, newValue) {
|
|
3638
3642
|
const node = getNode$1(key);
|
|
3639
3643
|
if (node.set == null) {
|
|
3640
3644
|
throw new ReadOnlyRecoilValueError(`Attempt to set read-only RecoilValue: ${key}`);
|
|
3641
3645
|
}
|
|
3642
3646
|
const set2 = node.set;
|
|
3643
|
-
initializeNodeIfNewToStore(
|
|
3644
|
-
return set2(
|
|
3647
|
+
initializeNodeIfNewToStore(store2, state, key, "set");
|
|
3648
|
+
return set2(store2, state, newValue);
|
|
3645
3649
|
}
|
|
3646
|
-
function peekNodeInfo(
|
|
3647
|
-
const storeState =
|
|
3648
|
-
const graph2 =
|
|
3650
|
+
function peekNodeInfo(store2, state, key) {
|
|
3651
|
+
const storeState = store2.getState();
|
|
3652
|
+
const graph2 = store2.getGraph(state.version);
|
|
3649
3653
|
const type = getNode$1(key).nodeType;
|
|
3650
3654
|
return Recoil_lazyProxy$1({
|
|
3651
3655
|
type
|
|
3652
3656
|
}, {
|
|
3653
|
-
loadable: () => peekNodeLoadable(
|
|
3657
|
+
loadable: () => peekNodeLoadable(store2, state, key),
|
|
3654
3658
|
isActive: () => storeState.knownAtoms.has(key) || storeState.knownSelectors.has(key),
|
|
3655
3659
|
isSet: () => type === "selector" ? false : state.atomValues.has(key),
|
|
3656
3660
|
isModified: () => state.dirtyAtoms.has(key),
|
|
@@ -3661,7 +3665,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3661
3665
|
subscribers: () => {
|
|
3662
3666
|
var _storeState$nodeToCom, _storeState$nodeToCom2;
|
|
3663
3667
|
return {
|
|
3664
|
-
nodes: recoilValuesForKeys$1(Recoil_filterIterable(getDownstreamNodes(
|
|
3668
|
+
nodes: recoilValuesForKeys$1(Recoil_filterIterable(getDownstreamNodes(store2, state, /* @__PURE__ */ new Set([key])), (nodeKey) => nodeKey !== key)),
|
|
3665
3669
|
components: Recoil_mapIterable((_storeState$nodeToCom = (_storeState$nodeToCom2 = storeState.nodeToComponentSubscriptions.get(key)) === null || _storeState$nodeToCom2 === void 0 ? void 0 : _storeState$nodeToCom2.values()) !== null && _storeState$nodeToCom !== void 0 ? _storeState$nodeToCom : [], ([name]) => ({
|
|
3666
3670
|
name
|
|
3667
3671
|
}))
|
|
@@ -3669,10 +3673,10 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3669
3673
|
}
|
|
3670
3674
|
});
|
|
3671
3675
|
}
|
|
3672
|
-
function getDownstreamNodes(
|
|
3676
|
+
function getDownstreamNodes(store2, state, keys2) {
|
|
3673
3677
|
const visitedNodes = /* @__PURE__ */ new Set();
|
|
3674
3678
|
const visitingNodes = Array.from(keys2);
|
|
3675
|
-
const graph2 =
|
|
3679
|
+
const graph2 = store2.getGraph(state.version);
|
|
3676
3680
|
for (let key = visitingNodes.pop(); key; key = visitingNodes.pop()) {
|
|
3677
3681
|
var _graph$nodeToNodeSubs;
|
|
3678
3682
|
visitedNodes.add(key);
|
|
@@ -3734,14 +3738,14 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3734
3738
|
const {
|
|
3735
3739
|
invalidateMemoizedSnapshot: invalidateMemoizedSnapshot$1
|
|
3736
3740
|
} = Recoil_SnapshotCache;
|
|
3737
|
-
function getRecoilValueAsLoadable(
|
|
3741
|
+
function getRecoilValueAsLoadable(store2, {
|
|
3738
3742
|
key
|
|
3739
|
-
}, treeState =
|
|
3743
|
+
}, treeState = store2.getState().currentTree) {
|
|
3740
3744
|
var _storeState$nextTree, _storeState$previousT;
|
|
3741
|
-
const storeState =
|
|
3745
|
+
const storeState = store2.getState();
|
|
3742
3746
|
if (!(treeState.version === storeState.currentTree.version || treeState.version === ((_storeState$nextTree = storeState.nextTree) === null || _storeState$nextTree === void 0 ? void 0 : _storeState$nextTree.version) || treeState.version === ((_storeState$previousT = storeState.previousTree) === null || _storeState$previousT === void 0 ? void 0 : _storeState$previousT.version)))
|
|
3743
3747
|
;
|
|
3744
|
-
const loadable = getNodeLoadable$1(
|
|
3748
|
+
const loadable = getNodeLoadable$1(store2, treeState, key);
|
|
3745
3749
|
if (loadable.state === "loading") {
|
|
3746
3750
|
loadable.contents.catch(() => {
|
|
3747
3751
|
return;
|
|
@@ -3760,11 +3764,11 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3760
3764
|
});
|
|
3761
3765
|
return result;
|
|
3762
3766
|
}
|
|
3763
|
-
function valueFromValueOrUpdater(
|
|
3767
|
+
function valueFromValueOrUpdater(store2, state, {
|
|
3764
3768
|
key
|
|
3765
3769
|
}, valueOrUpdater) {
|
|
3766
3770
|
if (typeof valueOrUpdater === "function") {
|
|
3767
|
-
const current = getNodeLoadable$1(
|
|
3771
|
+
const current = getNodeLoadable$1(store2, state, key);
|
|
3768
3772
|
if (current.state === "loading") {
|
|
3769
3773
|
const msg = `Tried to set atom or selector "${key}" using an updater function while the current state is pending, this is not currently supported.`;
|
|
3770
3774
|
throw Recoil_err$2(msg);
|
|
@@ -3776,14 +3780,14 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3776
3780
|
return valueOrUpdater;
|
|
3777
3781
|
}
|
|
3778
3782
|
}
|
|
3779
|
-
function applyAction(
|
|
3783
|
+
function applyAction(store2, state, action) {
|
|
3780
3784
|
if (action.type === "set") {
|
|
3781
3785
|
const {
|
|
3782
3786
|
recoilValue,
|
|
3783
3787
|
valueOrUpdater
|
|
3784
3788
|
} = action;
|
|
3785
|
-
const newValue = valueFromValueOrUpdater(
|
|
3786
|
-
const writes = setNodeValue$1(
|
|
3789
|
+
const newValue = valueFromValueOrUpdater(store2, state, recoilValue, valueOrUpdater);
|
|
3790
|
+
const writes = setNodeValue$1(store2, state, recoilValue.key, newValue);
|
|
3787
3791
|
for (const [key, loadable] of writes.entries()) {
|
|
3788
3792
|
writeLoadableToTreeState(state, key, loadable);
|
|
3789
3793
|
}
|
|
@@ -3828,27 +3832,27 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3828
3832
|
state.dirtyAtoms.add(key);
|
|
3829
3833
|
state.nonvalidatedAtoms.delete(key);
|
|
3830
3834
|
}
|
|
3831
|
-
function applyActionsToStore(
|
|
3832
|
-
|
|
3835
|
+
function applyActionsToStore(store2, actions) {
|
|
3836
|
+
store2.replaceState((state) => {
|
|
3833
3837
|
const newState = copyTreeState(state);
|
|
3834
3838
|
for (const action of actions) {
|
|
3835
|
-
applyAction(
|
|
3839
|
+
applyAction(store2, newState, action);
|
|
3836
3840
|
}
|
|
3837
|
-
invalidateDownstreams(
|
|
3841
|
+
invalidateDownstreams(store2, newState);
|
|
3838
3842
|
invalidateMemoizedSnapshot$1();
|
|
3839
3843
|
return newState;
|
|
3840
3844
|
});
|
|
3841
3845
|
}
|
|
3842
|
-
function queueOrPerformStateUpdate(
|
|
3846
|
+
function queueOrPerformStateUpdate(store2, action) {
|
|
3843
3847
|
if (batchStack.length) {
|
|
3844
3848
|
const actionsByStore = batchStack[batchStack.length - 1];
|
|
3845
|
-
let actions = actionsByStore.get(
|
|
3849
|
+
let actions = actionsByStore.get(store2);
|
|
3846
3850
|
if (!actions) {
|
|
3847
|
-
actionsByStore.set(
|
|
3851
|
+
actionsByStore.set(store2, actions = []);
|
|
3848
3852
|
}
|
|
3849
3853
|
actions.push(action);
|
|
3850
3854
|
} else {
|
|
3851
|
-
applyActionsToStore(
|
|
3855
|
+
applyActionsToStore(store2, [action]);
|
|
3852
3856
|
}
|
|
3853
3857
|
}
|
|
3854
3858
|
const batchStack = [];
|
|
@@ -3856,8 +3860,8 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3856
3860
|
const actionsByStore = /* @__PURE__ */ new Map();
|
|
3857
3861
|
batchStack.push(actionsByStore);
|
|
3858
3862
|
return () => {
|
|
3859
|
-
for (const [
|
|
3860
|
-
applyActionsToStore(
|
|
3863
|
+
for (const [store2, actions] of actionsByStore) {
|
|
3864
|
+
applyActionsToStore(store2, actions);
|
|
3861
3865
|
}
|
|
3862
3866
|
batchStack.pop();
|
|
3863
3867
|
};
|
|
@@ -3870,62 +3874,62 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3870
3874
|
dirtyAtoms: new Set(state.dirtyAtoms)
|
|
3871
3875
|
};
|
|
3872
3876
|
}
|
|
3873
|
-
function invalidateDownstreams(
|
|
3874
|
-
const downstreams = getDownstreamNodes$1(
|
|
3877
|
+
function invalidateDownstreams(store2, state) {
|
|
3878
|
+
const downstreams = getDownstreamNodes$1(store2, state, state.dirtyAtoms);
|
|
3875
3879
|
for (const key of downstreams) {
|
|
3876
3880
|
var _getNodeMaybe, _getNodeMaybe$invalid;
|
|
3877
3881
|
(_getNodeMaybe = getNodeMaybe$2(key)) === null || _getNodeMaybe === void 0 ? void 0 : (_getNodeMaybe$invalid = _getNodeMaybe.invalidate) === null || _getNodeMaybe$invalid === void 0 ? void 0 : _getNodeMaybe$invalid.call(_getNodeMaybe, state);
|
|
3878
3882
|
}
|
|
3879
3883
|
}
|
|
3880
|
-
function setRecoilValue(
|
|
3881
|
-
queueOrPerformStateUpdate(
|
|
3884
|
+
function setRecoilValue(store2, recoilValue, valueOrUpdater) {
|
|
3885
|
+
queueOrPerformStateUpdate(store2, {
|
|
3882
3886
|
type: "set",
|
|
3883
3887
|
recoilValue,
|
|
3884
3888
|
valueOrUpdater
|
|
3885
3889
|
});
|
|
3886
3890
|
}
|
|
3887
|
-
function setRecoilValueLoadable(
|
|
3891
|
+
function setRecoilValueLoadable(store2, recoilValue, loadable) {
|
|
3888
3892
|
if (loadable instanceof DefaultValue$1$1) {
|
|
3889
|
-
return setRecoilValue(
|
|
3893
|
+
return setRecoilValue(store2, recoilValue, loadable);
|
|
3890
3894
|
}
|
|
3891
|
-
queueOrPerformStateUpdate(
|
|
3895
|
+
queueOrPerformStateUpdate(store2, {
|
|
3892
3896
|
type: "setLoadable",
|
|
3893
3897
|
recoilValue,
|
|
3894
3898
|
loadable
|
|
3895
3899
|
});
|
|
3896
3900
|
}
|
|
3897
|
-
function markRecoilValueModified(
|
|
3898
|
-
queueOrPerformStateUpdate(
|
|
3901
|
+
function markRecoilValueModified(store2, recoilValue) {
|
|
3902
|
+
queueOrPerformStateUpdate(store2, {
|
|
3899
3903
|
type: "markModified",
|
|
3900
3904
|
recoilValue
|
|
3901
3905
|
});
|
|
3902
3906
|
}
|
|
3903
|
-
function setUnvalidatedRecoilValue(
|
|
3904
|
-
queueOrPerformStateUpdate(
|
|
3907
|
+
function setUnvalidatedRecoilValue(store2, recoilValue, unvalidatedValue) {
|
|
3908
|
+
queueOrPerformStateUpdate(store2, {
|
|
3905
3909
|
type: "setUnvalidated",
|
|
3906
3910
|
recoilValue,
|
|
3907
3911
|
unvalidatedValue
|
|
3908
3912
|
});
|
|
3909
3913
|
}
|
|
3910
|
-
function subscribeToRecoilValue(
|
|
3914
|
+
function subscribeToRecoilValue(store2, {
|
|
3911
3915
|
key
|
|
3912
3916
|
}, callback, componentDebugName = null) {
|
|
3913
3917
|
const subID = getNextComponentID$1();
|
|
3914
|
-
const storeState =
|
|
3918
|
+
const storeState = store2.getState();
|
|
3915
3919
|
if (!storeState.nodeToComponentSubscriptions.has(key)) {
|
|
3916
3920
|
storeState.nodeToComponentSubscriptions.set(key, /* @__PURE__ */ new Map());
|
|
3917
3921
|
}
|
|
3918
3922
|
Recoil_nullthrows$1(storeState.nodeToComponentSubscriptions.get(key)).set(subID, [componentDebugName !== null && componentDebugName !== void 0 ? componentDebugName : "<not captured>", callback]);
|
|
3919
3923
|
const mode = reactMode$1();
|
|
3920
3924
|
if (mode.early && (mode.mode === "LEGACY" || mode.mode === "MUTABLE_SOURCE")) {
|
|
3921
|
-
const nextTree =
|
|
3925
|
+
const nextTree = store2.getState().nextTree;
|
|
3922
3926
|
if (nextTree && nextTree.dirtyAtoms.has(key)) {
|
|
3923
3927
|
callback(nextTree);
|
|
3924
3928
|
}
|
|
3925
3929
|
}
|
|
3926
3930
|
return {
|
|
3927
3931
|
release: () => {
|
|
3928
|
-
const releaseStoreState =
|
|
3932
|
+
const releaseStoreState = store2.getState();
|
|
3929
3933
|
const subs = releaseStoreState.nodeToComponentSubscriptions.get(key);
|
|
3930
3934
|
if (subs === void 0 || !subs.has(subID)) {
|
|
3931
3935
|
return;
|
|
@@ -3937,13 +3941,13 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3937
3941
|
}
|
|
3938
3942
|
};
|
|
3939
3943
|
}
|
|
3940
|
-
function refreshRecoilValue(
|
|
3944
|
+
function refreshRecoilValue(store2, recoilValue) {
|
|
3941
3945
|
var _node$clearCache;
|
|
3942
3946
|
const {
|
|
3943
3947
|
currentTree
|
|
3944
|
-
} =
|
|
3948
|
+
} = store2.getState();
|
|
3945
3949
|
const node = getNode$2(recoilValue.key);
|
|
3946
|
-
(_node$clearCache = node.clearCache) === null || _node$clearCache === void 0 ? void 0 : _node$clearCache.call(node,
|
|
3950
|
+
(_node$clearCache = node.clearCache) === null || _node$clearCache === void 0 ? void 0 : _node$clearCache.call(node, store2, currentTree);
|
|
3947
3951
|
}
|
|
3948
3952
|
var Recoil_RecoilValueInterface = {
|
|
3949
3953
|
RecoilValueReadOnly: RecoilValueReadOnly$1,
|
|
@@ -3988,8 +3992,8 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3988
3992
|
} = Recoil_RetentionZone;
|
|
3989
3993
|
const SUSPENSE_TIMEOUT_MS = 12e4;
|
|
3990
3994
|
const emptySet$1 = /* @__PURE__ */ new Set();
|
|
3991
|
-
function releaseRetainablesNowOnCurrentTree(
|
|
3992
|
-
const storeState =
|
|
3995
|
+
function releaseRetainablesNowOnCurrentTree(store2, retainables) {
|
|
3996
|
+
const storeState = store2.getState();
|
|
3993
3997
|
const treeState = storeState.currentTree;
|
|
3994
3998
|
if (storeState.nextTree) {
|
|
3995
3999
|
return;
|
|
@@ -4004,15 +4008,15 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
4004
4008
|
nodes2.add(r2);
|
|
4005
4009
|
}
|
|
4006
4010
|
}
|
|
4007
|
-
const releasableNodes = findReleasableNodes(
|
|
4011
|
+
const releasableNodes = findReleasableNodes(store2, nodes2);
|
|
4008
4012
|
for (const node of releasableNodes) {
|
|
4009
|
-
releaseNode(
|
|
4013
|
+
releaseNode(store2, treeState, node);
|
|
4010
4014
|
}
|
|
4011
4015
|
}
|
|
4012
|
-
function findReleasableNodes(
|
|
4013
|
-
const storeState =
|
|
4016
|
+
function findReleasableNodes(store2, searchFromNodes) {
|
|
4017
|
+
const storeState = store2.getState();
|
|
4014
4018
|
const treeState = storeState.currentTree;
|
|
4015
|
-
const graph2 =
|
|
4019
|
+
const graph2 = store2.getGraph(treeState.version);
|
|
4016
4020
|
const releasableNodes = /* @__PURE__ */ new Set();
|
|
4017
4021
|
const nonReleasableNodes = /* @__PURE__ */ new Set();
|
|
4018
4022
|
findReleasableNodesInner(searchFromNodes);
|
|
@@ -4020,7 +4024,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
4020
4024
|
function findReleasableNodesInner(searchFromNodes2) {
|
|
4021
4025
|
const releasableNodesFoundThisIteration = /* @__PURE__ */ new Set();
|
|
4022
4026
|
const downstreams = getDownstreamNodesInTopologicalOrder(
|
|
4023
|
-
|
|
4027
|
+
store2,
|
|
4024
4028
|
treeState,
|
|
4025
4029
|
searchFromNodes2,
|
|
4026
4030
|
releasableNodes,
|
|
@@ -4062,8 +4066,8 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
4062
4066
|
}
|
|
4063
4067
|
}
|
|
4064
4068
|
}
|
|
4065
|
-
function getDownstreamNodesInTopologicalOrder(
|
|
4066
|
-
const graph2 =
|
|
4069
|
+
function getDownstreamNodesInTopologicalOrder(store2, treeState, nodes2, doNotDescendInto1, doNotDescendInto2) {
|
|
4070
|
+
const graph2 = store2.getGraph(treeState.version);
|
|
4067
4071
|
const answer = [];
|
|
4068
4072
|
const visited = /* @__PURE__ */ new Set();
|
|
4069
4073
|
while (nodes2.size > 0) {
|
|
@@ -4089,12 +4093,12 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
4089
4093
|
answer.push(node);
|
|
4090
4094
|
}
|
|
4091
4095
|
}
|
|
4092
|
-
function releaseNode(
|
|
4096
|
+
function releaseNode(store2, treeState, node) {
|
|
4093
4097
|
if (!Recoil_gkx("recoil_memory_managament_2020")) {
|
|
4094
4098
|
return;
|
|
4095
4099
|
}
|
|
4096
|
-
cleanUpNode$1(
|
|
4097
|
-
const storeState =
|
|
4100
|
+
cleanUpNode$1(store2, node);
|
|
4101
|
+
const storeState = store2.getState();
|
|
4098
4102
|
storeState.knownAtoms.delete(node);
|
|
4099
4103
|
storeState.knownSelectors.delete(node);
|
|
4100
4104
|
storeState.nodeTransactionSubscriptions.delete(node);
|
|
@@ -4135,41 +4139,41 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
4135
4139
|
return retainedBy;
|
|
4136
4140
|
}
|
|
4137
4141
|
}
|
|
4138
|
-
function scheduleOrPerformPossibleReleaseOfRetainable(
|
|
4139
|
-
const state =
|
|
4142
|
+
function scheduleOrPerformPossibleReleaseOfRetainable(store2, retainable) {
|
|
4143
|
+
const state = store2.getState();
|
|
4140
4144
|
if (state.nextTree) {
|
|
4141
4145
|
state.retention.retainablesToCheckForRelease.add(retainable);
|
|
4142
4146
|
} else {
|
|
4143
|
-
releaseRetainablesNowOnCurrentTree(
|
|
4147
|
+
releaseRetainablesNowOnCurrentTree(store2, /* @__PURE__ */ new Set([retainable]));
|
|
4144
4148
|
}
|
|
4145
4149
|
}
|
|
4146
|
-
function updateRetainCount(
|
|
4150
|
+
function updateRetainCount(store2, retainable, delta) {
|
|
4147
4151
|
var _map$get;
|
|
4148
4152
|
if (!Recoil_gkx("recoil_memory_managament_2020")) {
|
|
4149
4153
|
return;
|
|
4150
4154
|
}
|
|
4151
|
-
const map2 =
|
|
4155
|
+
const map2 = store2.getState().retention.referenceCounts;
|
|
4152
4156
|
const newCount = ((_map$get = map2.get(retainable)) !== null && _map$get !== void 0 ? _map$get : 0) + delta;
|
|
4153
4157
|
if (newCount === 0) {
|
|
4154
|
-
updateRetainCountToZero(
|
|
4158
|
+
updateRetainCountToZero(store2, retainable);
|
|
4155
4159
|
} else {
|
|
4156
4160
|
map2.set(retainable, newCount);
|
|
4157
4161
|
}
|
|
4158
4162
|
}
|
|
4159
|
-
function updateRetainCountToZero(
|
|
4163
|
+
function updateRetainCountToZero(store2, retainable) {
|
|
4160
4164
|
if (!Recoil_gkx("recoil_memory_managament_2020")) {
|
|
4161
4165
|
return;
|
|
4162
4166
|
}
|
|
4163
|
-
const map2 =
|
|
4167
|
+
const map2 = store2.getState().retention.referenceCounts;
|
|
4164
4168
|
map2.delete(retainable);
|
|
4165
|
-
scheduleOrPerformPossibleReleaseOfRetainable(
|
|
4169
|
+
scheduleOrPerformPossibleReleaseOfRetainable(store2, retainable);
|
|
4166
4170
|
}
|
|
4167
|
-
function releaseScheduledRetainablesNow(
|
|
4171
|
+
function releaseScheduledRetainablesNow(store2) {
|
|
4168
4172
|
if (!Recoil_gkx("recoil_memory_managament_2020")) {
|
|
4169
4173
|
return;
|
|
4170
4174
|
}
|
|
4171
|
-
const state =
|
|
4172
|
-
releaseRetainablesNowOnCurrentTree(
|
|
4175
|
+
const state = store2.getState();
|
|
4176
|
+
releaseRetainablesNowOnCurrentTree(store2, state.retention.retainablesToCheckForRelease);
|
|
4173
4177
|
state.retention.retainablesToCheckForRelease.clear();
|
|
4174
4178
|
}
|
|
4175
4179
|
function retainedByOptionWithDefault(r2) {
|
|
@@ -4450,8 +4454,8 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
4450
4454
|
return this._store.storeID;
|
|
4451
4455
|
}
|
|
4452
4456
|
}
|
|
4453
|
-
function cloneStoreState(
|
|
4454
|
-
const storeState =
|
|
4457
|
+
function cloneStoreState(store2, treeState, bumpVersion = false) {
|
|
4458
|
+
const storeState = store2.getState();
|
|
4455
4459
|
const version = bumpVersion ? getNextTreeStateVersion$2() : treeState.version;
|
|
4456
4460
|
return {
|
|
4457
4461
|
currentTree: {
|
|
@@ -4474,7 +4478,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
4474
4478
|
nodeToComponentSubscriptions: /* @__PURE__ */ new Map(),
|
|
4475
4479
|
queuedComponentCallbacks_DEPRECATED: [],
|
|
4476
4480
|
suspendedComponentResolvers: /* @__PURE__ */ new Set(),
|
|
4477
|
-
graphsByVersion: (/* @__PURE__ */ new Map()).set(version,
|
|
4481
|
+
graphsByVersion: (/* @__PURE__ */ new Map()).set(version, store2.getGraph(treeState.version)),
|
|
4478
4482
|
retention: {
|
|
4479
4483
|
referenceCounts: /* @__PURE__ */ new Map(),
|
|
4480
4484
|
nodesRetainedByZone: /* @__PURE__ */ new Map(),
|
|
@@ -4489,23 +4493,23 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
4489
4493
|
return initializeState != null ? snapshot.map(initializeState) : snapshot;
|
|
4490
4494
|
}
|
|
4491
4495
|
const [memoizedCloneSnapshot, invalidateMemoizedSnapshot$2] = memoizeOneWithArgsHashAndInvalidation$1(
|
|
4492
|
-
(
|
|
4496
|
+
(store2, version) => {
|
|
4493
4497
|
var _storeState$nextTree;
|
|
4494
|
-
const storeState =
|
|
4498
|
+
const storeState = store2.getState();
|
|
4495
4499
|
const treeState = version === "latest" ? (_storeState$nextTree = storeState.nextTree) !== null && _storeState$nextTree !== void 0 ? _storeState$nextTree : storeState.currentTree : Recoil_nullthrows$1(storeState.previousTree);
|
|
4496
|
-
return new Snapshot(cloneStoreState(
|
|
4500
|
+
return new Snapshot(cloneStoreState(store2, treeState), store2.storeID);
|
|
4497
4501
|
},
|
|
4498
|
-
(
|
|
4502
|
+
(store2, version) => {
|
|
4499
4503
|
var _store$getState$nextT, _store$getState$previ;
|
|
4500
|
-
return String(version) + String(
|
|
4504
|
+
return String(version) + String(store2.storeID) + String((_store$getState$nextT = store2.getState().nextTree) === null || _store$getState$nextT === void 0 ? void 0 : _store$getState$nextT.version) + String(store2.getState().currentTree.version) + String((_store$getState$previ = store2.getState().previousTree) === null || _store$getState$previ === void 0 ? void 0 : _store$getState$previ.version);
|
|
4501
4505
|
}
|
|
4502
4506
|
);
|
|
4503
4507
|
setInvalidateMemoizedSnapshot$1(invalidateMemoizedSnapshot$2);
|
|
4504
|
-
function cloneSnapshot(
|
|
4505
|
-
const snapshot = memoizedCloneSnapshot(
|
|
4508
|
+
function cloneSnapshot(store2, version = "latest") {
|
|
4509
|
+
const snapshot = memoizedCloneSnapshot(store2, version);
|
|
4506
4510
|
if (!snapshot.isRetained()) {
|
|
4507
4511
|
invalidateMemoizedSnapshot$2();
|
|
4508
|
-
return memoizedCloneSnapshot(
|
|
4512
|
+
return memoizedCloneSnapshot(store2, version);
|
|
4509
4513
|
}
|
|
4510
4514
|
return snapshot;
|
|
4511
4515
|
}
|
|
@@ -4515,27 +4519,27 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
4515
4519
|
_defineProperty$a(this, "_batch", void 0);
|
|
4516
4520
|
_defineProperty$a(this, "set", (recoilState, newValueOrUpdater) => {
|
|
4517
4521
|
this.checkRefCount_INTERNAL();
|
|
4518
|
-
const
|
|
4522
|
+
const store2 = this.getStore_INTERNAL();
|
|
4519
4523
|
this._batch(() => {
|
|
4520
|
-
updateRetainCount$1(
|
|
4524
|
+
updateRetainCount$1(store2, recoilState.key, 1);
|
|
4521
4525
|
setRecoilValue$1(this.getStore_INTERNAL(), recoilState, newValueOrUpdater);
|
|
4522
4526
|
});
|
|
4523
4527
|
});
|
|
4524
4528
|
_defineProperty$a(this, "reset", (recoilState) => {
|
|
4525
4529
|
this.checkRefCount_INTERNAL();
|
|
4526
|
-
const
|
|
4530
|
+
const store2 = this.getStore_INTERNAL();
|
|
4527
4531
|
this._batch(() => {
|
|
4528
|
-
updateRetainCount$1(
|
|
4532
|
+
updateRetainCount$1(store2, recoilState.key, 1);
|
|
4529
4533
|
setRecoilValue$1(this.getStore_INTERNAL(), recoilState, DEFAULT_VALUE$1$1);
|
|
4530
4534
|
});
|
|
4531
4535
|
});
|
|
4532
4536
|
_defineProperty$a(this, "setUnvalidatedAtomValues_DEPRECATED", (values) => {
|
|
4533
4537
|
this.checkRefCount_INTERNAL();
|
|
4534
|
-
const
|
|
4538
|
+
const store2 = this.getStore_INTERNAL();
|
|
4535
4539
|
batchUpdates$1(() => {
|
|
4536
4540
|
for (const [k2, v2] of values.entries()) {
|
|
4537
|
-
updateRetainCount$1(
|
|
4538
|
-
setUnvalidatedRecoilValue$1(
|
|
4541
|
+
updateRetainCount$1(store2, k2, 1);
|
|
4542
|
+
setUnvalidatedRecoilValue$1(store2, new AbstractRecoilValue$2(k2), v2);
|
|
4539
4543
|
}
|
|
4540
4544
|
});
|
|
4541
4545
|
});
|
|
@@ -4633,15 +4637,15 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
4633
4637
|
addTransactionMetadata: notInAContext
|
|
4634
4638
|
});
|
|
4635
4639
|
let stateReplacerIsBeingExecuted = false;
|
|
4636
|
-
function startNextTreeIfNeeded(
|
|
4640
|
+
function startNextTreeIfNeeded(store2) {
|
|
4637
4641
|
if (stateReplacerIsBeingExecuted) {
|
|
4638
4642
|
throw Recoil_err$2("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.");
|
|
4639
4643
|
}
|
|
4640
|
-
const storeState =
|
|
4644
|
+
const storeState = store2.getState();
|
|
4641
4645
|
if (storeState.nextTree === null) {
|
|
4642
4646
|
if (Recoil_gkx("recoil_memory_managament_2020") && Recoil_gkx("recoil_release_on_cascading_update_killswitch_2021")) {
|
|
4643
4647
|
if (storeState.commitDepth > 0) {
|
|
4644
|
-
releaseScheduledRetainablesNow$1(
|
|
4648
|
+
releaseScheduledRetainablesNow$1(store2);
|
|
4645
4649
|
}
|
|
4646
4650
|
}
|
|
4647
4651
|
const version = storeState.currentTree.version;
|
|
@@ -4665,8 +4669,8 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
4665
4669
|
const mutableSource = useContext(MutableSourceContext);
|
|
4666
4670
|
return mutableSource;
|
|
4667
4671
|
}
|
|
4668
|
-
function notifyComponents(
|
|
4669
|
-
const dependentNodes = getDownstreamNodes$2(
|
|
4672
|
+
function notifyComponents(store2, storeState, treeState) {
|
|
4673
|
+
const dependentNodes = getDownstreamNodes$2(store2, treeState, treeState.dirtyAtoms);
|
|
4670
4674
|
for (const key of dependentNodes) {
|
|
4671
4675
|
const comps = storeState.nodeToComponentSubscriptions.get(key);
|
|
4672
4676
|
if (comps) {
|
|
@@ -4676,23 +4680,23 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
4676
4680
|
}
|
|
4677
4681
|
}
|
|
4678
4682
|
}
|
|
4679
|
-
function sendEndOfBatchNotifications(
|
|
4680
|
-
const storeState =
|
|
4683
|
+
function sendEndOfBatchNotifications(store2) {
|
|
4684
|
+
const storeState = store2.getState();
|
|
4681
4685
|
const treeState = storeState.currentTree;
|
|
4682
4686
|
const dirtyAtoms = treeState.dirtyAtoms;
|
|
4683
4687
|
if (dirtyAtoms.size) {
|
|
4684
4688
|
for (const [key, subscriptions] of storeState.nodeTransactionSubscriptions) {
|
|
4685
4689
|
if (dirtyAtoms.has(key)) {
|
|
4686
4690
|
for (const [_, subscription] of subscriptions) {
|
|
4687
|
-
subscription(
|
|
4691
|
+
subscription(store2);
|
|
4688
4692
|
}
|
|
4689
4693
|
}
|
|
4690
4694
|
}
|
|
4691
4695
|
for (const [_, subscription] of storeState.transactionSubscriptions) {
|
|
4692
|
-
subscription(
|
|
4696
|
+
subscription(store2);
|
|
4693
4697
|
}
|
|
4694
4698
|
if (!reactMode$2().early || storeState.suspendedComponentResolvers.size > 0) {
|
|
4695
|
-
notifyComponents(
|
|
4699
|
+
notifyComponents(store2, storeState, treeState);
|
|
4696
4700
|
storeState.suspendedComponentResolvers.forEach((cb) => cb());
|
|
4697
4701
|
storeState.suspendedComponentResolvers.clear();
|
|
4698
4702
|
}
|
|
@@ -4700,8 +4704,8 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
4700
4704
|
storeState.queuedComponentCallbacks_DEPRECATED.forEach((cb) => cb(treeState));
|
|
4701
4705
|
storeState.queuedComponentCallbacks_DEPRECATED.splice(0, storeState.queuedComponentCallbacks_DEPRECATED.length);
|
|
4702
4706
|
}
|
|
4703
|
-
function endBatch(
|
|
4704
|
-
const storeState =
|
|
4707
|
+
function endBatch(store2) {
|
|
4708
|
+
const storeState = store2.getState();
|
|
4705
4709
|
storeState.commitDepth++;
|
|
4706
4710
|
try {
|
|
4707
4711
|
const {
|
|
@@ -4713,7 +4717,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
4713
4717
|
storeState.previousTree = storeState.currentTree;
|
|
4714
4718
|
storeState.currentTree = nextTree;
|
|
4715
4719
|
storeState.nextTree = null;
|
|
4716
|
-
sendEndOfBatchNotifications(
|
|
4720
|
+
sendEndOfBatchNotifications(store2);
|
|
4717
4721
|
if (storeState.previousTree != null) {
|
|
4718
4722
|
storeState.graphsByVersion.delete(storeState.previousTree.version);
|
|
4719
4723
|
} else {
|
|
@@ -4722,7 +4726,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
4722
4726
|
storeState.previousTree = null;
|
|
4723
4727
|
if (Recoil_gkx("recoil_memory_managament_2020")) {
|
|
4724
4728
|
if (nextTree == null) {
|
|
4725
|
-
releaseScheduledRetainablesNow$1(
|
|
4729
|
+
releaseScheduledRetainablesNow$1(store2);
|
|
4726
4730
|
}
|
|
4727
4731
|
}
|
|
4728
4732
|
} finally {
|
|
@@ -4749,12 +4753,12 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
4749
4753
|
});
|
|
4750
4754
|
return null;
|
|
4751
4755
|
}
|
|
4752
|
-
function initialStoreState_DEPRECATED(
|
|
4756
|
+
function initialStoreState_DEPRECATED(store2, initializeState) {
|
|
4753
4757
|
const initial2 = makeEmptyStoreState$2();
|
|
4754
4758
|
initializeState({
|
|
4755
4759
|
set: (atom2, value) => {
|
|
4756
4760
|
const state = initial2.currentTree;
|
|
4757
|
-
const writes = setNodeValue$2(
|
|
4761
|
+
const writes = setNodeValue$2(store2, state, atom2.key, value);
|
|
4758
4762
|
const writtenNodes = new Set(writes.keys());
|
|
4759
4763
|
const nonvalidatedAtoms = state.nonvalidatedAtoms.clone();
|
|
4760
4764
|
for (const n2 of writtenNodes) {
|
|
@@ -4877,13 +4881,13 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
4877
4881
|
storeStateRef = Recoil_useRefInitOnce(() => initializeState_DEPRECATED != null ? initialStoreState_DEPRECATED(storeRef.current, initializeState_DEPRECATED) : initializeState != null ? initialStoreState(initializeState) : makeEmptyStoreState$2());
|
|
4878
4882
|
const mutableSource = useMemo$2(() => createMutableSource$1 === null || createMutableSource$1 === void 0 ? void 0 : createMutableSource$1(storeStateRef, () => storeStateRef.current.currentTree.version), [storeStateRef]);
|
|
4879
4883
|
useEffect$4(() => {
|
|
4880
|
-
const
|
|
4881
|
-
for (const atomKey of new Set(
|
|
4882
|
-
initializeNode$2(
|
|
4884
|
+
const store2 = storeRef.current;
|
|
4885
|
+
for (const atomKey of new Set(store2.getState().knownAtoms)) {
|
|
4886
|
+
initializeNode$2(store2, atomKey, "get");
|
|
4883
4887
|
}
|
|
4884
4888
|
return () => {
|
|
4885
|
-
for (const atomKey of
|
|
4886
|
-
cleanUpNode$2(
|
|
4889
|
+
for (const atomKey of store2.getState().knownAtoms) {
|
|
4890
|
+
cleanUpNode$2(store2, atomKey);
|
|
4887
4891
|
}
|
|
4888
4892
|
};
|
|
4889
4893
|
}, [storeRef]);
|
|
@@ -4977,31 +4981,31 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
4977
4981
|
if (!Recoil_gkx("recoil_memory_managament_2020")) {
|
|
4978
4982
|
return;
|
|
4979
4983
|
}
|
|
4980
|
-
const
|
|
4984
|
+
const store2 = storeRef.current;
|
|
4981
4985
|
if (timeoutID.current && !isSSR$2) {
|
|
4982
4986
|
window.clearTimeout(timeoutID.current);
|
|
4983
4987
|
timeoutID.current = null;
|
|
4984
4988
|
} else {
|
|
4985
4989
|
for (const r2 of retainables) {
|
|
4986
|
-
updateRetainCount$2(
|
|
4990
|
+
updateRetainCount$2(store2, r2, 1);
|
|
4987
4991
|
}
|
|
4988
4992
|
}
|
|
4989
4993
|
return () => {
|
|
4990
4994
|
for (const r2 of retainables) {
|
|
4991
|
-
updateRetainCount$2(
|
|
4995
|
+
updateRetainCount$2(store2, r2, -1);
|
|
4992
4996
|
}
|
|
4993
4997
|
};
|
|
4994
4998
|
}, [storeRef, ...retainables]);
|
|
4995
4999
|
const timeoutID = useRef$3$1();
|
|
4996
5000
|
const previousRetainables = Recoil_usePrevious$1(retainables);
|
|
4997
5001
|
if (!isSSR$2 && (previousRetainables === void 0 || !Recoil_shallowArrayEqual(previousRetainables, retainables))) {
|
|
4998
|
-
const
|
|
5002
|
+
const store2 = storeRef.current;
|
|
4999
5003
|
for (const r2 of retainables) {
|
|
5000
|
-
updateRetainCount$2(
|
|
5004
|
+
updateRetainCount$2(store2, r2, 1);
|
|
5001
5005
|
}
|
|
5002
5006
|
if (previousRetainables) {
|
|
5003
5007
|
for (const r2 of previousRetainables) {
|
|
5004
|
-
updateRetainCount$2(
|
|
5008
|
+
updateRetainCount$2(store2, r2, -1);
|
|
5005
5009
|
}
|
|
5006
5010
|
}
|
|
5007
5011
|
if (timeoutID.current) {
|
|
@@ -5010,7 +5014,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5010
5014
|
timeoutID.current = window.setTimeout(() => {
|
|
5011
5015
|
timeoutID.current = null;
|
|
5012
5016
|
for (const r2 of retainables) {
|
|
5013
|
-
updateRetainCount$2(
|
|
5017
|
+
updateRetainCount$2(store2, r2, -1);
|
|
5014
5018
|
}
|
|
5015
5019
|
}, SUSPENSE_TIMEOUT_MS$1);
|
|
5016
5020
|
}
|
|
@@ -5091,26 +5095,26 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5091
5095
|
subscriptions.current.delete(key);
|
|
5092
5096
|
}
|
|
5093
5097
|
}, [subscriptions]);
|
|
5094
|
-
const updateState = useCallback$1$1((
|
|
5098
|
+
const updateState = useCallback$1$1((_state2, key) => {
|
|
5095
5099
|
if (subscriptions.current.has(key)) {
|
|
5096
5100
|
forceUpdate([]);
|
|
5097
5101
|
}
|
|
5098
5102
|
}, []);
|
|
5099
5103
|
useEffect$3$1(() => {
|
|
5100
|
-
const
|
|
5104
|
+
const store2 = storeRef.current;
|
|
5101
5105
|
Recoil_differenceSets(recoilValuesUsed.current, previousSubscriptions.current).forEach((key) => {
|
|
5102
5106
|
if (subscriptions.current.has(key)) {
|
|
5103
5107
|
return;
|
|
5104
5108
|
}
|
|
5105
|
-
const sub = subscribeToRecoilValue$1(
|
|
5109
|
+
const sub = subscribeToRecoilValue$1(store2, new AbstractRecoilValue$3(key), (state2) => updateState(state2, key), componentName);
|
|
5106
5110
|
subscriptions.current.set(key, sub);
|
|
5107
|
-
const state =
|
|
5111
|
+
const state = store2.getState();
|
|
5108
5112
|
if (state.nextTree) {
|
|
5109
|
-
|
|
5110
|
-
updateState(
|
|
5113
|
+
store2.getState().queuedComponentCallbacks_DEPRECATED.push(() => {
|
|
5114
|
+
updateState(store2.getState(), key);
|
|
5111
5115
|
});
|
|
5112
5116
|
} else {
|
|
5113
|
-
updateState(
|
|
5117
|
+
updateState(store2.getState(), key);
|
|
5114
5118
|
}
|
|
5115
5119
|
});
|
|
5116
5120
|
Recoil_differenceSets(previousSubscriptions.current, recoilValuesUsed.current).forEach((key) => {
|
|
@@ -5171,10 +5175,10 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5171
5175
|
const componentName = Recoil_useComponentName();
|
|
5172
5176
|
const getSnapshot = useCallback$1$1(() => {
|
|
5173
5177
|
var _storeState$nextTree2;
|
|
5174
|
-
const
|
|
5175
|
-
const storeState =
|
|
5178
|
+
const store2 = storeRef.current;
|
|
5179
|
+
const storeState = store2.getState();
|
|
5176
5180
|
const treeState = reactMode$3().early ? (_storeState$nextTree2 = storeState.nextTree) !== null && _storeState$nextTree2 !== void 0 ? _storeState$nextTree2 : storeState.currentTree : storeState.currentTree;
|
|
5177
|
-
const loadable = getRecoilValueAsLoadable$2(
|
|
5181
|
+
const loadable = getRecoilValueAsLoadable$2(store2, recoilValue, treeState);
|
|
5178
5182
|
return {
|
|
5179
5183
|
loadable,
|
|
5180
5184
|
key: recoilValue.key
|
|
@@ -5194,8 +5198,8 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5194
5198
|
}, []);
|
|
5195
5199
|
const getMemoizedSnapshot = useMemo$1$1(() => memoizePreviousSnapshot(getSnapshot), [getSnapshot, memoizePreviousSnapshot]);
|
|
5196
5200
|
const subscribe = useCallback$1$1((notify) => {
|
|
5197
|
-
const
|
|
5198
|
-
const subscription = subscribeToRecoilValue$1(
|
|
5201
|
+
const store2 = storeRef.current;
|
|
5202
|
+
const subscription = subscribeToRecoilValue$1(store2, recoilValue, notify, componentName);
|
|
5199
5203
|
return subscription.release;
|
|
5200
5204
|
}, [storeRef, recoilValue, componentName]);
|
|
5201
5205
|
return useSyncExternalStore$1(
|
|
@@ -5208,18 +5212,18 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5208
5212
|
const storeRef = useStoreRef$2();
|
|
5209
5213
|
const getLoadable = useCallback$1$1(() => {
|
|
5210
5214
|
var _storeState$nextTree3;
|
|
5211
|
-
const
|
|
5212
|
-
const storeState =
|
|
5215
|
+
const store2 = storeRef.current;
|
|
5216
|
+
const storeState = store2.getState();
|
|
5213
5217
|
const treeState = reactMode$3().early ? (_storeState$nextTree3 = storeState.nextTree) !== null && _storeState$nextTree3 !== void 0 ? _storeState$nextTree3 : storeState.currentTree : storeState.currentTree;
|
|
5214
|
-
return getRecoilValueAsLoadable$2(
|
|
5218
|
+
return getRecoilValueAsLoadable$2(store2, recoilValue, treeState);
|
|
5215
5219
|
}, [storeRef, recoilValue]);
|
|
5216
5220
|
const getLoadableWithTesting = useCallback$1$1(() => {
|
|
5217
5221
|
return getLoadable();
|
|
5218
5222
|
}, [getLoadable]);
|
|
5219
5223
|
const componentName = Recoil_useComponentName();
|
|
5220
5224
|
const subscribe = useCallback$1$1((_storeState, notify) => {
|
|
5221
|
-
const
|
|
5222
|
-
const subscription = subscribeToRecoilValue$1(
|
|
5225
|
+
const store2 = storeRef.current;
|
|
5226
|
+
const subscription = subscribeToRecoilValue$1(store2, recoilValue, () => {
|
|
5223
5227
|
if (!Recoil_gkx("recoil_suppress_rerender_in_callback")) {
|
|
5224
5228
|
return notify();
|
|
5225
5229
|
}
|
|
@@ -5247,10 +5251,10 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5247
5251
|
const componentName = Recoil_useComponentName();
|
|
5248
5252
|
const getLoadable = useCallback$1$1(() => {
|
|
5249
5253
|
var _storeState$nextTree4;
|
|
5250
|
-
const
|
|
5251
|
-
const storeState =
|
|
5254
|
+
const store2 = storeRef.current;
|
|
5255
|
+
const storeState = store2.getState();
|
|
5252
5256
|
const treeState = reactMode$3().early ? (_storeState$nextTree4 = storeState.nextTree) !== null && _storeState$nextTree4 !== void 0 ? _storeState$nextTree4 : storeState.currentTree : storeState.currentTree;
|
|
5253
|
-
return getRecoilValueAsLoadable$2(
|
|
5257
|
+
return getRecoilValueAsLoadable$2(store2, recoilValue, treeState);
|
|
5254
5258
|
}, [storeRef, recoilValue]);
|
|
5255
5259
|
const getState2 = useCallback$1$1(() => ({
|
|
5256
5260
|
loadable: getLoadable(),
|
|
@@ -5261,7 +5265,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5261
5265
|
return prevState.loadable.is(nextState.loadable) && prevState.key === nextState.key ? prevState : nextState;
|
|
5262
5266
|
}, [getState2]);
|
|
5263
5267
|
useEffect$3$1(() => {
|
|
5264
|
-
const subscription = subscribeToRecoilValue$1(storeRef.current, recoilValue, (
|
|
5268
|
+
const subscription = subscribeToRecoilValue$1(storeRef.current, recoilValue, (_state2) => {
|
|
5265
5269
|
setState(updateState);
|
|
5266
5270
|
}, componentName);
|
|
5267
5271
|
setState(updateState);
|
|
@@ -5276,10 +5280,10 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5276
5280
|
const componentName = Recoil_useComponentName();
|
|
5277
5281
|
const getLoadable = useCallback$1$1(() => {
|
|
5278
5282
|
var _storeState$nextTree5;
|
|
5279
|
-
const
|
|
5280
|
-
const storeState =
|
|
5283
|
+
const store2 = storeRef.current;
|
|
5284
|
+
const storeState = store2.getState();
|
|
5281
5285
|
const treeState = reactMode$3().early ? (_storeState$nextTree5 = storeState.nextTree) !== null && _storeState$nextTree5 !== void 0 ? _storeState$nextTree5 : storeState.currentTree : storeState.currentTree;
|
|
5282
|
-
return getRecoilValueAsLoadable$2(
|
|
5286
|
+
return getRecoilValueAsLoadable$2(store2, recoilValue, treeState);
|
|
5283
5287
|
}, [storeRef, recoilValue]);
|
|
5284
5288
|
const loadable = getLoadable();
|
|
5285
5289
|
const prevLoadableRef = useRef$4(loadable);
|
|
@@ -5287,9 +5291,9 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5287
5291
|
prevLoadableRef.current = loadable;
|
|
5288
5292
|
});
|
|
5289
5293
|
useEffect$3$1(() => {
|
|
5290
|
-
const
|
|
5291
|
-
const storeState =
|
|
5292
|
-
const subscription = subscribeToRecoilValue$1(
|
|
5294
|
+
const store2 = storeRef.current;
|
|
5295
|
+
const storeState = store2.getState();
|
|
5296
|
+
const subscription = subscribeToRecoilValue$1(store2, recoilValue, (_state2) => {
|
|
5293
5297
|
var _prevLoadableRef$curr;
|
|
5294
5298
|
if (!Recoil_gkx("recoil_suppress_rerender_in_callback")) {
|
|
5295
5299
|
return forceUpdate([]);
|
|
@@ -5301,7 +5305,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5301
5305
|
prevLoadableRef.current = newLoadable;
|
|
5302
5306
|
}, componentName);
|
|
5303
5307
|
if (storeState.nextTree) {
|
|
5304
|
-
|
|
5308
|
+
store2.getState().queuedComponentCallbacks_DEPRECATED.push(() => {
|
|
5305
5309
|
prevLoadableRef.current = null;
|
|
5306
5310
|
forceUpdate([]);
|
|
5307
5311
|
});
|
|
@@ -5470,11 +5474,11 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5470
5474
|
return Recoil_mergeMaps(state.nonvalidatedAtoms.toMap(), persistedAtomContentsValues);
|
|
5471
5475
|
}
|
|
5472
5476
|
function useTransactionObservation_DEPRECATED(callback) {
|
|
5473
|
-
useTransactionSubscription(useCallback$2$1((
|
|
5474
|
-
let previousTree =
|
|
5475
|
-
const currentTree =
|
|
5477
|
+
useTransactionSubscription(useCallback$2$1((store2) => {
|
|
5478
|
+
let previousTree = store2.getState().previousTree;
|
|
5479
|
+
const currentTree = store2.getState().currentTree;
|
|
5476
5480
|
if (!previousTree) {
|
|
5477
|
-
previousTree =
|
|
5481
|
+
previousTree = store2.getState().currentTree;
|
|
5478
5482
|
}
|
|
5479
5483
|
const atomValues = externallyVisibleAtomValuesInState(currentTree);
|
|
5480
5484
|
const previousAtomValues = externallyVisibleAtomValuesInState(previousTree);
|
|
@@ -5500,9 +5504,9 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5500
5504
|
}, [callback]));
|
|
5501
5505
|
}
|
|
5502
5506
|
function useRecoilTransactionObserver(callback) {
|
|
5503
|
-
useTransactionSubscription(useCallback$2$1((
|
|
5504
|
-
const snapshot = cloneSnapshot$1(
|
|
5505
|
-
const previousSnapshot = cloneSnapshot$1(
|
|
5507
|
+
useTransactionSubscription(useCallback$2$1((store2) => {
|
|
5508
|
+
const snapshot = cloneSnapshot$1(store2, "latest");
|
|
5509
|
+
const previousSnapshot = cloneSnapshot$1(store2, "previous");
|
|
5506
5510
|
callback({
|
|
5507
5511
|
snapshot,
|
|
5508
5512
|
previousSnapshot
|
|
@@ -5515,7 +5519,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5515
5519
|
const previousSnapshot = Recoil_usePrevious$1(snapshot);
|
|
5516
5520
|
const timeoutID = useRef$5();
|
|
5517
5521
|
const releaseRef = useRef$5();
|
|
5518
|
-
useTransactionSubscription(useCallback$2$1((
|
|
5522
|
+
useTransactionSubscription(useCallback$2$1((store2) => setSnapshot(cloneSnapshot$1(store2)), []));
|
|
5519
5523
|
useEffect$4$1(() => {
|
|
5520
5524
|
const release = snapshot.retain();
|
|
5521
5525
|
if (timeoutID.current && !isSSR$4) {
|
|
@@ -5547,9 +5551,9 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5547
5551
|
}
|
|
5548
5552
|
return snapshot;
|
|
5549
5553
|
}
|
|
5550
|
-
function gotoSnapshot(
|
|
5554
|
+
function gotoSnapshot(store2, snapshot) {
|
|
5551
5555
|
var _storeState$nextTree;
|
|
5552
|
-
const storeState =
|
|
5556
|
+
const storeState = store2.getState();
|
|
5553
5557
|
const prev = (_storeState$nextTree = storeState.nextTree) !== null && _storeState$nextTree !== void 0 ? _storeState$nextTree : storeState.currentTree;
|
|
5554
5558
|
const next = snapshot.getStore_INTERNAL().getState().currentTree;
|
|
5555
5559
|
batchUpdates$3(() => {
|
|
@@ -5563,9 +5567,9 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5563
5567
|
}
|
|
5564
5568
|
}
|
|
5565
5569
|
keysToUpdate.forEach((key) => {
|
|
5566
|
-
setRecoilValueLoadable$1(
|
|
5570
|
+
setRecoilValueLoadable$1(store2, new AbstractRecoilValue$4(key), next.atomValues.has(key) ? Recoil_nullthrows$1(next.atomValues.get(key)) : DEFAULT_VALUE$3);
|
|
5567
5571
|
});
|
|
5568
|
-
|
|
5572
|
+
store2.replaceState((state) => ({
|
|
5569
5573
|
...state,
|
|
5570
5574
|
stateID: snapshot.getID()
|
|
5571
5575
|
}));
|
|
@@ -5610,17 +5614,17 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5610
5614
|
if (reactMode$4().mode === "MUTABLE_SOURCE") {
|
|
5611
5615
|
console.warn("Warning: There are known issues using useRecoilBridgeAcrossReactRoots() in recoil_mutable_source rendering mode. Please consider upgrading to recoil_sync_external_store mode.");
|
|
5612
5616
|
}
|
|
5613
|
-
const
|
|
5617
|
+
const store2 = useStoreRef$5().current;
|
|
5614
5618
|
return useMemo$2$1(() => {
|
|
5615
5619
|
function RecoilBridge({
|
|
5616
5620
|
children
|
|
5617
5621
|
}) {
|
|
5618
5622
|
return /* @__PURE__ */ React__default.default.createElement(RecoilRoot$1, {
|
|
5619
|
-
store_INTERNAL:
|
|
5623
|
+
store_INTERNAL: store2
|
|
5620
5624
|
}, children);
|
|
5621
5625
|
}
|
|
5622
5626
|
return RecoilBridge;
|
|
5623
|
-
}, [
|
|
5627
|
+
}, [store2]);
|
|
5624
5628
|
}
|
|
5625
5629
|
var Recoil_useRecoilBridgeAcrossReactRoots = useRecoilBridgeAcrossReactRoots;
|
|
5626
5630
|
const {
|
|
@@ -5643,7 +5647,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5643
5647
|
return getNode$5(recoilValue.key).nodeType === "atom";
|
|
5644
5648
|
}
|
|
5645
5649
|
class TransactionInterfaceImpl {
|
|
5646
|
-
constructor(
|
|
5650
|
+
constructor(store2, treeState) {
|
|
5647
5651
|
_defineProperty$a(this, "_store", void 0);
|
|
5648
5652
|
_defineProperty$a(this, "_treeState", void 0);
|
|
5649
5653
|
_defineProperty$a(this, "_changes", void 0);
|
|
@@ -5678,7 +5682,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5678
5682
|
_defineProperty$a(this, "reset", (recoilState) => {
|
|
5679
5683
|
this.set(recoilState, DEFAULT_VALUE$4);
|
|
5680
5684
|
});
|
|
5681
|
-
this._store =
|
|
5685
|
+
this._store = store2;
|
|
5682
5686
|
this._treeState = treeState;
|
|
5683
5687
|
this._changes = /* @__PURE__ */ new Map();
|
|
5684
5688
|
}
|
|
@@ -5694,10 +5698,10 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5694
5698
|
return newState;
|
|
5695
5699
|
}
|
|
5696
5700
|
}
|
|
5697
|
-
function atomicUpdater(
|
|
5701
|
+
function atomicUpdater(store2) {
|
|
5698
5702
|
return (fn) => {
|
|
5699
|
-
|
|
5700
|
-
const changeset = new TransactionInterfaceImpl(
|
|
5703
|
+
store2.replaceState((treeState) => {
|
|
5704
|
+
const changeset = new TransactionInterfaceImpl(store2, treeState);
|
|
5701
5705
|
fn(changeset);
|
|
5702
5706
|
return changeset.newTreeState_INTERNAL();
|
|
5703
5707
|
});
|
|
@@ -5746,7 +5750,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5746
5750
|
class Sentinel {
|
|
5747
5751
|
}
|
|
5748
5752
|
const SENTINEL = new Sentinel();
|
|
5749
|
-
function recoilCallback(
|
|
5753
|
+
function recoilCallback(store2, fn, args, extraInterface) {
|
|
5750
5754
|
let ret = SENTINEL;
|
|
5751
5755
|
let releaseSnapshot;
|
|
5752
5756
|
batchUpdates$4(() => {
|
|
@@ -5756,14 +5760,14 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5756
5760
|
}
|
|
5757
5761
|
const callbackInterface = Recoil_lazyProxy$1({
|
|
5758
5762
|
...extraInterface !== null && extraInterface !== void 0 ? extraInterface : {},
|
|
5759
|
-
set: (node, newValue) => setRecoilValue$3(
|
|
5760
|
-
reset: (node) => setRecoilValue$3(
|
|
5761
|
-
refresh: (node) => refreshRecoilValue$1(
|
|
5762
|
-
gotoSnapshot: (snapshot) => gotoSnapshot$1(
|
|
5763
|
-
transact_UNSTABLE: (transaction) => atomicUpdater$1(
|
|
5763
|
+
set: (node, newValue) => setRecoilValue$3(store2, node, newValue),
|
|
5764
|
+
reset: (node) => setRecoilValue$3(store2, node, DEFAULT_VALUE$5),
|
|
5765
|
+
refresh: (node) => refreshRecoilValue$1(store2, node),
|
|
5766
|
+
gotoSnapshot: (snapshot) => gotoSnapshot$1(store2, snapshot),
|
|
5767
|
+
transact_UNSTABLE: (transaction) => atomicUpdater$1(store2)(transaction)
|
|
5764
5768
|
}, {
|
|
5765
5769
|
snapshot: () => {
|
|
5766
|
-
const snapshot = cloneSnapshot$2(
|
|
5770
|
+
const snapshot = cloneSnapshot$2(store2);
|
|
5767
5771
|
releaseSnapshot = snapshot.retain();
|
|
5768
5772
|
return snapshot;
|
|
5769
5773
|
}
|
|
@@ -5811,8 +5815,8 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
5811
5815
|
function useRecoilRefresher(recoilValue) {
|
|
5812
5816
|
const storeRef = useStoreRef$7();
|
|
5813
5817
|
return useCallback$4$1(() => {
|
|
5814
|
-
const
|
|
5815
|
-
refreshRecoilValue$2(
|
|
5818
|
+
const store2 = storeRef.current;
|
|
5819
|
+
refreshRecoilValue$2(store2, recoilValue);
|
|
5816
5820
|
}, [recoilValue, storeRef]);
|
|
5817
5821
|
}
|
|
5818
5822
|
var Recoil_useRecoilRefresher = useRecoilRefresher;
|
|
@@ -6336,8 +6340,8 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6336
6340
|
function selectorIsLive() {
|
|
6337
6341
|
return !Recoil_gkx("recoil_memory_managament_2020") || liveStoresCount > 0;
|
|
6338
6342
|
}
|
|
6339
|
-
function selectorInit(
|
|
6340
|
-
|
|
6343
|
+
function selectorInit(store2) {
|
|
6344
|
+
store2.getState().knownSelectors.add(key);
|
|
6341
6345
|
liveStoresCount++;
|
|
6342
6346
|
return () => {
|
|
6343
6347
|
liveStoresCount--;
|
|
@@ -6346,19 +6350,19 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6346
6350
|
function selectorShouldDeleteConfigOnRelease() {
|
|
6347
6351
|
return getConfigDeletionHandler$1(key) !== void 0 && !selectorIsLive();
|
|
6348
6352
|
}
|
|
6349
|
-
function resolveAsync(
|
|
6353
|
+
function resolveAsync(store2, state, executionID, loadable, depValues) {
|
|
6350
6354
|
setCache(state, loadable, depValues);
|
|
6351
|
-
notifyStoresOfResolvedAsync(
|
|
6355
|
+
notifyStoresOfResolvedAsync(store2, executionID);
|
|
6352
6356
|
}
|
|
6353
|
-
function notifyStoresOfResolvedAsync(
|
|
6354
|
-
if (isLatestExecution(
|
|
6355
|
-
clearExecutionInfo(
|
|
6357
|
+
function notifyStoresOfResolvedAsync(store2, executionID) {
|
|
6358
|
+
if (isLatestExecution(store2, executionID)) {
|
|
6359
|
+
clearExecutionInfo(store2);
|
|
6356
6360
|
}
|
|
6357
6361
|
notifyWaitingStores(executionID, true);
|
|
6358
6362
|
}
|
|
6359
|
-
function notifyStoresOfNewAsyncDep(
|
|
6360
|
-
if (isLatestExecution(
|
|
6361
|
-
const executionInfo = Recoil_nullthrows$1(getExecutionInfo(
|
|
6363
|
+
function notifyStoresOfNewAsyncDep(store2, executionID) {
|
|
6364
|
+
if (isLatestExecution(store2, executionID)) {
|
|
6365
|
+
const executionInfo = Recoil_nullthrows$1(getExecutionInfo(store2));
|
|
6362
6366
|
executionInfo.stateVersions.clear();
|
|
6363
6367
|
notifyWaitingStores(executionID, false);
|
|
6364
6368
|
}
|
|
@@ -6374,52 +6378,52 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6374
6378
|
}
|
|
6375
6379
|
}
|
|
6376
6380
|
}
|
|
6377
|
-
function markStoreWaitingForResolvedAsync(
|
|
6381
|
+
function markStoreWaitingForResolvedAsync(store2, executionID) {
|
|
6378
6382
|
let stores = waitingStores.get(executionID);
|
|
6379
6383
|
if (stores == null) {
|
|
6380
6384
|
waitingStores.set(executionID, stores = /* @__PURE__ */ new Set());
|
|
6381
6385
|
}
|
|
6382
|
-
stores.add(
|
|
6386
|
+
stores.add(store2);
|
|
6383
6387
|
}
|
|
6384
|
-
function wrapResultPromise(
|
|
6388
|
+
function wrapResultPromise(store2, promise, state, depValues, executionID, loadingDepsState) {
|
|
6385
6389
|
return promise.then((value) => {
|
|
6386
6390
|
if (!selectorIsLive()) {
|
|
6387
|
-
clearExecutionInfo(
|
|
6391
|
+
clearExecutionInfo(store2);
|
|
6388
6392
|
throw CANCELED;
|
|
6389
6393
|
}
|
|
6390
6394
|
const loadable = loadableWithValue$2(value);
|
|
6391
|
-
resolveAsync(
|
|
6395
|
+
resolveAsync(store2, state, executionID, loadable, depValues);
|
|
6392
6396
|
return value;
|
|
6393
6397
|
}).catch((errorOrPromise) => {
|
|
6394
6398
|
if (!selectorIsLive()) {
|
|
6395
|
-
clearExecutionInfo(
|
|
6399
|
+
clearExecutionInfo(store2);
|
|
6396
6400
|
throw CANCELED;
|
|
6397
6401
|
}
|
|
6398
6402
|
if (Recoil_isPromise(errorOrPromise)) {
|
|
6399
|
-
return wrapPendingDependencyPromise(
|
|
6403
|
+
return wrapPendingDependencyPromise(store2, errorOrPromise, state, depValues, executionID, loadingDepsState);
|
|
6400
6404
|
}
|
|
6401
6405
|
const loadable = loadableWithError$1(errorOrPromise);
|
|
6402
|
-
resolveAsync(
|
|
6406
|
+
resolveAsync(store2, state, executionID, loadable, depValues);
|
|
6403
6407
|
throw errorOrPromise;
|
|
6404
6408
|
});
|
|
6405
6409
|
}
|
|
6406
|
-
function wrapPendingDependencyPromise(
|
|
6410
|
+
function wrapPendingDependencyPromise(store2, promise, state, existingDeps, executionID, loadingDepsState) {
|
|
6407
6411
|
return promise.then((resolvedDep) => {
|
|
6408
6412
|
if (!selectorIsLive()) {
|
|
6409
|
-
clearExecutionInfo(
|
|
6413
|
+
clearExecutionInfo(store2);
|
|
6410
6414
|
throw CANCELED;
|
|
6411
6415
|
}
|
|
6412
6416
|
if (loadingDepsState.loadingDepKey != null && loadingDepsState.loadingDepPromise === promise) {
|
|
6413
6417
|
state.atomValues.set(loadingDepsState.loadingDepKey, loadableWithValue$2(resolvedDep));
|
|
6414
6418
|
} else {
|
|
6415
|
-
|
|
6419
|
+
store2.getState().knownSelectors.forEach((nodeKey) => {
|
|
6416
6420
|
state.atomValues.delete(nodeKey);
|
|
6417
6421
|
});
|
|
6418
6422
|
}
|
|
6419
|
-
const cachedLoadable = getLoadableFromCacheAndUpdateDeps(
|
|
6423
|
+
const cachedLoadable = getLoadableFromCacheAndUpdateDeps(store2, state);
|
|
6420
6424
|
if (cachedLoadable && cachedLoadable.state !== "loading") {
|
|
6421
|
-
if (isLatestExecution(
|
|
6422
|
-
notifyStoresOfResolvedAsync(
|
|
6425
|
+
if (isLatestExecution(store2, executionID) || getExecutionInfo(store2) == null) {
|
|
6426
|
+
notifyStoresOfResolvedAsync(store2, executionID);
|
|
6423
6427
|
}
|
|
6424
6428
|
if (cachedLoadable.state === "hasValue") {
|
|
6425
6429
|
return cachedLoadable.contents;
|
|
@@ -6427,15 +6431,15 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6427
6431
|
throw cachedLoadable.contents;
|
|
6428
6432
|
}
|
|
6429
6433
|
}
|
|
6430
|
-
if (!isLatestExecution(
|
|
6431
|
-
const executionInfo = getInProgressExecutionInfo(
|
|
6434
|
+
if (!isLatestExecution(store2, executionID)) {
|
|
6435
|
+
const executionInfo = getInProgressExecutionInfo(store2, state);
|
|
6432
6436
|
if (executionInfo != null) {
|
|
6433
6437
|
return executionInfo.loadingLoadable.contents;
|
|
6434
6438
|
}
|
|
6435
6439
|
}
|
|
6436
|
-
const [loadable, depValues] = evaluateSelectorGetter(
|
|
6440
|
+
const [loadable, depValues] = evaluateSelectorGetter(store2, state, executionID);
|
|
6437
6441
|
if (loadable.state !== "loading") {
|
|
6438
|
-
resolveAsync(
|
|
6442
|
+
resolveAsync(store2, state, executionID, loadable, depValues);
|
|
6439
6443
|
}
|
|
6440
6444
|
if (loadable.state === "hasError") {
|
|
6441
6445
|
throw loadable.contents;
|
|
@@ -6446,25 +6450,25 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6446
6450
|
throw CANCELED;
|
|
6447
6451
|
}
|
|
6448
6452
|
if (!selectorIsLive()) {
|
|
6449
|
-
clearExecutionInfo(
|
|
6453
|
+
clearExecutionInfo(store2);
|
|
6450
6454
|
throw CANCELED;
|
|
6451
6455
|
}
|
|
6452
6456
|
const loadable = loadableWithError$1(error);
|
|
6453
|
-
resolveAsync(
|
|
6457
|
+
resolveAsync(store2, state, executionID, loadable, existingDeps);
|
|
6454
6458
|
throw error;
|
|
6455
6459
|
});
|
|
6456
6460
|
}
|
|
6457
|
-
function updateDeps(
|
|
6461
|
+
function updateDeps(store2, state, deps, executionID) {
|
|
6458
6462
|
var _store$getState, _store$getState$curre, _store$getState2, _store$getState2$next;
|
|
6459
|
-
if (isLatestExecution(
|
|
6463
|
+
if (isLatestExecution(store2, executionID) || state.version === ((_store$getState = store2.getState()) === null || _store$getState === void 0 ? void 0 : (_store$getState$curre = _store$getState.currentTree) === null || _store$getState$curre === void 0 ? void 0 : _store$getState$curre.version) || state.version === ((_store$getState2 = store2.getState()) === null || _store$getState2 === void 0 ? void 0 : (_store$getState2$next = _store$getState2.nextTree) === null || _store$getState2$next === void 0 ? void 0 : _store$getState2$next.version)) {
|
|
6460
6464
|
var _store$getState$nextT, _store$getState3, _store$getState3$next;
|
|
6461
|
-
saveDepsToStore$1(key, deps,
|
|
6465
|
+
saveDepsToStore$1(key, deps, store2, (_store$getState$nextT = (_store$getState3 = store2.getState()) === null || _store$getState3 === void 0 ? void 0 : (_store$getState3$next = _store$getState3.nextTree) === null || _store$getState3$next === void 0 ? void 0 : _store$getState3$next.version) !== null && _store$getState$nextT !== void 0 ? _store$getState$nextT : store2.getState().currentTree.version);
|
|
6462
6466
|
}
|
|
6463
6467
|
for (const nodeKey of deps) {
|
|
6464
6468
|
discoveredDependencyNodeKeys.add(nodeKey);
|
|
6465
6469
|
}
|
|
6466
6470
|
}
|
|
6467
|
-
function evaluateSelectorGetter(
|
|
6471
|
+
function evaluateSelectorGetter(store2, state, executionID) {
|
|
6468
6472
|
const endPerfBlock = startPerfBlock$1(key);
|
|
6469
6473
|
let duringSynchronousExecution = true;
|
|
6470
6474
|
let duringAsynchronousExecution = true;
|
|
@@ -6483,11 +6487,11 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6483
6487
|
function getRecoilValue({
|
|
6484
6488
|
key: depKey
|
|
6485
6489
|
}) {
|
|
6486
|
-
const depLoadable = getNodeLoadable$2(
|
|
6490
|
+
const depLoadable = getNodeLoadable$2(store2, state, depKey);
|
|
6487
6491
|
depValues.set(depKey, depLoadable);
|
|
6488
6492
|
if (!duringSynchronousExecution) {
|
|
6489
|
-
updateDeps(
|
|
6490
|
-
notifyStoresOfNewAsyncDep(
|
|
6493
|
+
updateDeps(store2, state, new Set(depValues.keys()), executionID);
|
|
6494
|
+
notifyStoresOfNewAsyncDep(store2, executionID);
|
|
6491
6495
|
}
|
|
6492
6496
|
switch (depLoadable.state) {
|
|
6493
6497
|
case "hasValue":
|
|
@@ -6508,7 +6512,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6508
6512
|
}
|
|
6509
6513
|
!(recoilValue != null) ? Recoil_invariant(false) : void 0;
|
|
6510
6514
|
return recoilCallback$1(
|
|
6511
|
-
|
|
6515
|
+
store2,
|
|
6512
6516
|
fn,
|
|
6513
6517
|
args,
|
|
6514
6518
|
{
|
|
@@ -6530,7 +6534,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6530
6534
|
result = result.contents;
|
|
6531
6535
|
}
|
|
6532
6536
|
if (Recoil_isPromise(result)) {
|
|
6533
|
-
result = wrapResultPromise(
|
|
6537
|
+
result = wrapResultPromise(store2, result, state, depValues, executionID, loadingDepsState).finally(finishEvaluation);
|
|
6534
6538
|
} else {
|
|
6535
6539
|
finishEvaluation();
|
|
6536
6540
|
}
|
|
@@ -6538,7 +6542,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6538
6542
|
} catch (errorOrDepPromise) {
|
|
6539
6543
|
result = errorOrDepPromise;
|
|
6540
6544
|
if (Recoil_isPromise(result)) {
|
|
6541
|
-
result = wrapPendingDependencyPromise(
|
|
6545
|
+
result = wrapPendingDependencyPromise(store2, result, state, depValues, executionID, loadingDepsState).finally(finishEvaluation);
|
|
6542
6546
|
} else {
|
|
6543
6547
|
resultIsError = true;
|
|
6544
6548
|
finishEvaluation();
|
|
@@ -6552,11 +6556,11 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6552
6556
|
loadable = loadableWithValue$2(result);
|
|
6553
6557
|
}
|
|
6554
6558
|
duringSynchronousExecution = false;
|
|
6555
|
-
updateExecutionInfoDepValues(
|
|
6556
|
-
updateDeps(
|
|
6559
|
+
updateExecutionInfoDepValues(store2, executionID, depValues);
|
|
6560
|
+
updateDeps(store2, state, new Set(depValues.keys()), executionID);
|
|
6557
6561
|
return [loadable, depValues];
|
|
6558
6562
|
}
|
|
6559
|
-
function getLoadableFromCacheAndUpdateDeps(
|
|
6563
|
+
function getLoadableFromCacheAndUpdateDeps(store2, state) {
|
|
6560
6564
|
let cachedLoadable = state.atomValues.get(key);
|
|
6561
6565
|
if (cachedLoadable != null) {
|
|
6562
6566
|
return cachedLoadable;
|
|
@@ -6565,7 +6569,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6565
6569
|
try {
|
|
6566
6570
|
cachedLoadable = cache2.get((nodeKey) => {
|
|
6567
6571
|
!(typeof nodeKey === "string") ? false ? Recoil_invariant(false, "Cache nodeKey is type string") : Recoil_invariant(false) : void 0;
|
|
6568
|
-
return getNodeLoadable$2(
|
|
6572
|
+
return getNodeLoadable$2(store2, state, nodeKey).contents;
|
|
6569
6573
|
}, {
|
|
6570
6574
|
onNodeVisit: (node) => {
|
|
6571
6575
|
if (node.type === "branch" && node.nodeKey !== key) {
|
|
@@ -6579,40 +6583,40 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6579
6583
|
if (cachedLoadable) {
|
|
6580
6584
|
var _getExecutionInfo;
|
|
6581
6585
|
state.atomValues.set(key, cachedLoadable);
|
|
6582
|
-
updateDeps(
|
|
6586
|
+
updateDeps(store2, state, depsAfterCacheLookup, (_getExecutionInfo = getExecutionInfo(store2)) === null || _getExecutionInfo === void 0 ? void 0 : _getExecutionInfo.executionID);
|
|
6583
6587
|
}
|
|
6584
6588
|
return cachedLoadable;
|
|
6585
6589
|
}
|
|
6586
|
-
function getSelectorLoadableAndUpdateDeps(
|
|
6587
|
-
const cachedVal = getLoadableFromCacheAndUpdateDeps(
|
|
6590
|
+
function getSelectorLoadableAndUpdateDeps(store2, state) {
|
|
6591
|
+
const cachedVal = getLoadableFromCacheAndUpdateDeps(store2, state);
|
|
6588
6592
|
if (cachedVal != null) {
|
|
6589
|
-
clearExecutionInfo(
|
|
6593
|
+
clearExecutionInfo(store2);
|
|
6590
6594
|
return cachedVal;
|
|
6591
6595
|
}
|
|
6592
|
-
const inProgressExecutionInfo = getInProgressExecutionInfo(
|
|
6596
|
+
const inProgressExecutionInfo = getInProgressExecutionInfo(store2, state);
|
|
6593
6597
|
if (inProgressExecutionInfo != null) {
|
|
6594
6598
|
var _inProgressExecutionI;
|
|
6595
6599
|
if (((_inProgressExecutionI = inProgressExecutionInfo.loadingLoadable) === null || _inProgressExecutionI === void 0 ? void 0 : _inProgressExecutionI.state) === "loading") {
|
|
6596
|
-
markStoreWaitingForResolvedAsync(
|
|
6600
|
+
markStoreWaitingForResolvedAsync(store2, inProgressExecutionInfo.executionID);
|
|
6597
6601
|
}
|
|
6598
6602
|
return inProgressExecutionInfo.loadingLoadable;
|
|
6599
6603
|
}
|
|
6600
6604
|
const newExecutionID = getNewExecutionID();
|
|
6601
|
-
const [loadable, newDepValues] = evaluateSelectorGetter(
|
|
6605
|
+
const [loadable, newDepValues] = evaluateSelectorGetter(store2, state, newExecutionID);
|
|
6602
6606
|
if (loadable.state === "loading") {
|
|
6603
|
-
setExecutionInfo(
|
|
6604
|
-
markStoreWaitingForResolvedAsync(
|
|
6607
|
+
setExecutionInfo(store2, newExecutionID, loadable, newDepValues, state);
|
|
6608
|
+
markStoreWaitingForResolvedAsync(store2, newExecutionID);
|
|
6605
6609
|
} else {
|
|
6606
|
-
clearExecutionInfo(
|
|
6610
|
+
clearExecutionInfo(store2);
|
|
6607
6611
|
setCache(state, loadable, newDepValues);
|
|
6608
6612
|
}
|
|
6609
6613
|
return loadable;
|
|
6610
6614
|
}
|
|
6611
|
-
function getInProgressExecutionInfo(
|
|
6612
|
-
const pendingExecutions = Recoil_concatIterables([executionInfoMap.has(
|
|
6615
|
+
function getInProgressExecutionInfo(store2, state) {
|
|
6616
|
+
const pendingExecutions = Recoil_concatIterables([executionInfoMap.has(store2) ? [Recoil_nullthrows$1(executionInfoMap.get(store2))] : [], Recoil_mapIterable(Recoil_filterIterable(executionInfoMap, ([s]) => s !== store2), ([, execInfo]) => execInfo)]);
|
|
6613
6617
|
function anyDepChanged(execDepValues) {
|
|
6614
6618
|
for (const [depKey, execLoadable] of execDepValues) {
|
|
6615
|
-
if (!getNodeLoadable$2(
|
|
6619
|
+
if (!getNodeLoadable$2(store2, state, depKey).is(execLoadable)) {
|
|
6616
6620
|
return true;
|
|
6617
6621
|
}
|
|
6618
6622
|
}
|
|
@@ -6628,31 +6632,31 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6628
6632
|
}
|
|
6629
6633
|
return void 0;
|
|
6630
6634
|
}
|
|
6631
|
-
function getExecutionInfo(
|
|
6632
|
-
return executionInfoMap.get(
|
|
6635
|
+
function getExecutionInfo(store2) {
|
|
6636
|
+
return executionInfoMap.get(store2);
|
|
6633
6637
|
}
|
|
6634
|
-
function setExecutionInfo(
|
|
6635
|
-
executionInfoMap.set(
|
|
6638
|
+
function setExecutionInfo(store2, newExecutionID, loadable, depValues, state) {
|
|
6639
|
+
executionInfoMap.set(store2, {
|
|
6636
6640
|
depValuesDiscoveredSoFarDuringAsyncWork: depValues,
|
|
6637
6641
|
executionID: newExecutionID,
|
|
6638
6642
|
loadingLoadable: loadable,
|
|
6639
6643
|
stateVersions: /* @__PURE__ */ new Map([[state.version, true]])
|
|
6640
6644
|
});
|
|
6641
6645
|
}
|
|
6642
|
-
function updateExecutionInfoDepValues(
|
|
6643
|
-
if (isLatestExecution(
|
|
6644
|
-
const executionInfo = getExecutionInfo(
|
|
6646
|
+
function updateExecutionInfoDepValues(store2, executionID, depValues) {
|
|
6647
|
+
if (isLatestExecution(store2, executionID)) {
|
|
6648
|
+
const executionInfo = getExecutionInfo(store2);
|
|
6645
6649
|
if (executionInfo != null) {
|
|
6646
6650
|
executionInfo.depValuesDiscoveredSoFarDuringAsyncWork = depValues;
|
|
6647
6651
|
}
|
|
6648
6652
|
}
|
|
6649
6653
|
}
|
|
6650
|
-
function clearExecutionInfo(
|
|
6651
|
-
executionInfoMap.delete(
|
|
6654
|
+
function clearExecutionInfo(store2) {
|
|
6655
|
+
executionInfoMap.delete(store2);
|
|
6652
6656
|
}
|
|
6653
|
-
function isLatestExecution(
|
|
6657
|
+
function isLatestExecution(store2, executionID) {
|
|
6654
6658
|
var _getExecutionInfo2;
|
|
6655
|
-
return executionID === ((_getExecutionInfo2 = getExecutionInfo(
|
|
6659
|
+
return executionID === ((_getExecutionInfo2 = getExecutionInfo(store2)) === null || _getExecutionInfo2 === void 0 ? void 0 : _getExecutionInfo2.executionID);
|
|
6656
6660
|
}
|
|
6657
6661
|
function depValuesToDepRoute(depValues) {
|
|
6658
6662
|
return Array.from(depValues.entries()).map(([depKey, valLoadable]) => [depKey, valLoadable.contents]);
|
|
@@ -6677,7 +6681,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6677
6681
|
dependencyStack.pop();
|
|
6678
6682
|
}
|
|
6679
6683
|
}
|
|
6680
|
-
function selectorPeek(
|
|
6684
|
+
function selectorPeek(store2, state) {
|
|
6681
6685
|
const cachedLoadable = state.atomValues.get(key);
|
|
6682
6686
|
if (cachedLoadable != null) {
|
|
6683
6687
|
return cachedLoadable;
|
|
@@ -6685,29 +6689,29 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6685
6689
|
return cache2.get((nodeKey) => {
|
|
6686
6690
|
var _peekNodeLoadable;
|
|
6687
6691
|
!(typeof nodeKey === "string") ? Recoil_invariant(false) : void 0;
|
|
6688
|
-
return (_peekNodeLoadable = peekNodeLoadable$1(
|
|
6692
|
+
return (_peekNodeLoadable = peekNodeLoadable$1(store2, state, nodeKey)) === null || _peekNodeLoadable === void 0 ? void 0 : _peekNodeLoadable.contents;
|
|
6689
6693
|
});
|
|
6690
6694
|
}
|
|
6691
|
-
function selectorGet(
|
|
6692
|
-
return detectCircularDependencies(() => getSelectorLoadableAndUpdateDeps(
|
|
6695
|
+
function selectorGet(store2, state) {
|
|
6696
|
+
return detectCircularDependencies(() => getSelectorLoadableAndUpdateDeps(store2, state));
|
|
6693
6697
|
}
|
|
6694
6698
|
function invalidateSelector(state) {
|
|
6695
6699
|
state.atomValues.delete(key);
|
|
6696
6700
|
}
|
|
6697
|
-
function clearSelectorCache(
|
|
6701
|
+
function clearSelectorCache(store2, treeState) {
|
|
6698
6702
|
!(recoilValue != null) ? Recoil_invariant(false) : void 0;
|
|
6699
6703
|
for (const nodeKey of discoveredDependencyNodeKeys) {
|
|
6700
6704
|
var _node$clearCache;
|
|
6701
6705
|
const node = getNode$6(nodeKey);
|
|
6702
|
-
(_node$clearCache = node.clearCache) === null || _node$clearCache === void 0 ? void 0 : _node$clearCache.call(node,
|
|
6706
|
+
(_node$clearCache = node.clearCache) === null || _node$clearCache === void 0 ? void 0 : _node$clearCache.call(node, store2, treeState);
|
|
6703
6707
|
}
|
|
6704
6708
|
discoveredDependencyNodeKeys.clear();
|
|
6705
6709
|
invalidateSelector(treeState);
|
|
6706
6710
|
cache2.clear();
|
|
6707
|
-
markRecoilValueModified$1(
|
|
6711
|
+
markRecoilValueModified$1(store2, recoilValue);
|
|
6708
6712
|
}
|
|
6709
6713
|
if (set2 != null) {
|
|
6710
|
-
const selectorSet = (
|
|
6714
|
+
const selectorSet = (store2, state, newValue) => {
|
|
6711
6715
|
let syncSelectorSetFinished = false;
|
|
6712
6716
|
const writes = /* @__PURE__ */ new Map();
|
|
6713
6717
|
function getRecoilValue({
|
|
@@ -6716,7 +6720,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6716
6720
|
if (syncSelectorSetFinished) {
|
|
6717
6721
|
throw Recoil_err$2("Recoil: Async selector sets are not currently supported.");
|
|
6718
6722
|
}
|
|
6719
|
-
const loadable = getNodeLoadable$2(
|
|
6723
|
+
const loadable = getNodeLoadable$2(store2, state, depKey);
|
|
6720
6724
|
if (loadable.state === "hasValue") {
|
|
6721
6725
|
return loadable.contents;
|
|
6722
6726
|
} else if (loadable.state === "loading") {
|
|
@@ -6732,7 +6736,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6732
6736
|
throw Recoil_err$2(msg);
|
|
6733
6737
|
}
|
|
6734
6738
|
const setValue = typeof valueOrUpdater === "function" ? valueOrUpdater(getRecoilValue(recoilState)) : valueOrUpdater;
|
|
6735
|
-
const upstreamWrites = setNodeValue$3(
|
|
6739
|
+
const upstreamWrites = setNodeValue$3(store2, state, recoilState.key, setValue);
|
|
6736
6740
|
upstreamWrites.forEach((v2, k2) => writes.set(k2, v2));
|
|
6737
6741
|
}
|
|
6738
6742
|
function resetRecoilState(recoilState) {
|
|
@@ -6836,40 +6840,40 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6836
6840
|
function maybeFreezeValueOrPromise(valueOrPromise) {
|
|
6837
6841
|
return valueOrPromise;
|
|
6838
6842
|
}
|
|
6839
|
-
function wrapPendingPromise(
|
|
6843
|
+
function wrapPendingPromise(store2, promise) {
|
|
6840
6844
|
const wrappedPromise = promise.then((value) => {
|
|
6841
6845
|
var _store$getState$nextT, _state$atomValues$get;
|
|
6842
|
-
const state = (_store$getState$nextT =
|
|
6846
|
+
const state = (_store$getState$nextT = store2.getState().nextTree) !== null && _store$getState$nextT !== void 0 ? _store$getState$nextT : store2.getState().currentTree;
|
|
6843
6847
|
if (((_state$atomValues$get = state.atomValues.get(key)) === null || _state$atomValues$get === void 0 ? void 0 : _state$atomValues$get.contents) === wrappedPromise) {
|
|
6844
|
-
setRecoilValue$4(
|
|
6848
|
+
setRecoilValue$4(store2, node, value);
|
|
6845
6849
|
}
|
|
6846
6850
|
return value;
|
|
6847
6851
|
}).catch((error) => {
|
|
6848
6852
|
var _store$getState$nextT2, _state$atomValues$get2;
|
|
6849
|
-
const state = (_store$getState$nextT2 =
|
|
6853
|
+
const state = (_store$getState$nextT2 = store2.getState().nextTree) !== null && _store$getState$nextT2 !== void 0 ? _store$getState$nextT2 : store2.getState().currentTree;
|
|
6850
6854
|
if (((_state$atomValues$get2 = state.atomValues.get(key)) === null || _state$atomValues$get2 === void 0 ? void 0 : _state$atomValues$get2.contents) === wrappedPromise) {
|
|
6851
|
-
setRecoilValueLoadable$2(
|
|
6855
|
+
setRecoilValueLoadable$2(store2, node, loadableWithError$2(error));
|
|
6852
6856
|
}
|
|
6853
6857
|
throw error;
|
|
6854
6858
|
});
|
|
6855
6859
|
return wrappedPromise;
|
|
6856
6860
|
}
|
|
6857
|
-
function initAtom(
|
|
6861
|
+
function initAtom(store2, initState, trigger) {
|
|
6858
6862
|
var _options$effects;
|
|
6859
6863
|
liveStoresCount++;
|
|
6860
6864
|
const cleanupAtom = () => {
|
|
6861
6865
|
var _cleanupEffectsByStor;
|
|
6862
6866
|
liveStoresCount--;
|
|
6863
|
-
(_cleanupEffectsByStor = cleanupEffectsByStore.get(
|
|
6864
|
-
cleanupEffectsByStore.delete(
|
|
6867
|
+
(_cleanupEffectsByStor = cleanupEffectsByStore.get(store2)) === null || _cleanupEffectsByStor === void 0 ? void 0 : _cleanupEffectsByStor.forEach((cleanup) => cleanup());
|
|
6868
|
+
cleanupEffectsByStore.delete(store2);
|
|
6865
6869
|
};
|
|
6866
|
-
|
|
6870
|
+
store2.getState().knownAtoms.add(key);
|
|
6867
6871
|
if (defaultLoadable.state === "loading") {
|
|
6868
6872
|
const notifyDefaultSubscribers = () => {
|
|
6869
6873
|
var _store$getState$nextT3;
|
|
6870
|
-
const state = (_store$getState$nextT3 =
|
|
6874
|
+
const state = (_store$getState$nextT3 = store2.getState().nextTree) !== null && _store$getState$nextT3 !== void 0 ? _store$getState$nextT3 : store2.getState().currentTree;
|
|
6871
6875
|
if (!state.atomValues.has(key)) {
|
|
6872
|
-
markRecoilValueModified$2(
|
|
6876
|
+
markRecoilValueModified$2(store2, node);
|
|
6873
6877
|
}
|
|
6874
6878
|
};
|
|
6875
6879
|
defaultLoadable.contents.finally(notifyDefaultSubscribers);
|
|
@@ -6879,14 +6883,14 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6879
6883
|
let getLoadable = function(recoilValue) {
|
|
6880
6884
|
if (isDuringInit && recoilValue.key === key) {
|
|
6881
6885
|
const retValue = initValue;
|
|
6882
|
-
return retValue instanceof DefaultValue$2$1 ? peekAtom(
|
|
6886
|
+
return retValue instanceof DefaultValue$2$1 ? peekAtom(store2, initState) : Recoil_isPromise(retValue) ? loadableWithPromise$2(retValue.then((v2) => v2 instanceof DefaultValue$2$1 ? defaultLoadable.toPromise() : v2)) : loadableWithValue$3(retValue);
|
|
6883
6887
|
}
|
|
6884
|
-
return getRecoilValueAsLoadable$4(
|
|
6888
|
+
return getRecoilValueAsLoadable$4(store2, recoilValue);
|
|
6885
6889
|
}, getPromise = function(recoilValue) {
|
|
6886
6890
|
return getLoadable(recoilValue).toPromise();
|
|
6887
6891
|
}, getInfo_UNSTABLE = function(recoilValue) {
|
|
6888
6892
|
var _store$getState$nextT4;
|
|
6889
|
-
const info = peekNodeInfo$3(
|
|
6893
|
+
const info = peekNodeInfo$3(store2, (_store$getState$nextT4 = store2.getState().nextTree) !== null && _store$getState$nextT4 !== void 0 ? _store$getState$nextT4 : store2.getState().currentTree, recoilValue.key);
|
|
6890
6894
|
return isDuringInit && recoilValue.key === key && !(initValue instanceof DefaultValue$2$1) ? {
|
|
6891
6895
|
...info,
|
|
6892
6896
|
isSet: true,
|
|
@@ -6921,7 +6925,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6921
6925
|
value: unwrap(valueOrUpdater)
|
|
6922
6926
|
};
|
|
6923
6927
|
}
|
|
6924
|
-
setRecoilValue$4(
|
|
6928
|
+
setRecoilValue$4(store2, node, typeof valueOrUpdater === "function" ? (currentValue) => {
|
|
6925
6929
|
const newValue = unwrap(
|
|
6926
6930
|
valueOrUpdater(currentValue)
|
|
6927
6931
|
);
|
|
@@ -6938,7 +6942,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6938
6942
|
var _cleanupEffectsByStor2;
|
|
6939
6943
|
const {
|
|
6940
6944
|
release
|
|
6941
|
-
} =
|
|
6945
|
+
} = store2.subscribeToTransactions((currentStore) => {
|
|
6942
6946
|
var _currentTree$atomValu;
|
|
6943
6947
|
let {
|
|
6944
6948
|
currentTree,
|
|
@@ -6960,14 +6964,14 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6960
6964
|
}
|
|
6961
6965
|
}
|
|
6962
6966
|
}, key);
|
|
6963
|
-
cleanupEffectsByStore.set(
|
|
6967
|
+
cleanupEffectsByStore.set(store2, [...(_cleanupEffectsByStor2 = cleanupEffectsByStore.get(store2)) !== null && _cleanupEffectsByStor2 !== void 0 ? _cleanupEffectsByStor2 : [], release]);
|
|
6964
6968
|
};
|
|
6965
6969
|
for (const effect2 of effects) {
|
|
6966
6970
|
try {
|
|
6967
6971
|
const cleanup = effect2({
|
|
6968
6972
|
node,
|
|
6969
|
-
storeID:
|
|
6970
|
-
parentStoreID_UNSTABLE:
|
|
6973
|
+
storeID: store2.storeID,
|
|
6974
|
+
parentStoreID_UNSTABLE: store2.parentStoreID,
|
|
6971
6975
|
trigger,
|
|
6972
6976
|
setSelf: setSelf(effect2),
|
|
6973
6977
|
resetSelf: resetSelf(effect2),
|
|
@@ -6978,7 +6982,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6978
6982
|
});
|
|
6979
6983
|
if (cleanup != null) {
|
|
6980
6984
|
var _cleanupEffectsByStor3;
|
|
6981
|
-
cleanupEffectsByStore.set(
|
|
6985
|
+
cleanupEffectsByStore.set(store2, [...(_cleanupEffectsByStor3 = cleanupEffectsByStore.get(store2)) !== null && _cleanupEffectsByStor3 !== void 0 ? _cleanupEffectsByStor3 : [], cleanup]);
|
|
6982
6986
|
}
|
|
6983
6987
|
} catch (error) {
|
|
6984
6988
|
initValue = error;
|
|
@@ -6988,10 +6992,10 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
6988
6992
|
isDuringInit = false;
|
|
6989
6993
|
if (!(initValue instanceof DefaultValue$2$1)) {
|
|
6990
6994
|
var _store$getState$nextT5;
|
|
6991
|
-
const initLoadable = isInitError ? loadableWithError$2(initValue) : Recoil_isPromise(initValue) ? loadableWithPromise$2(wrapPendingPromise(
|
|
6995
|
+
const initLoadable = isInitError ? loadableWithError$2(initValue) : Recoil_isPromise(initValue) ? loadableWithPromise$2(wrapPendingPromise(store2, initValue)) : loadableWithValue$3(unwrap(initValue));
|
|
6992
6996
|
maybeFreezeValueOrPromise(initLoadable.contents);
|
|
6993
6997
|
initState.atomValues.set(key, initLoadable);
|
|
6994
|
-
(_store$getState$nextT5 =
|
|
6998
|
+
(_store$getState$nextT5 = store2.getState().nextTree) === null || _store$getState$nextT5 === void 0 ? void 0 : _store$getState$nextT5.atomValues.set(key, initLoadable);
|
|
6995
6999
|
}
|
|
6996
7000
|
}
|
|
6997
7001
|
return cleanupAtom;
|
|
@@ -12149,7 +12153,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
12149
12153
|
* This source code is licensed under the MIT license found in the
|
|
12150
12154
|
* LICENSE file in the root directory of this source tree.
|
|
12151
12155
|
*/
|
|
12152
|
-
var f$1 = React__default.default, k$1 = Symbol.for("react.element"), l$2 = Symbol.for("react.fragment"), m$1 = Object.prototype.hasOwnProperty, n$
|
|
12156
|
+
var f$1 = React__default.default, k$1 = Symbol.for("react.element"), l$2 = Symbol.for("react.fragment"), m$1 = Object.prototype.hasOwnProperty, n$3 = f$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p$2 = { key: true, ref: true, __self: true, __source: true };
|
|
12153
12157
|
function q$1(c2, a2, g2) {
|
|
12154
12158
|
var b2, d2 = {}, e3 = null, h2 = null;
|
|
12155
12159
|
void 0 !== g2 && (e3 = "" + g2);
|
|
@@ -12160,7 +12164,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
12160
12164
|
if (c2 && c2.defaultProps)
|
|
12161
12165
|
for (b2 in a2 = c2.defaultProps, a2)
|
|
12162
12166
|
void 0 === d2[b2] && (d2[b2] = a2[b2]);
|
|
12163
|
-
return { $$typeof: k$1, type: c2, key: e3, ref: h2, props: d2, _owner: n$
|
|
12167
|
+
return { $$typeof: k$1, type: c2, key: e3, ref: h2, props: d2, _owner: n$3.current };
|
|
12164
12168
|
}
|
|
12165
12169
|
reactJsxRuntime_production_min.Fragment = l$2;
|
|
12166
12170
|
reactJsxRuntime_production_min.jsx = q$1;
|
|
@@ -34369,23 +34373,23 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
34369
34373
|
* This source code is licensed under the MIT license found in the
|
|
34370
34374
|
* LICENSE file in the root directory of this source tree.
|
|
34371
34375
|
*/
|
|
34372
|
-
var b = 60103, c = 60106, d = 60107, e$
|
|
34376
|
+
var b = 60103, c = 60106, d = 60107, e$2 = 60108, f = 60114, g = 60109, h = 60110, k = 60112, l$1 = 60113, m = 60120, n$2 = 60115, p = 60116, q = 60121, r$2 = 60122, u = 60117, v = 60129, w = 60131;
|
|
34373
34377
|
if ("function" === typeof Symbol && Symbol.for) {
|
|
34374
34378
|
var x = Symbol.for;
|
|
34375
34379
|
b = x("react.element");
|
|
34376
34380
|
c = x("react.portal");
|
|
34377
34381
|
d = x("react.fragment");
|
|
34378
|
-
e$
|
|
34382
|
+
e$2 = x("react.strict_mode");
|
|
34379
34383
|
f = x("react.profiler");
|
|
34380
34384
|
g = x("react.provider");
|
|
34381
34385
|
h = x("react.context");
|
|
34382
34386
|
k = x("react.forward_ref");
|
|
34383
34387
|
l$1 = x("react.suspense");
|
|
34384
34388
|
m = x("react.suspense_list");
|
|
34385
|
-
n$
|
|
34389
|
+
n$2 = x("react.memo");
|
|
34386
34390
|
p = x("react.lazy");
|
|
34387
34391
|
q = x("react.block");
|
|
34388
|
-
r$
|
|
34392
|
+
r$2 = x("react.server.block");
|
|
34389
34393
|
u = x("react.fundamental");
|
|
34390
34394
|
v = x("react.debug_trace_mode");
|
|
34391
34395
|
w = x("react.legacy_hidden");
|
|
@@ -34398,7 +34402,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
34398
34402
|
switch (a2 = a2.type, a2) {
|
|
34399
34403
|
case d:
|
|
34400
34404
|
case f:
|
|
34401
|
-
case e$
|
|
34405
|
+
case e$2:
|
|
34402
34406
|
case l$1:
|
|
34403
34407
|
case m:
|
|
34404
34408
|
return a2;
|
|
@@ -34407,7 +34411,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
34407
34411
|
case h:
|
|
34408
34412
|
case k:
|
|
34409
34413
|
case p:
|
|
34410
|
-
case n$
|
|
34414
|
+
case n$2:
|
|
34411
34415
|
case g:
|
|
34412
34416
|
return a2;
|
|
34413
34417
|
default:
|
|
@@ -34419,7 +34423,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
34419
34423
|
}
|
|
34420
34424
|
}
|
|
34421
34425
|
}
|
|
34422
|
-
var z = g, A = b, B = k, C = d, D = p, E = n$
|
|
34426
|
+
var z = g, A = b, B = k, C = d, D = p, E = n$2, F = c, G = f, H = e$2, I = l$1;
|
|
34423
34427
|
reactIs_production_min.ContextConsumer = h;
|
|
34424
34428
|
reactIs_production_min.ContextProvider = z;
|
|
34425
34429
|
reactIs_production_min.Element = A;
|
|
@@ -34456,7 +34460,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
34456
34460
|
return y(a2) === p;
|
|
34457
34461
|
};
|
|
34458
34462
|
reactIs_production_min.isMemo = function(a2) {
|
|
34459
|
-
return y(a2) === n$
|
|
34463
|
+
return y(a2) === n$2;
|
|
34460
34464
|
};
|
|
34461
34465
|
reactIs_production_min.isPortal = function(a2) {
|
|
34462
34466
|
return y(a2) === c;
|
|
@@ -34465,13 +34469,13 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
34465
34469
|
return y(a2) === f;
|
|
34466
34470
|
};
|
|
34467
34471
|
reactIs_production_min.isStrictMode = function(a2) {
|
|
34468
|
-
return y(a2) === e$
|
|
34472
|
+
return y(a2) === e$2;
|
|
34469
34473
|
};
|
|
34470
34474
|
reactIs_production_min.isSuspense = function(a2) {
|
|
34471
34475
|
return y(a2) === l$1;
|
|
34472
34476
|
};
|
|
34473
34477
|
reactIs_production_min.isValidElementType = function(a2) {
|
|
34474
|
-
return "string" === typeof a2 || "function" === typeof a2 || a2 === d || a2 === f || a2 === v || a2 === e$
|
|
34478
|
+
return "string" === typeof a2 || "function" === typeof a2 || a2 === d || a2 === f || a2 === v || a2 === e$2 || a2 === l$1 || a2 === m || a2 === w || "object" === typeof a2 && null !== a2 && (a2.$$typeof === p || a2.$$typeof === n$2 || a2.$$typeof === g || a2.$$typeof === h || a2.$$typeof === k || a2.$$typeof === u || a2.$$typeof === q || a2[0] === r$2) ? true : false;
|
|
34475
34479
|
};
|
|
34476
34480
|
reactIs_production_min.typeOf = y;
|
|
34477
34481
|
(function(module2) {
|
|
@@ -34479,10 +34483,10 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
34479
34483
|
module2.exports = reactIs_production_min;
|
|
34480
34484
|
}
|
|
34481
34485
|
})(reactIs);
|
|
34482
|
-
let e = (e3) => "object" == typeof e3 && null != e3 && 1 === e3.nodeType, t = (e3, t2) => (!t2 || "hidden" !== e3) && ("visible" !== e3 && "clip" !== e3), n = (e3, n2) => {
|
|
34486
|
+
let e$1 = (e3) => "object" == typeof e3 && null != e3 && 1 === e3.nodeType, t$1 = (e3, t2) => (!t2 || "hidden" !== e3) && ("visible" !== e3 && "clip" !== e3), n$1 = (e3, n2) => {
|
|
34483
34487
|
if (e3.clientHeight < e3.scrollHeight || e3.clientWidth < e3.scrollWidth) {
|
|
34484
34488
|
let l2 = getComputedStyle(e3, null);
|
|
34485
|
-
return t(l2.overflowY, n2) || t(l2.overflowX, n2) || ((e4) => {
|
|
34489
|
+
return t$1(l2.overflowY, n2) || t$1(l2.overflowX, n2) || ((e4) => {
|
|
34486
34490
|
let t2 = ((e6) => {
|
|
34487
34491
|
if (!e6.ownerDocument || !e6.ownerDocument.defaultView)
|
|
34488
34492
|
return null;
|
|
@@ -34500,20 +34504,20 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
34500
34504
|
let t2 = e3.parentElement;
|
|
34501
34505
|
return null == t2 ? e3.getRootNode().host || null : t2;
|
|
34502
34506
|
};
|
|
34503
|
-
var o = (t2, o2) => {
|
|
34507
|
+
var o$1 = (t2, o2) => {
|
|
34504
34508
|
var r2, d2, h2, f2, u2, s;
|
|
34505
34509
|
if ("undefined" == typeof document)
|
|
34506
34510
|
return [];
|
|
34507
34511
|
let { scrollMode: a2, block: c2, inline: g2, boundary: m2, skipOverflowHiddenElements: p2 } = o2, w2 = "function" == typeof m2 ? m2 : (e3) => e3 !== m2;
|
|
34508
|
-
if (!e(t2))
|
|
34512
|
+
if (!e$1(t2))
|
|
34509
34513
|
throw new TypeError("Invalid target");
|
|
34510
34514
|
let W = document.scrollingElement || document.documentElement, H2 = [], b2 = t2;
|
|
34511
|
-
for (; e(b2) && w2(b2); ) {
|
|
34515
|
+
for (; e$1(b2) && w2(b2); ) {
|
|
34512
34516
|
if (b2 = i(b2), b2 === W) {
|
|
34513
34517
|
H2.push(b2);
|
|
34514
34518
|
break;
|
|
34515
34519
|
}
|
|
34516
|
-
null != b2 && b2 === document.body && n(b2) && !n(document.documentElement) || null != b2 && n(b2, p2) && H2.push(b2);
|
|
34520
|
+
null != b2 && b2 === document.body && n$1(b2) && !n$1(document.documentElement) || null != b2 && n$1(b2, p2) && H2.push(b2);
|
|
34517
34521
|
}
|
|
34518
34522
|
let v2 = null != (d2 = null == (r2 = window.visualViewport) ? void 0 : r2.width) ? d2 : innerWidth, y2 = null != (f2 = null == (h2 = window.visualViewport) ? void 0 : h2.height) ? f2 : innerHeight, E2 = null != (u2 = window.scrollX) ? u2 : pageXOffset, M = null != (s = window.scrollY) ? s : pageYOffset, { height: x2, width: I2, top: C2, right: R, bottom: T, left: V } = t2.getBoundingClientRect(), k2 = "start" === c2 || "nearest" === c2 ? C2 : "end" === c2 ? T : C2 + x2 / 2, B2 = "center" === g2 ? V + I2 / 2 : "end" === g2 ? R : V, D2 = [];
|
|
34519
34523
|
for (let e3 = 0; e3 < H2.length; e3++) {
|
|
@@ -34795,7 +34799,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
34795
34799
|
if (!node) {
|
|
34796
34800
|
return;
|
|
34797
34801
|
}
|
|
34798
|
-
var actions = o(node, {
|
|
34802
|
+
var actions = o$1(node, {
|
|
34799
34803
|
boundary: menuNode,
|
|
34800
34804
|
block: "nearest",
|
|
34801
34805
|
scrollMode: "if-needed"
|
|
@@ -36773,7 +36777,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
36773
36777
|
}
|
|
36774
36778
|
})();
|
|
36775
36779
|
})(classnames);
|
|
36776
|
-
const r = classnames.exports;
|
|
36780
|
+
const r$1 = classnames.exports;
|
|
36777
36781
|
function _typeof(o2) {
|
|
36778
36782
|
"@babel/helpers - typeof";
|
|
36779
36783
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o3) {
|
|
@@ -42068,7 +42072,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
42068
42072
|
var e3 = this.dropdownRef.current;
|
|
42069
42073
|
e3 && (e3.scrollTop = e3.scrollHeight / 2 - e3.clientHeight / 2);
|
|
42070
42074
|
} }, { key: "render", value: function() {
|
|
42071
|
-
var t2 = r({ "react-datepicker__year-dropdown": true, "react-datepicker__year-dropdown--scrollable": this.props.scrollableYearDropdown });
|
|
42075
|
+
var t2 = r$1({ "react-datepicker__year-dropdown": true, "react-datepicker__year-dropdown--scrollable": this.props.scrollableYearDropdown });
|
|
42072
42076
|
return React__default.default.createElement("div", { className: t2, ref: this.dropdownRef }, this.renderOptions());
|
|
42073
42077
|
} }]), a2;
|
|
42074
42078
|
}()), gt = function(t2) {
|
|
@@ -42211,7 +42215,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
42211
42215
|
}), r2.state = { monthYearsList: Ct(r2.props.minDate, r2.props.maxDate) }, r2;
|
|
42212
42216
|
}
|
|
42213
42217
|
return le(o2, [{ key: "render", value: function() {
|
|
42214
|
-
var t3 = r({ "react-datepicker__month-year-dropdown": true, "react-datepicker__month-year-dropdown--scrollable": this.props.scrollableMonthYearDropdown });
|
|
42218
|
+
var t3 = r$1({ "react-datepicker__month-year-dropdown": true, "react-datepicker__month-year-dropdown--scrollable": this.props.scrollableMonthYearDropdown });
|
|
42215
42219
|
return React__default.default.createElement("div", { className: t3 }, this.renderOptions());
|
|
42216
42220
|
} }]), o2;
|
|
42217
42221
|
}()), _t = function(t2) {
|
|
@@ -42326,7 +42330,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
42326
42330
|
return t3.isSameDay(t3.props.selected);
|
|
42327
42331
|
}), de(ye(t3), "getClassNames", function(e3) {
|
|
42328
42332
|
var n3 = t3.props.dayClassName ? t3.props.dayClassName(e3) : void 0;
|
|
42329
|
-
return r("react-datepicker__day", n3, "react-datepicker__day--" + Oe(t3.props.day), { "react-datepicker__day--disabled": t3.isDisabled(), "react-datepicker__day--excluded": t3.isExcluded(), "react-datepicker__day--selected": t3.isSelected(), "react-datepicker__day--keyboard-selected": t3.isKeyboardSelected(), "react-datepicker__day--range-start": t3.isRangeStart(), "react-datepicker__day--range-end": t3.isRangeEnd(), "react-datepicker__day--in-range": t3.isInRange(), "react-datepicker__day--in-selecting-range": t3.isInSelectingRange(), "react-datepicker__day--selecting-range-start": t3.isSelectingRangeStart(), "react-datepicker__day--selecting-range-end": t3.isSelectingRangeEnd(), "react-datepicker__day--today": t3.isCurrentDay(), "react-datepicker__day--weekend": t3.isWeekend(), "react-datepicker__day--outside-month": t3.isAfterMonth() || t3.isBeforeMonth() }, t3.getHighLightedClass("react-datepicker__day--highlighted"));
|
|
42333
|
+
return r$1("react-datepicker__day", n3, "react-datepicker__day--" + Oe(t3.props.day), { "react-datepicker__day--disabled": t3.isDisabled(), "react-datepicker__day--excluded": t3.isExcluded(), "react-datepicker__day--selected": t3.isSelected(), "react-datepicker__day--keyboard-selected": t3.isKeyboardSelected(), "react-datepicker__day--range-start": t3.isRangeStart(), "react-datepicker__day--range-end": t3.isRangeEnd(), "react-datepicker__day--in-range": t3.isInRange(), "react-datepicker__day--in-selecting-range": t3.isInSelectingRange(), "react-datepicker__day--selecting-range-start": t3.isSelectingRangeStart(), "react-datepicker__day--selecting-range-end": t3.isSelectingRangeEnd(), "react-datepicker__day--today": t3.isCurrentDay(), "react-datepicker__day--weekend": t3.isWeekend(), "react-datepicker__day--outside-month": t3.isAfterMonth() || t3.isBeforeMonth() }, t3.getHighLightedClass("react-datepicker__day--highlighted"));
|
|
42330
42334
|
}), de(ye(t3), "getAriaLabel", function() {
|
|
42331
42335
|
var e3 = t3.props, r2 = e3.day, n3 = e3.ariaLabelPrefixWhenEnabled, o3 = void 0 === n3 ? "Choose" : n3, a3 = e3.ariaLabelPrefixWhenDisabled, s2 = void 0 === a3 ? "Not available" : a3, i3 = t3.isDisabled() || t3.isExcluded() ? s2 : o3;
|
|
42332
42336
|
return "".concat(i3, " ").concat(Ee(r2, "PPPP", t3.props.locale));
|
|
@@ -42361,7 +42365,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
42361
42365
|
}
|
|
42362
42366
|
return le(o2, [{ key: "render", value: function() {
|
|
42363
42367
|
var t3 = this.props, n3 = t3.weekNumber, o3 = t3.ariaLabelPrefix, a2 = void 0 === o3 ? "week " : o3, s = { "react-datepicker__week-number": true, "react-datepicker__week-number--clickable": !!t3.onClick };
|
|
42364
|
-
return React__default.default.createElement("div", { className: r(s), "aria-label": "".concat(a2, " ").concat(this.props.weekNumber), onClick: this.handleClick }, n3);
|
|
42368
|
+
return React__default.default.createElement("div", { className: r$1(s), "aria-label": "".concat(a2, " ").concat(this.props.weekNumber), onClick: this.handleClick }, n3);
|
|
42365
42369
|
} }]), o2;
|
|
42366
42370
|
}(), Et = function(t2) {
|
|
42367
42371
|
he(n2, React__default.default.Component);
|
|
@@ -42469,7 +42473,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
42469
42473
|
t3.handleDayClick(Fe(setQuarter(t3.props.day, r2)), e3);
|
|
42470
42474
|
}), de(ye(t3), "getMonthClassNames", function(e3) {
|
|
42471
42475
|
var n3 = t3.props, o3 = n3.day, a3 = n3.startDate, s2 = n3.endDate, i3 = n3.selected, p2 = n3.minDate, c2 = n3.maxDate, l2 = n3.preSelection, d2 = n3.monthClassName, u2 = d2 ? d2(o3) : void 0;
|
|
42472
|
-
return r("react-datepicker__month-text", "react-datepicker__month-".concat(e3), u2, { "react-datepicker__month--disabled": (p2 || c2) && Ze(setMonth(o3, e3), t3.props), "react-datepicker__month--selected": t3.isSelectedMonth(o3, e3, i3), "react-datepicker__month-text--keyboard-selected": getMonth(l2) === e3, "react-datepicker__month--in-range": et(a3, s2, e3, o3), "react-datepicker__month--range-start": t3.isRangeStartMonth(e3), "react-datepicker__month--range-end": t3.isRangeEndMonth(e3), "react-datepicker__month-text--today": t3.isCurrentMonth(o3, e3) });
|
|
42476
|
+
return r$1("react-datepicker__month-text", "react-datepicker__month-".concat(e3), u2, { "react-datepicker__month--disabled": (p2 || c2) && Ze(setMonth(o3, e3), t3.props), "react-datepicker__month--selected": t3.isSelectedMonth(o3, e3, i3), "react-datepicker__month-text--keyboard-selected": getMonth(l2) === e3, "react-datepicker__month--in-range": et(a3, s2, e3, o3), "react-datepicker__month--range-start": t3.isRangeStartMonth(e3), "react-datepicker__month--range-end": t3.isRangeEndMonth(e3), "react-datepicker__month-text--today": t3.isCurrentMonth(o3, e3) });
|
|
42473
42477
|
}), de(ye(t3), "getTabIndex", function(e3) {
|
|
42474
42478
|
var r2 = getMonth(t3.props.preSelection);
|
|
42475
42479
|
return t3.props.disabledKeyboardNavigation || e3 !== r2 ? "-1" : "0";
|
|
@@ -42478,7 +42482,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
42478
42482
|
return "".concat(c2, " ").concat(Ee(p2, "MMMM yyyy"));
|
|
42479
42483
|
}), de(ye(t3), "getQuarterClassNames", function(e3) {
|
|
42480
42484
|
var n3 = t3.props, o3 = n3.day, a3 = n3.startDate, s2 = n3.endDate, i3 = n3.selected, p2 = n3.minDate, c2 = n3.maxDate;
|
|
42481
|
-
return r("react-datepicker__quarter-text", "react-datepicker__quarter-".concat(e3), { "react-datepicker__quarter--disabled": (p2 || c2) && tt(setQuarter(o3, e3), t3.props), "react-datepicker__quarter--selected": t3.isSelectedQuarter(o3, e3, i3), "react-datepicker__quarter--in-range": nt(a3, s2, e3, o3), "react-datepicker__quarter--range-start": t3.isRangeStartQuarter(e3), "react-datepicker__quarter--range-end": t3.isRangeEndQuarter(e3) });
|
|
42485
|
+
return r$1("react-datepicker__quarter-text", "react-datepicker__quarter-".concat(e3), { "react-datepicker__quarter--disabled": (p2 || c2) && tt(setQuarter(o3, e3), t3.props), "react-datepicker__quarter--selected": t3.isSelectedQuarter(o3, e3, i3), "react-datepicker__quarter--in-range": nt(a3, s2, e3, o3), "react-datepicker__quarter--range-start": t3.isRangeStartQuarter(e3), "react-datepicker__quarter--range-end": t3.isRangeEndQuarter(e3) });
|
|
42482
42486
|
}), de(ye(t3), "renderMonths", function() {
|
|
42483
42487
|
var r2 = t3.props, n3 = r2.showFullMonthYearPicker, o3 = r2.showTwoColumnMonthYearPicker, a3 = r2.showFourColumnMonthYearPicker, s2 = r2.locale, i3 = r2.day, p2 = r2.selected;
|
|
42484
42488
|
return (a3 ? [[0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11]] : o3 ? [[0, 1], [2, 3], [4, 5], [6, 7], [8, 9], [10, 11]] : [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9, 10, 11]]).map(function(r3, o4) {
|
|
@@ -42501,7 +42505,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
42501
42505
|
var e3 = t3.props;
|
|
42502
42506
|
e3.day;
|
|
42503
42507
|
var n3 = e3.selectingDate, o3 = e3.selectsStart, a3 = e3.selectsEnd, s2 = e3.showMonthYearPicker, i3 = e3.showQuarterYearPicker;
|
|
42504
|
-
return r("react-datepicker__month", { "react-datepicker__month--selecting-range": n3 && (o3 || a3) }, { "react-datepicker__monthPicker": s2 }, { "react-datepicker__quarterPicker": i3 });
|
|
42508
|
+
return r$1("react-datepicker__month", { "react-datepicker__month--selecting-range": n3 && (o3 || a3) }, { "react-datepicker__monthPicker": s2 }, { "react-datepicker__quarterPicker": i3 });
|
|
42505
42509
|
}), t3;
|
|
42506
42510
|
}
|
|
42507
42511
|
return le(o2, [{ key: "render", value: function() {
|
|
@@ -42607,7 +42611,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
42607
42611
|
}
|
|
42608
42612
|
}), de(ye(a2), "getYearClassNames", function(e3) {
|
|
42609
42613
|
var t4 = a2.props, n3 = t4.minDate, o3 = t4.maxDate, s = t4.selected;
|
|
42610
|
-
return r("react-datepicker__year-text", { "react-datepicker__year-text--selected": e3 === getYear(s), "react-datepicker__year-text--disabled": (n3 || o3) && rt(e3, a2.props), "react-datepicker__year-text--keyboard-selected": a2.isKeyboardSelected(e3), "react-datepicker__year-text--today": a2.isCurrentYear(e3) });
|
|
42614
|
+
return r$1("react-datepicker__year-text", { "react-datepicker__year-text--selected": e3 === getYear(s), "react-datepicker__year-text--disabled": (n3 || o3) && rt(e3, a2.props), "react-datepicker__year-text--keyboard-selected": a2.isKeyboardSelected(e3), "react-datepicker__year-text--today": a2.isCurrentYear(e3) });
|
|
42611
42615
|
}), de(ye(a2), "getYearTabIndex", function(e3) {
|
|
42612
42616
|
return a2.props.disabledKeyboardNavigation ? "-1" : e3 === getYear(a2.props.preSelection) ? "0" : "-1";
|
|
42613
42617
|
}), a2;
|
|
@@ -42719,7 +42723,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
42719
42723
|
var t4 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : a2.state.date, n3 = Te(t4, a2.props.locale, a2.props.calendarStartDay), o3 = [];
|
|
42720
42724
|
return a2.props.showWeekNumbers && o3.push(React__default.default.createElement("div", { key: "W", className: "react-datepicker__day-name" }, a2.props.weekLabel || "#")), o3.concat([0, 1, 2, 3, 4, 5, 6].map(function(t5) {
|
|
42721
42725
|
var o4 = addDays(n3, t5), s = a2.formatWeekday(o4, a2.props.locale), i2 = a2.props.weekDayClassName ? a2.props.weekDayClassName(o4) : void 0;
|
|
42722
|
-
return React__default.default.createElement("div", { key: t5, className: r("react-datepicker__day-name", i2) }, s);
|
|
42726
|
+
return React__default.default.createElement("div", { key: t5, className: r$1("react-datepicker__day-name", i2) }, s);
|
|
42723
42727
|
}));
|
|
42724
42728
|
}), de(ye(a2), "formatWeekday", function(e3, t4) {
|
|
42725
42729
|
return a2.props.formatWeekDay ? function(e4, t5, r2) {
|
|
@@ -42861,7 +42865,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
42861
42865
|
this.props.preSelection && !We(this.props.preSelection, e3.preSelection) ? this.setState({ date: this.props.preSelection }) : this.props.openToDate && !We(this.props.openToDate, e3.openToDate) && this.setState({ date: this.props.openToDate });
|
|
42862
42866
|
} }, { key: "render", value: function() {
|
|
42863
42867
|
var t3 = this.props.container || It;
|
|
42864
|
-
return React__default.default.createElement("div", { ref: this.containerRef }, React__default.default.createElement(t3, { className: r("react-datepicker", this.props.className, { "react-datepicker--time-only": this.props.showTimeSelectOnly }), showPopperArrow: this.props.showPopperArrow, arrowProps: this.props.arrowProps }, this.renderPreviousButton(), this.renderNextButton(), this.renderMonths(), this.renderYears(), this.renderTodayButton(), this.renderTimeSection(), this.renderInputTimeSection(), this.props.children));
|
|
42868
|
+
return React__default.default.createElement("div", { ref: this.containerRef }, React__default.default.createElement(t3, { className: r$1("react-datepicker", this.props.className, { "react-datepicker--time-only": this.props.showTimeSelectOnly }), showPopperArrow: this.props.showPopperArrow, arrowProps: this.props.arrowProps }, this.renderPreviousButton(), this.renderNextButton(), this.renderMonths(), this.renderYears(), this.renderTodayButton(), this.renderTimeSection(), this.renderInputTimeSection(), this.props.children));
|
|
42865
42869
|
} }], [{ key: "defaultProps", get: function() {
|
|
42866
42870
|
return { onDropdownFocus: function() {
|
|
42867
42871
|
}, monthsShown: 1, monthSelectedIn: 0, forceShowMonthNavigation: false, timeCaption: "Time", previousYearButtonLabel: "Previous Year", nextYearButtonLabel: "Next Year", previousMonthButtonLabel: "Previous Month", nextMonthButtonLabel: "Next Month", customTimeInput: null, yearItemNumber: 12 };
|
|
@@ -42911,14 +42915,14 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
42911
42915
|
return le(o2, [{ key: "render", value: function() {
|
|
42912
42916
|
var t3, n3 = this.props, o3 = n3.className, a2 = n3.wrapperClassName, s = n3.hidePopper, i2 = n3.popperComponent, p2 = n3.popperModifiers, c2 = n3.popperPlacement, l2 = n3.popperProps, d2 = n3.targetComponent, u2 = n3.enableTabLoop, h2 = n3.popperOnKeyDown, m2 = n3.portalId, f2 = n3.portalHost;
|
|
42913
42917
|
if (!s) {
|
|
42914
|
-
var y2 = r("react-datepicker-popper", o3);
|
|
42918
|
+
var y2 = r$1("react-datepicker-popper", o3);
|
|
42915
42919
|
t3 = React__default.default.createElement(Popper, ue({ modifiers: p2, placement: c2 }, l2), function(t4) {
|
|
42916
42920
|
var r2 = t4.ref, n4 = t4.style, o4 = t4.placement, a3 = t4.arrowProps;
|
|
42917
42921
|
return React__default.default.createElement(At, { enableTabLoop: u2 }, React__default.default.createElement("div", { ref: r2, style: n4, className: y2, "data-placement": o4, onKeyDown: h2 }, React__default.default.cloneElement(i2, { arrowProps: a3 })));
|
|
42918
42922
|
});
|
|
42919
42923
|
}
|
|
42920
42924
|
this.props.popperContainer && (t3 = React__default.default.createElement(this.props.popperContainer, {}, t3)), m2 && !s && (t3 = React__default.default.createElement(Rt, { portalId: m2, portalHost: f2 }, t3));
|
|
42921
|
-
var v2 = r("react-datepicker-wrapper", a2);
|
|
42925
|
+
var v2 = r$1("react-datepicker-wrapper", a2);
|
|
42922
42926
|
return React__default.default.createElement(Manager, { className: "react-datepicker-manager" }, React__default.default.createElement(Reference, null, function(t4) {
|
|
42923
42927
|
var r2 = t4.ref;
|
|
42924
42928
|
return React__default.default.createElement("div", { ref: r2, className: v2 }, d2);
|
|
@@ -43096,7 +43100,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
43096
43100
|
s.calendar = e3;
|
|
43097
43101
|
}, locale: s.props.locale, calendarStartDay: s.props.calendarStartDay, chooseDayAriaLabelPrefix: s.props.chooseDayAriaLabelPrefix, disabledDayAriaLabelPrefix: s.props.disabledDayAriaLabelPrefix, weekAriaLabelPrefix: s.props.weekAriaLabelPrefix, monthAriaLabelPrefix: s.props.monthAriaLabelPrefix, adjustDateOnChange: s.props.adjustDateOnChange, setOpen: s.setOpen, shouldCloseOnSelect: s.props.shouldCloseOnSelect, dateFormat: s.props.dateFormatCalendar, useWeekdaysShort: s.props.useWeekdaysShort, formatWeekDay: s.props.formatWeekDay, dropdownMode: s.props.dropdownMode, selected: s.props.selected, preSelection: s.state.preSelection, onSelect: s.handleSelect, onWeekSelect: s.props.onWeekSelect, openToDate: s.props.openToDate, minDate: s.props.minDate, maxDate: s.props.maxDate, selectsStart: s.props.selectsStart, selectsEnd: s.props.selectsEnd, selectsRange: s.props.selectsRange, startDate: s.props.startDate, endDate: s.props.endDate, excludeDates: s.props.excludeDates, excludeDateIntervals: s.props.excludeDateIntervals, filterDate: s.props.filterDate, onClickOutside: s.handleCalendarClickOutside, formatWeekNumber: s.props.formatWeekNumber, highlightDates: s.state.highlightDates, includeDates: s.props.includeDates, includeDateIntervals: s.props.includeDateIntervals, includeTimes: s.props.includeTimes, injectTimes: s.props.injectTimes, inline: s.props.inline, shouldFocusDayInline: s.state.shouldFocusDayInline, peekNextMonth: s.props.peekNextMonth, showMonthDropdown: s.props.showMonthDropdown, showPreviousMonths: s.props.showPreviousMonths, useShortMonthInDropdown: s.props.useShortMonthInDropdown, showMonthYearDropdown: s.props.showMonthYearDropdown, showWeekNumbers: s.props.showWeekNumbers, showYearDropdown: s.props.showYearDropdown, withPortal: s.props.withPortal, forceShowMonthNavigation: s.props.forceShowMonthNavigation, showDisabledMonthNavigation: s.props.showDisabledMonthNavigation, scrollableYearDropdown: s.props.scrollableYearDropdown, scrollableMonthYearDropdown: s.props.scrollableMonthYearDropdown, todayButton: s.props.todayButton, weekLabel: s.props.weekLabel, outsideClickIgnoreClass: "react-datepicker-ignore-onclickoutside", fixedHeight: s.props.fixedHeight, monthsShown: s.props.monthsShown, monthSelectedIn: s.state.monthSelectedIn, onDropdownFocus: s.handleDropdownFocus, onMonthChange: s.props.onMonthChange, onYearChange: s.props.onYearChange, dayClassName: s.props.dayClassName, weekDayClassName: s.props.weekDayClassName, monthClassName: s.props.monthClassName, timeClassName: s.props.timeClassName, showTimeSelect: s.props.showTimeSelect, showTimeSelectOnly: s.props.showTimeSelectOnly, onTimeChange: s.handleTimeChange, timeFormat: s.props.timeFormat, timeIntervals: s.props.timeIntervals, minTime: s.props.minTime, maxTime: s.props.maxTime, excludeTimes: s.props.excludeTimes, filterTime: s.props.filterTime, timeCaption: s.props.timeCaption, className: s.props.calendarClassName, container: s.props.calendarContainer, yearItemNumber: s.props.yearItemNumber, yearDropdownItemNumber: s.props.yearDropdownItemNumber, previousMonthAriaLabel: s.props.previousMonthAriaLabel, previousMonthButtonLabel: s.props.previousMonthButtonLabel, nextMonthAriaLabel: s.props.nextMonthAriaLabel, nextMonthButtonLabel: s.props.nextMonthButtonLabel, previousYearAriaLabel: s.props.previousYearAriaLabel, previousYearButtonLabel: s.props.previousYearButtonLabel, nextYearAriaLabel: s.props.nextYearAriaLabel, nextYearButtonLabel: s.props.nextYearButtonLabel, timeInputLabel: s.props.timeInputLabel, disabledKeyboardNavigation: s.props.disabledKeyboardNavigation, renderCustomHeader: s.props.renderCustomHeader, popperProps: s.props.popperProps, renderDayContents: s.props.renderDayContents, onDayMouseEnter: s.props.onDayMouseEnter, onMonthMouseLeave: s.props.onMonthMouseLeave, selectsDisabledDaysInRange: s.props.selectsDisabledDaysInRange, showTimeInput: s.props.showTimeInput, showMonthYearPicker: s.props.showMonthYearPicker, showFullMonthYearPicker: s.props.showFullMonthYearPicker, showTwoColumnMonthYearPicker: s.props.showTwoColumnMonthYearPicker, showFourColumnMonthYearPicker: s.props.showFourColumnMonthYearPicker, showYearPicker: s.props.showYearPicker, showQuarterYearPicker: s.props.showQuarterYearPicker, showPopperArrow: s.props.showPopperArrow, excludeScrollbar: s.props.excludeScrollbar, handleOnKeyDown: s.props.onKeyDown, handleOnDayKeyDown: s.onDayKeyDown, isInputFocused: s.state.focused, customTimeInput: s.props.customTimeInput, setPreSelection: s.setPreSelection }, s.props.children) : null;
|
|
43098
43102
|
}), de(ye(s), "renderDateInput", function() {
|
|
43099
|
-
var t4, n2 = r(s.props.className, de({}, "react-datepicker-ignore-onclickoutside", s.state.open)), o3 = s.props.customInput || React__default.default.createElement("input", { type: "text" }), a3 = s.props.customInputRef || "ref", i2 = "string" == typeof s.props.value ? s.props.value : "string" == typeof s.state.inputValue ? s.state.inputValue : s.props.selectsRange ? function(e3, t5, r2) {
|
|
43103
|
+
var t4, n2 = r$1(s.props.className, de({}, "react-datepicker-ignore-onclickoutside", s.state.open)), o3 = s.props.customInput || React__default.default.createElement("input", { type: "text" }), a3 = s.props.customInputRef || "ref", i2 = "string" == typeof s.props.value ? s.props.value : "string" == typeof s.state.inputValue ? s.state.inputValue : s.props.selectsRange ? function(e3, t5, r2) {
|
|
43100
43104
|
if (!e3)
|
|
43101
43105
|
return "";
|
|
43102
43106
|
var n3 = Ne(e3, r2), o4 = t5 ? Ne(t5, r2) : "";
|
|
@@ -43104,7 +43108,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
43104
43108
|
}(s.props.startDate, s.props.endDate, s.props) : Ne(s.props.selected, s.props);
|
|
43105
43109
|
return React__default.default.cloneElement(o3, (de(t4 = {}, a3, function(e3) {
|
|
43106
43110
|
s.input = e3;
|
|
43107
|
-
}), de(t4, "value", i2), de(t4, "onBlur", s.handleBlur), de(t4, "onChange", s.handleChange), de(t4, "onClick", s.onInputClick), de(t4, "onFocus", s.handleFocus), de(t4, "onKeyDown", s.onInputKeyDown), de(t4, "id", s.props.id), de(t4, "name", s.props.name), de(t4, "autoFocus", s.props.autoFocus), de(t4, "placeholder", s.props.placeholderText), de(t4, "disabled", s.props.disabled), de(t4, "autoComplete", s.props.autoComplete), de(t4, "className", r(o3.props.className, n2)), de(t4, "title", s.props.title), de(t4, "readOnly", s.props.readOnly), de(t4, "required", s.props.required), de(t4, "tabIndex", s.props.tabIndex), de(t4, "aria-describedby", s.props.ariaDescribedBy), de(t4, "aria-invalid", s.props.ariaInvalid), de(t4, "aria-labelledby", s.props.ariaLabelledBy), de(t4, "aria-required", s.props.ariaRequired), t4));
|
|
43111
|
+
}), de(t4, "value", i2), de(t4, "onBlur", s.handleBlur), de(t4, "onChange", s.handleChange), de(t4, "onClick", s.onInputClick), de(t4, "onFocus", s.handleFocus), de(t4, "onKeyDown", s.onInputKeyDown), de(t4, "id", s.props.id), de(t4, "name", s.props.name), de(t4, "autoFocus", s.props.autoFocus), de(t4, "placeholder", s.props.placeholderText), de(t4, "disabled", s.props.disabled), de(t4, "autoComplete", s.props.autoComplete), de(t4, "className", r$1(o3.props.className, n2)), de(t4, "title", s.props.title), de(t4, "readOnly", s.props.readOnly), de(t4, "required", s.props.required), de(t4, "tabIndex", s.props.tabIndex), de(t4, "aria-describedby", s.props.ariaDescribedBy), de(t4, "aria-invalid", s.props.ariaInvalid), de(t4, "aria-labelledby", s.props.ariaLabelledBy), de(t4, "aria-required", s.props.ariaRequired), t4));
|
|
43108
43112
|
}), de(ye(s), "renderClearButton", function() {
|
|
43109
43113
|
var t4 = s.props, r2 = t4.isClearable, n2 = t4.selected, o3 = t4.startDate, a3 = t4.endDate, i2 = t4.clearButtonTitle, p2 = t4.clearButtonClassName, c2 = void 0 === p2 ? "" : p2, l2 = t4.ariaLabelClose, d2 = void 0 === l2 ? "Close" : l2;
|
|
43110
43114
|
return !r2 || null == n2 && null == o3 && null == a3 ? null : React__default.default.createElement("button", { type: "button", className: "react-datepicker__close-icon ".concat(c2).trim(), "aria-label": d2, onClick: s.onClearClick, title: i2, tabIndex: -1 });
|
|
@@ -49396,7 +49400,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
49396
49400
|
key: "render",
|
|
49397
49401
|
value: function render2() {
|
|
49398
49402
|
var _props = this.props, children = _props.children, className = _props.className, disableHeight = _props.disableHeight, disableWidth = _props.disableWidth, style = _props.style;
|
|
49399
|
-
var
|
|
49403
|
+
var _state2 = this.state, height = _state2.height, width = _state2.width;
|
|
49400
49404
|
var outerStyle = { overflow: "visible" };
|
|
49401
49405
|
var childParams = {};
|
|
49402
49406
|
var bailoutOnChildren = false;
|
|
@@ -54952,13 +54956,85 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
54952
54956
|
return baseClone$1(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG$1);
|
|
54953
54957
|
}
|
|
54954
54958
|
var cloneDeep_1 = cloneDeep;
|
|
54959
|
+
class GlobalStore {
|
|
54960
|
+
constructor() {
|
|
54961
|
+
__privateAdd(this, _notify);
|
|
54962
|
+
__privateAdd(this, _state, void 0);
|
|
54963
|
+
__privateAdd(this, _locks, void 0);
|
|
54964
|
+
__privateAdd(this, _subscribers, void 0);
|
|
54965
|
+
__privateSet(this, _state, {});
|
|
54966
|
+
__privateSet(this, _locks, {});
|
|
54967
|
+
__privateSet(this, _subscribers, {});
|
|
54968
|
+
}
|
|
54969
|
+
clear() {
|
|
54970
|
+
__privateSet(this, _state, {});
|
|
54971
|
+
__privateSet(this, _locks, {});
|
|
54972
|
+
__privateSet(this, _subscribers, {});
|
|
54973
|
+
}
|
|
54974
|
+
async getValue(key) {
|
|
54975
|
+
if (__privateGet(this, _locks)[key]) {
|
|
54976
|
+
return __privateGet(this, _locks)[key];
|
|
54977
|
+
}
|
|
54978
|
+
return __privateGet(this, _state)[key];
|
|
54979
|
+
}
|
|
54980
|
+
getValueSync(key) {
|
|
54981
|
+
return __privateGet(this, _state)[key];
|
|
54982
|
+
}
|
|
54983
|
+
setValue(key, value) {
|
|
54984
|
+
__privateMethod(this, _notify, notify_fn).call(this, key, value);
|
|
54985
|
+
__privateGet(this, _state)[key] = value;
|
|
54986
|
+
}
|
|
54987
|
+
async replaceValue(key, fn) {
|
|
54988
|
+
if (__privateGet(this, _locks)[key]) {
|
|
54989
|
+
return __privateGet(this, _locks)[key];
|
|
54990
|
+
}
|
|
54991
|
+
let unlock;
|
|
54992
|
+
let unlockError;
|
|
54993
|
+
const lockPromise = new Promise((resolve, reject) => {
|
|
54994
|
+
unlock = resolve;
|
|
54995
|
+
unlockError = reject;
|
|
54996
|
+
});
|
|
54997
|
+
__privateGet(this, _locks)[key] = lockPromise;
|
|
54998
|
+
let result;
|
|
54999
|
+
try {
|
|
55000
|
+
result = await fn();
|
|
55001
|
+
__privateGet(this, _state)[key] = result;
|
|
55002
|
+
__privateMethod(this, _notify, notify_fn).call(this, key, result);
|
|
55003
|
+
unlock(result);
|
|
55004
|
+
this.setValue(key, result);
|
|
55005
|
+
} catch (e3) {
|
|
55006
|
+
unlockError(e3);
|
|
55007
|
+
} finally {
|
|
55008
|
+
delete __privateGet(this, _locks)[key];
|
|
55009
|
+
}
|
|
55010
|
+
return lockPromise;
|
|
55011
|
+
}
|
|
55012
|
+
subscribe(key, callback) {
|
|
55013
|
+
if (!__privateGet(this, _subscribers)[key]) {
|
|
55014
|
+
__privateGet(this, _subscribers)[key] = [];
|
|
55015
|
+
}
|
|
55016
|
+
__privateGet(this, _subscribers)[key].push(callback);
|
|
55017
|
+
return () => {
|
|
55018
|
+
__privateGet(this, _subscribers)[key] = __privateGet(this, _subscribers)[key].filter((cb) => cb !== callback);
|
|
55019
|
+
};
|
|
55020
|
+
}
|
|
55021
|
+
}
|
|
55022
|
+
_state = new WeakMap();
|
|
55023
|
+
_locks = new WeakMap();
|
|
55024
|
+
_subscribers = new WeakMap();
|
|
55025
|
+
_notify = new WeakSet();
|
|
55026
|
+
notify_fn = function(key, value) {
|
|
55027
|
+
if (__privateGet(this, _subscribers)[key]) {
|
|
55028
|
+
__privateGet(this, _subscribers)[key].forEach((cb) => cb(value));
|
|
55029
|
+
}
|
|
55030
|
+
};
|
|
55031
|
+
const store = new GlobalStore();
|
|
54955
55032
|
class RequestExtrasSerializable {
|
|
54956
55033
|
constructor(extras) {
|
|
54957
55034
|
__publicField(this, "extras");
|
|
54958
55035
|
this.extras = extras;
|
|
54959
55036
|
}
|
|
54960
55037
|
toSerializable() {
|
|
54961
|
-
var _a;
|
|
54962
55038
|
if (!this.extras) {
|
|
54963
55039
|
return null;
|
|
54964
55040
|
}
|
|
@@ -54966,9 +55042,9 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
54966
55042
|
return this.extras;
|
|
54967
55043
|
}
|
|
54968
55044
|
const serializable = cloneDeep_1(this.extras);
|
|
54969
|
-
if (
|
|
54970
|
-
const headers = new Headers(serializable.
|
|
54971
|
-
serializable.
|
|
55045
|
+
if (serializable == null ? void 0 : serializable.headers) {
|
|
55046
|
+
const headers = new Headers(serializable.headers);
|
|
55047
|
+
serializable.headers = Object.fromEntries(headers.entries());
|
|
54972
55048
|
}
|
|
54973
55049
|
return serializable;
|
|
54974
55050
|
}
|
|
@@ -54982,8 +55058,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
54982
55058
|
}
|
|
54983
55059
|
async function request(url, options, extras) {
|
|
54984
55060
|
var _a, _b;
|
|
54985
|
-
const sessionToken =
|
|
54986
|
-
const mergedOptions = extras
|
|
55061
|
+
const sessionToken = await store.getValue("sessionToken");
|
|
55062
|
+
const mergedOptions = extras ? { ...options, ...extras } : options;
|
|
54987
55063
|
const { headers, ...other } = mergedOptions;
|
|
54988
55064
|
const headersInterface = new Headers(headers);
|
|
54989
55065
|
if (!headersInterface.has("Accept")) {
|
|
@@ -54997,18 +55073,35 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
54997
55073
|
}
|
|
54998
55074
|
const baseUrl = (_b = (_a = window.dara) == null ? void 0 : _a.base_url) != null ? _b : "";
|
|
54999
55075
|
const urlString = url instanceof URL ? url.pathname + url.search : url;
|
|
55000
|
-
|
|
55076
|
+
const response = await fetch(baseUrl + urlString, {
|
|
55001
55077
|
headers: headersInterface,
|
|
55002
55078
|
...other
|
|
55003
55079
|
});
|
|
55004
|
-
|
|
55005
|
-
|
|
55006
|
-
|
|
55007
|
-
|
|
55008
|
-
|
|
55009
|
-
|
|
55010
|
-
|
|
55011
|
-
|
|
55080
|
+
if (response.status === 401 || response.status === 403) {
|
|
55081
|
+
try {
|
|
55082
|
+
const refreshedToken = await store.replaceValue("sessionToken", async () => {
|
|
55083
|
+
const refreshResponse = await fetch(`${baseUrl}/api/auth/refresh-token`, {
|
|
55084
|
+
headers: headersInterface,
|
|
55085
|
+
...other,
|
|
55086
|
+
method: "POST"
|
|
55087
|
+
});
|
|
55088
|
+
if (refreshResponse.ok) {
|
|
55089
|
+
const { token } = await refreshResponse.json();
|
|
55090
|
+
return token;
|
|
55091
|
+
}
|
|
55092
|
+
await validateResponse(refreshResponse, "Request auth error, failed to refresh the session token");
|
|
55093
|
+
});
|
|
55094
|
+
headersInterface.set("Authorization", `Bearer ${refreshedToken}`);
|
|
55095
|
+
return fetch(baseUrl + urlString, {
|
|
55096
|
+
headers: headersInterface,
|
|
55097
|
+
...other
|
|
55098
|
+
});
|
|
55099
|
+
} catch (e3) {
|
|
55100
|
+
console.error("Failed to refresh token", e3);
|
|
55101
|
+
return response;
|
|
55102
|
+
}
|
|
55103
|
+
}
|
|
55104
|
+
return response;
|
|
55012
55105
|
}
|
|
55013
55106
|
const directionCtx = React.createContext({ direction: "row" });
|
|
55014
55107
|
const importersCtx = React.createContext({});
|
|
@@ -55930,14 +56023,10 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
55930
56023
|
}
|
|
55931
56024
|
const requestExtrasCtx = React.createContext({ options: {} });
|
|
55932
56025
|
function useRequestExtras() {
|
|
55933
|
-
const sessionToken = useSessionToken();
|
|
55934
56026
|
const { options } = React.useContext(requestExtrasCtx);
|
|
55935
56027
|
const extras = React.useMemo(() => {
|
|
55936
|
-
return
|
|
55937
|
-
|
|
55938
|
-
sessionToken
|
|
55939
|
-
};
|
|
55940
|
-
}, [useDeepCompare(options), sessionToken]);
|
|
56028
|
+
return options;
|
|
56029
|
+
}, [useDeepCompare(options)]);
|
|
55941
56030
|
return extras;
|
|
55942
56031
|
}
|
|
55943
56032
|
function RequestExtrasProvider({
|
|
@@ -56052,11 +56141,11 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
56052
56141
|
message.reason
|
|
56053
56142
|
);
|
|
56054
56143
|
}
|
|
56055
|
-
function
|
|
56144
|
+
function useAuthConfig() {
|
|
56056
56145
|
return reactQuery.useQuery(
|
|
56057
|
-
["auth-
|
|
56146
|
+
["auth-config"],
|
|
56058
56147
|
async () => {
|
|
56059
|
-
const response = await request("/api/core/auth-
|
|
56148
|
+
const response = await request("/api/core/auth-config", {
|
|
56060
56149
|
method: HTTP_METHOD.GET
|
|
56061
56150
|
});
|
|
56062
56151
|
return response.json();
|
|
@@ -56064,23 +56153,17 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
56064
56153
|
{ refetchOnWindowFocus: false }
|
|
56065
56154
|
);
|
|
56066
56155
|
}
|
|
56067
|
-
async function revokeSession(
|
|
56068
|
-
|
|
56069
|
-
|
|
56070
|
-
|
|
56071
|
-
|
|
56072
|
-
|
|
56073
|
-
|
|
56074
|
-
|
|
56075
|
-
token
|
|
56076
|
-
);
|
|
56077
|
-
if (response.ok) {
|
|
56078
|
-
const responseData = await response.json();
|
|
56079
|
-
return responseData;
|
|
56080
|
-
}
|
|
56081
|
-
} catch (e3) {
|
|
56082
|
-
console.error("Failed to revoke session", e3);
|
|
56156
|
+
async function revokeSession() {
|
|
56157
|
+
try {
|
|
56158
|
+
const response = await request("/api/auth/revoke-session", {
|
|
56159
|
+
method: HTTP_METHOD.POST
|
|
56160
|
+
});
|
|
56161
|
+
if (response.ok) {
|
|
56162
|
+
const responseData = await response.json();
|
|
56163
|
+
return responseData;
|
|
56083
56164
|
}
|
|
56165
|
+
} catch (e3) {
|
|
56166
|
+
console.error("Failed to revoke session", e3);
|
|
56084
56167
|
}
|
|
56085
56168
|
}
|
|
56086
56169
|
async function handleAuthErrors(res, toLogin = false, ignoreErrors = null) {
|
|
@@ -56109,7 +56192,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
56109
56192
|
refetchOnWindowFocus: false
|
|
56110
56193
|
});
|
|
56111
56194
|
}
|
|
56112
|
-
async function
|
|
56195
|
+
async function requestSessionToken(body = {}) {
|
|
56113
56196
|
const res = await request("/api/auth/session", {
|
|
56114
56197
|
body: JSON.stringify(body),
|
|
56115
56198
|
method: HTTP_METHOD.POST
|
|
@@ -56124,14 +56207,10 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
56124
56207
|
localStorage.setItem(getTokenKey(), token);
|
|
56125
56208
|
return token;
|
|
56126
56209
|
}
|
|
56127
|
-
async function verifySessionToken(
|
|
56128
|
-
const res = await request(
|
|
56129
|
-
|
|
56130
|
-
|
|
56131
|
-
method: HTTP_METHOD.POST
|
|
56132
|
-
},
|
|
56133
|
-
token
|
|
56134
|
-
);
|
|
56210
|
+
async function verifySessionToken() {
|
|
56211
|
+
const res = await request("/api/auth/verify-session", {
|
|
56212
|
+
method: HTTP_METHOD.POST
|
|
56213
|
+
});
|
|
56135
56214
|
return res.ok;
|
|
56136
56215
|
}
|
|
56137
56216
|
function isPlaceholder(value) {
|
|
@@ -58015,6 +58094,18 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
58015
58094
|
}
|
|
58016
58095
|
return resolver(getOrRegisterPlainVariable(variable, client, taskContext, extras));
|
|
58017
58096
|
}
|
|
58097
|
+
function tokenSubscribe(cb) {
|
|
58098
|
+
return store.subscribe("sessionToken", cb);
|
|
58099
|
+
}
|
|
58100
|
+
function getSessionToken() {
|
|
58101
|
+
return store.getValueSync("sessionToken");
|
|
58102
|
+
}
|
|
58103
|
+
function setSessionToken(token) {
|
|
58104
|
+
store.setValue("sessionToken", token);
|
|
58105
|
+
}
|
|
58106
|
+
function useSessionToken() {
|
|
58107
|
+
return React__namespace.useSyncExternalStore(tokenSubscribe, getSessionToken);
|
|
58108
|
+
}
|
|
58018
58109
|
const STORE_EXTRAS_MAP = /* @__PURE__ */ new Map();
|
|
58019
58110
|
function BackendStoreSync({ children }) {
|
|
58020
58111
|
const { client } = React__namespace.useContext(websocketCtx);
|
|
@@ -58072,55 +58163,44 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
58072
58163
|
storeKey: "BackendStore"
|
|
58073
58164
|
});
|
|
58074
58165
|
}
|
|
58075
|
-
function getSessionKey(
|
|
58076
|
-
const sessionToken = typeof extras === "string" ? extras : extras.sessionToken;
|
|
58166
|
+
function getSessionKey(uid2) {
|
|
58077
58167
|
if (isEmbedded()) {
|
|
58078
58168
|
return `dara-session-${window.frameElement.dataset.daraPageId}-var-${uid2}`;
|
|
58079
58169
|
}
|
|
58080
|
-
return `dara-session-${
|
|
58170
|
+
return `dara-session-${getSessionToken()}-var-${uid2}`;
|
|
58081
58171
|
}
|
|
58082
58172
|
function BrowserStoreSync({ children }) {
|
|
58083
|
-
const
|
|
58084
|
-
|
|
58085
|
-
(itemKey)
|
|
58173
|
+
const getStoreValue = React__namespace.useCallback((itemKey) => {
|
|
58174
|
+
var _a;
|
|
58175
|
+
const key = getSessionKey(itemKey);
|
|
58176
|
+
return JSON.parse((_a = localStorage.getItem(key)) != null ? _a : "null");
|
|
58177
|
+
}, []);
|
|
58178
|
+
const syncStoreValues = React__namespace.useCallback(({ diff }) => {
|
|
58179
|
+
for (const [itemKey, value] of diff.entries()) {
|
|
58180
|
+
const key = getSessionKey(itemKey);
|
|
58181
|
+
localStorage.setItem(key, JSON.stringify(value));
|
|
58182
|
+
}
|
|
58183
|
+
}, []);
|
|
58184
|
+
const listenToStoreChanges = React__namespace.useCallback(({ updateItem }) => {
|
|
58185
|
+
const listener2 = (e3) => {
|
|
58086
58186
|
var _a;
|
|
58087
|
-
|
|
58088
|
-
|
|
58089
|
-
|
|
58090
|
-
|
|
58091
|
-
|
|
58092
|
-
|
|
58093
|
-
|
|
58094
|
-
for (const [itemKey, value] of diff.entries()) {
|
|
58095
|
-
const key = getSessionKey(extras, itemKey);
|
|
58096
|
-
localStorage.setItem(key, JSON.stringify(value));
|
|
58097
|
-
}
|
|
58098
|
-
},
|
|
58099
|
-
[extras]
|
|
58100
|
-
);
|
|
58101
|
-
const listenToStoreChanges = React__namespace.useCallback(
|
|
58102
|
-
({ updateItem }) => {
|
|
58103
|
-
const listener2 = (e3) => {
|
|
58104
|
-
var _a;
|
|
58105
|
-
if (e3.storageArea === localStorage) {
|
|
58106
|
-
if (e3.key) {
|
|
58107
|
-
const match2 = e3.key.match(/^dara-session-(.*)-var-(.*)$/);
|
|
58108
|
-
if (match2) {
|
|
58109
|
-
const [, sessionToken, uid2] = match2;
|
|
58110
|
-
if (typeof extras === "string" && sessionToken === extras || typeof extras === "object" && extras.sessionToken === sessionToken) {
|
|
58111
|
-
updateItem(uid2, JSON.parse((_a = e3.newValue) != null ? _a : "null"));
|
|
58112
|
-
}
|
|
58187
|
+
if (e3.storageArea === localStorage) {
|
|
58188
|
+
if (e3.key) {
|
|
58189
|
+
const match2 = e3.key.match(/^dara-session-(.*)-var-(.*)$/);
|
|
58190
|
+
if (match2) {
|
|
58191
|
+
const [, sessionToken, uid2] = match2;
|
|
58192
|
+
if (sessionToken === getSessionToken()) {
|
|
58193
|
+
updateItem(uid2, JSON.parse((_a = e3.newValue) != null ? _a : "null"));
|
|
58113
58194
|
}
|
|
58114
58195
|
}
|
|
58115
58196
|
}
|
|
58116
|
-
}
|
|
58117
|
-
|
|
58118
|
-
|
|
58119
|
-
|
|
58120
|
-
|
|
58121
|
-
}
|
|
58122
|
-
|
|
58123
|
-
);
|
|
58197
|
+
}
|
|
58198
|
+
};
|
|
58199
|
+
window.addEventListener("storage", listener2);
|
|
58200
|
+
return () => {
|
|
58201
|
+
window.removeEventListener("storage", listener2);
|
|
58202
|
+
};
|
|
58203
|
+
}, []);
|
|
58124
58204
|
return /* @__PURE__ */ React__namespace.createElement(RecoilSync_index_1, { listen: listenToStoreChanges, read: getStoreValue, storeKey: "BrowserStore", write: syncStoreValues }, children);
|
|
58125
58205
|
}
|
|
58126
58206
|
function localStorageEffect(variable, extrasSerializable, wsClient, taskContext) {
|
|
@@ -58880,6 +58960,57 @@ Inferred class string: "${iconClasses}."`
|
|
|
58880
58960
|
}
|
|
58881
58961
|
return templateCopy;
|
|
58882
58962
|
}
|
|
58963
|
+
function e(e3) {
|
|
58964
|
+
this.message = e3;
|
|
58965
|
+
}
|
|
58966
|
+
e.prototype = new Error(), e.prototype.name = "InvalidCharacterError";
|
|
58967
|
+
var r = "undefined" != typeof window && window.atob && window.atob.bind(window) || function(r2) {
|
|
58968
|
+
var t2 = String(r2).replace(/=+$/, "");
|
|
58969
|
+
if (t2.length % 4 == 1)
|
|
58970
|
+
throw new e("'atob' failed: The string to be decoded is not correctly encoded.");
|
|
58971
|
+
for (var n2, o2, a2 = 0, i2 = 0, c2 = ""; o2 = t2.charAt(i2++); ~o2 && (n2 = a2 % 4 ? 64 * n2 + o2 : o2, a2++ % 4) ? c2 += String.fromCharCode(255 & n2 >> (-2 * a2 & 6)) : 0)
|
|
58972
|
+
o2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o2);
|
|
58973
|
+
return c2;
|
|
58974
|
+
};
|
|
58975
|
+
function t(e3) {
|
|
58976
|
+
var t2 = e3.replace(/-/g, "+").replace(/_/g, "/");
|
|
58977
|
+
switch (t2.length % 4) {
|
|
58978
|
+
case 0:
|
|
58979
|
+
break;
|
|
58980
|
+
case 2:
|
|
58981
|
+
t2 += "==";
|
|
58982
|
+
break;
|
|
58983
|
+
case 3:
|
|
58984
|
+
t2 += "=";
|
|
58985
|
+
break;
|
|
58986
|
+
default:
|
|
58987
|
+
throw "Illegal base64url string!";
|
|
58988
|
+
}
|
|
58989
|
+
try {
|
|
58990
|
+
return function(e4) {
|
|
58991
|
+
return decodeURIComponent(r(e4).replace(/(.)/g, function(e6, r2) {
|
|
58992
|
+
var t3 = r2.charCodeAt(0).toString(16).toUpperCase();
|
|
58993
|
+
return t3.length < 2 && (t3 = "0" + t3), "%" + t3;
|
|
58994
|
+
}));
|
|
58995
|
+
}(t2);
|
|
58996
|
+
} catch (e4) {
|
|
58997
|
+
return r(t2);
|
|
58998
|
+
}
|
|
58999
|
+
}
|
|
59000
|
+
function n(e3) {
|
|
59001
|
+
this.message = e3;
|
|
59002
|
+
}
|
|
59003
|
+
function o(e3, r2) {
|
|
59004
|
+
if ("string" != typeof e3)
|
|
59005
|
+
throw new n("Invalid token specified");
|
|
59006
|
+
var o2 = true === (r2 = r2 || {}).header ? 0 : 1;
|
|
59007
|
+
try {
|
|
59008
|
+
return JSON.parse(t(e3.split(".")[o2]));
|
|
59009
|
+
} catch (e4) {
|
|
59010
|
+
throw new n("Invalid token specified: " + e4.message);
|
|
59011
|
+
}
|
|
59012
|
+
}
|
|
59013
|
+
n.prototype = new Error(), n.prototype.name = "InvalidTokenError";
|
|
58883
59014
|
const Wrapper$2 = styled__default.default.div`
|
|
58884
59015
|
display: flex;
|
|
58885
59016
|
align-items: center;
|
|
@@ -59017,6 +59148,28 @@ Inferred class string: "${iconClasses}."`
|
|
|
59017
59148
|
}
|
|
59018
59149
|
return isLoading ? /* @__PURE__ */ React__default.default.createElement(DefaultFallback, null) : children;
|
|
59019
59150
|
}
|
|
59151
|
+
async function checkTokenExpiry(token) {
|
|
59152
|
+
if (token) {
|
|
59153
|
+
try {
|
|
59154
|
+
const decoded = o(token);
|
|
59155
|
+
if (decoded.exp * 1e3 - Date.now() < 5 * 60 * 1e3) {
|
|
59156
|
+
const res = await request("/api/auth/refresh-token", {
|
|
59157
|
+
headers: {
|
|
59158
|
+
Accept: "application/json",
|
|
59159
|
+
"Content-Type": "application/json"
|
|
59160
|
+
},
|
|
59161
|
+
method: "POST"
|
|
59162
|
+
});
|
|
59163
|
+
if (res.ok) {
|
|
59164
|
+
const { token: newToken } = await res.json();
|
|
59165
|
+
return newToken;
|
|
59166
|
+
}
|
|
59167
|
+
}
|
|
59168
|
+
} catch (e3) {
|
|
59169
|
+
console.warn("Failed to refresh token", e3);
|
|
59170
|
+
}
|
|
59171
|
+
}
|
|
59172
|
+
}
|
|
59020
59173
|
function DynamicAuthComponent(props) {
|
|
59021
59174
|
const importers = React.useContext(importersCtx);
|
|
59022
59175
|
const [component, setComponent] = React.useState(() => /* @__PURE__ */ React__default.default.createElement(DefaultFallback, null));
|
|
@@ -59036,26 +59189,44 @@ Inferred class string: "${iconClasses}."`
|
|
|
59036
59189
|
}).catch((err2) => {
|
|
59037
59190
|
throw new Error(`Failed to import module ${props.component.py_module}`, err2);
|
|
59038
59191
|
});
|
|
59039
|
-
}, [props.component]);
|
|
59192
|
+
}, [props.component, importers]);
|
|
59040
59193
|
return component;
|
|
59041
59194
|
}
|
|
59042
59195
|
function AuthWrapper(props) {
|
|
59043
|
-
const
|
|
59044
|
-
const
|
|
59045
|
-
|
|
59046
|
-
|
|
59047
|
-
|
|
59048
|
-
localStorage.setItem(key, newToken);
|
|
59049
|
-
} else {
|
|
59050
|
-
localStorage.removeItem(key);
|
|
59051
|
-
}
|
|
59052
|
-
setToken(newToken);
|
|
59196
|
+
const { data: authConfig, isLoading } = useAuthConfig();
|
|
59197
|
+
const isMounted = React.useRef(false);
|
|
59198
|
+
if (!isMounted.current) {
|
|
59199
|
+
isMounted.current = true;
|
|
59200
|
+
store.setValue("sessionToken", getToken());
|
|
59053
59201
|
}
|
|
59202
|
+
React.useEffect(() => {
|
|
59203
|
+
if (!(authConfig == null ? void 0 : authConfig.supports_token_refresh)) {
|
|
59204
|
+
return;
|
|
59205
|
+
}
|
|
59206
|
+
const interval = setInterval(async () => {
|
|
59207
|
+
const token = await store.getValue("sessionToken");
|
|
59208
|
+
const newToken = await checkTokenExpiry(token);
|
|
59209
|
+
if (newToken) {
|
|
59210
|
+
store.setValue("sessionToken", newToken);
|
|
59211
|
+
}
|
|
59212
|
+
}, 60 * 1e3);
|
|
59213
|
+
return () => clearInterval(interval);
|
|
59214
|
+
}, [authConfig]);
|
|
59215
|
+
React.useEffect(() => {
|
|
59216
|
+
return store.subscribe("sessionToken", (newToken) => {
|
|
59217
|
+
const key = getTokenKey();
|
|
59218
|
+
if (newToken) {
|
|
59219
|
+
localStorage.setItem(key, newToken);
|
|
59220
|
+
} else {
|
|
59221
|
+
localStorage.removeItem(key);
|
|
59222
|
+
}
|
|
59223
|
+
});
|
|
59224
|
+
}, []);
|
|
59054
59225
|
if (isLoading) {
|
|
59055
59226
|
return /* @__PURE__ */ React__default.default.createElement(Center, null, /* @__PURE__ */ React__default.default.createElement(DefaultFallback, null));
|
|
59056
59227
|
}
|
|
59057
|
-
const { login, logout, ...extraRoutes } =
|
|
59058
|
-
return /* @__PURE__ */ React__default.default.createElement(
|
|
59228
|
+
const { login, logout, ...extraRoutes } = authConfig.auth_components;
|
|
59229
|
+
return /* @__PURE__ */ React__default.default.createElement(Switch$1, null, /* @__PURE__ */ React__default.default.createElement(Route, { path: "/login" }, /* @__PURE__ */ React__default.default.createElement(DynamicAuthComponent, { component: login })), /* @__PURE__ */ React__default.default.createElement(Route, { path: "/logout" }, /* @__PURE__ */ React__default.default.createElement(DynamicAuthComponent, { component: logout })), Object.entries(extraRoutes).map(([path, component]) => /* @__PURE__ */ React__default.default.createElement(Route, { key: path, path: `/${path}` }, /* @__PURE__ */ React__default.default.createElement(DynamicAuthComponent, { component }))), /* @__PURE__ */ React__default.default.createElement(Route, { component: ErrorPage, path: "/error" }), /* @__PURE__ */ React__default.default.createElement(Route, { path: "/", render: () => /* @__PURE__ */ React__default.default.createElement(PrivateRoute, null, props.children) }));
|
|
59059
59230
|
}
|
|
59060
59231
|
const index = "";
|
|
59061
59232
|
const ErrorBoundaryContext = React.createContext(null);
|
|
@@ -85913,7 +86084,6 @@ Inferred class string: "${iconClasses}."`
|
|
|
85913
86084
|
const [username, setUsername] = React.useState("");
|
|
85914
86085
|
const [password, setPassword] = React.useState("");
|
|
85915
86086
|
const [isError2, setIsError] = React.useState(false);
|
|
85916
|
-
const { token, setToken } = React.useContext(authCtx);
|
|
85917
86087
|
const history2 = useHistory();
|
|
85918
86088
|
const location2 = useLocation();
|
|
85919
86089
|
const queryParams = new URLSearchParams(location2.search);
|
|
@@ -85922,9 +86092,9 @@ Inferred class string: "${iconClasses}."`
|
|
|
85922
86092
|
setIsLoggingIn(true);
|
|
85923
86093
|
setIsError(false);
|
|
85924
86094
|
try {
|
|
85925
|
-
const sessionToken = await
|
|
86095
|
+
const sessionToken = await requestSessionToken({ password, username });
|
|
85926
86096
|
if (sessionToken) {
|
|
85927
|
-
|
|
86097
|
+
setSessionToken(sessionToken);
|
|
85928
86098
|
history2.replace(decodeURIComponent(previousLocation));
|
|
85929
86099
|
}
|
|
85930
86100
|
} catch {
|
|
@@ -85933,9 +86103,8 @@ Inferred class string: "${iconClasses}."`
|
|
|
85933
86103
|
setIsLoggingIn(false);
|
|
85934
86104
|
};
|
|
85935
86105
|
React.useEffect(() => {
|
|
85936
|
-
|
|
85937
|
-
|
|
85938
|
-
verifySessionToken(localStorage.getItem(key)).then((verified) => {
|
|
86106
|
+
if (getSessionToken()) {
|
|
86107
|
+
verifySessionToken().then((verified) => {
|
|
85939
86108
|
if (verified) {
|
|
85940
86109
|
history2.replace(decodeURIComponent(previousLocation));
|
|
85941
86110
|
} else {
|
|
@@ -85993,10 +86162,9 @@ Inferred class string: "${iconClasses}."`
|
|
|
85993
86162
|
))));
|
|
85994
86163
|
}
|
|
85995
86164
|
function BasicAuthLogout() {
|
|
85996
|
-
const { setToken, token } = useAuthCtx();
|
|
85997
86165
|
React.useEffect(() => {
|
|
85998
|
-
revokeSession(
|
|
85999
|
-
|
|
86166
|
+
revokeSession().then(() => {
|
|
86167
|
+
setSessionToken(null);
|
|
86000
86168
|
window.location.href = `${window.dara.base_url}/login`;
|
|
86001
86169
|
});
|
|
86002
86170
|
}, []);
|
|
@@ -86004,26 +86172,20 @@ Inferred class string: "${iconClasses}."`
|
|
|
86004
86172
|
}
|
|
86005
86173
|
function DefaultAuthLogin() {
|
|
86006
86174
|
var _a;
|
|
86007
|
-
const { token, setToken } = React.useContext(authCtx);
|
|
86008
86175
|
const history2 = useHistory();
|
|
86009
86176
|
const location2 = useLocation();
|
|
86010
86177
|
const queryParams = new URLSearchParams(location2.search);
|
|
86011
86178
|
const previousLocation = (_a = queryParams.get("referrer")) != null ? _a : "/";
|
|
86012
86179
|
async function getNewToken() {
|
|
86013
|
-
const sessionToken = await
|
|
86180
|
+
const sessionToken = await requestSessionToken({});
|
|
86014
86181
|
if (sessionToken) {
|
|
86015
|
-
|
|
86182
|
+
setSessionToken(sessionToken);
|
|
86016
86183
|
history2.replace(decodeURIComponent(previousLocation));
|
|
86017
86184
|
}
|
|
86018
86185
|
}
|
|
86019
86186
|
React.useEffect(() => {
|
|
86020
|
-
|
|
86021
|
-
|
|
86022
|
-
const storedToken = localStorage.getItem(key);
|
|
86023
|
-
if (token !== void 0 && token !== null && (!storedToken || storedToken === "undefined")) {
|
|
86024
|
-
localStorage.setItem(key, token);
|
|
86025
|
-
}
|
|
86026
|
-
verifySessionToken(localStorage.getItem(key)).then((verified) => {
|
|
86187
|
+
if (getSessionToken()) {
|
|
86188
|
+
verifySessionToken().then((verified) => {
|
|
86027
86189
|
if (verified) {
|
|
86028
86190
|
history2.replace(decodeURIComponent(previousLocation));
|
|
86029
86191
|
} else {
|
|
@@ -86378,6 +86540,7 @@ Inferred class string: "${iconClasses}."`
|
|
|
86378
86540
|
exports.combineFilters = combineFilters;
|
|
86379
86541
|
exports.default = run;
|
|
86380
86542
|
exports.getIcon = getIcon;
|
|
86543
|
+
exports.getSessionToken = getSessionToken;
|
|
86381
86544
|
exports.getToken = getToken;
|
|
86382
86545
|
exports.getTokenKey = getTokenKey;
|
|
86383
86546
|
exports.handleAuthErrors = handleAuthErrors;
|
|
@@ -86388,10 +86551,10 @@ Inferred class string: "${iconClasses}."`
|
|
|
86388
86551
|
exports.request = request;
|
|
86389
86552
|
exports.resolveValue = resolveValue;
|
|
86390
86553
|
exports.revokeSession = revokeSession;
|
|
86554
|
+
exports.setSessionToken = setSessionToken;
|
|
86391
86555
|
exports.useAction = useAction;
|
|
86392
86556
|
exports.useActionIsLoading = useActionIsLoading;
|
|
86393
86557
|
exports.useAnyVariable = useAnyVariable;
|
|
86394
|
-
exports.useAuthCtx = useAuthCtx;
|
|
86395
86558
|
exports.useComponentStyles = useComponentStyles;
|
|
86396
86559
|
exports.useDataVariable = useDataVariable;
|
|
86397
86560
|
exports.useEventBus = useEventBus;
|