201 lines
7.6 KiB
JavaScript
201 lines
7.6 KiB
JavaScript
/* Metro module 1719; source: unknown; dependencies: [1618, 1720] */
|
|
import * as ReanimatedModuleModule from './module-01618-ReanimatedModule.js'; /* Metro dependency 1618 */
|
|
import * as Module01720Module from './module-01720.js'; /* Metro dependency 1720 */
|
|
|
|
function _fun18717(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#18717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1846:6, offset: 0x00e946d0, size: 162 bytes, params: 8, frame: 17
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const Map = global.Map;
|
|
exports.PropsRegistryGarbageCollector = {'viewsCount': 0, 'viewsMap': null, 'intervalId': null, viewsMap: new Map(),
|
|
registerView: function(a0, a1) {
|
|
var property = this.viewsMap;
|
|
if (!property.has(a0)) {
|
|
property = this.viewsMap;
|
|
property.set(a0, a1);
|
|
property = this.viewsCount;
|
|
this.viewsCount = typeof property === 'bigint' ? property + 1n : +property + 1;
|
|
if (this.viewsCount === 1) {
|
|
this.registerInterval();
|
|
}
|
|
}
|
|
}, unregisterView: function(a0) {
|
|
var property = this.viewsMap;
|
|
property.delete(a0);
|
|
property = this.viewsCount;
|
|
this.viewsCount = typeof property === 'bigint' ? property - 1n : +property - 1;
|
|
if (this.viewsCount === 0) {
|
|
this.unregisterInterval();
|
|
}
|
|
}, syncPropsBackToReact: syncPropsBackToReact, registerInterval: function() {
|
|
this.intervalId = global.setInterval(this.syncPropsBackToReact.bind(this), 500);
|
|
}, unregisterInterval: function() {
|
|
if (this.intervalId !== null) {
|
|
global.clearInterval(this.intervalId);
|
|
this.intervalId = null;
|
|
}
|
|
}};
|
|
function unprocessProps(a0) { // fn#18718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1846:908, offset: 0x00e94772, size: 53 bytes, params: 2, frame: 12
|
|
(Module01720Module).unprocessColorsInProps(a0);
|
|
((a0) => {
|
|
if (global.Array.isArray(a0.boxShadow)) {
|
|
a0.boxShadow = a0.boxShadow.map(_fun18720);
|
|
}
|
|
})(a0);
|
|
function unprocessBoxShadow(a0) { // fn#18719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1846:969, owner: unprocessProps.unprocessBoxShadow, offset: 0x00e947a7, size: 63 bytes, params: 2, frame: 12
|
|
const Array = global.Array;
|
|
const isArray = Array.isArray;
|
|
let boxShadow = a0.boxShadow;
|
|
if (Reflect.apply(isArray, Array, [boxShadow])) {
|
|
boxShadow = a0.boxShadow;
|
|
a0.boxShadow = boxShadow.map(_fun18720);
|
|
}
|
|
function _fun18720(a0) { // fn#18720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1846:1058, offset: 0x00e947e6, size: 74 bytes, params: 2, frame: 17
|
|
const Object = global.Object;
|
|
const assign = Object.assign;
|
|
let value = environment.__proto__.__proto__;
|
|
value = require(1720) /* metro dependency 1720 */;
|
|
return Reflect.apply(assign, Object, [{}, a0, {color: value.unprocessColor(a0.color)}]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function syncPropsBackToReact() { // fn#18723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1846:449, offset: 0x00e948c6, size: 145 bytes, params: 1, frame: 20
|
|
var viewTag;
|
|
var styleProps;
|
|
var viewsMap;
|
|
var get;
|
|
var value2;
|
|
var unprocessPropsBinding;
|
|
var value3;
|
|
var _syncStylePropsBackToReact;
|
|
var error;
|
|
const ReanimatedModule = (ReanimatedModuleModule).ReanimatedModule;
|
|
const getSettledUpdates = ReanimatedModule.getSettledUpdates;
|
|
const iterator = Reflect.apply(getSettledUpdates, ReanimatedModule, [])[Symbol.iterator]();
|
|
const iterator2 = iterator.next;
|
|
let r2 = iterator;
|
|
let item2 = Reflect.apply(iterator2, r2, []);
|
|
let item = item2.value;
|
|
item2 = item2.done ? undefined : r2;
|
|
reducibleJoin2: while (true) {
|
|
if (item2 === undefined) {
|
|
return undefined;
|
|
}
|
|
break reducibleJoin2;
|
|
}
|
|
reducibleLoop2: while (true) {
|
|
try {
|
|
viewTag = item.viewTag;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
styleProps = item.styleProps;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
viewsMap = this.viewsMap;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
get = viewsMap.get;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
value2 = Reflect.apply(get, viewsMap, [viewTag]);
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
unprocessPropsBinding = unprocessProps;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
unprocessPropsBinding(styleProps);
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
value3 = value2 == null;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
reducibleJoin1: while (true) {
|
|
if (value3) {
|
|
r2 = item2;
|
|
break reducibleJoin1;
|
|
}
|
|
try {
|
|
_syncStylePropsBackToReact = value2._syncStylePropsBackToReact;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
Reflect.apply(_syncStylePropsBackToReact, value2, [styleProps]);
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
r2 = item2;
|
|
break reducibleJoin1;
|
|
}
|
|
item2 = Reflect.apply(iterator2, r2, []);
|
|
item = item2.value;
|
|
item2 = item2.done ? undefined : r2;
|
|
if (item2 === undefined) {
|
|
break reducibleLoop2;
|
|
}
|
|
continue reducibleLoop2;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun18717, 1719, [1618, 1720]) /* metro module 1719, dependencies: [1618, 1720] */;
|