Files
discord-decomp/sources/components_native/common/SequencedLottieAnimationView.tsx
T
2026-07-27 16:20:00 +03:00

142 lines
6.4 KiB
TypeScript

/* Metro module 12362; source: components_native/common/SequencedLottieAnimationView.tsx; dependencies: [29, 6, 7, 15, 17, 18, 31, 27, 33, 6761, 2] */
function _fun94254(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:6, offset: 0x020f281a, size: 300 bytes, params: 8, frame: 20
const env0_2 = ['source', 'style'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(29) /* metro dependency 29 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const env0_6 = importDefault(15) /* metro dependency 15 */;
const env0_7 = importDefault(17) /* metro dependency 17 */;
const env0_8 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_9 = (require(27) /* metro dependency 27 */).View;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
const PureComponent = value.PureComponent;
value = _fun94258(PureComponent);
value.defaultProps = {autoPlay: true};
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/SequencedLottieAnimationView.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_94255() { // fn#94255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:222, offset: 0x020f2946, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_94255_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun94258(a0) { // fn#94258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:421, offset: 0x020f29a8, size: 147 bytes, params: 2, frame: 16
const closure = SequencedLottieAnimationView;
env0_8(closure, a0);
return env0_5(closure, [{key: 'componentDidMount', value: function() {
this.playScene(this.props.nextScene);
}}, {key: 'componentDidUpdate', value: function() {
var nextScene = this.props.nextScene;
if (nextScene !== this.currentScene) {
this.playScene(nextScene);
}
}}, {key: 'playScene', value: value_94264}, {key: 'render', value: value_94265}]);
}
function SequencedLottieAnimationView(a0) { // fn#94259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:433, offset: 0x020f2a3b, size: 193 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, SequencedLottieAnimationView);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(SequencedLottieAnimationView);
binding = env1_6;
if (_isNativeReflectConstruct_94255()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.animationRef = null;
value.currentScene = value.props.nextScene;
value.isUnmounted = false;
value.handleComplete = handleComplete_94260;
value.handleSetRef = handleSetRef;
return value;
}
function value_94264(a0) { // fn#94264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:1190, offset: 0x020f2b81, size: 140 bytes, params: 2, frame: 17
var r4;
var r3;
const sceneSegments = this.props.sceneSegments;
const property = sceneSegments[a0];
const property2 = sceneSegments[this.currentScene];
let animationRef = this.animationRef;
const value = animationRef == null;
if (value) {
r3 = value;
} else {
r4 = a0 !== this.currentScene && property.BEG === property2.BEG;
r4 = r4 && property.END === property2.END;
r3 = r4;
}
if (!r3) {
animationRef = this.animationRef;
animationRef.play(property.BEG, property.END);
}
this.currentScene = a0;
}
function value_94265() { // fn#94265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:1419, offset: 0x020f2c0d, size: 235 bytes, params: 1, frame: 21
const props = this.props;
const source = props.source;
const style = props.style;
const value = environment.__proto__;
const binding = env1_3;
const value2 = undefined;
const value3 = binding(props, env1_2);
const r10 = value2 === (typeof source !== 'object' || source.uri ? value2 : global.JSON.stringify(source)) ? value2 : {aspectRatio: source.w / source.h};
return (
<View style={[r10, style]}>
{((Component) => <Component source={source} style={[r10,
style]} {...value3} {...{['ref']: this.handleSetRef}} {...{['onAnimationFinish']: this.handleComplete}} />)(importDefault(6761) /* metro dependency 6761 */)}
</View>
);
}
function SequencedLottieAnimationViewHandleComplete() { // fn#94260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:790, owner: SequencedLottieAnimationView.handleComplete, offset: 0x020f2afc, size: 45 bytes, params: 1, frame: 11
const onSceneComplete = env0_0.props.onSceneComplete;
if (onSceneComplete != null) {
onSceneComplete(env0_0.currentScene);
}
}
function handleSetRef(a0) { // fn#94261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12548:868, owner: SequencedLottieAnimationView.handleSetRef, offset: 0x020f2b29, size: 20 bytes, params: 2, frame: 2
env0_0.animationRef = a0;
}