decord/source/681_checkIfSnapshotChanged.js

70 lines
1.7 KiB
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 681
2026-07-24 07:16:23 +00:00
// Function ID: 8399
2026-07-20 16:05:17 +00:00
// Name: checkIfSnapshotChanged
2026-07-23 10:11:24 +00:00
// Dependencies: [31]
2026-07-20 16:05:17 +00:00
// Module 681 (checkIfSnapshotChanged)
2026-07-23 10:11:24 +00:00
import result from "result";
let closure_1;
let closure_2;
let closure_3;
let closure_4;
2026-07-20 16:05:17 +00:00
function checkIfSnapshotChanged(value) {
return !is(value.value, value.getSnapshot());
}
if ("function" === typeof Object.is) {
const _Object = Object;
} else {
is = function is(arg0, arg1) {
let tmp = arg0 === arg1;
if (tmp) {
let tmp2 = 0 !== arg0;
if (!tmp2) {
tmp2 = 1 / arg0 === 1 / arg1;
}
tmp = tmp2;
}
if (!tmp) {
tmp = arg0 != arg0 && arg1 != arg1;
const tmp3 = arg0 != arg0 && arg1 != arg1;
}
return tmp;
};
}
2026-07-23 10:11:24 +00:00
({ useState: closure_1, useEffect: closure_2, useLayoutEffect: closure_3, useDebugValue: closure_4 } = result);
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
export const useSyncExternalStore = undefined !== result.useSyncExternalStore ? result.useSyncExternalStore : (function useSyncExternalStore$1(arg0, getSnapshot) {
let closure_0 = arg0;
const callback = getSnapshot;
2026-07-20 16:05:17 +00:00
const tmp = getSnapshot();
2026-07-23 10:11:24 +00:00
const callback2 = tmp;
const tmp2 = callback({ inst: { value: tmp, getSnapshot } });
2026-07-20 16:05:17 +00:00
const inst = tmp2[0].inst;
2026-07-23 10:11:24 +00:00
const callback3 = tmp2[1];
2026-07-20 16:05:17 +00:00
const items = [arg0, tmp, getSnapshot];
inst(() => {
2026-07-23 10:11:24 +00:00
inst.value = closure_2;
inst.getSnapshot = closure_1;
if (outer1_5(inst)) {
2026-07-20 16:05:17 +00:00
const obj = { inst };
2026-07-23 10:11:24 +00:00
callback2(obj);
2026-07-20 16:05:17 +00:00
}
}, items);
const items1 = [arg0];
2026-07-23 10:11:24 +00:00
callback2(() => {
if (outer1_5(inst)) {
let obj = { inst };
callback2(obj);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
return callback(() => {
if (outer2_5(outer1_3)) {
const obj = { inst: outer1_3 };
outer1_4(obj);
2026-07-20 16:05:17 +00:00
}
});
}, items1);
2026-07-23 10:11:24 +00:00
callback3(tmp);
2026-07-20 16:05:17 +00:00
return tmp;
2026-07-23 10:11:24 +00:00
});