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
7.6 KiB
1 line
7.6 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 AnimatedInterpolation from \"./AnimatedInterpolation\";\nimport AnimatedNode from \"./AnimatedNode\";\nimport AnimatedValue from \"./AnimatedValue\";\nimport AnimatedWithChildren from \"./AnimatedWithChildren\";\nvar AnimatedDivision = function (_AnimatedWithChildren) {\n _inherits(AnimatedDivision, _AnimatedWithChildren);\n var _super = _createSuper(AnimatedDivision);\n function AnimatedDivision(a, b) {\n var _this;\n _classCallCheck(this, AnimatedDivision);\n _this = _super.call(this);\n _this._warnedAboutDivideByZero = false;\n if (b === 0 || b instanceof AnimatedNode && b.__getValue() === 0) {\n console.error('Detected potential division by zero in AnimatedDivision');\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 _createClass(AnimatedDivision, [{\n key: \"__makeNative\",\n value: function __makeNative() {\n this._a.__makeNative();\n this._b.__makeNative();\n _get(_getPrototypeOf(AnimatedDivision.prototype), \"__makeNative\", this).call(this);\n }\n }, {\n key: \"__getValue\",\n value: function __getValue() {\n var a = this._a.__getValue();\n var b = this._b.__getValue();\n if (b === 0) {\n if (!this._warnedAboutDivideByZero) {\n console.error('Detected division by zero in AnimatedDivision');\n this._warnedAboutDivideByZero = true;\n }\n return 0;\n }\n this._warnedAboutDivideByZero = false;\n return a / b;\n }\n }, {\n key: \"interpolate\",\n value: function interpolate(config) {\n return new AnimatedInterpolation(this, config);\n }\n }, {\n key: \"__attach\",\n value: function __attach() {\n this._a.__addChild(this);\n this._b.__addChild(this);\n }\n }, {\n key: \"__detach\",\n value: function __detach() {\n this._a.__removeChild(this);\n this._b.__removeChild(this);\n _get(_getPrototypeOf(AnimatedDivision.prototype), \"__detach\", this).call(this);\n }\n }, {\n key: \"__getNativeConfig\",\n value: function __getNativeConfig() {\n return {\n type: 'division',\n input: [this._a.__getNativeTag(), this._b.__getNativeTag()]\n };\n }\n }]);\n return AnimatedDivision;\n}(AnimatedWithChildren);\nexport default AnimatedDivision;","map":{"version":3,"names":["AnimatedInterpolation","AnimatedNode","AnimatedValue","AnimatedWithChildren","AnimatedDivision","a","b","_warnedAboutDivideByZero","__getValue","console","error","_a","_b","__makeNative","config","__addChild","__removeChild","type","input","__getNativeTag"],"sources":["/Users/mathildejean/Documents/BUT/LaSuperMeteo/LaSuperMeteo/iut-expo-starter/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedDivision.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 AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nclass AnimatedDivision extends AnimatedWithChildren {\n constructor(a, b) {\n super();\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 }\n\n __makeNative() {\n this._a.__makeNative();\n\n this._b.__makeNative();\n\n super.__makeNative();\n }\n\n __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 interpolate(config) {\n return new AnimatedInterpolation(this, config);\n }\n\n __attach() {\n this._a.__addChild(this);\n\n this._b.__addChild(this);\n }\n\n __detach() {\n this._a.__removeChild(this);\n\n this._b.__removeChild(this);\n\n super.__detach();\n }\n\n __getNativeConfig() {\n return {\n type: 'division',\n input: [this._a.__getNativeTag(), this._b.__getNativeTag()]\n };\n }\n\n}\n\nexport default AnimatedDivision;"],"mappings":"AASA,YAAY;;AAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEb,OAAOA,qBAAqB;AAC5B,OAAOC,YAAY;AACnB,OAAOC,aAAa;AACpB,OAAOC,oBAAoB;AAA+B,IAEpDC,gBAAgB;EAAA;EAAA;EACpB,0BAAYC,CAAC,EAAEC,CAAC,EAAE;IAAA;IAAA;IAChB;IACA,MAAKC,wBAAwB,GAAG,KAAK;IAErC,IAAID,CAAC,KAAK,CAAC,IAAIA,CAAC,YAAYL,YAAY,IAAIK,CAAC,CAACE,UAAU,EAAE,KAAK,CAAC,EAAE;MAChEC,OAAO,CAACC,KAAK,CAAC,yDAAyD,CAAC;IAC1E;IAEA,MAAKC,EAAE,GAAG,O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