decord/source/__polyfill/01xxx/module_1008.js
github-actions e510164e6b chore: update source for alpha 346.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
2026-09-10 05:38:07 +00:00

151 lines
5.4 KiB
JavaScript

// Module ID: 1008
// Function ID: 1009
// Dependencies: [682]
// Exports: createReduxEnhancer
// Module 1008
import _mod682 from "module_682" /* 682 */;
require = arg1;
const dependencyMap = arg6;
Object.defineProperty(arg5, Symbol.toStringTag, { value: "Module" });
let obj = {
attachReduxState: true,
actionTransformer(arg0) {
return arg0;
},
stateTransformer(arg0) {
let tmp = arg0;
if (!arg0) {
tmp = null;
}
return tmp;
}
};
export const createReduxEnhancer = function createReduxEnhancer(arg0) {
obj = {};
const merged = Object.assign(obj);
const merged1 = Object.assign(arg0);
return (arg0) => {
closure_0 = arg0;
return (arg0, arg1) => {
if (obj.attachReduxState) {
obj = _mod682;
const globalScope = obj.getGlobalScope();
globalScope.addEventProcessor((type, attachments) => {
try {
let tmp = undefined === type.type;
if (tmp) {
tmp = "redux" === type.contexts.state.state.type;
}
if (tmp) {
attachments = attachments.attachments;
if (!attachments) {
attachments = [];
}
const items = [];
obj = { filename: "redux_state.json", data: null };
const _JSON = JSON;
obj.data = JSON.stringify(type.contexts.state.state.value);
items[HermesBuiltin.arraySpread(attachments, 0)] = obj;
attachments.attachments = items;
const arraySpreadResult = HermesBuiltin.arraySpread(attachments, 0);
}
return type;
} catch (err) {
}
});
}
closure_0 = arg0;
const tmp4 = closure_0((arg0, arg1) => {
const tmp = closure_0(arg0, arg1);
const currentScope = closure_0(closure_3_1[0]).getCurrentScope();
const actionTransformerResult = closure_0.actionTransformer(arg1);
if (null != actionTransformerResult) {
const obj2 = { category: "redux.action", data: actionTransformerResult, type: "info" };
tmp2(tmp3[0]).addBreadcrumb(obj2);
const tmp2Result = tmp2(tmp3[0]);
}
const stateTransformerResult = closure_0.stateTransformer(tmp);
if (null != stateTransformerResult) {
const client = tmp2(tmp3[0]).getClient();
let options;
if (client != null) {
options = client.getOptions();
}
let num;
if (options != null) {
num = options.normalizeDepth;
}
if (!num) {
num = 3;
}
const obj4 = { state: null };
const obj5 = { type: "redux", value: stateTransformerResult };
obj4.state = obj5;
const tmp2Result3 = tmp2(tmp3[0]);
const result = tmp2(tmp3[0]).addNonEnumerableProperty(obj4, "__sentry_override_normalization_depth__", 3 + num);
currentScope.setContext("state", obj4);
const tmp2Result4 = tmp2(tmp3[0]);
} else {
currentScope.setContext("state", null);
}
const configureScopeWithState = obj3.configureScopeWithState;
if (typeof configureScopeWithState === "function") {
const result1 = configureScopeWithState(currentScope, tmp);
}
return tmp;
}, arg1);
const proxy = new Proxy(tmp4.replaceReducer, {
apply(apply, arg1, arg2) {
closure_0 = arg2[0];
const items = [
(arg0, arg1) => {
const tmp = closure_0(arg0, arg1);
const currentScope = closure_0(closure_3_1[0]).getCurrentScope();
const actionTransformerResult = closure_0.actionTransformer(arg1);
if (null != actionTransformerResult) {
const obj2 = { category: "redux.action", data: actionTransformerResult, type: "info" };
tmp2(tmp3[0]).addBreadcrumb(obj2);
const tmp2Result = tmp2(tmp3[0]);
}
const stateTransformerResult = closure_0.stateTransformer(tmp);
if (null != stateTransformerResult) {
const client = tmp2(tmp3[0]).getClient();
let options;
if (client != null) {
options = client.getOptions();
}
let num;
if (options != null) {
num = options.normalizeDepth;
}
if (!num) {
num = 3;
}
const obj4 = { state: null };
const obj5 = { type: "redux", value: stateTransformerResult };
obj4.state = obj5;
const tmp2Result3 = tmp2(tmp3[0]);
const result = tmp2(tmp3[0]).addNonEnumerableProperty(obj4, "__sentry_override_normalization_depth__", 3 + num);
currentScope.setContext("state", obj4);
const tmp2Result4 = tmp2(tmp3[0]);
} else {
currentScope.setContext("state", null);
}
const configureScopeWithState = obj3.configureScopeWithState;
if (typeof configureScopeWithState === "function") {
const result1 = configureScopeWithState(currentScope, tmp);
}
return tmp;
}
];
apply.apply(arg1, items);
}
});
tmp4.replaceReducer = proxy;
return tmp4;
};
};
};