114 lines
3.3 KiB
JavaScript
114 lines
3.3 KiB
JavaScript
// Metro module 372 (f373).
|
|
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 mapStringToNumericComponents from "./mapStringToNumericComponents";
|
|
import AnimatedWithChildren from "./AnimatedWithChildren";
|
|
function $mk66339($env) {
|
|
return function(a0) {
|
|
const r0 = $env;
|
|
return r0[1].apply(r0[0], a0);
|
|
};
|
|
}
|
|
let AnimatedDiffClamp;
|
|
let env392 = {};
|
|
env392[6] = function _isNativeReflectConstruct() {
|
|
let c12286_0;
|
|
try {
|
|
c12286_0 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
} catch ($e) {}
|
|
const _isNativeReflectConstruct2 = function _isNativeReflectConstruct() {
|
|
return !!c12286_0;
|
|
};
|
|
env392[6] = _isNativeReflectConstruct2;
|
|
return _isNativeReflectConstruct2();
|
|
};
|
|
AnimatedDiffClamp = function AnimatedDiffClamp(a0, a1, a2, a3) {
|
|
_classCallCheck(this, AnimatedDiffClamp);
|
|
const r8 = [a3];
|
|
const r7 = _getPrototypeOf(AnimatedDiffClamp);
|
|
const r24 = _possibleConstructorReturn(this, (0, env392[6])() ? Reflect.construct(r7, r8, _getPrototypeOf(this).constructor) : r7.apply(this, r8));
|
|
r24._a = a0;
|
|
r24._min = a1;
|
|
r24._max = a2;
|
|
const _lastValue = r24._a.__getValue();
|
|
r24._lastValue = _lastValue;
|
|
r24._value = _lastValue;
|
|
return r24;
|
|
};
|
|
_inherits(AnimatedDiffClamp, AnimatedWithChildren);
|
|
export default _createClass(AnimatedDiffClamp, [{
|
|
key: "__makeNative",
|
|
value: function __makeNative(a0) {
|
|
let env23721;
|
|
this._a.__makeNative(a0);
|
|
const r10 = env23721 = {};
|
|
env23721[0] = this;
|
|
env23721[1] = void 0;
|
|
let r15 = _get(_getPrototypeOf(AnimatedDiffClamp.prototype), "__makeNative", this);
|
|
env23721[1] = r15;
|
|
if (typeof r15 === "function") {
|
|
r15 = $mk66339(r10);
|
|
}
|
|
r15([a0]);
|
|
}
|
|
}, {
|
|
key: "interpolate",
|
|
value: function interpolate(a0) {
|
|
return new mapStringToNumericComponents(this, a0);
|
|
}
|
|
}, {
|
|
key: "__getValue",
|
|
value: function __getValue() {
|
|
const _lastValue = this._a.__getValue();
|
|
const r9 = _lastValue - this._lastValue;
|
|
this._lastValue = _lastValue;
|
|
this._value = Math.min(Math.max(this._value + r9, this._min), this._max);
|
|
return this._value;
|
|
}
|
|
}, {
|
|
key: "__attach",
|
|
value: function __attach() {
|
|
let env23722;
|
|
this._a.__addChild(this);
|
|
const r9 = env23722 = {};
|
|
env23722[0] = this;
|
|
env23722[1] = void 0;
|
|
let r14 = _get(_getPrototypeOf(AnimatedDiffClamp.prototype), "__attach", this);
|
|
env23722[1] = r14;
|
|
if (typeof r14 === "function") {
|
|
r14 = $mk66339(r9);
|
|
}
|
|
r14([]);
|
|
}
|
|
}, {
|
|
key: "__detach",
|
|
value: function __detach() {
|
|
let env23723;
|
|
this._a.__removeChild(this);
|
|
const r9 = env23723 = {};
|
|
env23723[0] = this;
|
|
env23723[1] = void 0;
|
|
let r14 = _get(_getPrototypeOf(AnimatedDiffClamp.prototype), "__detach", this);
|
|
env23723[1] = r14;
|
|
if (typeof r14 === "function") {
|
|
r14 = $mk66339(r9);
|
|
}
|
|
r14([]);
|
|
}
|
|
}, {
|
|
key: "__getNativeConfig",
|
|
value: function __getNativeConfig() {
|
|
return {
|
|
type: "diffclamp",
|
|
input: this._a.__getNativeTag(),
|
|
min: this._min,
|
|
max: this._max,
|
|
debugID: this.__getDebugID()
|
|
};
|
|
}
|
|
}]);
|