{"ast":null,"code":"'use strict';\n\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\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 AnimatedValue from \"./AnimatedValue\";\nimport AnimatedWithChildren from \"./AnimatedWithChildren\";\nimport invariant from 'fbjs/lib/invariant';\nvar _uniqueId = 1;\nvar AnimatedValueXY = function (_AnimatedWithChildren) {\n  _inherits(AnimatedValueXY, _AnimatedWithChildren);\n  var _super = _createSuper(AnimatedValueXY);\n  function AnimatedValueXY(valueIn) {\n    var _this;\n    _classCallCheck(this, AnimatedValueXY);\n    _this = _super.call(this);\n    var value = valueIn || {\n      x: 0,\n      y: 0\n    };\n    if (typeof value.x === 'number' && typeof value.y === 'number') {\n      _this.x = new AnimatedValue(value.x);\n      _this.y = new AnimatedValue(value.y);\n    } else {\n      invariant(value.x instanceof AnimatedValue && value.y instanceof AnimatedValue, 'AnimatedValueXY must be initialized with an object of numbers or ' + 'AnimatedValues.');\n      _this.x = value.x;\n      _this.y = value.y;\n    }\n    _this._listeners = {};\n    return _this;\n  }\n  _createClass(AnimatedValueXY, [{\n    key: \"setValue\",\n    value: function setValue(value) {\n      this.x.setValue(value.x);\n      this.y.setValue(value.y);\n    }\n  }, {\n    key: \"setOffset\",\n    value: function setOffset(offset) {\n      this.x.setOffset(offset.x);\n      this.y.setOffset(offset.y);\n    }\n  }, {\n    key: \"flattenOffset\",\n    value: function flattenOffset() {\n      this.x.flattenOffset();\n      this.y.flattenOffset();\n    }\n  }, {\n    key: \"extractOffset\",\n    value: function extractOffset() {\n      this.x.extractOffset();\n      this.y.extractOffset();\n    }\n  }, {\n    key: \"__getValue\",\n    value: function __getValue() {\n      return {\n        x: this.x.__getValue(),\n        y: this.y.__getValue()\n      };\n    }\n  }, {\n    key: \"resetAnimation\",\n    value: function resetAnimation(callback) {\n      this.x.resetAnimation();\n      this.y.resetAnimation();\n      callback && callback(this.__getValue());\n    }\n  }, {\n    key: \"stopAnimation\",\n    value: function stopAnimation(callback) {\n      this.x.stopAnimation();\n      this.y.stopAnimation();\n      callback && callback(this.__getValue());\n    }\n  }, {\n    key: \"addListener\",\n    value: function addListener(callback) {\n      var _this2 = this;\n      var id = String(_uniqueId++);\n      var jointCallback = function jointCallback(_ref) {\n        var number = _ref.value;\n        callback(_this2.__getValue());\n      };\n      this._listeners[id] = {\n        x: this.x.addListener(jointCallback),\n        y: this.y.addListener(jointCallback)\n      };\n      return id;\n    }\n  }, {\n    key: \"removeListener\",\n    value: function removeListener(id) {\n      this.x.removeListener(this._listeners[id].x);\n      this.y.removeListener(this._listeners[id].y);\n      delete this._listeners[id];\n    }\n  }, {\n    key: \"removeAllListeners\",\n    value: function removeAllListeners() {\n      this.x.removeAllListeners();\n      this.y.removeAllListeners();\n      this._listeners = {};\n    }\n  }, {\n    key: \"getLayout\",\n    value: function getLayout() {\n      return {\n        left: this.x,\n        top: this.y\n      };\n    }\n  }, {\n    key: \"getTranslateTransform\",\n    value: function getTranslateTransform() {\n      return [{\n        translateX: this.x\n      }, {\n        translateY: this.y\n      }];\n    }\n  }]);\n  return AnimatedValueXY;\n}(AnimatedWithChildren);\nexport default AnimatedValueXY;","map":{"version":3,"names":["_classCallCheck","_createClass","_inherits","_possibleConstructorReturn","_getPrototypeOf","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","result","NewTarget","constructor","Reflect","construct","arguments","apply","sham","Proxy","Boolean","prototype","valueOf","call","e","AnimatedValue","AnimatedWithChildren","invariant","_uniqueId","AnimatedValueXY","_AnimatedWithChildren","_super","valueIn","_this","value","x","y","_listeners","key","setValue","setOffset","offset","flattenOffset","extractOffset","__getValue","resetAnimation","callback","stopAnimation","addListener","_this2","id","String","jointCallback","_ref","number","removeListener","removeAllListeners","getLayout","left","top","getTranslateTransform","translateX","translateY"],"sources":["/Users/Daniel.Antelo/Workspaces/expo-template-reactrouter-nativebase/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedValueXY.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 AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport invariant from 'fbjs/lib/invariant';\nvar _uniqueId = 1;\n\n/**\n * 2D Value for driving 2D animations, such as pan gestures. Almost identical\n * API to normal `Animated.Value`, but multiplexed.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html\n */\nclass AnimatedValueXY extends AnimatedWithChildren {\n  constructor(valueIn) {\n    super();\n    var value = valueIn || {\n      x: 0,\n      y: 0\n    }; // fixme: shouldn't need `: any`\n    if (typeof value.x === 'number' && typeof value.y === 'number') {\n      this.x = new AnimatedValue(value.x);\n      this.y = new AnimatedValue(value.y);\n    } else {\n      invariant(value.x instanceof AnimatedValue && value.y instanceof AnimatedValue, 'AnimatedValueXY must be initialized with an object of numbers or ' + 'AnimatedValues.');\n      this.x = value.x;\n      this.y = value.y;\n    }\n    this._listeners = {};\n  }\n\n  /**\n   * Directly set the value. This will stop any animations running on the value\n   * and update all the bound properties.\n   *\n   * See https://reactnative.dev/docs/animatedvaluexy.html#setvalue\n   */\n  setValue(value) {\n    this.x.setValue(value.x);\n    this.y.setValue(value.y);\n  }\n\n  /**\n   * Sets an offset that is applied on top of whatever value is set, whether\n   * via `setValue`, an animation, or `Animated.event`. Useful for compensating\n   * things like the start of a pan gesture.\n   *\n   * See https://reactnative.dev/docs/animatedvaluexy.html#setoffset\n   */\n  setOffset(offset) {\n    this.x.setOffset(offset.x);\n    this.y.setOffset(offset.y);\n  }\n\n  /**\n   * Merges the offset value into the base value and resets the offset to zero.\n   * The final output of the value is unchanged.\n   *\n   * See https://reactnative.dev/docs/animatedvaluexy.html#flattenoffset\n   */\n  flattenOffset() {\n    this.x.flattenOffset();\n    this.y.flattenOffset();\n  }\n\n  /**\n   * Sets the offset value to the base value, and resets the base value to\n   * zero. The final output of the value is unchanged.\n   *\n   * See https://reactnative.dev/docs/animatedvaluexy.html#extractoffset\n   */\n  extractOffset() {\n    this.x.extractOffset();\n    this.y.extractOffset();\n  }\n  __getValue() {\n    return {\n      x: this.x.__getValue(),\n      y: this.y.__getValue()\n    };\n  }\n\n  /**\n   * Stops any animation and resets the value to its original.\n   *\n   * See https://reactnative.dev/docs/animatedvaluexy.html#resetanimation\n   */\n  resetAnimation(callback) {\n    this.x.resetAnimation();\n    this.y.resetAnimation();\n    callback && callback(this.__getValue());\n  }\n\n  /**\n   * Stops any running animation or tracking. `callback` is invoked with the\n   * final value after stopping the animation, which is useful for updating\n   * state to match the animation position with layout.\n   *\n   * See https://reactnative.dev/docs/animatedvaluexy.html#stopanimation\n   */\n  stopAnimation(callback) {\n    this.x.stopAnimation();\n    this.y.stopAnimation();\n    callback && callback(this.__getValue());\n  }\n\n  /**\n   * Adds an asynchronous listener to the value so you can observe updates from\n   * animations.  This is useful because there is no way to synchronously read\n   * the value because it might be driven natively.\n   *\n   * Returns a string that serves as an identifier for the listener.\n   *\n   * See https://reactnative.dev/docs/animatedvaluexy.html#addlistener\n   */\n  addListener(callback) {\n    var id = String(_uniqueId++);\n    var jointCallback = _ref => {\n      var number = _ref.value;\n      callback(this.__getValue());\n    };\n    this._listeners[id] = {\n      x: this.x.addListener(jointCallback),\n      y: this.y.addListener(jointCallback)\n    };\n    return id;\n  }\n\n  /**\n   * Unregister a listener. The `id` param shall match the identifier\n   * previously returned by `addListener()`.\n   *\n   * See https://reactnative.dev/docs/animatedvaluexy.html#removelistener\n   */\n  removeListener(id) {\n    this.x.removeListener(this._listeners[id].x);\n    this.y.removeListener(this._listeners[id].y);\n    delete this._listeners[id];\n  }\n\n  /**\n   * Remove all registered listeners.\n   *\n   * See https://reactnative.dev/docs/animatedvaluexy.html#removealllisteners\n   */\n  removeAllListeners() {\n    this.x.removeAllListeners();\n    this.y.removeAllListeners();\n    this._listeners = {};\n  }\n\n  /**\n   * Converts `{x, y}` into `{left, top}` for use in style.\n   *\n   * See https://reactnative.dev/docs/animatedvaluexy.html#getlayout\n   */\n  getLayout() {\n    return {\n      left: this.x,\n      top: this.y\n    };\n  }\n\n  /**\n   * Converts `{x, y}` into a useable translation transform.\n   *\n   * See https://reactnative.dev/docs/animatedvaluexy.html#gettranslatetransform\n   */\n  getTranslateTransform() {\n    return [{\n      translateX: this.x\n    }, {\n      translateY: this.y\n    }];\n  }\n}\nexport default AnimatedValueXY;"],"mappings":"AAUA,YAAY;;AAAC,OAAAA,eAAA;AAAA,OAAAC,YAAA;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,EAAAF,MAAA,GAAAG,OAAA,CAAAC,SAAA,CAAAL,KAAA,EAAAM,SAAA,EAAAJ,SAAA,YAAAD,MAAA,GAAAD,KAAA,CAAAO,KAAA,OAAAD,SAAA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