123 lines
3.6 KiB
JavaScript
123 lines
3.6 KiB
JavaScript
// Metro module 375 (f376).
|
|
import _classCallCheck from "./_classCallCheck";
|
|
import _createClass from "./_createClass";
|
|
import _possibleConstructorReturn from "./_possibleConstructorReturn";
|
|
import _getPrototypeOf from "./_getPrototypeOf";
|
|
import _get from "./_get";
|
|
import _inherits from "./_inherits";
|
|
import Module357 from "./Module357";
|
|
import AnimatedNode from "./AnimatedNode";
|
|
function $mk66385($env) {
|
|
return function(a0) {
|
|
const r0 = $env;
|
|
return r0[1].apply(r0[0], a0);
|
|
};
|
|
}
|
|
let AnimatedTracking;
|
|
let env398 = {};
|
|
env398[6] = function _isNativeReflectConstruct() {
|
|
let c12289_0;
|
|
try {
|
|
c12289_0 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
} catch ($e) {}
|
|
const _isNativeReflectConstruct2 = function _isNativeReflectConstruct() {
|
|
return !!c12289_0;
|
|
};
|
|
env398[6] = _isNativeReflectConstruct2;
|
|
return _isNativeReflectConstruct2();
|
|
};
|
|
AnimatedTracking = function AnimatedTracking(a0, a1, a2, a3, a4, a5) {
|
|
_classCallCheck(this, AnimatedTracking);
|
|
const r7 = [a5];
|
|
const r6 = _getPrototypeOf(AnimatedTracking);
|
|
const r26 = _possibleConstructorReturn(this, (0, env398[6])() ? Reflect.construct(r6, r7, _getPrototypeOf(this).constructor) : r6.apply(this, r7));
|
|
r26._value = a0;
|
|
r26._parent = a1;
|
|
r26._animationClass = a2;
|
|
r26._animationConfig = a3;
|
|
r26._useNativeDriver = Module357.shouldUseNativeDriver(a3);
|
|
r26._callback = a4;
|
|
r26.__attach();
|
|
return r26;
|
|
};
|
|
_inherits(AnimatedTracking, AnimatedNode);
|
|
export default _createClass(AnimatedTracking, [{
|
|
key: "__makeNative",
|
|
value: function __makeNative(a0) {
|
|
let env23733;
|
|
this.__isNative = true;
|
|
this._parent.__makeNative(a0);
|
|
const r10 = env23733 = {};
|
|
env23733[0] = this;
|
|
env23733[1] = void 0;
|
|
let r16 = _get(_getPrototypeOf(AnimatedTracking.prototype), "__makeNative", this);
|
|
env23733[1] = r16;
|
|
if (typeof r16 === "function") {
|
|
r16 = $mk66385(r10);
|
|
}
|
|
r16([a0]);
|
|
this._value.__makeNative(a0);
|
|
}
|
|
}, {
|
|
key: "__getValue",
|
|
value: function __getValue() {
|
|
return this._parent.__getValue();
|
|
}
|
|
}, {
|
|
key: "__attach",
|
|
value: function __attach() {
|
|
this._parent.__addChild(this);
|
|
if (this._useNativeDriver) {
|
|
this.__makeNative(this._animationConfig.platformConfig);
|
|
}
|
|
let env23734;
|
|
const r14 = env23734 = {};
|
|
env23734[0] = this;
|
|
let r19 = _get(_getPrototypeOf(AnimatedTracking.prototype), "__attach", this);
|
|
env23734[1] = r19;
|
|
if (typeof r19 === "function") {
|
|
r19 = $mk66385(r14);
|
|
}
|
|
r19([]);
|
|
}
|
|
}, {
|
|
key: "__detach",
|
|
value: function __detach() {
|
|
let env23735;
|
|
this._parent.__removeChild(this);
|
|
const r9 = env23735 = {};
|
|
env23735[0] = this;
|
|
env23735[1] = void 0;
|
|
let r14 = _get(_getPrototypeOf(AnimatedTracking.prototype), "__detach", this);
|
|
env23735[1] = r14;
|
|
if (typeof r14 === "function") {
|
|
r14 = $mk66385(r9);
|
|
}
|
|
r14([]);
|
|
}
|
|
}, {
|
|
key: "update",
|
|
value: function update() {
|
|
this._value.animate(new this._animationClass({
|
|
...this._animationConfig,
|
|
toValue: this._animationConfig.toValue.__getValue()
|
|
}), this._callback);
|
|
}
|
|
}, {
|
|
key: "__getNativeConfig",
|
|
value: function __getNativeConfig() {
|
|
const animationConfig = new this._animationClass({
|
|
...this._animationConfig,
|
|
toValue: void 0
|
|
}).__getNativeAnimationConfig();
|
|
return {
|
|
type: "tracking",
|
|
animationId: Module357.generateNewAnimationId(),
|
|
animationConfig,
|
|
toValue: this._parent.__getNativeTag(),
|
|
value: this._value.__getNativeTag(),
|
|
debugID: this.__getDebugID()
|
|
};
|
|
}
|
|
}]);
|