113 lines
5.2 KiB
JavaScript
113 lines
5.2 KiB
JavaScript
/* Metro module 3918; source: unknown; dependencies: [57, 31, 3907] */
|
|
import Module00057 from './module-00057.js'; /* Metro dependency 57 */
|
|
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as CModule from './module-03907-c.js'; /* Metro dependency 3907 */
|
|
|
|
function _fun32195(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#32195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4067:6, offset: 0x0100e62b, size: 119 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule.useCallback;
|
|
exports.useRive = useRive;
|
|
function useRive() { // fn#32196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4067:166, offset: 0x0100e6a2, size: 248 bytes, params: 1, frame: 21
|
|
var r7;
|
|
var r5;
|
|
var r0;
|
|
var useRiveT02;
|
|
var object;
|
|
const value2 = (CModule).c(4);
|
|
const value3 = useRef(null);
|
|
const value = env0_2(useState(null), 2);
|
|
const property = value[0];
|
|
const env0_1 = value[1];
|
|
var env0_2 = useRef(null);
|
|
const property2 = value2[0];
|
|
let Symbol = global.Symbol;
|
|
if (property2 === Symbol.for('react.memo_cache_sentinel')) {
|
|
useRiveT02 = useRiveT0;
|
|
value2[0] = useRiveT02;
|
|
r7 = useRiveT02;
|
|
} else {
|
|
r7 = value2[0];
|
|
}
|
|
const property4 = value2[1];
|
|
Symbol = global.Symbol;
|
|
if (property4 === Symbol.for('react.memo_cache_sentinel')) {
|
|
object = {f: r7};
|
|
value2[1] = object;
|
|
r5 = object;
|
|
} else {
|
|
r5 = value2[1];
|
|
}
|
|
if (value2[2] !== property) {
|
|
object = {riveRef: value3, riveViewRef: property, setHybridRef: r5};
|
|
value2[2] = property;
|
|
value2[3] = object;
|
|
r0 = object;
|
|
} else {
|
|
r0 = value2[3];
|
|
}
|
|
return r0;
|
|
function useRiveT0(a0) { // fn#32197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4067:309, owner: useRive.t0, offset: 0x0100e79a, size: 210 bytes, params: 2, frame: 15
|
|
var Promise;
|
|
var promise;
|
|
const env0_0 = a0;
|
|
if (env0_0.current !== a0) {
|
|
env0_0.current = a0;
|
|
if (env0_2.current) {
|
|
global.clearTimeout(env0_2.current);
|
|
}
|
|
Promise = global.Promise;
|
|
promise = new Promise(_fun32198);
|
|
Promise = global.Promise;
|
|
promise = Promise.race([a0?.awaitViewReady(), promise]);
|
|
promise = promise.then(_fun32200);
|
|
promise = promise.catch(_fun32201);
|
|
promise.finally(_fun32202);
|
|
}
|
|
function _fun32198(a0, a1) { // fn#32198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4067:408, offset: 0x0100e86c, size: 51 bytes, params: 3, frame: 14
|
|
const env0_0 = a1;
|
|
env1_2.current = global.setTimeout(_fun32199, 5000);
|
|
function _fun32199() { // fn#32199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4067:444, offset: 0x0100e89f, size: 50 bytes, params: 1, frame: 12
|
|
const Error = global.Error;
|
|
require(new Error('Rive view ready timeout'));
|
|
}
|
|
|
|
}
|
|
|
|
function _fun32200(a0) { // fn#32200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4067:563, offset: 0x0100e8d1, size: 76 bytes, params: 2, frame: 11
|
|
var value;
|
|
if (a0 === true) {
|
|
value = environment.__proto__;
|
|
env1_1(env0_0);
|
|
} else {
|
|
global.console.warn('Rive view ready check returned false');
|
|
value = environment.__proto__;
|
|
env1_1(null);
|
|
}
|
|
}
|
|
|
|
function _fun32201(a0) { // fn#32201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4067:660, offset: 0x0100e91d, size: 46 bytes, params: 2, frame: 13
|
|
global.console.warn('Failed to initialize Rive view:', a0);
|
|
env1_1(null);
|
|
}
|
|
|
|
function _fun32202() { // fn#32202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4067:742, offset: 0x0100e94b, size: 51 bytes, params: 1, frame: 12
|
|
var clearTimeout;
|
|
var binding;
|
|
if (env1_2.current) {
|
|
clearTimeout = global.clearTimeout;
|
|
binding = env1_2;
|
|
clearTimeout(binding.current);
|
|
binding.current = null;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun32195, 3918, [57, 31, 3907]) /* metro module 3918, dependencies: [57, 31, 3907] */;
|