You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
8.5 KiB

{"ast":null,"code":"'use strict';\n\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _get from \"@babel/runtime/helpers/get\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport AnimatedValue from \"./AnimatedValue\";\nimport AnimatedNode from \"./AnimatedNode\";\nimport { generateNewAnimationId, shouldUseNativeDriver } from \"../NativeAnimatedHelper\";\nvar AnimatedTracking = function (_AnimatedNode) {\n _inherits(AnimatedTracking, _AnimatedNode);\n var _super = _createSuper(AnimatedTracking);\n function AnimatedTracking(value, parent, animationClass, animationConfig, callback) {\n var _this;\n _classCallCheck(this, AnimatedTracking);\n _this = _super.call(this);\n _this._value = value;\n _this._parent = parent;\n _this._animationClass = animationClass;\n _this._animationConfig = animationConfig;\n _this._useNativeDriver = shouldUseNativeDriver(animationConfig);\n _this._callback = callback;\n _this.__attach();\n return _this;\n }\n _createClass(AnimatedTracking, [{\n key: \"__makeNative\",\n value: function __makeNative() {\n this.__isNative = true;\n this._parent.__makeNative();\n _get(_getPrototypeOf(AnimatedTracking.prototype), \"__makeNative\", this).call(this);\n this._value.__makeNative();\n }\n }, {\n key: \"__getValue\",\n value: function __getValue() {\n return this._parent.__getValue();\n }\n }, {\n key: \"__attach\",\n value: function __attach() {\n this._parent.__addChild(this);\n if (this._useNativeDriver) {\n this.__makeNative();\n }\n }\n }, {\n key: \"__detach\",\n value: function __detach() {\n this._parent.__removeChild(this);\n _get(_getPrototypeOf(AnimatedTracking.prototype), \"__detach\", this).call(this);\n }\n }, {\n key: \"update\",\n value: function update() {\n this._value.animate(new this._animationClass(_objectSpread(_objectSpread({}, this._animationConfig), {}, {\n toValue: this._animationConfig.toValue.__getValue()\n })), this._callback);\n }\n }, {\n key: \"__getNativeConfig\",\n value: function __getNativeConfig() {\n var animation = new this._animationClass(_objectSpread(_objectSpread({}, this._animationConfig), {}, {\n toValue: undefined\n }));\n var animationConfig = animation.__getNativeAnimationConfig();\n return {\n type: 'tracking',\n animationId: generateNewAnimationId(),\n animationConfig: animationConfig,\n toValue: this._parent.__getNativeTag(),\n value: this._value.__getNativeTag()\n };\n }\n }]);\n return AnimatedTracking;\n}(AnimatedNode);\nexport default AnimatedTracking;","map":{"version":3,"names":["_objectSpread","AnimatedValue","AnimatedNode","generateNewAnimationId","shouldUseNativeDriver","AnimatedTracking","value","parent","animationClass","animationConfig","callback","_value","_parent","_animationClass","_animationConfig","_useNativeDriver","_callback","__attach","__isNative","__makeNative","__getValue","__addChild","__removeChild","animate","toValue","animation","undefined","__getNativeAnimationConfig","type","animationId","__getNativeTag"],"sources":["/Users/mathildejean/Documents/BUT/LaSuperMeteo/LaSuperMeteo/iut-expo-starter/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedTracking.js"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedNode from './AnimatedNode';\nimport { generateNewAnimationId, shouldUseNativeDriver } from '../NativeAnimatedHelper';\n\nclass AnimatedTracking extends AnimatedNode {\n constructor(value, parent, animationClass, animationConfig, callback) {\n super();\n this._value = value;\n this._parent = parent;\n this._animationClass = animationClass;\n this._animationConfig = animationConfig;\n this._useNativeDriver = shouldUseNativeDriver(animationConfig);\n this._callback = callback;\n\n this.__attach();\n }\n\n __makeNative() {\n this.__isNative = true;\n\n this._parent.__makeNative();\n\n super.__makeNative();\n\n this._value.__makeNative();\n }\n\n __getValue() {\n return this._parent.__getValue();\n }\n\n __attach() {\n this._parent.__addChild(this);\n\n if (this._useNativeDriver) {\n // when the tracking starts we need to convert this node to a \"native node\"\n // so that the parent node will be made \"native\" too. This is necessary as\n // if we don't do this `update` method will get called. At that point it\n // may be too late as it would mean the JS driver has already started\n // updating node values\n this.__makeNative();\n }\n }\n\n __detach() {\n this._parent.__removeChild(this);\n\n super.__detach();\n }\n\n update() {\n this._value.animate(new this._animationClass(_objectSpread(_objectSpread({}, this._animationConfig), {}, {\n toValue: this._animationConfig.toValue.__getValue()\n })), this._callback);\n }\n\n __getNativeConfig() {\n var animation = new this._animationClass(_objectSpread(_objectSpread({}, this._animationConfig), {}, {\n // remove toValue from the config as it's a ref to Animated.Value\n toValue: undefined\n }));\n\n var animationConfig = animation.__getNativeAnimationConfig();\n\n return {\n type: 'tracking',\n animationId: generateNewAnimationId(),\n animationConfig,\n toValue: this._parent.__getNativeTag(),\n value: this._value.__getNativeTag()\n };\n }\n\n}\n\nexport default AnimatedTracking;"],"mappings":"AASA,YAAY;;AAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEb,OAAOA,aAAa,MAAM,sCAAsC;AAChE,OAAOC,aAAa;AACpB,OAAOC,YAAY;AACnB,SAASC,sBAAsB,EAAEC,qBAAqB;AAAkC,IAElFC,gBAAgB;EAAA;EAAA;EACpB,0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