153 lines
3.8 KiB
JavaScript
153 lines
3.8 KiB
JavaScript
// Metro module 1677 (f1678).
|
|
import _classCallCheck from "./_classCallCheck";
|
|
import _createClass from "./_createClass";
|
|
import { ReduceMotion } from "./Module1631";
|
|
import { ReanimatedError } from "./Module1617";
|
|
import * as _Module1678 from "./Module1678";
|
|
import * as _recognizePrefixSuffix from "./recognizePrefixSuffix";
|
|
let env1321 = {};
|
|
const c1321_3 = {
|
|
code: "function pnpm_BaseAnimationBuilderTs1(delay,animation){const{withDelay,reduceMotion}=this.__closure;return withDelay(delay,animation,reduceMotion);}"
|
|
};
|
|
const c1321_4 = {
|
|
code: "function pnpm_BaseAnimationBuilderTs2(_,animation){const{getReduceMotionFromConfig,reduceMotion}=this.__closure;animation.reduceMotion=getReduceMotionFromConfig(reduceMotion);return animation;}"
|
|
};
|
|
const BaseAnimationBuilder = function BaseAnimationBuilder() {
|
|
_classCallCheck(this, BaseAnimationBuilder);
|
|
this.reduceMotionV = ReduceMotion.System;
|
|
this.randomizeDelay = false;
|
|
this.build = () => {
|
|
throw new ReanimatedError("Unimplemented method in child class.");
|
|
};
|
|
};
|
|
exports.BaseAnimationBuilder = _createClass(BaseAnimationBuilder, [{
|
|
key: "duration",
|
|
value: function duration(a0) {
|
|
this.durationV = a0;
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "delay",
|
|
value: function delay(a0) {
|
|
this.delayV = a0;
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "withCallback",
|
|
value: function withCallback(a0) {
|
|
this.callbackV = a0;
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "reduceMotion",
|
|
value: function reduceMotion(a0) {
|
|
this.reduceMotionV = a0;
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "getDuration",
|
|
value: function getDuration() {
|
|
let durationV = this.durationV;
|
|
if (durationV == null) {
|
|
durationV = 300;
|
|
}
|
|
return durationV;
|
|
}
|
|
}, {
|
|
key: "randomDelay",
|
|
value: function randomDelay() {
|
|
this.randomizeDelay = true;
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "getDelay",
|
|
value: function getDelay() {
|
|
let r6;
|
|
if (this.randomizeDelay) {
|
|
const r8 = Math.random();
|
|
let delayV = this.delayV;
|
|
if (delayV == null) {
|
|
delayV = 1000;
|
|
}
|
|
r6 = r8 * delayV;
|
|
} else {
|
|
r6 = this.delayV;
|
|
if (r6 == null) {
|
|
r6 = 0;
|
|
}
|
|
}
|
|
return r6;
|
|
}
|
|
}, {
|
|
key: "getReduceMotion",
|
|
value: function getReduceMotion() {
|
|
return this.reduceMotionV;
|
|
}
|
|
}, {
|
|
key: "getDelayFunction",
|
|
value: function getDelayFunction() {
|
|
let r10;
|
|
const r2 = this.randomizeDelay || this.delayV;
|
|
const reduceMotion2 = this.getReduceMotion();
|
|
if (r2) {
|
|
const n = function n(a0, a1) {
|
|
return _Module1678.withDelay(a0, a1, reduceMotion2);
|
|
};
|
|
n.__closure = {
|
|
withDelay: _Module1678.withDelay,
|
|
reduceMotion: reduceMotion2
|
|
};
|
|
n.__workletHash = 15544853359686;
|
|
n.__initData = c1321_3;
|
|
r10 = n;
|
|
} else {
|
|
r10 = function t(a0, a1) {
|
|
a1.reduceMotion = _recognizePrefixSuffix.getReduceMotionFromConfig(reduceMotion2);
|
|
return a1;
|
|
};
|
|
r10.__closure = {
|
|
getReduceMotionFromConfig: _recognizePrefixSuffix.getReduceMotionFromConfig,
|
|
reduceMotion: reduceMotion2
|
|
};
|
|
r10.__workletHash = 8417033392474;
|
|
r10.__initData = c1321_4;
|
|
}
|
|
return r10;
|
|
}
|
|
}], [{
|
|
key: "duration",
|
|
value: function duration(a0) {
|
|
return this.createInstance().duration(a0);
|
|
}
|
|
}, {
|
|
key: "delay",
|
|
value: function delay(a0) {
|
|
return this.createInstance().delay(a0);
|
|
}
|
|
}, {
|
|
key: "withCallback",
|
|
value: function withCallback(a0) {
|
|
return this.createInstance().withCallback(a0);
|
|
}
|
|
}, {
|
|
key: "reduceMotion",
|
|
value: function reduceMotion(a0) {
|
|
return this.createInstance().reduceMotion(a0);
|
|
}
|
|
}, {
|
|
key: "getDuration",
|
|
value: function getDuration() {
|
|
return 300;
|
|
}
|
|
}, {
|
|
key: "randomDelay",
|
|
value: function randomDelay() {
|
|
return this.createInstance().randomDelay();
|
|
}
|
|
}, {
|
|
key: "build",
|
|
value: function build() {
|
|
return this.createInstance().build();
|
|
}
|
|
}]);
|