Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
73 lines
2.4 KiB
JavaScript
73 lines
2.4 KiB
JavaScript
// Module ID: 1244
|
|
// Function ID: 1245
|
|
// Dependencies: [19, 1245, 561]
|
|
// Exports: createWithEqualityFn, useStoreWithEqualityFn
|
|
|
|
// Module 1244
|
|
import is from "is" /* 1245 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
const require = globalThis.__r;
|
|
|
|
function identity(arg0) {
|
|
return arg0;
|
|
}
|
|
function createWithEqualityFnImpl(arg0, arg1) {
|
|
_require = arg1;
|
|
store = require("module_561").createStore(arg0);
|
|
function useBoundStoreWithEqualityFn(arg0) {
|
|
let tmp = arg1;
|
|
if (arg1 === undefined) {
|
|
tmp = closure_0;
|
|
}
|
|
let tmp2 = arg0;
|
|
if (arg0 === undefined) {
|
|
tmp2 = identity;
|
|
}
|
|
const syncExternalStoreWithSelector = is.useSyncExternalStoreWithSelector(store.subscribe, store.getState, store.getInitialState, tmp2, tmp);
|
|
const debugValue = noop.useDebugValue(syncExternalStoreWithSelector);
|
|
return syncExternalStoreWithSelector;
|
|
}
|
|
const merged = Object.assign(useBoundStoreWithEqualityFn, store);
|
|
return useBoundStoreWithEqualityFn;
|
|
}
|
|
|
|
export const createWithEqualityFn = (arg0, arg1) => {
|
|
if (arg0) {
|
|
if (typeof tmp === "function") {
|
|
_require = arg1;
|
|
store = require("module_561").createStore(arg0);
|
|
function useBoundStoreWithEqualityFn(arg0) {
|
|
let tmp = arg1;
|
|
if (arg1 === undefined) {
|
|
tmp = closure_0;
|
|
}
|
|
let tmp2 = arg0;
|
|
if (arg0 === undefined) {
|
|
tmp2 = identity;
|
|
}
|
|
const syncExternalStoreWithSelector = is.useSyncExternalStoreWithSelector(store.subscribe, store.getState, store.getInitialState, tmp2, tmp);
|
|
const debugValue = noop.useDebugValue(syncExternalStoreWithSelector);
|
|
return syncExternalStoreWithSelector;
|
|
}
|
|
const _Object = Object;
|
|
const merged = Object.assign(useBoundStoreWithEqualityFn, store);
|
|
let tmp2 = useBoundStoreWithEqualityFn;
|
|
const obj = require("module_561");
|
|
} else {
|
|
throw new TypeError("Trying to call a non-function");
|
|
}
|
|
} else {
|
|
tmp2 = tmp;
|
|
}
|
|
return tmp2;
|
|
};
|
|
export const useStoreWithEqualityFn = function useStoreWithEqualityFn(context, arg1, shallow) {
|
|
let tmp = arg1;
|
|
if (arg1 === undefined) {
|
|
tmp = identity;
|
|
}
|
|
const syncExternalStoreWithSelector = is.useSyncExternalStoreWithSelector(context.subscribe, context.getState, context.getInitialState, tmp, shallow);
|
|
const debugValue = noop.useDebugValue(syncExternalStoreWithSelector);
|
|
return syncExternalStoreWithSelector;
|
|
};
|