1 line
No EOL
12 KiB
JSON
1 line
No EOL
12 KiB
JSON
{"ast":null,"code":"import { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nexport function delayWhen(delayDurationSelector, subscriptionDelay) {\n if (subscriptionDelay) {\n return source => new SubscriptionDelayObservable(source, subscriptionDelay).lift(new DelayWhenOperator(delayDurationSelector));\n }\n return source => source.lift(new DelayWhenOperator(delayDurationSelector));\n}\nclass DelayWhenOperator {\n constructor(delayDurationSelector) {\n this.delayDurationSelector = delayDurationSelector;\n }\n call(subscriber, source) {\n return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector));\n }\n}\nclass DelayWhenSubscriber extends OuterSubscriber {\n constructor(destination, delayDurationSelector) {\n super(destination);\n this.delayDurationSelector = delayDurationSelector;\n this.completed = false;\n this.delayNotifierSubscriptions = [];\n this.index = 0;\n }\n notifyNext(outerValue, _innerValue, _outerIndex, _innerIndex, innerSub) {\n this.destination.next(outerValue);\n this.removeSubscription(innerSub);\n this.tryComplete();\n }\n notifyError(error, innerSub) {\n this._error(error);\n }\n notifyComplete(innerSub) {\n const value = this.removeSubscription(innerSub);\n if (value) {\n this.destination.next(value);\n }\n this.tryComplete();\n }\n _next(value) {\n const index = this.index++;\n try {\n const delayNotifier = this.delayDurationSelector(value, index);\n if (delayNotifier) {\n this.tryDelay(delayNotifier, value);\n }\n } catch (err) {\n this.destination.error(err);\n }\n }\n _complete() {\n this.completed = true;\n this.tryComplete();\n this.unsubscribe();\n }\n removeSubscription(subscription) {\n subscription.unsubscribe();\n const subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription);\n if (subscriptionIdx !== -1) {\n this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);\n }\n return subscription.outerValue;\n }\n tryDelay(delayNotifier, value) {\n const notifierSubscription = subscribeToResult(this, delayNotifier, value);\n if (notifierSubscription && !notifierSubscription.closed) {\n const destination = this.destination;\n destination.add(notifierSubscription);\n this.delayNotifierSubscriptions.push(notifierSubscription);\n }\n }\n tryComplete() {\n if (this.completed && this.delayNotifierSubscriptions.length === 0) {\n this.destination.complete();\n }\n }\n}\nclass SubscriptionDelayObservable extends Observable {\n constructor(source, subscriptionDelay) {\n super();\n this.source = source;\n this.subscriptionDelay = subscriptionDelay;\n }\n _subscribe(subscriber) {\n this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source));\n }\n}\nclass SubscriptionDelaySubscriber extends Subscriber {\n constructor(parent, source) {\n super();\n this.parent = parent;\n this.source = source;\n this.sourceSubscribed = false;\n }\n _next(unused) {\n this.subscribeToSource();\n }\n _error(err) {\n this.unsubscribe();\n this.parent.error(err);\n }\n _complete() {\n this.unsubscribe();\n this.subscribeToSource();\n }\n subscribeToSource() {\n if (!this.sourceSubscribed) {\n this.sourceSubscribed = true;\n this.unsubscribe();\n this.source.subscribe(this.parent);\n }\n }\n}","map":{"version":3,"names":["Subscriber","Observable","OuterSubscriber","subscribeToResult","delayWhen","delayDurationSelector","subscriptionDelay","source","SubscriptionDelayObservable","lift","DelayWhenOperator","constructor","call","subscriber","subscribe","DelayWhenSubscriber","destination","completed","delayNotifierSubscriptions","index","notifyNext","outerValue","_innerValue","_outerIndex","_innerIndex","innerSub","next","removeSubscription","tryComplete","notifyError","error","_error","notifyComplete","value","_next","delayNotifier","tryDelay","err","_complete","unsubscribe","subscription","subscriptionIdx","indexOf","splice","notifierSubscription","closed","add","push","length","complete","_subscribe","SubscriptionDelaySubscriber","parent","sourceSubscribed","unused","subscribeToSource"],"sources":["/home/arctichawk1/Desktop/Projects/Public/Kargi-Sitesi/node_modules/rxjs/_esm2015/internal/operators/delayWhen.js"],"sourcesContent":["import { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nexport function delayWhen(delayDurationSelector, subscriptionDelay) {\n if (subscriptionDelay) {\n return (source) => new SubscriptionDelayObservable(source, subscriptionDelay)\n .lift(new DelayWhenOperator(delayDurationSelector));\n }\n return (source) => source.lift(new DelayWhenOperator(delayDurationSelector));\n}\nclass DelayWhenOperator {\n constructor(delayDurationSelector) {\n this.delayDurationSelector = delayDurationSelector;\n }\n call(subscriber, source) {\n return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector));\n }\n}\nclass DelayWhenSubscriber extends OuterSubscriber {\n constructor(destination, delayDurationSelector) {\n super(destination);\n this.delayDurationSelector = delayDurationSelector;\n this.completed = false;\n this.delayNotifierSubscriptions = [];\n this.index = 0;\n }\n notifyNext(outerValue, _innerValue, _outerIndex, _innerIndex, innerSub) {\n this.destination.next(outerValue);\n this.removeSubscription(innerSub);\n this.tryComplete();\n }\n notifyError(error, innerSub) {\n this._error(error);\n }\n notifyComplete(innerSub) {\n const value = this.removeSubscription(innerSub);\n if (value) {\n this.destination.next(value);\n }\n this.tryComplete();\n }\n _next(value) {\n const index = this.index++;\n try {\n const delayNotifier = this.delayDurationSelector(value, index);\n if (delayNotifier) {\n this.tryDelay(delayNotifier, value);\n }\n }\n catch (err) {\n this.destination.error(err);\n }\n }\n _complete() {\n this.completed = true;\n this.tryComplete();\n this.unsubscribe();\n }\n removeSubscription(subscription) {\n subscription.unsubscribe();\n const subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription);\n if (subscriptionIdx !== -1) {\n this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);\n }\n return subscription.outerValue;\n }\n tryDelay(delayNotifier, value) {\n const notifierSubscription = subscribeToResult(this, delayNotifier, value);\n if (notifierSubscription && !notifierSubscription.closed) {\n const destination = this.destination;\n destination.add(notifierSubscription);\n this.delayNotifierSubscriptions.push(notifierSubscription);\n }\n }\n tryComplete() {\n if (this.completed && this.delayNotifierSubscriptions.length === 0) {\n this.destination.complete();\n }\n }\n}\nclass SubscriptionDelayObservable extends Observable {\n constructor(source, subscriptionDelay) {\n super();\n this.source = source;\n this.subscriptionDelay = subscriptionDelay;\n }\n _subscribe(subscriber) {\n this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source));\n }\n}\nclass SubscriptionDelaySubscriber extends Subscriber {\n constructor(parent, source) {\n super();\n this.parent = parent;\n this.source = source;\n this.sourceSubscribed = false;\n }\n _next(unused) {\n this.subscribeToSource();\n }\n _error(err) {\n this.unsubscribe();\n this.parent.error(err);\n }\n _complete() {\n this.unsubscribe();\n this.subscribeToSource();\n }\n subscribeToSource() {\n if (!this.sourceSubscribed) {\n this.sourceSubscribed = true;\n this.unsubscribe();\n this.source.subscribe(this.parent);\n }\n }\n}\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,eAAe;AAC1C,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,eAAe,QAAQ,oBAAoB;AACpD,SAASC,iBAAiB,QAAQ,2BAA2B;AAC7D,OAAO,SAASC,SAASA,CAACC,qBAAqB,EAAEC,iBAAiB,EAAE;EAChE,IAAIA,iBAAiB,EAAE;IACnB,OAAQC,MAAM,IAAK,IAAIC,2BAA2B,CAACD,MAAM,EAAED,iBAAiB,CAAC,CACxEG,IAAI,CAAC,IAAIC,iBAAiB,CAACL,qBAAqB,CAAC,CAAC;EAC3D;EACA,OAAQE,MAAM,IAAKA,MAAM,CAACE,IAAI,CAAC,IAAIC,iBAAiB,CAACL,qBAAqB,CAAC,CAAC;AAChF;AACA,MAAMK,iBAAiB,CAAC;EACpBC,WAAWA,CAACN,qBAAqB,EAAE;IAC/B,IAAI,CAACA,qBAAqB,GAAGA,qBAAqB;EACtD;EACAO,IAAIA,CAACC,UAAU,EAAEN,MAAM,EAAE;IACrB,OAAOA,MAAM,CAACO,SAAS,CAAC,IAAIC,mBAAmB,CAACF,UAAU,EAAE,IAAI,CAACR,qBAAqB,CAAC,CAAC;EAC5F;AACJ;AACA,MAAMU,mBAAmB,SAASb,eAAe,CAAC;EAC9CS,WAAWA,CAACK,WAAW,EAAEX,qB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