71 lines
4.0 KiB
TypeScript
71 lines
4.0 KiB
TypeScript
/* Metro module 6771; source: modules/app_analytics/useAnalyticsLocations.tsx; dependencies: [57, 31, 33, 22, 644, 2] */
|
|
function _fun53326(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6949:6, offset: 0x013460b7, size: 212 bytes, params: 8, frame: 19
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
|
let value = importAll(31) /* metro dependency 31 */;
|
|
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
|
value = value.createContext([]);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_analytics/useAnalyticsLocations.tsx');
|
|
exports.default = useAnalyticsLocations;
|
|
exports.LocationContext = value;
|
|
exports.AnalyticsLocationProvider = AnalyticsLocationProvider;
|
|
exports.useLocationStackFromLocationContext = useLocationStackFromLocationContext;
|
|
}
|
|
|
|
function mergeLocations(a0, a1) { // fn#53327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6949:152, offset: 0x0134618b, size: 83 bytes, params: 3, frame: 16
|
|
if (a1.length === 0) {
|
|
return a0;
|
|
}
|
|
let value = importDefault(22) /* metro dependency 22 */;
|
|
value = value.flatten(a1);
|
|
const items2 = [];
|
|
arraySpread(items2, value, arraySpread(items2, a0, 0, importDefault), importDefault);
|
|
return items2;
|
|
}
|
|
|
|
function useAnalyticsLocations(a0) { // fn#53328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6949:340, offset: 0x013461de, size: 220 bytes, params: 2, frame: 19
|
|
const value = copyRestArgs(0, undefined);
|
|
const binding = env0_3;
|
|
const [property, env0_2] = env0_2Binding(binding.useState(value), 2);
|
|
const value5 = binding.useContext(env0_5);
|
|
const value6 = binding.useMemo(_fun53329, [property, value5]);
|
|
const value7 = binding.useMemo(_fun53330, [property, value5]);
|
|
binding.useEffect(_fun53331, [value, property]);
|
|
return {analyticsLocations: value6, sourceAnalyticsLocations: value7,
|
|
parentAnalyticsLocation: value7[value7.length - 1], newestAnalyticsLocation: value6[value6.length - 1]};
|
|
}
|
|
|
|
function AnalyticsLocationProvider({children, value}) { // fn#53332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6949:776, offset: 0x01346347, size: 50 bytes, params: 2, frame: 14
|
|
const Provider = env0_5.Provider;
|
|
return (
|
|
<Provider value={value}>
|
|
{children}
|
|
</Provider>
|
|
);
|
|
}
|
|
|
|
function useLocationStackFromLocationContext() { // fn#53333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6949:914, offset: 0x01346379, size: 34 bytes, params: 1, frame: 11
|
|
return env0_3.useContext(env0_5) ?? [];
|
|
}
|
|
|
|
function _fun53329() { // fn#53329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6949:451, offset: 0x013462ba, size: 28 bytes, params: 1, frame: 13
|
|
return mergeLocations(env0_3, env0_1);
|
|
}
|
|
|
|
function _fun53330() { // fn#53330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6949:496, offset: 0x013462d6, size: 53 bytes, params: 1, frame: 15
|
|
const value = environment.__proto__;
|
|
const mergeLocationsBinding = mergeLocations;
|
|
const binding = env0_3;
|
|
const binding2 = env0_1;
|
|
return mergeLocationsBinding(binding, binding2.slice(0, binding2.length - 1));
|
|
}
|
|
|
|
function _fun53331() { // fn#53331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6949:568, offset: 0x0134630b, size: 60 bytes, params: 1, frame: 14
|
|
const value = environment.__proto__;
|
|
if (!(importDefault(644) /* metro dependency 644 */)(env0_0, env0_1)) {
|
|
env0_2(env0_0);
|
|
}
|
|
}
|
|
|