Kargi-Sitesi/.angular/cache/18.2.11/babel-webpack/2cb5fa73043622cb14c2a2365cb48703aa0953b4310d74071294a981a79c79bb.json

1 line
No EOL
15 KiB
JSON

{"ast":null,"code":"import { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { Observable } from '../Observable';\nimport { Subject } from '../Subject';\nexport function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) {\n return source => source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector));\n}\nclass GroupByOperator {\n constructor(keySelector, elementSelector, durationSelector, subjectSelector) {\n this.keySelector = keySelector;\n this.elementSelector = elementSelector;\n this.durationSelector = durationSelector;\n this.subjectSelector = subjectSelector;\n }\n call(subscriber, source) {\n return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector));\n }\n}\nclass GroupBySubscriber extends Subscriber {\n constructor(destination, keySelector, elementSelector, durationSelector, subjectSelector) {\n super(destination);\n this.keySelector = keySelector;\n this.elementSelector = elementSelector;\n this.durationSelector = durationSelector;\n this.subjectSelector = subjectSelector;\n this.groups = null;\n this.attemptedToUnsubscribe = false;\n this.count = 0;\n }\n _next(value) {\n let key;\n try {\n key = this.keySelector(value);\n } catch (err) {\n this.error(err);\n return;\n }\n this._group(value, key);\n }\n _group(value, key) {\n let groups = this.groups;\n if (!groups) {\n groups = this.groups = new Map();\n }\n let group = groups.get(key);\n let element;\n if (this.elementSelector) {\n try {\n element = this.elementSelector(value);\n } catch (err) {\n this.error(err);\n }\n } else {\n element = value;\n }\n if (!group) {\n group = this.subjectSelector ? this.subjectSelector() : new Subject();\n groups.set(key, group);\n const groupedObservable = new GroupedObservable(key, group, this);\n this.destination.next(groupedObservable);\n if (this.durationSelector) {\n let duration;\n try {\n duration = this.durationSelector(new GroupedObservable(key, group));\n } catch (err) {\n this.error(err);\n return;\n }\n this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this)));\n }\n }\n if (!group.closed) {\n group.next(element);\n }\n }\n _error(err) {\n const groups = this.groups;\n if (groups) {\n groups.forEach((group, key) => {\n group.error(err);\n });\n groups.clear();\n }\n this.destination.error(err);\n }\n _complete() {\n const groups = this.groups;\n if (groups) {\n groups.forEach((group, key) => {\n group.complete();\n });\n groups.clear();\n }\n this.destination.complete();\n }\n removeGroup(key) {\n this.groups.delete(key);\n }\n unsubscribe() {\n if (!this.closed) {\n this.attemptedToUnsubscribe = true;\n if (this.count === 0) {\n super.unsubscribe();\n }\n }\n }\n}\nclass GroupDurationSubscriber extends Subscriber {\n constructor(key, group, parent) {\n super(group);\n this.key = key;\n this.group = group;\n this.parent = parent;\n }\n _next(value) {\n this.complete();\n }\n _unsubscribe() {\n const {\n parent,\n key\n } = this;\n this.key = this.parent = null;\n if (parent) {\n parent.removeGroup(key);\n }\n }\n}\nexport class GroupedObservable extends Observable {\n constructor(key, groupSubject, refCountSubscription) {\n super();\n this.key = key;\n this.groupSubject = groupSubject;\n this.refCountSubscription = refCountSubscription;\n }\n _subscribe(subscriber) {\n const subscription = new Subscription();\n const {\n refCountSubscription,\n groupSubject\n } = this;\n if (refCountSubscription && !refCountSubscription.closed) {\n subscription.add(new InnerRefCountSubscription(refCountSubscription));\n }\n subscription.add(groupSubject.subscribe(subscriber));\n return subscription;\n }\n}\nclass InnerRefCountSubscription extends Subscription {\n constructor(parent) {\n super();\n this.parent = parent;\n parent.count++;\n }\n unsubscribe() {\n const parent = this.parent;\n if (!parent.closed && !this.closed) {\n super.unsubscribe();\n parent.count -= 1;\n if (parent.count === 0 && parent.attemptedToUnsubscribe) {\n parent.unsubscribe();\n }\n }\n }\n}","map":{"version":3,"names":["Subscriber","Subscription","Observable","Subject","groupBy","keySelector","elementSelector","durationSelector","subjectSelector","source","lift","GroupByOperator","constructor","call","subscriber","subscribe","GroupBySubscriber","destination","groups","attemptedToUnsubscribe","count","_next","value","key","err","error","_group","Map","group","get","element","set","groupedObservable","GroupedObservable","next","duration","add","GroupDurationSubscriber","closed","_error","forEach","clear","_complete","complete","removeGroup","delete","unsubscribe","parent","_unsubscribe","groupSubject","refCountSubscription","_subscribe","subscription","InnerRefCountSubscription"],"sources":["/home/arctichawk1/Desktop/Projects/Public/Kargi-Sitesi/node_modules/rxjs/_esm2015/internal/operators/groupBy.js"],"sourcesContent":["import { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { Observable } from '../Observable';\nimport { Subject } from '../Subject';\nexport function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) {\n return (source) => source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector));\n}\nclass GroupByOperator {\n constructor(keySelector, elementSelector, durationSelector, subjectSelector) {\n this.keySelector = keySelector;\n this.elementSelector = elementSelector;\n this.durationSelector = durationSelector;\n this.subjectSelector = subjectSelector;\n }\n call(subscriber, source) {\n return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector));\n }\n}\nclass GroupBySubscriber extends Subscriber {\n constructor(destination, keySelector, elementSelector, durationSelector, subjectSelector) {\n super(destination);\n this.keySelector = keySelector;\n this.elementSelector = elementSelector;\n this.durationSelector = durationSelector;\n this.subjectSelector = subjectSelector;\n this.groups = null;\n this.attemptedToUnsubscribe = false;\n this.count = 0;\n }\n _next(value) {\n let key;\n try {\n key = this.keySelector(value);\n }\n catch (err) {\n this.error(err);\n return;\n }\n this._group(value, key);\n }\n _group(value, key) {\n let groups = this.groups;\n if (!groups) {\n groups = this.groups = new Map();\n }\n let group = groups.get(key);\n let element;\n if (this.elementSelector) {\n try {\n element = this.elementSelector(value);\n }\n catch (err) {\n this.error(err);\n }\n }\n else {\n element = value;\n }\n if (!group) {\n group = (this.subjectSelector ? this.subjectSelector() : new Subject());\n groups.set(key, group);\n const groupedObservable = new GroupedObservable(key, group, this);\n this.destination.next(groupedObservable);\n if (this.durationSelector) {\n let duration;\n try {\n duration = this.durationSelector(new GroupedObservable(key, group));\n }\n catch (err) {\n this.error(err);\n return;\n }\n this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this)));\n }\n }\n if (!group.closed) {\n group.next(element);\n }\n }\n _error(err) {\n const groups = this.groups;\n if (groups) {\n groups.forEach((group, key) => {\n group.error(err);\n });\n groups.clear();\n }\n this.destination.error(err);\n }\n _complete() {\n const groups = this.groups;\n if (groups) {\n groups.forEach((group, key) => {\n group.complete();\n });\n groups.clear();\n }\n this.destination.complete();\n }\n removeGroup(key) {\n this.groups.delete(key);\n }\n unsubscribe() {\n if (!this.closed) {\n this.attemptedToUnsubscribe = true;\n if (this.count === 0) {\n super.unsubscribe();\n }\n }\n }\n}\nclass GroupDurationSubscriber extends Subscriber {\n constructor(key, group, parent) {\n super(group);\n this.key = key;\n this.group = group;\n this.parent = parent;\n }\n _next(value) {\n this.complete();\n }\n _unsubscribe() {\n const { parent, key } = this;\n this.key = this.parent = null;\n if (parent) {\n parent.removeGroup(key);\n }\n }\n}\nexport class GroupedObservable extends Observable {\n constructor(key, groupSubject, refCountSubscription) {\n super();\n this.key = key;\n this.groupSubject = groupSubject;\n this.refCountSubscription = refCountSubscription;\n }\n _subscribe(subscriber) {\n const subscription = new Subscription();\n const { refCountSubscription, groupSubject } = this;\n if (refCountSubscription && !refCountSubscription.closed) {\n subscription.add(new InnerRefCountSubscription(refCountSubscription));\n }\n subscription.add(groupSubject.subscribe(subscriber));\n return subscription;\n }\n}\nclass InnerRefCountSubscription extends Subscription {\n constructor(parent) {\n super();\n this.parent = parent;\n parent.count++;\n }\n unsubscribe() {\n const parent = this.parent;\n if (!parent.closed && !this.closed) {\n super.unsubscribe();\n parent.count -= 1;\n if (parent.count === 0 && parent.attemptedToUnsubscribe) {\n parent.unsubscribe();\n }\n }\n }\n}\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,eAAe;AAC1C,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,OAAO,QAAQ,YAAY;AACpC,OAAO,SAASC,OAAOA,CAACC,WAAW,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