1 line
No EOL
7.4 KiB
JSON
1 line
No EOL
7.4 KiB
JSON
{"ast":null,"code":"import { Subject } from '../Subject';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function repeatWhen(notifier) {\n return source => source.lift(new RepeatWhenOperator(notifier));\n}\nclass RepeatWhenOperator {\n constructor(notifier) {\n this.notifier = notifier;\n }\n call(subscriber, source) {\n return source.subscribe(new RepeatWhenSubscriber(subscriber, this.notifier, source));\n }\n}\nclass RepeatWhenSubscriber extends SimpleOuterSubscriber {\n constructor(destination, notifier, source) {\n super(destination);\n this.notifier = notifier;\n this.source = source;\n this.sourceIsBeingSubscribedTo = true;\n }\n notifyNext() {\n this.sourceIsBeingSubscribedTo = true;\n this.source.subscribe(this);\n }\n notifyComplete() {\n if (this.sourceIsBeingSubscribedTo === false) {\n return super.complete();\n }\n }\n complete() {\n this.sourceIsBeingSubscribedTo = false;\n if (!this.isStopped) {\n if (!this.retries) {\n this.subscribeToRetries();\n }\n if (!this.retriesSubscription || this.retriesSubscription.closed) {\n return super.complete();\n }\n this._unsubscribeAndRecycle();\n this.notifications.next(undefined);\n }\n }\n _unsubscribe() {\n const {\n notifications,\n retriesSubscription\n } = this;\n if (notifications) {\n notifications.unsubscribe();\n this.notifications = undefined;\n }\n if (retriesSubscription) {\n retriesSubscription.unsubscribe();\n this.retriesSubscription = undefined;\n }\n this.retries = undefined;\n }\n _unsubscribeAndRecycle() {\n const {\n _unsubscribe\n } = this;\n this._unsubscribe = null;\n super._unsubscribeAndRecycle();\n this._unsubscribe = _unsubscribe;\n return this;\n }\n subscribeToRetries() {\n this.notifications = new Subject();\n let retries;\n try {\n const {\n notifier\n } = this;\n retries = notifier(this.notifications);\n } catch (e) {\n return super.complete();\n }\n this.retries = retries;\n this.retriesSubscription = innerSubscribe(retries, new SimpleInnerSubscriber(this));\n }\n}","map":{"version":3,"names":["Subject","SimpleOuterSubscriber","innerSubscribe","SimpleInnerSubscriber","repeatWhen","notifier","source","lift","RepeatWhenOperator","constructor","call","subscriber","subscribe","RepeatWhenSubscriber","destination","sourceIsBeingSubscribedTo","notifyNext","notifyComplete","complete","isStopped","retries","subscribeToRetries","retriesSubscription","closed","_unsubscribeAndRecycle","notifications","next","undefined","_unsubscribe","unsubscribe","e"],"sources":["/home/arctichawk1/Desktop/Projects/Public/Kargi-Sitesi/node_modules/rxjs/_esm2015/internal/operators/repeatWhen.js"],"sourcesContent":["import { Subject } from '../Subject';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function repeatWhen(notifier) {\n return (source) => source.lift(new RepeatWhenOperator(notifier));\n}\nclass RepeatWhenOperator {\n constructor(notifier) {\n this.notifier = notifier;\n }\n call(subscriber, source) {\n return source.subscribe(new RepeatWhenSubscriber(subscriber, this.notifier, source));\n }\n}\nclass RepeatWhenSubscriber extends SimpleOuterSubscriber {\n constructor(destination, notifier, source) {\n super(destination);\n this.notifier = notifier;\n this.source = source;\n this.sourceIsBeingSubscribedTo = true;\n }\n notifyNext() {\n this.sourceIsBeingSubscribedTo = true;\n this.source.subscribe(this);\n }\n notifyComplete() {\n if (this.sourceIsBeingSubscribedTo === false) {\n return super.complete();\n }\n }\n complete() {\n this.sourceIsBeingSubscribedTo = false;\n if (!this.isStopped) {\n if (!this.retries) {\n this.subscribeToRetries();\n }\n if (!this.retriesSubscription || this.retriesSubscription.closed) {\n return super.complete();\n }\n this._unsubscribeAndRecycle();\n this.notifications.next(undefined);\n }\n }\n _unsubscribe() {\n const { notifications, retriesSubscription } = this;\n if (notifications) {\n notifications.unsubscribe();\n this.notifications = undefined;\n }\n if (retriesSubscription) {\n retriesSubscription.unsubscribe();\n this.retriesSubscription = undefined;\n }\n this.retries = undefined;\n }\n _unsubscribeAndRecycle() {\n const { _unsubscribe } = this;\n this._unsubscribe = null;\n super._unsubscribeAndRecycle();\n this._unsubscribe = _unsubscribe;\n return this;\n }\n subscribeToRetries() {\n this.notifications = new Subject();\n let retries;\n try {\n const { notifier } = this;\n retries = notifier(this.notifications);\n }\n catch (e) {\n return super.complete();\n }\n this.retries = retries;\n this.retriesSubscription = innerSubscribe(retries, new SimpleInnerSubscriber(this));\n }\n}\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,YAAY;AACpC,SAASC,qBAAqB,EAAEC,cAAc,EAAEC,qBAAqB,QAAQ,mBAAmB;AAChG,OAAO,SAASC,UAAUA,CAACC,QAAQ,EAAE;EACjC,OAAQC,MAAM,IAAKA,MAAM,CAACC,IAAI,CAAC,IAAIC,kBAAkB,CAACH,QAAQ,CAAC,CAAC;AACpE;AACA,MAAMG,kBAAkB,CAAC;EACrBC,WAAWA,CAACJ,QAAQ,EAAE;IAClB,IAAI,CAACA,QAAQ,GAAGA,QAAQ;EAC5B;EACAK,IAAIA,CAACC,UAAU,EAAEL,MAAM,EAAE;IACrB,OAAOA,MAAM,CAACM,SAAS,CAAC,IAAIC,oBAAoB,CAACF,UAAU,EAAE,IAAI,CAACN,QAAQ,EAAEC,MAAM,CAAC,CAAC;EACxF;AACJ;AACA,MAAMO,oBAAoB,SAASZ,qBAAqB,CAAC;EACrDQ,WAAWA,CAACK,WAAW,EAAET,QAAQ,EAAEC,MAAM,EAAE;IACvC,KAAK,CAACQ,WAAW,CAAC;IAClB,IAAI,CAACT,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACC,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACS,yBAAyB,GAAG,IAAI;EACzC;EACAC,UAAUA,CAAA,EAAG;IACT,IAAI,CAACD,yBAAyB,GAAG,IAAI;IACrC,IAAI,CAACT,MAAM,CAACM,SAAS,CAAC,IAAI,CAAC;EAC/B;EACAK,cAAcA,CAAA,EAAG;IACb,IAAI,IAAI,CAACF,yBAAyB,KAAK,KAAK,EAAE;MAC1C,OAAO,KAAK,CAACG,QAAQ,CAAC,CAAC;IAC3B;EACJ;EACAA,QAAQA,CAAA,EAAG;IACP,IAAI,CAACH,yBAAyB,GA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