{"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 { AnimatedEvent } from \"../AnimatedEvent\";\nimport AnimatedNode from \"./AnimatedNode\";\nimport AnimatedStyle from \"./AnimatedStyle\";\nimport NativeAnimatedHelper from \"../NativeAnimatedHelper\";\nimport invariant from 'fbjs/lib/invariant';\nvar AnimatedProps = function (_AnimatedNode) {\n  _inherits(AnimatedProps, _AnimatedNode);\n  var _super = _createSuper(AnimatedProps);\n  function AnimatedProps(props, callback) {\n    var _this;\n    _classCallCheck(this, AnimatedProps);\n    _this = _super.call(this);\n    if (props.style) {\n      props = _objectSpread(_objectSpread({}, props), {}, {\n        style: new AnimatedStyle(props.style)\n      });\n    }\n    _this._props = props;\n    _this._callback = callback;\n    _this.__attach();\n    return _this;\n  }\n  _createClass(AnimatedProps, [{\n    key: \"__getValue\",\n    value: function __getValue() {\n      var props = {};\n      for (var key in this._props) {\n        var value = this._props[key];\n        if (value instanceof AnimatedNode) {\n          if (!value.__isNative || value instanceof AnimatedStyle) {\n            props[key] = value.__getValue();\n          }\n        } else if (value instanceof AnimatedEvent) {\n          props[key] = value.__getHandler();\n        } else {\n          props[key] = value;\n        }\n      }\n      return props;\n    }\n  }, {\n    key: \"__getAnimatedValue\",\n    value: function __getAnimatedValue() {\n      var props = {};\n      for (var key in this._props) {\n        var value = this._props[key];\n        if (value instanceof AnimatedNode) {\n          props[key] = value.__getAnimatedValue();\n        }\n      }\n      return props;\n    }\n  }, {\n    key: \"__attach\",\n    value: function __attach() {\n      for (var key in this._props) {\n        var value = this._props[key];\n        if (value instanceof AnimatedNode) {\n          value.__addChild(this);\n        }\n      }\n    }\n  }, {\n    key: \"__detach\",\n    value: function __detach() {\n      if (this.__isNative && this._animatedView) {\n        this.__disconnectAnimatedView();\n      }\n      for (var key in this._props) {\n        var value = this._props[key];\n        if (value instanceof AnimatedNode) {\n          value.__removeChild(this);\n        }\n      }\n      _get(_getPrototypeOf(AnimatedProps.prototype), \"__detach\", this).call(this);\n    }\n  }, {\n    key: \"update\",\n    value: function update() {\n      this._callback();\n    }\n  }, {\n    key: \"__makeNative\",\n    value: function __makeNative() {\n      if (!this.__isNative) {\n        this.__isNative = true;\n        for (var key in this._props) {\n          var value = this._props[key];\n          if (value instanceof AnimatedNode) {\n            value.__makeNative();\n          }\n        }\n        if (this._animatedView) {\n          this.__connectAnimatedView();\n        }\n      }\n    }\n  }, {\n    key: \"setNativeView\",\n    value: function setNativeView(animatedView) {\n      if (this._animatedView === animatedView) {\n        return;\n      }\n      this._animatedView = animatedView;\n      if (this.__isNative) {\n        this.__connectAnimatedView();\n      }\n    }\n  }, {\n    key: \"__connectAnimatedView\",\n    value: function __connectAnimatedView() {\n      invariant(this.__isNative, 'Expected node to be marked as \"native\"');\n      var nativeViewTag = this._animatedView;\n      invariant(nativeViewTag != null, 'Unable to locate attached view in the native tree');\n      NativeAnimatedHelper.API.connectAnimatedNodeToView(this.__getNativeTag(), nativeViewTag);\n    }\n  }, {\n    key: \"__disconnectAnimatedView\",\n    value: function __disconnectAnimatedView() {\n      invariant(this.__isNative, 'Expected node to be marked as \"native\"');\n      var nativeViewTag = this._animatedView;\n      invariant(nativeViewTag != null, 'Unable to locate attached view in the native tree');\n      NativeAnimatedHelper.API.disconnectAnimatedNodeFromView(this.__getNativeTag(), nativeViewTag);\n    }\n  }, {\n    key: \"__restoreDefaultValues\",\n    value: function __restoreDefaultValues() {\n      if (this.__isNative) {\n        NativeAnimatedHelper.API.restoreDefaultValues(this.__getNativeTag());\n      }\n    }\n  }, {\n    key: \"__getNativeConfig\",\n    value: function __getNativeConfig() {\n      var propsConfig = {};\n      for (var propKey in this._props) {\n        var value = this._props[propKey];\n        if (value instanceof AnimatedNode) {\n          value.__makeNative();\n          propsConfig[propKey] = value.__getNativeTag();\n        }\n      }\n      return {\n        type: 'props',\n        props: propsConfig\n      };\n    }\n  }]);\n  return AnimatedProps;\n}(AnimatedNode);\nexport default AnimatedProps;","map":{"version":3,"names":["_classCallCheck","_createClass","_get","_inherits","_possibleConstructorReturn","_getPrototypeOf","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","result","NewTarget","constructor","Reflect","construct","arguments","apply","sham","Proxy","Boolean","prototype","valueOf","call","e","_objectSpread","AnimatedEvent","AnimatedNode","AnimatedStyle","NativeAnimatedHelper","invariant","AnimatedProps","_AnimatedNode","_super","props","callback","_this","style","_props","_callback","__attach","key","value","__getValue","__isNative","__getHandler","__getAnimatedValue","__addChild","__detach","_animatedView","__disconnectAnimatedView","__removeChild","update","__makeNative","__connectAnimatedView","setNativeView","animatedView","nativeViewTag","API","connectAnimatedNodeToView","__getNativeTag","disconnectAnimatedNodeFromView","__restoreDefaultValues","restoreDefaultValues","__getNativeConfig","propsConfig","propKey","type"],"sources":["/Users/Daniel.Antelo/Workspaces/expo-template-reactrouter-nativebase/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedProps.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\n'use strict';\n\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport { AnimatedEvent } from '../AnimatedEvent';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedStyle from './AnimatedStyle';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport invariant from 'fbjs/lib/invariant';\nclass AnimatedProps extends AnimatedNode {\n  constructor(props, callback) {\n    super();\n    if (props.style) {\n      props = _objectSpread(_objectSpread({}, props), {}, {\n        style: new AnimatedStyle(props.style)\n      });\n    }\n    this._props = props;\n    this._callback = callback;\n    this.__attach();\n  }\n  __getValue() {\n    var props = {};\n    for (var key in this._props) {\n      var value = this._props[key];\n      if (value instanceof AnimatedNode) {\n        if (!value.__isNative || value instanceof AnimatedStyle) {\n          // We cannot use value of natively driven nodes this way as the value we have access from\n          // JS may not be up to date.\n          props[key] = value.__getValue();\n        }\n      } else if (value instanceof AnimatedEvent) {\n        props[key] = value.__getHandler();\n      } else {\n        props[key] = value;\n      }\n    }\n    return props;\n  }\n  __getAnimatedValue() {\n    var props = {};\n    for (var key in this._props) {\n      var value = this._props[key];\n      if (value instanceof AnimatedNode) {\n        props[key] = value.__getAnimatedValue();\n      }\n    }\n    return props;\n  }\n  __attach() {\n    for (var key in this._props) {\n      var value = this._props[key];\n      if (value instanceof AnimatedNode) {\n        value.__addChild(this);\n      }\n    }\n  }\n  __detach() {\n    if (this.__isNative && this._animatedView) {\n      this.__disconnectAnimatedView();\n    }\n    for (var key in this._props) {\n      var value = this._props[key];\n      if (value instanceof AnimatedNode) {\n        value.__removeChild(this);\n      }\n    }\n    super.__detach();\n  }\n  update() {\n    this._callback();\n  }\n  __makeNative() {\n    if (!this.__isNative) {\n      this.__isNative = true;\n      for (var key in this._props) {\n        var value = this._props[key];\n        if (value instanceof AnimatedNode) {\n          value.__makeNative();\n        }\n      }\n      if (this._animatedView) {\n        this.__connectAnimatedView();\n      }\n    }\n  }\n  setNativeView(animatedView) {\n    if (this._animatedView === animatedView) {\n      return;\n    }\n    this._animatedView = animatedView;\n    if (this.__isNative) {\n      this.__connectAnimatedView();\n    }\n  }\n  __connectAnimatedView() {\n    invariant(this.__isNative, 'Expected node to be marked as \"native\"');\n    var nativeViewTag = this._animatedView;\n    invariant(nativeViewTag != null, 'Unable to locate attached view in the native tree');\n    NativeAnimatedHelper.API.connectAnimatedNodeToView(this.__getNativeTag(), nativeViewTag);\n  }\n  __disconnectAnimatedView() {\n    invariant(this.__isNative, 'Expected node to be marked as \"native\"');\n    var nativeViewTag = this._animatedView;\n    invariant(nativeViewTag != null, 'Unable to locate attached view in the native tree');\n    NativeAnimatedHelper.API.disconnectAnimatedNodeFromView(this.__getNativeTag(), nativeViewTag);\n  }\n  __restoreDefaultValues() {\n    // When using the native driver, view properties need to be restored to\n    // their default values manually since react no longer tracks them. This\n    // is needed to handle cases where a prop driven by native animated is removed\n    // after having been changed natively by an animation.\n    if (this.__isNative) {\n      NativeAnimatedHelper.API.restoreDefaultValues(this.__getNativeTag());\n    }\n  }\n  __getNativeConfig() {\n    var propsConfig = {};\n    for (var propKey in this._props) {\n      var value = this._props[propKey];\n      if (value instanceof AnimatedNode) {\n        value.__makeNative();\n        propsConfig[propKey] = value.__getNativeTag();\n      }\n    }\n    return {\n      type: 'props',\n      props: propsConfig\n    };\n  }\n}\nexport default AnimatedProps;"],"mappings":"AAUA,YAAY;;AAAC,OAAAA,eAAA;AAAA,OAAAC,YAAA;AAAA,OAAAC,IAAA;AAAA,OAAAC,SAAA;AAAA,OAAAC,0BAAA;AAAA,OAAAC,eAAA;AAAA,SAAAC,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,GAAAN,eAAA,CAAAE,OAAA,GAAAK,MAAA,MAAAJ,yBAAA,QAAAK,SAAA,GAAAR,eAAA,OAAAS,WAAA,EA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