{"ast":null,"code":"'use strict';\n\nfunction _extends() {\n  _extends = Object.assign || function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n\n    return target;\n  };\n\n  return _extends.apply(this, arguments);\n}\n\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    if (enumerableOnly) symbols = symbols.filter(function (sym) {\n      return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n    });\n    keys.push.apply(keys, symbols);\n  }\n\n  return keys;\n}\n\nfunction _objectSpread(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n\n    if (i % 2) {\n      ownKeys(Object(source), true).forEach(function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if (Object.getOwnPropertyDescriptors) {\n      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n    } else {\n      ownKeys(Object(source)).forEach(function (key) {\n        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n      });\n    }\n  }\n\n  return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n\n  return target;\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n\n  _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n\n  return _setPrototypeOf(o, p);\n}\n\nimport View from \"../../../exports/View\";\nimport { AnimatedEvent } from \"./AnimatedEvent\";\nimport AnimatedProps from \"./nodes/AnimatedProps\";\nimport * as React from 'react';\nimport NativeAnimatedHelper from \"./NativeAnimatedHelper\";\nimport invariant from 'fbjs/lib/invariant';\nimport setAndForwardRef from \"../Utilities/setAndForwardRef\";\nvar animatedComponentNextId = 1;\n\nfunction createAnimatedComponent(Component, options) {\n  invariant(typeof Component !== 'function' || Component.prototype && Component.prototype.isReactComponent, '`createAnimatedComponent` does not support stateless functional components; ' + 'use a class component instead.');\n\n  var AnimatedComponent = function (_React$Component) {\n    _inheritsLoose(AnimatedComponent, _React$Component);\n\n    function AnimatedComponent() {\n      var _this;\n\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n\n      _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n      _this._invokeAnimatedPropsCallbackOnMount = false;\n      _this._eventDetachers = [];\n      _this._animatedComponentId = animatedComponentNextId++ + \":animatedComponent\";\n\n      _this._isFabric = function () {\n        var _this$_component$_int, _this$_component$_int2, _this$_component$getN, _this$_component$getN2, _this$_component$getS, _this$_component$getS2;\n\n        if (_this._component == null) {\n          return false;\n        }\n\n        return ((_this$_component$_int = _this._component['_internalInstanceHandle']) == null ? void 0 : (_this$_component$_int2 = _this$_component$_int.stateNode) == null ? void 0 : _this$_component$_int2.canonical) != null || _this._component.getNativeScrollRef != null && _this._component.getNativeScrollRef() != null && ((_this$_component$getN = _this._component.getNativeScrollRef()['_internalInstanceHandle']) == null ? void 0 : (_this$_component$getN2 = _this$_component$getN.stateNode) == null ? void 0 : _this$_component$getN2.canonical) != null || _this._component.getScrollResponder != null && _this._component.getScrollResponder() != null && _this._component.getScrollResponder().getNativeScrollRef != null && _this._component.getScrollResponder().getNativeScrollRef() != null && ((_this$_component$getS = _this._component.getScrollResponder().getNativeScrollRef()['_internalInstanceHandle']) == null ? void 0 : (_this$_component$getS2 = _this$_component$getS.stateNode) == null ? void 0 : _this$_component$getS2.canonical) != null;\n      };\n\n      _this._waitForUpdate = function () {\n        if (_this._isFabric()) {\n          NativeAnimatedHelper.API.setWaitingForIdentifier(_this._animatedComponentId);\n        }\n      };\n\n      _this._markUpdateComplete = function () {\n        if (_this._isFabric()) {\n          NativeAnimatedHelper.API.unsetWaitingForIdentifier(_this._animatedComponentId);\n        }\n      };\n\n      _this._animatedPropsCallback = function () {\n        if (_this._component == null) {\n          _this._invokeAnimatedPropsCallbackOnMount = true;\n        } else if (process.env.NODE_ENV === 'test' || typeof _this._component.setNativeProps !== 'function' || _this._isFabric()) {\n          _this.forceUpdate();\n        } else if (!_this._propsAnimated.__isNative) {\n          _this._component.setNativeProps(_this._propsAnimated.__getAnimatedValue());\n        } else {\n          throw new Error('Attempting to run JS driven animation on animated ' + 'node that has been moved to \"native\" earlier by starting an ' + 'animation with `useNativeDriver: true`');\n        }\n      };\n\n      _this._setComponentRef = setAndForwardRef({\n        getForwardedRef: function getForwardedRef() {\n          return _this.props.forwardedRef;\n        },\n        setLocalRef: function setLocalRef(ref) {\n          _this._prevComponent = _this._component;\n          _this._component = ref;\n\n          if (ref != null && ref.getNode == null) {\n            ref.getNode = function () {\n              var _ref$constructor$name;\n\n              console.warn('%s: Calling `getNode()` on the ref of an Animated component ' + 'is no longer necessary. You can now directly use the ref ' + 'instead. This method will be removed in a future release.', (_ref$constructor$name = ref.constructor.name) !== null && _ref$constructor$name !== void 0 ? _ref$constructor$name : '<<anonymous>>');\n              return ref;\n            };\n          }\n        }\n      });\n      return _this;\n    }\n\n    var _proto = AnimatedComponent.prototype;\n\n    _proto._attachNativeEvents = function _attachNativeEvents() {\n      var _this$_component,\n          _this2 = this;\n\n      var scrollableNode = (_this$_component = this._component) != null && _this$_component.getScrollableNode ? this._component.getScrollableNode() : this._component;\n\n      var _loop = function _loop(key) {\n        var prop = _this2.props[key];\n\n        if (prop instanceof AnimatedEvent && prop.__isNative) {\n          prop.__attach(scrollableNode, key);\n\n          _this2._eventDetachers.push(function () {\n            return prop.__detach(scrollableNode, key);\n          });\n        }\n      };\n\n      for (var key in this.props) {\n        _loop(key);\n      }\n    };\n\n    _proto._detachNativeEvents = function _detachNativeEvents() {\n      this._eventDetachers.forEach(function (remove) {\n        return remove();\n      });\n\n      this._eventDetachers = [];\n    };\n\n    _proto._attachProps = function _attachProps(nextProps) {\n      var oldPropsAnimated = this._propsAnimated;\n\n      if (nextProps === oldPropsAnimated) {\n        return;\n      }\n\n      this._propsAnimated = new AnimatedProps(nextProps, this._animatedPropsCallback);\n\n      if (oldPropsAnimated) {\n        oldPropsAnimated.__restoreDefaultValues();\n\n        oldPropsAnimated.__detach();\n      }\n    };\n\n    _proto.render = function render() {\n      var _props$collapsable, _props$nativeID;\n\n      var _ref = this._propsAnimated.__getValue() || {},\n          _ref$style = _ref.style,\n          style = _ref$style === void 0 ? {} : _ref$style,\n          props = _objectWithoutPropertiesLoose(_ref, [\"style\"]);\n\n      var _ref2 = this.props.passthroughAnimatedPropExplicitValues || {},\n          _ref2$style = _ref2.style,\n          passthruStyle = _ref2$style === void 0 ? {} : _ref2$style,\n          passthruProps = _objectWithoutPropertiesLoose(_ref2, [\"style\"]);\n\n      var mergedStyle = _objectSpread(_objectSpread({}, style), passthruStyle);\n\n      var forceNativeIdFabric = this._component == null && ((options == null ? void 0 : options.collapsable) === false || props.collapsable !== true) || this._isFabric();\n\n      var forceNativeId = (_props$collapsable = props.collapsable) !== null && _props$collapsable !== void 0 ? _props$collapsable : this._propsAnimated.__isNative || forceNativeIdFabric || (options == null ? void 0 : options.collapsable) === false;\n      var collapsableProps = forceNativeId ? {\n        nativeID: (_props$nativeID = props.nativeID) !== null && _props$nativeID !== void 0 ? _props$nativeID : 'animatedComponent',\n        collapsable: false\n      } : {};\n      return React.createElement(Component, _extends({}, props, passthruProps, collapsableProps, {\n        style: mergedStyle,\n        ref: this._setComponentRef\n      }));\n    };\n\n    _proto.UNSAFE_componentWillMount = function UNSAFE_componentWillMount() {\n      this._waitForUpdate();\n\n      this._attachProps(this.props);\n    };\n\n    _proto.componentDidMount = function componentDidMount() {\n      if (this._invokeAnimatedPropsCallbackOnMount) {\n        this._invokeAnimatedPropsCallbackOnMount = false;\n\n        this._animatedPropsCallback();\n      }\n\n      this._propsAnimated.setNativeView(this._component);\n\n      this._attachNativeEvents();\n\n      this._markUpdateComplete();\n    };\n\n    _proto.UNSAFE_componentWillReceiveProps = function UNSAFE_componentWillReceiveProps(newProps) {\n      this._waitForUpdate();\n\n      this._attachProps(newProps);\n    };\n\n    _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n      if (this._component !== this._prevComponent) {\n        this._propsAnimated.setNativeView(this._component);\n      }\n\n      if (this._component !== this._prevComponent || prevProps !== this.props) {\n        this._detachNativeEvents();\n\n        this._attachNativeEvents();\n      }\n\n      this._markUpdateComplete();\n    };\n\n    _proto.componentWillUnmount = function componentWillUnmount() {\n      this._propsAnimated && this._propsAnimated.__detach();\n\n      this._detachNativeEvents();\n\n      this._markUpdateComplete();\n\n      this._component = null;\n      this._prevComponent = null;\n    };\n\n    return AnimatedComponent;\n  }(React.Component);\n\n  return React.forwardRef(function AnimatedComponentWrapper(props, ref) {\n    return React.createElement(AnimatedComponent, _extends({}, props, ref == null ? null : {\n      forwardedRef: ref\n    }));\n  });\n}\n\nexport default createAnimatedComponent;","map":{"version":3,"sources":["/Users/rohitsingh/Documents/projects/new-nativebase-setup/NativeBase/example/node_modules/react-native-web/dist/vendor/react-native/Animated/createAnimatedComponent.js"],"names":["_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","_objectSpread","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","value","configurable","writable","_objectWithoutPropertiesLoose","excluded","sourceKeys","indexOf","_inheritsLoose","subClass","superClass","create","constructor","_setPrototypeOf","o","p","setPrototypeOf","__proto__","View","AnimatedEvent","AnimatedProps","React","NativeAnimatedHelper","invariant","setAndForwardRef","animatedComponentNextId","createAnimatedComponent","Component","options","isReactComponent","AnimatedComponent","_React$Component","_this","_len","args","Array","_key","concat","_invokeAnimatedPropsCallbackOnMount","_eventDetachers","_animatedComponentId","_isFabric","_this$_component$_int","_this$_component$_int2","_this$_component$getN","_this$_component$getN2","_this$_component$getS","_this$_component$getS2","_component","stateNode","canonical","getNativeScrollRef","getScrollResponder","_waitForUpdate","API","setWaitingForIdentifier","_markUpdateComplete","unsetWaitingForIdentifier","_animatedPropsCallback","process","env","NODE_ENV","setNativeProps","forceUpdate","_propsAnimated","__isNative","__getAnimatedValue","Error","_setComponentRef","getForwardedRef","props","forwardedRef","setLocalRef","ref","_prevComponent","getNode","_ref$constructor$name","console","warn","name","_proto","_attachNativeEvents","_this$_component","_this2","scrollableNode","getScrollableNode","_loop","prop","__attach","__detach","_detachNativeEvents","remove","_attachProps","nextProps","oldPropsAnimated","__restoreDefaultValues","render","_props$collapsable","_props$nativeID","_ref","__getValue","_ref$style","style","_ref2","passthroughAnimatedPropExplicitValues","_ref2$style","passthruStyle","passthruProps","mergedStyle","forceNativeIdFabric","collapsable","forceNativeId","collapsableProps","nativeID","createElement","UNSAFE_componentWillMount","componentDidMount","setNativeView","UNSAFE_componentWillReceiveProps","newProps","componentDidUpdate","prevProps","componentWillUnmount","forwardRef","AnimatedComponentWrapper"],"mappings":"AASA;;AAEA,SAASA,QAAT,GAAoB;AAAEA,EAAAA,QAAQ,GAAGC,MAAM,CAACC,MAAP,IAAiB,UAAUC,MAAV,EAAkB;AAAE,SAAK,IAAIC,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGC,SAAS,CAACC,MAA9B,EAAsCF,CAAC,EAA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AoByB,QAApB,EAAvB;;AAEA,WAAKC,mBAAL;;AAEA,WAAKlC,mBAAL;;AAEA,WAAKR,UAAL,GAAkB,IAAlB;AACA,WAAK0B,cAAL,GAAsB,IAAtB;AACD,KATD;;AAWA,WAAO5C,iBAAP;AACD,GApPoC,CAoPnCT,KAAK,CAACM,SApP6B,CAArC;;AAsPA,SAAoBN,KAAK,CAACsG,UAAN,CAAiB,SAASC,wBAAT,CAAkCtD,KAAlC,EAAyCG,GAAzC,EAA8C;AACjF,WAAoBpD,KAAK,CAAC6F,aAAN,CAAoBpF,iBAApB,EAAuC5D,QAAQ,CAAC,EAAD,EAAKoG,KAAL,EAAYG,GAAG,IAAI,IAAP,GAAc,IAAd,GAAqB;AAClGF,MAAAA,YAAY,EAAEE;AADoF,KAAjC,CAA/C,CAApB;AAGD,GAJmB,CAApB;AAKD;;AAED,eAAe/C,uBAAf","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its 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\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport View from '../../../exports/View';\nimport { AnimatedEvent } from './AnimatedEvent';\nimport AnimatedProps from './nodes/AnimatedProps';\nimport * as React from 'react';\nimport NativeAnimatedHelper from './NativeAnimatedHelper';\nimport invariant from 'fbjs/lib/invariant';\nimport setAndForwardRef from '../Utilities/setAndForwardRef';\nvar animatedComponentNextId = 1;\n\nfunction createAnimatedComponent(Component, options) {\n  invariant(typeof Component !== 'function' || Component.prototype && Component.prototype.isReactComponent, '`createAnimatedComponent` does not support stateless functional components; ' + 'use a class component instead.');\n\n  var AnimatedComponent = /*#__PURE__*/function (_React$Component) {\n    _inheritsLoose(AnimatedComponent, _React$Component);\n\n    function AnimatedComponent() {\n      var _this;\n\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n\n      _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n      _this._invokeAnimatedPropsCallbackOnMount = false;\n      _this._eventDetachers = [];\n      _this._animatedComponentId = animatedComponentNextId++ + \":animatedComponent\";\n\n      _this._isFabric = function () {\n        var _this$_component$_int, _this$_component$_int2, _this$_component$getN, _this$_component$getN2, _this$_component$getS, _this$_component$getS2;\n\n        // When called during the first render, `_component` is always null.\n        // Therefore, even if a component is rendered in Fabric, we can't detect\n        // that until ref is set, which happens sometime after the first render.\n        // In cases where this value switching between \"false\" and \"true\" on Fabric\n        // causes issues, add an additional check for _component nullity.\n        if (_this._component == null) {\n          return false;\n        }\n\n        return (// eslint-disable-next-line dot-notation\n          ((_this$_component$_int = _this._component['_internalInstanceHandle']) == null ? void 0 : (_this$_component$_int2 = _this$_component$_int.stateNode) == null ? void 0 : _this$_component$_int2.canonical) != null || // Some components have a setNativeProps function but aren't a host component\n          // such as lists like FlatList and SectionList. These should also use\n          // forceUpdate in Fabric since setNativeProps doesn't exist on the underlying\n          // host component. This crazy hack is essentially special casing those lists and\n          // ScrollView itself to use forceUpdate in Fabric.\n          // If these components end up using forwardRef then these hacks can go away\n          // as this._component would actually be the underlying host component and the above check\n          // would be sufficient.\n          _this._component.getNativeScrollRef != null && _this._component.getNativeScrollRef() != null && // eslint-disable-next-line dot-notation\n          ((_this$_component$getN = _this._component.getNativeScrollRef()['_internalInstanceHandle']) == null ? void 0 : (_this$_component$getN2 = _this$_component$getN.stateNode) == null ? void 0 : _this$_component$getN2.canonical) != null || _this._component.getScrollResponder != null && _this._component.getScrollResponder() != null && _this._component.getScrollResponder().getNativeScrollRef != null && _this._component.getScrollResponder().getNativeScrollRef() != null && ((_this$_component$getS = _this._component.getScrollResponder().getNativeScrollRef()[// eslint-disable-next-line dot-notation\n          '_internalInstanceHandle']) == null ? void 0 : (_this$_component$getS2 = _this$_component$getS.stateNode) == null ? void 0 : _this$_component$getS2.canonical) != null\n        );\n      };\n\n      _this._waitForUpdate = function () {\n        if (_this._isFabric()) {\n          NativeAnimatedHelper.API.setWaitingForIdentifier(_this._animatedComponentId);\n        }\n      };\n\n      _this._markUpdateComplete = function () {\n        if (_this._isFabric()) {\n          NativeAnimatedHelper.API.unsetWaitingForIdentifier(_this._animatedComponentId);\n        }\n      };\n\n      _this._animatedPropsCallback = function () {\n        if (_this._component == null) {\n          // AnimatedProps is created in will-mount because it's used in render.\n          // But this callback may be invoked before mount in async mode,\n          // In which case we should defer the setNativeProps() call.\n          // React may throw away uncommitted work in async mode,\n          // So a deferred call won't always be invoked.\n          _this._invokeAnimatedPropsCallbackOnMount = true;\n        } else if (process.env.NODE_ENV === 'test' || // For animating properties of non-leaf/non-native components\n        typeof _this._component.setNativeProps !== 'function' || // In Fabric, force animations to go through forceUpdate and skip setNativeProps\n        _this._isFabric()) {\n          _this.forceUpdate();\n        } else if (!_this._propsAnimated.__isNative) {\n          _this._component.setNativeProps(_this._propsAnimated.__getAnimatedValue());\n        } else {\n          throw new Error('Attempting to run JS driven animation on animated ' + 'node that has been moved to \"native\" earlier by starting an ' + 'animation with `useNativeDriver: true`');\n        }\n      };\n\n      _this._setComponentRef = setAndForwardRef({\n        getForwardedRef: function getForwardedRef() {\n          return _this.props.forwardedRef;\n        },\n        setLocalRef: function setLocalRef(ref) {\n          _this._prevComponent = _this._component;\n          _this._component = ref; // TODO: Delete this in a future release.\n\n          if (ref != null && ref.getNode == null) {\n            ref.getNode = function () {\n              var _ref$constructor$name;\n\n              console.warn('%s: Calling `getNode()` on the ref of an Animated component ' + 'is no longer necessary. You can now directly use the ref ' + 'instead. This method will be removed in a future release.', (_ref$constructor$name = ref.constructor.name) !== null && _ref$constructor$name !== void 0 ? _ref$constructor$name : '<<anonymous>>');\n              return ref;\n            };\n          }\n        }\n      });\n      return _this;\n    }\n\n    var _proto = AnimatedComponent.prototype;\n\n    _proto._attachNativeEvents = function _attachNativeEvents() {\n      var _this$_component,\n          _this2 = this;\n\n      // Make sure to get the scrollable node for components that implement\n      // `ScrollResponder.Mixin`.\n      var scrollableNode = (_this$_component = this._component) != null && _this$_component.getScrollableNode ? this._component.getScrollableNode() : this._component;\n\n      var _loop = function _loop(key) {\n        var prop = _this2.props[key];\n\n        if (prop instanceof AnimatedEvent && prop.__isNative) {\n          prop.__attach(scrollableNode, key);\n\n          _this2._eventDetachers.push(function () {\n            return prop.__detach(scrollableNode, key);\n          });\n        }\n      };\n\n      for (var key in this.props) {\n        _loop(key);\n      }\n    };\n\n    _proto._detachNativeEvents = function _detachNativeEvents() {\n      this._eventDetachers.forEach(function (remove) {\n        return remove();\n      });\n\n      this._eventDetachers = [];\n    };\n\n    _proto._attachProps = function _attachProps(nextProps) {\n      var oldPropsAnimated = this._propsAnimated;\n\n      if (nextProps === oldPropsAnimated) {\n        return;\n      }\n\n      this._propsAnimated = new AnimatedProps(nextProps, this._animatedPropsCallback); // When you call detach, it removes the element from the parent list\n      // of children. If it goes to 0, then the parent also detaches itself\n      // and so on.\n      // An optimization is to attach the new elements and THEN detach the old\n      // ones instead of detaching and THEN attaching.\n      // This way the intermediate state isn't to go to 0 and trigger\n      // this expensive recursive detaching to then re-attach everything on\n      // the very next operation.\n\n      if (oldPropsAnimated) {\n        oldPropsAnimated.__restoreDefaultValues();\n\n        oldPropsAnimated.__detach();\n      }\n    };\n\n    _proto.render = function render() {\n      var _props$collapsable, _props$nativeID;\n\n      var _ref = this._propsAnimated.__getValue() || {},\n          _ref$style = _ref.style,\n          style = _ref$style === void 0 ? {} : _ref$style,\n          props = _objectWithoutPropertiesLoose(_ref, [\"style\"]);\n\n      var _ref2 = this.props.passthroughAnimatedPropExplicitValues || {},\n          _ref2$style = _ref2.style,\n          passthruStyle = _ref2$style === void 0 ? {} : _ref2$style,\n          passthruProps = _objectWithoutPropertiesLoose(_ref2, [\"style\"]);\n\n      var mergedStyle = _objectSpread(_objectSpread({}, style), passthruStyle); // On Fabric, we always want to ensure the container Animated View is *not*\n      // flattened.\n      // Because we do not get a host component ref immediately and thus cannot\n      // do a proper Fabric vs non-Fabric detection immediately, we default to assuming\n      // that Fabric *is* enabled until we know otherwise.\n      // Thus, in Fabric, this view will never be flattened. In non-Fabric, the view will\n      // not be flattened during the initial render but may be flattened in the second render\n      // and onwards.\n\n\n      var forceNativeIdFabric = this._component == null && ((options == null ? void 0 : options.collapsable) === false || props.collapsable !== true) || this._isFabric();\n\n      var forceNativeId = (_props$collapsable = props.collapsable) !== null && _props$collapsable !== void 0 ? _props$collapsable : this._propsAnimated.__isNative || forceNativeIdFabric || (options == null ? void 0 : options.collapsable) === false; // The native driver updates views directly through the UI thread so we\n      // have to make sure the view doesn't get optimized away because it cannot\n      // go through the NativeViewHierarchyManager since it operates on the shadow\n      // thread. TODO: T68258846\n\n      var collapsableProps = forceNativeId ? {\n        nativeID: (_props$nativeID = props.nativeID) !== null && _props$nativeID !== void 0 ? _props$nativeID : 'animatedComponent',\n        collapsable: false\n      } : {};\n      return /*#__PURE__*/React.createElement(Component, _extends({}, props, passthruProps, collapsableProps, {\n        style: mergedStyle,\n        ref: this._setComponentRef\n      }));\n    };\n\n    _proto.UNSAFE_componentWillMount = function UNSAFE_componentWillMount() {\n      this._waitForUpdate();\n\n      this._attachProps(this.props);\n    };\n\n    _proto.componentDidMount = function componentDidMount() {\n      if (this._invokeAnimatedPropsCallbackOnMount) {\n        this._invokeAnimatedPropsCallbackOnMount = false;\n\n        this._animatedPropsCallback();\n      }\n\n      this._propsAnimated.setNativeView(this._component);\n\n      this._attachNativeEvents();\n\n      this._markUpdateComplete();\n    };\n\n    _proto.UNSAFE_componentWillReceiveProps = function UNSAFE_componentWillReceiveProps(newProps) {\n      this._waitForUpdate();\n\n      this._attachProps(newProps);\n    };\n\n    _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n      if (this._component !== this._prevComponent) {\n        this._propsAnimated.setNativeView(this._component);\n      }\n\n      if (this._component !== this._prevComponent || prevProps !== this.props) {\n        this._detachNativeEvents();\n\n        this._attachNativeEvents();\n      }\n\n      this._markUpdateComplete();\n    };\n\n    _proto.componentWillUnmount = function componentWillUnmount() {\n      this._propsAnimated && this._propsAnimated.__detach();\n\n      this._detachNativeEvents();\n\n      this._markUpdateComplete();\n\n      this._component = null;\n      this._prevComponent = null;\n    };\n\n    return AnimatedComponent;\n  }(React.Component);\n\n  return /*#__PURE__*/React.forwardRef(function AnimatedComponentWrapper(props, ref) {\n    return /*#__PURE__*/React.createElement(AnimatedComponent, _extends({}, props, ref == null ? null : {\n      forwardedRef: ref\n    }));\n  });\n}\n\nexport default createAnimatedComponent;"]},"metadata":{},"sourceType":"module"}