{"ast":null,"code":"import _get from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/get\";\nimport _getPrototypeOf from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _inherits from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/createSuper\";\nimport _classCallCheck from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"C:/Users/kgamal/Downloads/HijriGregorianDatepicker-master/HijriGregorianDatepicker-master/node_modules/@babel/runtime/helpers/esm/createClass\";\nimport { Subscriber } from '../Subscriber';\nexport function retry() {\n  var count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;\n  return function (source) {\n    return source.lift(new RetryOperator(count, source));\n  };\n}\n\nvar RetryOperator = /*#__PURE__*/function () {\n  function RetryOperator(count, source) {\n    _classCallCheck(this, RetryOperator);\n\n    this.count = count;\n    this.source = source;\n  }\n\n  _createClass(RetryOperator, [{\n    key: \"call\",\n    value: function call(subscriber, source) {\n      return source.subscribe(new RetrySubscriber(subscriber, this.count, this.source));\n    }\n  }]);\n\n  return RetryOperator;\n}();\n\nvar RetrySubscriber = /*#__PURE__*/function (_Subscriber) {\n  _inherits(RetrySubscriber, _Subscriber);\n\n  var _super = _createSuper(RetrySubscriber);\n\n  function RetrySubscriber(destination, count, source) {\n    var _this;\n\n    _classCallCheck(this, RetrySubscriber);\n\n    _this = _super.call(this, destination);\n    _this.count = count;\n    _this.source = source;\n    return _this;\n  }\n\n  _createClass(RetrySubscriber, [{\n    key: \"error\",\n    value: function error(err) {\n      if (!this.isStopped) {\n        var source = this.source,\n            count = this.count;\n\n        if (count === 0) {\n          return _get(_getPrototypeOf(RetrySubscriber.prototype), \"error\", this).call(this, err);\n        } else if (count > -1) {\n          this.count = count - 1;\n        }\n\n        source.subscribe(this._unsubscribeAndRecycle());\n      }\n    }\n  }]);\n\n  return RetrySubscriber;\n}(Subscriber); //# sourceMappingURL=retry.js.map","map":null,"metadata":{},"sourceType":"module"}