Kargi-Sitesi/.angular/cache/18.2.11/babel-webpack/2076345b99ceee744a88ff27de752d2cae4fe192e5c70da807e9d5c6818e0076.json

1 line
8.8 KiB
JSON
Raw Normal View History

2024-11-04 02:30:09 +00:00
{"ast":null,"code":"import { async } from '../scheduler/async';\nimport { isDate } from '../util/isDate';\nimport { Subscriber } from '../Subscriber';\nimport { Notification } from '../Notification';\nexport function delay(delay, scheduler = async) {\n const absoluteDelay = isDate(delay);\n const delayFor = absoluteDelay ? +delay - scheduler.now() : Math.abs(delay);\n return source => source.lift(new DelayOperator(delayFor, scheduler));\n}\nclass DelayOperator {\n constructor(delay, scheduler) {\n this.delay = delay;\n this.scheduler = scheduler;\n }\n call(subscriber, source) {\n return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));\n }\n}\nclass DelaySubscriber extends Subscriber {\n constructor(destination, delay, scheduler) {\n super(destination);\n this.delay = delay;\n this.scheduler = scheduler;\n this.queue = [];\n this.active = false;\n this.errored = false;\n }\n static dispatch(state) {\n const source = state.source;\n const queue = source.queue;\n const scheduler = state.scheduler;\n const destination = state.destination;\n while (queue.length > 0 && queue[0].time - scheduler.now() <= 0) {\n queue.shift().notification.observe(destination);\n }\n if (queue.length > 0) {\n const delay = Math.max(0, queue[0].time - scheduler.now());\n this.schedule(state, delay);\n } else {\n this.unsubscribe();\n source.active = false;\n }\n }\n _schedule(scheduler) {\n this.active = true;\n const destination = this.destination;\n destination.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {\n source: this,\n destination: this.destination,\n scheduler: scheduler\n }));\n }\n scheduleNotification(notification) {\n if (this.errored === true) {\n return;\n }\n const scheduler = this.scheduler;\n const message = new DelayMessage(scheduler.now() + this.delay, notification);\n this.queue.push(message);\n if (this.active === false) {\n this._schedule(scheduler);\n }\n }\n _next(value) {\n this.scheduleNotification(Notification.createNext(value));\n }\n _error(err) {\n this.errored = true;\n this.queue = [];\n this.destination.error(err);\n this.unsubscribe();\n }\n _complete() {\n this.scheduleNotification(Notification.createComplete());\n this.unsubscribe();\n }\n}\nclass DelayMessage {\n constructor(time, notification) {\n this.time = time;\n this.notification = notification;\n }\n}","map":{"version":3,"names":["async","isDate","Subscriber","Notification","delay","scheduler","absoluteDelay","delayFor","now","Math","abs","source","lift","DelayOperator","constructor","call","subscriber","subscribe","DelaySubscriber","destination","queue","active","errored","dispatch","state","length","time","shift","notification","observe","max","schedule","unsubscribe","_schedule","add","scheduleNotification","message","DelayMessage","push","_next","value","createNext","_error","err","error","_complete","createComplete"],"sources":["/home/arctichawk1/Desktop/Projects/Public/Kargi-Sitesi/node_modules/rxjs/_esm2015/internal/operators/delay.js"],"sourcesContent":["import { async } from '../scheduler/async';\nimport { isDate } from '../util/isDate';\nimport { Subscriber } from '../Subscriber';\nimport { Notification } from '../Notification';\nexport function delay(delay, scheduler = async) {\n const absoluteDelay = isDate(delay);\n const delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay);\n return (source) => source.lift(new DelayOperator(delayFor, scheduler));\n}\nclass DelayOperator {\n constructor(delay, scheduler) {\n this.delay = delay;\n this.scheduler = scheduler;\n }\n call(subscriber, source) {\n return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));\n }\n}\nclass DelaySubscriber extends Subscriber {\n constructor(destination, delay, scheduler) {\n super(destination);\n this.delay = delay;\n this.sche