// Metro module 369 (f370). import _classCallCheck from "./_classCallCheck"; import _createClass from "./_createClass"; import _possibleConstructorReturn from "./_possibleConstructorReturn"; import _getPrototypeOf from "./_getPrototypeOf"; import _get from "./_get"; import _inherits from "./_inherits"; import AnimatedNode from "./AnimatedNode"; import AnimatedValue from "./AnimatedValue"; import mapStringToNumericComponents from "./mapStringToNumericComponents"; import AnimatedWithChildren from "./AnimatedWithChildren"; function $mk66309($env) { return function(a0) { const r0 = $env; return r0[1].apply(r0[0], a0); }; } let AnimatedDivision; let env386 = {}; env386[6] = function _isNativeReflectConstruct() { let c12283_0; try { c12283_0 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); } catch ($e) {} const _isNativeReflectConstruct2 = function _isNativeReflectConstruct() { return !!c12283_0; }; env386[6] = _isNativeReflectConstruct2; return _isNativeReflectConstruct2(); }; AnimatedDivision = function AnimatedDivision(a0, a1, a2) { _classCallCheck(this, AnimatedDivision); const r13 = [a2]; const r12 = _getPrototypeOf(AnimatedDivision); const r30 = _possibleConstructorReturn(this, (0, env386[6])() ? Reflect.construct(r12, r13, _getPrototypeOf(this).constructor) : r12.apply(this, r13)); r30._warnedAboutDivideByZero = false; if (a1 === 0 || a1 instanceof AnimatedNode && a1.__getValue() === 0) { console.error("Detected potential division by zero in AnimatedDivision"); } r30._a = typeof a0 === "number" ? new AnimatedValue(a0) : a0; r30._b = typeof a1 === "number" ? new AnimatedValue(a1) : a1; return r30; }; _inherits(AnimatedDivision, AnimatedWithChildren); export default _createClass(AnimatedDivision, [{ key: "__makeNative", value: function __makeNative(a0) { let env23712; this._a.__makeNative(a0); this._b.__makeNative(a0); const r13 = env23712 = {}; env23712[0] = this; env23712[1] = void 0; let r18 = _get(_getPrototypeOf(AnimatedDivision.prototype), "__makeNative", this); env23712[1] = r18; if (typeof r18 === "function") { r18 = $mk66309(r13); } r18([a0]); } }, { key: "__getValue", value: function __getValue() { let r10; const r7 = this._a.__getValue(); const r9 = this._b.__getValue(); if (r9 === 0) { const _warnedAboutDivideByZero = this._warnedAboutDivideByZero; r10 = 0; if (!_warnedAboutDivideByZero) { console.error("Detected division by zero in AnimatedDivision"); this._warnedAboutDivideByZero = true; r10 = 0; } } else { this._warnedAboutDivideByZero = false; r10 = r7 / r9; } return r10; } }, { key: "interpolate", value: function interpolate(a0) { return new mapStringToNumericComponents(this, a0); } }, { key: "__attach", value: function __attach() { let env23713; this._a.__addChild(this); this._b.__addChild(this); const r12 = env23713 = {}; env23713[0] = this; env23713[1] = void 0; let r17 = _get(_getPrototypeOf(AnimatedDivision.prototype), "__attach", this); env23713[1] = r17; if (typeof r17 === "function") { r17 = $mk66309(r12); } r17([]); } }, { key: "__detach", value: function __detach() { let env23714; this._a.__removeChild(this); this._b.__removeChild(this); const r12 = env23714 = {}; env23714[0] = this; env23714[1] = void 0; let r17 = _get(_getPrototypeOf(AnimatedDivision.prototype), "__detach", this); env23714[1] = r17; if (typeof r17 === "function") { r17 = $mk66309(r12); } r17([]); } }, { key: "__getNativeConfig", value: function __getNativeConfig() { return { type: "division", input: [this._a.__getNativeTag(), this._b.__getNativeTag()], debugID: this.__getDebugID() }; } }]);