{"ast":null,"code":"import _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 { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function exhaust() {\n  return function (source) {\n    return source.lift(new SwitchFirstOperator());\n  };\n}\n\nvar SwitchFirstOperator = /*#__PURE__*/function () {\n  function SwitchFirstOperator() {\n    _classCallCheck(this, SwitchFirstOperator);\n  }\n\n  _createClass(SwitchFirstOperator, [{\n    key: \"call\",\n    value: function call(subscriber, source) {\n      return source.subscribe(new SwitchFirstSubscriber(subscriber));\n    }\n  }]);\n\n  return SwitchFirstOperator;\n}();\n\nvar SwitchFirstSubscriber = /*#__PURE__*/function (_SimpleOuterSubscribe) {\n  _inherits(SwitchFirstSubscriber, _SimpleOuterSubscribe);\n\n  var _super = _createSuper(SwitchFirstSubscriber);\n\n  function SwitchFirstSubscriber(destination) {\n    var _this;\n\n    _classCallCheck(this, SwitchFirstSubscriber);\n\n    _this = _super.call(this, destination);\n    _this.hasCompleted = false;\n    _this.hasSubscription = false;\n    return _this;\n  }\n\n  _createClass(SwitchFirstSubscriber, [{\n    key: \"_next\",\n    value: function _next(value) {\n      if (!this.hasSubscription) {\n        this.hasSubscription = true;\n        this.add(innerSubscribe(value, new SimpleInnerSubscriber(this)));\n      }\n    }\n  }, {\n    key: \"_complete\",\n    value: function _complete() {\n      this.hasCompleted = true;\n\n      if (!this.hasSubscription) {\n        this.destination.complete();\n      }\n    }\n  }, {\n    key: \"notifyComplete\",\n    value: function notifyComplete() {\n      this.hasSubscription = false;\n\n      if (this.hasCompleted) {\n        this.destination.complete();\n      }\n    }\n  }]);\n\n  return SwitchFirstSubscriber;\n}(SimpleOuterSubscriber); //# sourceMappingURL=exhaust.js.map","map":null,"metadata":{},"sourceType":"module"}