decord/source/367__assertNativeAnimatedModule.js

207 lines
5.1 KiB
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 367
// Function ID: 368
2026-07-20 16:05:17 +00:00
// Name: _assertNativeAnimatedModule
2026-07-29 08:29:29 +00:00
// Dependencies: [41, 42, 357, 38]
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
// Module 367 (_assertNativeAnimatedModule)
2026-07-23 10:11:24 +00:00
import _classCallCheck from "_classCallCheck";
2026-07-29 08:29:29 +00:00
import _createClass from "_createClass";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
const AnimatedNode = importDefault;
let c3 = 1;
2026-07-20 16:05:17 +00:00
function _assertNativeAnimatedModule() {
2026-07-29 08:29:29 +00:00
const result = AnimatedNode(357).assertNativeAnimatedModule();
let c4 = null;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
class AnimatedNode {
constructor(arg0) {
tmp = outer1_2(this, AnimatedNode);
this._platformConfig = undefined;
this.__isNative = false;
this.__nativeTag = undefined;
this.__disableBatchingForNativeCreate = undefined;
this.__debugID = undefined;
map = new Map();
this._listeners = map;
prop = undefined;
if (global != null) {
prop = global.unstable_disableBatchingForNativeCreate;
}
this.__disableBatchingForNativeCreate = prop;
return;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
const items = [
{
2026-07-20 16:05:17 +00:00
key: "__attach",
value: function __attach() {
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "__detach",
value: function __detach() {
const self = this;
this.removeAllListeners();
let __isNative = this.__isNative;
if (__isNative) {
__isNative = null != self.__nativeTag;
}
if (__isNative) {
2026-07-29 08:29:29 +00:00
const API = AnimatedNode(357).API;
2026-07-20 16:05:17 +00:00
API.dropAnimatedNode(self.__nativeTag);
self.__nativeTag = undefined;
}
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "__getValue",
value: function __getValue() {
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "__getAnimatedValue",
value: function __getAnimatedValue() {
return this.__getValue();
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "__addChild",
value: function __addChild(arg0) {
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "__removeChild",
value: function __removeChild(arg0) {
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "__getChildren",
value: function __getChildren() {
return [];
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "__makeNative",
value: function __makeNative(_platformConfig) {
2026-07-29 08:29:29 +00:00
AnimatedNode(38)(this.__isNative, "This node cannot be made a \"native\" animated node");
2026-07-20 16:05:17 +00:00
this._platformConfig = _platformConfig;
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "addListener",
value: function addListener(arg0) {
2026-07-29 08:29:29 +00:00
let closure_3 = tmp + 1;
const StringResult = String(+closure_3);
const _listeners = this._listeners;
const result = _listeners.set(StringResult, arg0);
2026-07-20 16:05:17 +00:00
return StringResult;
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "removeListener",
value: function removeListener(arg0) {
2026-07-29 08:29:29 +00:00
const _listeners = this._listeners;
_listeners.delete(arg0);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "removeAllListeners",
value: function removeAllListeners() {
2026-07-29 08:29:29 +00:00
const _listeners = this._listeners;
_listeners.clear();
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "hasListeners",
value: function hasListeners(progress) {
2026-07-29 08:29:29 +00:00
return this._listeners.size > 0;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "__onAnimatedValueUpdateReceived",
value: function __onAnimatedValueUpdateReceived(arg0, arg1) {
this.__callListeners(arg0 + arg1);
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "__callListeners",
value: function __callListeners(value) {
2026-07-23 10:11:24 +00:00
const obj = { value };
2026-07-29 08:29:29 +00:00
const _listeners = this._listeners;
const item = _listeners.forEach((arg0) => {
2026-07-20 16:05:17 +00:00
arg0(obj);
});
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "__getNativeTag",
value: function __getNativeTag() {
const self = this;
let __nativeTag = this.__nativeTag;
if (null == __nativeTag) {
2026-07-29 08:29:29 +00:00
if (c4 != null) {
2026-08-04 21:03:28 +00:00
if (typeof c4 !== "function") {
2026-07-29 08:29:29 +00:00
HermesBuiltin.throwTypeError();
}
const result = AnimatedNode(357).assertNativeAnimatedModule();
c4 = null;
const obj = AnimatedNode(357);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
AnimatedNode(38)(self.__isNative, "Attempt to get native tag from node not marked as \"native\"");
const newNodeTag = AnimatedNode(357).generateNewNodeTag();
2026-07-20 16:05:17 +00:00
self.__nativeTag = newNodeTag;
const __getNativeConfigResult = self.__getNativeConfig();
if (self._platformConfig) {
__getNativeConfigResult.platformConfig = self._platformConfig;
}
2026-07-29 08:29:29 +00:00
if (self.__disableBatchingForNativeCreate) {
__getNativeConfigResult.disableBatchingForNativeCreate = true;
}
const API = AnimatedNode(357).API;
2026-07-20 16:05:17 +00:00
const animatedNode = API.createAnimatedNode(newNodeTag, __getNativeConfigResult);
__nativeTag = newNodeTag;
2026-07-29 08:29:29 +00:00
const obj2 = AnimatedNode(357);
const tmp4 = AnimatedNode;
2026-07-20 16:05:17 +00:00
}
return __nativeTag;
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "__getNativeConfig",
value: function __getNativeConfig() {
const error = new Error("This JS animated node type cannot be used as native animated node");
throw error;
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "__getPlatformConfig",
value: function __getPlatformConfig() {
return this._platformConfig;
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "__setPlatformConfig",
value: function __setPlatformConfig(_platformConfig) {
this._platformConfig = _platformConfig;
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "toJSON",
value: function toJSON() {
return this.__getValue();
}
2026-07-29 08:29:29 +00:00
},
{
2026-07-20 16:05:17 +00:00
key: "__getDebugID",
value: function __getDebugID() {
}
2026-07-29 08:29:29 +00:00
}
];
export default _createClass(AnimatedNode, items);