246 lines
6.6 KiB
JavaScript
246 lines
6.6 KiB
JavaScript
// Metro module 383 (f384).
|
|
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 AnimatedNode from "./AnimatedNode";
|
|
import Module357 from "./Module357";
|
|
import AnimatedWithChildren from "./AnimatedWithChildren";
|
|
function $mk66453($env) {
|
|
return function(a0) {
|
|
const r0 = $env;
|
|
return r0[1].apply(r0[0], a0);
|
|
};
|
|
}
|
|
function $mk66454($env) {
|
|
return (a0) => {
|
|
const r13 = $env;
|
|
const r6 = {};
|
|
const r7 = $env.$parent;
|
|
for (const key in a0) {
|
|
const r16 = a0[key];
|
|
if (r16 instanceof (0, r7[0])(r7[1][6])) {
|
|
r6[key] = (0, r13[0])(r16);
|
|
} else if (Array.isArray(r16)) {
|
|
r6[key] = r16.map($mk101217(r13));
|
|
} else if (typeof r16 === "object") {
|
|
const r29 = {};
|
|
for (const key2 in r16) {
|
|
const r23 = r16[key2];
|
|
r29[key2] = r23 instanceof (0, r7[0])(r7[1][6]) ? (0, r13[0])(r23) : r23;
|
|
}
|
|
r6[key] = r29;
|
|
} else {
|
|
r6[key] = r16;
|
|
}
|
|
}
|
|
return r6;
|
|
};
|
|
}
|
|
function $mk101217($env) {
|
|
return (a0) => {
|
|
const r2 = $env.$parent;
|
|
return a0 instanceof (0, r2[0])(r2[1][6]) ? (0, $env[0])(a0) : a0;
|
|
};
|
|
}
|
|
let AnimatedTransform;
|
|
let env410 = {};
|
|
env410[6] = function _isNativeReflectConstruct() {
|
|
let c12295_0;
|
|
try {
|
|
c12295_0 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
} catch ($e) {}
|
|
const _isNativeReflectConstruct2 = function _isNativeReflectConstruct() {
|
|
return !!c12295_0;
|
|
};
|
|
env410[6] = _isNativeReflectConstruct2;
|
|
return _isNativeReflectConstruct2();
|
|
};
|
|
AnimatedTransform = function AnimatedTransform(a0, a1, a2) {
|
|
_classCallCheck(this, AnimatedTransform);
|
|
const r8 = [a2];
|
|
const r7 = _getPrototypeOf(AnimatedTransform);
|
|
const r23 = _possibleConstructorReturn(this, (0, env410[6])() ? Reflect.construct(r7, r8, _getPrototypeOf(this).constructor) : r7.apply(this, r8));
|
|
r23._nodes = a0;
|
|
r23._transforms = a1;
|
|
return r23;
|
|
};
|
|
_inherits(AnimatedTransform, AnimatedWithChildren);
|
|
export default _createClass(AnimatedTransform, [{
|
|
key: "__makeNative",
|
|
value: function __makeNative(a0) {
|
|
const _nodes = this._nodes;
|
|
const length = _nodes.length;
|
|
let r0 = 0;
|
|
while (r0 < length) {
|
|
_nodes[r0].__makeNative(a0);
|
|
r0 = r0 + 1;
|
|
}
|
|
let env23750;
|
|
const r14 = env23750 = {};
|
|
env23750[0] = this;
|
|
let r21 = _get(_getPrototypeOf(AnimatedTransform.prototype), "__makeNative", this);
|
|
env23750[1] = r21;
|
|
if (typeof r21 === "function") {
|
|
r21 = $mk66453(r14);
|
|
}
|
|
r21([a0]);
|
|
}
|
|
}, {
|
|
key: "__getValue",
|
|
value: function __getValue() {
|
|
let env23751;
|
|
const _transforms = this._transforms;
|
|
const r4 = env23751 = {
|
|
$parent: env410
|
|
};
|
|
env23751[0] = (a0) => a0.__getValue();
|
|
return _transforms.map($mk66454(r4));
|
|
}
|
|
}, {
|
|
key: "__getValueWithStaticTransforms",
|
|
value: function __getValueWithStaticTransforms(a0) {
|
|
let env23753;
|
|
let env23754;
|
|
let c23752_0 = [];
|
|
const _transforms = this._transforms;
|
|
const r6 = env23753 = {
|
|
$parent: env410
|
|
};
|
|
env23753[0] = (a0) => {
|
|
c23752_0.push(a0.__getValue());
|
|
};
|
|
_transforms.map($mk66454(r6));
|
|
const r10 = env23754 = {
|
|
$parent: env410
|
|
};
|
|
env23754[0] = () => c23752_0.shift();
|
|
return a0.map($mk66454(r10));
|
|
}
|
|
}, {
|
|
key: "__getAnimatedValue",
|
|
value: function __getAnimatedValue() {
|
|
let env23755;
|
|
const _transforms = this._transforms;
|
|
const r4 = env23755 = {
|
|
$parent: env410
|
|
};
|
|
env23755[0] = (a0) => a0.__getAnimatedValue();
|
|
return _transforms.map($mk66454(r4));
|
|
}
|
|
}, {
|
|
key: "__attach",
|
|
value: function __attach() {
|
|
const _nodes = this._nodes;
|
|
const length = _nodes.length;
|
|
let r0 = 0;
|
|
while (r0 < length) {
|
|
_nodes[r0].__addChild(this);
|
|
r0 = r0 + 1;
|
|
}
|
|
let env23756;
|
|
const r13 = env23756 = {};
|
|
env23756[0] = this;
|
|
let r20 = _get(_getPrototypeOf(AnimatedTransform.prototype), "__attach", this);
|
|
env23756[1] = r20;
|
|
if (typeof r20 === "function") {
|
|
r20 = $mk66453(r13);
|
|
}
|
|
r20([]);
|
|
}
|
|
}, {
|
|
key: "__detach",
|
|
value: function __detach() {
|
|
const _nodes = this._nodes;
|
|
const length = _nodes.length;
|
|
let r0 = 0;
|
|
while (r0 < length) {
|
|
_nodes[r0].__removeChild(this);
|
|
r0 = r0 + 1;
|
|
}
|
|
let env23757;
|
|
const r13 = env23757 = {};
|
|
env23757[0] = this;
|
|
let r20 = _get(_getPrototypeOf(AnimatedTransform.prototype), "__detach", this);
|
|
env23757[1] = r20;
|
|
if (typeof r20 === "function") {
|
|
r20 = $mk66453(r13);
|
|
}
|
|
r20([]);
|
|
}
|
|
}, {
|
|
key: "__getNativeConfig",
|
|
value: function __getNativeConfig() {
|
|
const transforms = [];
|
|
const _transforms = this._transforms;
|
|
const length = _transforms.length;
|
|
let r0 = 0;
|
|
while (r0 < length) {
|
|
const r15 = _transforms[r0];
|
|
const r1 = r0;
|
|
for (const key in r15) {
|
|
const property = key;
|
|
const r19 = r15[property];
|
|
if (r19 instanceof AnimatedNode) {
|
|
transforms.push({
|
|
type: "animated",
|
|
property,
|
|
nodeTag: r19.__getNativeTag()
|
|
});
|
|
} else {
|
|
transforms.push({
|
|
type: "static",
|
|
property,
|
|
value: Module357.transformDataType(r19)
|
|
});
|
|
}
|
|
}
|
|
r0 = r1 + 1;
|
|
}
|
|
return {
|
|
type: "transform",
|
|
transforms,
|
|
debugID: this.__getDebugID()
|
|
};
|
|
}
|
|
}], [{
|
|
key: "from",
|
|
value: function from(a0) {
|
|
const r10 = Array.isArray(a0) ? a0 : [];
|
|
const _nodes = [];
|
|
const length = r10.length;
|
|
const r7 = 0 < length;
|
|
let r0 = 0;
|
|
if (r7) {
|
|
do {
|
|
const r17 = r10[r0];
|
|
const r1 = r0;
|
|
for (const key in r17) {
|
|
const r19 = r17[key];
|
|
if (r19 instanceof AnimatedNode) {
|
|
_nodes.push(r19);
|
|
}
|
|
}
|
|
r0 = r1 + 1;
|
|
} while (r0 < length);
|
|
}
|
|
const length2 = _nodes.length;
|
|
let r31 = null;
|
|
if (length2 !== 0) {
|
|
const r35 = {
|
|
__proto__: AnimatedTransform.prototype
|
|
};
|
|
_classCallCheck(r35, AnimatedTransform);
|
|
const r38 = [void 0];
|
|
const r40 = _getPrototypeOf(AnimatedTransform);
|
|
const r50 = _possibleConstructorReturn(r35, (0, env410[6])() ? Reflect.construct(r40, r38, _getPrototypeOf(r35).constructor) : r40.apply(r35, r38));
|
|
r50._nodes = _nodes;
|
|
r50._transforms = a0;
|
|
r31 = r50 instanceof Object ? r50 : r35;
|
|
}
|
|
return r31;
|
|
}
|
|
}]);
|