207 lines
11 KiB
JavaScript
207 lines
11 KiB
JavaScript
/* Metro module 1764; source: unknown; dependencies: [57, 31, 1613, 1718, 1647, 1638, 1641, 1640] */
|
|
import Module00057 from './module-00057.js'; /* Metro dependency 57 */
|
|
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as Module01613Module from './module-01613.js'; /* Metro dependency 1613 */
|
|
import * as ShareableMappingModule from './module-01641-shareableMapping.js'; /* Metro dependency 1641 */
|
|
import * as MakeMutableModule from './module-01647-makeMutable.js'; /* Metro dependency 1647 */
|
|
import * as FindNodeHandleModule from './module-01718-findNodeHandle.js'; /* Metro dependency 1718 */
|
|
|
|
function _fun19461(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#19461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1891:6, offset: 0x00eaae0c, size: 225 bytes, params: 8, frame: 19
|
|
var isMacOS2;
|
|
const env0_0 = require;
|
|
const getComponentOrScrollable = function(a0) {
|
|
var r0;
|
|
var value = a0;
|
|
if (value.getScrollableNode) {
|
|
value = value.getScrollableNode();
|
|
r0 = value;
|
|
} else if (value.getNativeScrollRef) {
|
|
value = value.getNativeScrollRef();
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
const env0_3 = value.useRef;
|
|
const env0_4 = value.useState;
|
|
value = require(1613) /* metro dependency 1613 */;
|
|
value = value.shouldBeUseWeb();
|
|
if (!(require(1613) /* metro dependency 1613 */).isIOS()) {
|
|
isMacOS2 = (require(1613) /* metro dependency 1613 */).isMacOS();
|
|
}
|
|
object = {code: 'function pnpm_useAnimatedRefTs1(){const{tagOrWrapper,viewName}=this.__closure;const f=function(){return tagOrWrapper.value;};if(viewName){f.viewName=viewName;}return f;}'};
|
|
exports.useAnimatedRef = value ? function() {
|
|
return useAnimatedRefBase(_fun19470);
|
|
} : useAnimatedRefNative;
|
|
function useAnimatedRefBase(a0) { // fn#19463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1891:299, offset: 0x00eaaf1d, size: 137 bytes, params: 2, frame: 13
|
|
var current_194642;
|
|
let env0_0 = a0;
|
|
const Map = global.Map;
|
|
let value2 = Object.create(Map.prototype, {constructor: {value: Map}});
|
|
const map = new Map();
|
|
const current = useRef(map instanceof Object ? map : value2).current;
|
|
const env0_2 = useRef(-1);
|
|
const value = useRef(null);
|
|
if (!value.current) {
|
|
current_194642 = current_19464;
|
|
current_194642.observe = function(a0) {
|
|
var r5;
|
|
var env0_0 = a0;
|
|
var current_19464Binding = current_19464;
|
|
var value2 = null;
|
|
r5 = value2 == current_19464Binding || value2 == current_19464.getTag ? undefined : current_19464.getTag();
|
|
current.set(a0, a0(value2 != r5 ? r5 : value2));
|
|
return _fun19468;
|
|
};
|
|
current_194642.current = null;
|
|
value.current = current_194642;
|
|
}
|
|
return value.current;
|
|
function useAnimatedRefBaseCurrent(a0) { // fn#19464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1891:394, owner: useAnimatedRefBase.current, offset: 0x00eaafa6, size: 173 bytes, params: 2, frame: 14
|
|
var r3;
|
|
var r2;
|
|
var binding;
|
|
var value2;
|
|
var current_19464Binding;
|
|
var value3;
|
|
if (a0) {
|
|
binding = env0_2;
|
|
value2 = undefined;
|
|
binding.current = a0(a0);
|
|
current_19464.getTag = getTag_19465;
|
|
current_19464.current = a0;
|
|
if (current.size) {
|
|
current_19464Binding = current_19464;
|
|
value3 = null;
|
|
r3 = value3 == current_19464Binding || value3 == current_19464.getTag ? value2 : current_19464.getTag();
|
|
r2 = value3 != r3 ? r3 : value3;
|
|
current.forEach(_fun19466);
|
|
}
|
|
}
|
|
return env0_2.current;
|
|
function currentGetTag() { // fn#19465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1891:441, owner: useAnimatedRefBase.current.getTag, offset: 0x00eab053, size: 45 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__.__proto__;
|
|
return (FindNodeHandleModule).findNodeHandle(env0_0);
|
|
}
|
|
|
|
function _fun19466(a0, a1) { // fn#19466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1891:585, offset: 0x00eab080, size: 52 bytes, params: 3, frame: 14
|
|
if (a0 != null) {
|
|
a0();
|
|
}
|
|
current.set(a1, a1(env0_1));
|
|
}
|
|
|
|
}
|
|
|
|
function useAnimatedRefBaseObserve(a0) { // fn#19467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1891:657, owner: useAnimatedRefBase.observe, offset: 0x00eab0b4, size: 101 bytes, params: 2, frame: 17
|
|
const env0_0 = a0;
|
|
const current_19464Binding = current_19464;
|
|
const value2 = null;
|
|
const r5 = value2 == current_19464Binding || value2 == current_19464.getTag ? undefined : current_19464.getTag();
|
|
current.set(a0, a0(value2 != r5 ? r5 : value2));
|
|
return _fun19468;
|
|
function _fun19468() { // fn#19468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1891:757, offset: 0x00eab119, size: 58 bytes, params: 1, frame: 13
|
|
const value3 = current.get(env0_0);
|
|
if (value3 != null) {
|
|
value3();
|
|
}
|
|
current.delete(env0_0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function useAnimatedRefWeb() { // fn#19469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1891:1086, offset: 0x00eab153, size: 23 bytes, params: 1, frame: 11
|
|
return useAnimatedRefBase(function(a0) {
|
|
return getComponentOrScrollable(a0);
|
|
});
|
|
function _fun19470(a0) { // fn#19470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1891:1142, offset: 0x00eab16a, size: 19 bytes, params: 2, frame: 11
|
|
return getComponentOrScrollable(a0);
|
|
}
|
|
|
|
}
|
|
|
|
function useAnimatedRefNative() { // fn#19471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1891:1193, offset: 0x00eab17d, size: 238 bytes, params: 1, frame: 22
|
|
var moduleValue;
|
|
var makeShareableCloneRecursive;
|
|
var __init_194762;
|
|
const value2 = useState(_fun19472);
|
|
const property = Module00057(value2, 1)[0];
|
|
const property2 = Module00057(useState(_fun19473), 1)[0];
|
|
const value4 = useAnimatedRefBase(_fun19474);
|
|
const shareableMappingCache = (ShareableMappingModule).shareableMappingCache;
|
|
const get = shareableMappingCache.get;
|
|
if (!Reflect.apply(get, shareableMappingCache, [value4])) {
|
|
moduleValue = require(1640) /* metro dependency 1640 */;
|
|
makeShareableCloneRecursive = moduleValue.makeShareableCloneRecursive;
|
|
__init_194762 = __init_19476;
|
|
__init_194762.__closure = {tagOrWrapper: property2, viewName: property};
|
|
__init_194762.__workletHash = 5138727370224;
|
|
__init_194762.__initData = env0_6;
|
|
shareableMappingCache.set(value4, Reflect.apply(makeShareableCloneRecursive, moduleValue,
|
|
[{__init: __init_194762}]));
|
|
}
|
|
return value4;
|
|
function _fun19472() { // fn#19472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1891:1236, offset: 0x00eab26b, size: 84 bytes, params: 1, frame: 14
|
|
var r0;
|
|
let value = environment.__proto__;
|
|
const isFabric2 = (Module01613Module).isFabric();
|
|
const value2 = null;
|
|
if (isFabric2) {
|
|
r0 = value2;
|
|
} else if (env1_5) {
|
|
value = require(1647) /* metro dependency 1647 */;
|
|
value = value.makeMutable(value2);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun19473() { // fn#19473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1891:1327, offset: 0x00eab2bf, size: 40 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__;
|
|
return (MakeMutableModule).makeMutable(null);
|
|
}
|
|
|
|
function _fun19474(a0) { // fn#19474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1891:1408, offset: 0x00eab2e7, size: 163 bytes, params: 2, frame: 15
|
|
var uiViewClassName;
|
|
const value2 = undefined;
|
|
const r1 = Module01613Module.isFabric() ? (require(1638) /* metro dependency 1638 */).getShadowNodeWrapperFromRef : function(a0) {
|
|
return require(dependencyMap[3]).findNodeHandle(getComponentOrScrollable(a0));
|
|
};
|
|
let binding = env0_1;
|
|
binding.value = r1(a0);
|
|
if (env0_0) {
|
|
binding = env0_0;
|
|
uiViewClassName = a0 == null || a0.viewConfig == null ? value2 : a0.viewConfig.uiViewClassName;
|
|
uiViewClassName = !uiViewClassName ? 'RCTView' : uiViewClassName;
|
|
binding.value = uiViewClassName;
|
|
}
|
|
return env0_1.value;
|
|
}
|
|
|
|
function useAnimatedRefNative__init() { // fn#19476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1891:1766, owner: useAnimatedRefNative.__init, offset: 0x00eab3bc, size: 29 bytes, params: 1, frame: 3
|
|
const __initF2 = __initF;
|
|
if (env0_0) {
|
|
__initF2.viewName = env0_0;
|
|
}
|
|
return __initF2;
|
|
function __initF() { // fn#19477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1891:1806, owner: useAnimatedRefNative.__init.f, offset: 0x00eab3d9, size: 14 bytes, params: 1, frame: 1
|
|
return env1_1.value;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun19461, 1764, [57, 31, 1613, 1718, 1647, 1638, 1641,
|
|
1640]) /* metro module 1764, dependencies: [57, 31, 1613, 1718, 1647, 1638, 1641, 1640] */;
|