{"ast":null,"code":"'use strict';\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 AnimatedInterpolation from \"./AnimatedInterpolation\";\nimport AnimatedNode from \"./AnimatedNode\";\nimport AnimatedValue from \"./AnimatedValue\";\nimport AnimatedWithChildren from \"./AnimatedWithChildren\";\n\nvar AnimatedDivision = function (_AnimatedWithChildren) {\n  _inheritsLoose(AnimatedDivision, _AnimatedWithChildren);\n\n  function AnimatedDivision(a, b) {\n    var _this;\n\n    _this = _AnimatedWithChildren.call(this) || this;\n    _this._warnedAboutDivideByZero = false;\n\n    if (b === 0 || b instanceof AnimatedNode && b.__getValue() === 0) {\n      console.error('Detected potential division by zero in AnimatedDivision');\n    }\n\n    _this._a = typeof a === 'number' ? new AnimatedValue(a) : a;\n    _this._b = typeof b === 'number' ? new AnimatedValue(b) : b;\n    return _this;\n  }\n\n  var _proto = AnimatedDivision.prototype;\n\n  _proto.__makeNative = function __makeNative() {\n    this._a.__makeNative();\n\n    this._b.__makeNative();\n\n    _AnimatedWithChildren.prototype.__makeNative.call(this);\n  };\n\n  _proto.__getValue = function __getValue() {\n    var a = this._a.__getValue();\n\n    var b = this._b.__getValue();\n\n    if (b === 0) {\n      if (!this._warnedAboutDivideByZero) {\n        console.error('Detected division by zero in AnimatedDivision');\n        this._warnedAboutDivideByZero = true;\n      }\n\n      return 0;\n    }\n\n    this._warnedAboutDivideByZero = false;\n    return a / b;\n  };\n\n  _proto.interpolate = function interpolate(config) {\n    return new AnimatedInterpolation(this, config);\n  };\n\n  _proto.__attach = function __attach() {\n    this._a.__addChild(this);\n\n    this._b.__addChild(this);\n  };\n\n  _proto.__detach = function __detach() {\n    this._a.__removeChild(this);\n\n    this._b.__removeChild(this);\n\n    _AnimatedWithChildren.prototype.__detach.call(this);\n  };\n\n  _proto.__getNativeConfig = function __getNativeConfig() {\n    return {\n      type: 'division',\n      input: [this._a.__getNativeTag(), this._b.__getNativeTag()]\n    };\n  };\n\n  return AnimatedDivision;\n}(AnimatedWithChildren);\n\nexport default AnimatedDivision;","map":{"version":3,"sources":["/Users/rohitsingh/Documents/projects/new-nativebase-setup/NativeBase/example/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedDivision.js"],"names":["_inheritsLoose","subClass","superClass","prototype","Object","create","constructor","_setPrototypeOf","o","p","setPrototypeOf","__proto__","AnimatedInterpolation","AnimatedNode","AnimatedValue","AnimatedWithChildren","AnimatedDivision","_AnimatedWithChildren","a","b","_this","call","_warnedAboutDivideByZero","__getValue","console","error","_a","_b","_proto","__makeNative","interpolate","config","__attach","__addChild","__detach","__removeChild","__getNativeConfig","type","input","__getNativeTag"],"mappings":"AASA;;AAEA,SAASA,cAAT,CAAwBC,QAAxB,EAAkCC,UAAlC,EAA8C;AAAED,EAAAA,QAAQ,CAACE,SAAT,GAAqBC,MAAM,CAACC,MAAP,CAAcH,UAAU,CAACC,SAAzB,CAArB;AAA0DF,EAAAA,QAAQ,CAACE,SAAT,CAAmBG,WAAnB,GAAiCL,QAAjC;;AAA2CM,EAAAA,eAAe,CAACN,QAAD,EAAWC,UAAX,CAAf;AAAwC;;AAE7L,SAASK,eAAT,CAAyBC,CAAzB,EAA4BC,CAA5B,EAA+B;AAAEF,EAAAA,eAAe,GAAGH,MAAM,CAACM,cAAP,IAAyB,SAASH,eAAT,CAAyBC,CAAzB,EAA4BC,CAA5B,EAA+B;AAAED,IAAAA,CAAC,CAACG,SAAF,GAAcF,CAAd;AAAiB,WAAOD,CAAP;AAAW,GAAxG;;AAA0G,SAAOD,eAAe,CAACC,CAAD,EAAIC,CAAJ,CAAtB;AAA+B;;AAE1K,OAAOG,qBAAP;AACA,OAAOC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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 _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 AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nvar AnimatedDivision = /*#__PURE__*/function (_AnimatedWithChildren) {\n  _inheritsLoose(AnimatedDivision, _AnimatedWithChildren);\n\n  function AnimatedDivision(a, b) {\n    var _this;\n\n    _this = _AnimatedWithChildren.call(this) || this;\n    _this._warnedAboutDivideByZero = false;\n\n    if (b === 0 || b instanceof AnimatedNode && b.__getValue() === 0) {\n      console.error('Detected potential division by zero in AnimatedDivision');\n    }\n\n    _this._a = typeof a === 'number' ? new AnimatedValue(a) : a;\n    _this._b = typeof b === 'number' ? new AnimatedValue(b) : b;\n    return _this;\n  }\n\n  var _proto = AnimatedDivision.prototype;\n\n  _proto.__makeNative = function __makeNative() {\n    this._a.__makeNative();\n\n    this._b.__makeNative();\n\n    _AnimatedWithChildren.prototype.__makeNative.call(this);\n  };\n\n  _proto.__getValue = function __getValue() {\n    var a = this._a.__getValue();\n\n    var b = this._b.__getValue();\n\n    if (b === 0) {\n      // Prevent spamming the console/LogBox\n      if (!this._warnedAboutDivideByZero) {\n        console.error('Detected division by zero in AnimatedDivision');\n        this._warnedAboutDivideByZero = true;\n      } // Passing infinity/NaN to Fabric will cause a native crash\n\n\n      return 0;\n    }\n\n    this._warnedAboutDivideByZero = false;\n    return a / b;\n  };\n\n  _proto.interpolate = function interpolate(config) {\n    return new AnimatedInterpolation(this, config);\n  };\n\n  _proto.__attach = function __attach() {\n    this._a.__addChild(this);\n\n    this._b.__addChild(this);\n  };\n\n  _proto.__detach = function __detach() {\n    this._a.__removeChild(this);\n\n    this._b.__removeChild(this);\n\n    _AnimatedWithChildren.prototype.__detach.call(this);\n  };\n\n  _proto.__getNativeConfig = function __getNativeConfig() {\n    return {\n      type: 'division',\n      input: [this._a.__getNativeTag(), this._b.__getNativeTag()]\n    };\n  };\n\n  return AnimatedDivision;\n}(AnimatedWithChildren);\n\nexport default AnimatedDivision;"]},"metadata":{},"sourceType":"module"}