148 lines
7.8 KiB
TypeScript
148 lines
7.8 KiB
TypeScript
/* Metro module 12362; source: components_native/common/SequencedLottieAnimationView.tsx; dependencies: [29, 6, 7, 15, 17, 18, 31, 27, 33, 6761, 2] */
|
|
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import ObjectWithoutProperties from '../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
|
|
import Module06761 from '../../by-id/module-06761.js'; /* Metro dependency 6761 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
|
|
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});
|
|
let value = ReactModule;
|
|
const PureComponent = value.PureComponent;
|
|
value = _fun94258(PureComponent);
|
|
value.defaultProps = {autoPlay: true};
|
|
(FileImportTrackerModule).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 SequencedLottieAnimationView2 = SequencedLottieAnimationView;
|
|
Inherits(SequencedLottieAnimationView2, a0);
|
|
return CreateClass(SequencedLottieAnimationView2, [{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 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;
|
|
}
|
|
|
|
}
|
|
|
|
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}} />)(Module06761)}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
global.__d(_fun94254, 12362, [29, 6, 7, 15, 17, 18, 31, 27, 33, 6761,
|
|
2]) /* metro module 12362, dependencies: [29, 6, 7, 15, 17, 18, 31, 27, 33, 6761, 2] */;
|