Kargi-Sitesi/.angular/cache/18.2.11/babel-webpack/7d6c5be40941ba10284b0b83042eeb33d83be3a5c7b45fb0e8aad2e99995322f.json

1 line
5.7 KiB
JSON
Raw Permalink Normal View History

2024-11-04 02:30:09 +00:00
{"ast":null,"code":"import { Subscriber } from '../Subscriber';\nimport { async } from '../scheduler/async';\nexport function debounceTime(dueTime, scheduler = async) {\n return source => source.lift(new DebounceTimeOperator(dueTime, scheduler));\n}\nclass DebounceTimeOperator {\n constructor(dueTime, scheduler) {\n this.dueTime = dueTime;\n this.scheduler = scheduler;\n }\n call(subscriber, source) {\n return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));\n }\n}\nclass DebounceTimeSubscriber extends Subscriber {\n constructor(destination, dueTime, scheduler) {\n super(destination);\n this.dueTime = dueTime;\n this.scheduler = scheduler;\n this.debouncedSubscription = null;\n this.lastValue = null;\n this.hasValue = false;\n }\n _next(value) {\n this.clearDebounce();\n this.lastValue = value;\n this.hasValue = true;\n this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this));\n }\n _complete() {\n this.debouncedNext();\n this.destination.complete();\n }\n debouncedNext() {\n this.clearDebounce();\n if (this.hasValue) {\n const {\n lastValue\n } = this;\n this.lastValue = null;\n this.hasValue = false;\n this.destination.next(lastValue);\n }\n }\n clearDebounce() {\n const debouncedSubscription = this.debouncedSubscription;\n if (debouncedSubscription !== null) {\n this.remove(debouncedSubscription);\n debouncedSubscription.unsubscribe();\n this.debouncedSubscription = null;\n }\n }\n}\nfunction dispatchNext(subscriber) {\n subscriber.debouncedNext();\n}","map":{"version":3,"names":["Subscriber","async","debounceTime","dueTime","scheduler","source","lift","DebounceTimeOperator","constructor","call","subscriber","subscribe","DebounceTimeSubscriber","destination","debouncedSubscription","lastValue","hasValue","_next","value","clearDebounce","add","schedule","dispatchNext","_complete","debouncedNext","complete","next","remove","unsubscribe"],"sources":["/home/arctichawk1/Desktop/Projects/Public/Kargi-Sitesi/node_modules/rxjs/_esm2015/internal/operators/debounceTime.js"],"sourcesContent":["import { Subscriber } from '../Subscriber';\nimport { async } from '../scheduler/async';\nexport function debounceTime(dueTime, scheduler = async) {\n return (source) => source.lift(new DebounceTimeOperator(dueTime, scheduler));\n}\nclass DebounceTimeOperator {\n constructor(dueTime, scheduler) {\n this.dueTime = dueTime;\n this.scheduler = scheduler;\n }\n call(subscriber, source) {\n return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));\n }\n}\nclass DebounceTimeSubscriber extends Subscriber {\n constructor(destination, dueTime, scheduler) {\n super(destination);\n this.dueTime = dueTime;\n this.scheduler = scheduler;\n this.debouncedSubscription = null;\n this.lastValue = null;\n this.hasValue = false;\n }\n _next(value) {\n this.clearDebounce();\n this.lastValue = value;\n this.hasValue = true;\n this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this));\n }\n _complete() {\n this.debouncedNext();\n this.destination.complete();\n }\n debouncedNext() {\n this.clearDebounce();\n if (this.hasValue) {\n const { lastValue } = this;\n this.lastValue = null;\n this.hasValue = false;\n this.destination.next(lastValue);\n }\n }\n clearDebounce() {\n const debouncedSubscription = this.debouncedSubscription;\n if (debouncedSubscription !== null) {\n this.remove(debouncedSubscription);\n debouncedSubscription.unsubscribe();\n this.debouncedSubscription = null;\n }\n }\n}\nfunction dispatchNext(subscriber) {\n subscriber.debouncedNext();\n}\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,eAAe;AAC1C,SAASC,KAAK,QA