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

1 line
7.2 KiB
JSON
Raw Normal View History

2024-11-04 02:30:09 +00:00
{"ast":null,"code":"import { map } from './map';\nimport { from } from '../observable/from';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function exhaustMap(project, resultSelector) {\n if (resultSelector) {\n return source => source.pipe(exhaustMap((a, i) => from(project(a, i)).pipe(map((b, ii) => resultSelector(a, b, i, ii)))));\n }\n return source => source.lift(new ExhaustMapOperator(project));\n}\nclass ExhaustMapOperator {\n constructor(project) {\n this.project = project;\n }\n call(subscriber, source) {\n return source.subscribe(new ExhaustMapSubscriber(subscriber, this.project));\n }\n}\nclass ExhaustMapSubscriber extends SimpleOuterSubscriber {\n constructor(destination, project) {\n super(destination);\n this.project = project;\n this.hasSubscription = false;\n this.hasCompleted = false;\n this.index = 0;\n }\n _next(value) {\n if (!this.hasSubscription) {\n this.tryNext(value);\n }\n }\n tryNext(value) {\n let result;\n const index = this.index++;\n try {\n result = this.project(value, index);\n } catch (err) {\n this.destination.error(err);\n return;\n }\n this.hasSubscription = true;\n this._innerSub(result);\n }\n _innerSub(result) {\n const innerSubscriber = new SimpleInnerSubscriber(this);\n const destination = this.destination;\n destination.add(innerSubscriber);\n const innerSubscription = innerSubscribe(result, innerSubscriber);\n if (innerSubscription !== innerSubscriber) {\n destination.add(innerSubscription);\n }\n }\n _complete() {\n this.hasCompleted = true;\n if (!this.hasSubscription) {\n this.destination.complete();\n }\n this.unsubscribe();\n }\n notifyNext(innerValue) {\n this.destination.next(innerValue);\n }\n notifyError(err) {\n this.destination.error(err);\n }\n notifyComplete() {\n this.hasSubscription = false;\n if (this.hasCompleted) {\n this.destination.complete();\n }\n }\n}","map":{"version":3,"names":["map","from","SimpleOuterSubscriber","SimpleInnerSubscriber","innerSubscribe","exhaustMap","project","resultSelector","source","pipe","a","i","b","ii","lift","ExhaustMapOperator","constructor","call","subscriber","subscribe","ExhaustMapSubscriber","destination","hasSubscription","hasCompleted","index","_next","value","tryNext","result","err","error","_innerSub","innerSubscriber","add","innerSubscription","_complete","complete","unsubscribe","notifyNext","innerValue","next","notifyError","notifyComplete"],"sources":["/home/arctichawk1/Desktop/Projects/Public/Kargi-Sitesi/node_modules/rxjs/_esm2015/internal/operators/exhaustMap.js"],"sourcesContent":["import { map } from './map';\nimport { from } from '../observable/from';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function exhaustMap(project, resultSelector) {\n if (resultSelector) {\n return (source) => source.pipe(exhaustMap((a, i) => from(project(a, i)).pipe(map((b, ii) => resultSelector(a, b, i, ii)))));\n }\n return (source) => source.lift(new ExhaustMapOperator(project));\n}\nclass ExhaustMapOperator {\n constructor(project) {\n this.project = project;\n }\n call(subscriber, source) {\n return source.subscribe(new ExhaustMapSubscriber(subscriber, this.project));\n }\n}\nclass ExhaustMapSubscriber extends SimpleOuterSubscriber {\n constructor(destination, project) {\n super(destination);\n this.project = project;\n this.hasSubscription = false;\n this.hasCompleted = false;\n this.index = 0;\n }\n _next(value) {\n if (!this.hasSubscription) {\n this.tryNext(value);\n }\n }\n tryNext(value) {\n let result;\n const index = this.index++;\n try {\n result = this.project(value, index);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.hasSub