Kargi-Sitesi/.angular/cache/16.2.16/babel-webpack/73907f7d6af862db7ee85839530ed54a290a9d9ee74fc1a17dccccd64592d4e6.json

1 line
8.8 KiB
JSON
Raw Normal View History

2024-10-31 19:07:58 +00:00
{"ast":null,"code":"import { Subscriber } from '../Subscriber';\nexport function sequenceEqual(compareTo, comparator) {\n return source => source.lift(new SequenceEqualOperator(compareTo, comparator));\n}\nexport class SequenceEqualOperator {\n constructor(compareTo, comparator) {\n this.compareTo = compareTo;\n this.comparator = comparator;\n }\n call(subscriber, source) {\n return source.subscribe(new SequenceEqualSubscriber(subscriber, this.compareTo, this.comparator));\n }\n}\nexport class SequenceEqualSubscriber extends Subscriber {\n constructor(destination, compareTo, comparator) {\n super(destination);\n this.compareTo = compareTo;\n this.comparator = comparator;\n this._a = [];\n this._b = [];\n this._oneComplete = false;\n this.destination.add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, this)));\n }\n _next(value) {\n if (this._oneComplete && this._b.length === 0) {\n this.emit(false);\n } else {\n this._a.push(value);\n this.checkValues();\n }\n }\n _complete() {\n if (this._oneComplete) {\n this.emit(this._a.length === 0 && this._b.length === 0);\n } else {\n this._oneComplete = true;\n }\n this.unsubscribe();\n }\n checkValues() {\n const {\n _a,\n _b,\n comparator\n } = this;\n while (_a.length > 0 && _b.length > 0) {\n let a = _a.shift();\n let b = _b.shift();\n let areEqual = false;\n try {\n areEqual = comparator ? comparator(a, b) : a === b;\n } catch (e) {\n this.destination.error(e);\n }\n if (!areEqual) {\n this.emit(false);\n }\n }\n }\n emit(value) {\n const {\n destination\n } = this;\n destination.next(value);\n destination.complete();\n }\n nextB(value) {\n if (this._oneComplete && this._a.length === 0) {\n this.emit(false);\n } else {\n this._b.push(value);\n this.checkValues();\n }\n }\n completeB() {\n if (this._oneComplete) {\n this.emit(this._a.length === 0 && this._b.length === 0);\n } else {\n this._oneComplete = true;\n }\n }\n}\nclass SequenceEqualCompareToSubscriber extends Subscriber {\n constructor(destination, parent) {\n super(destination);\n this.parent = parent;\n }\n _next(value) {\n this.parent.nextB(value);\n }\n _error(err) {\n this.parent.error(err);\n this.unsubscribe();\n }\n _complete() {\n this.parent.completeB();\n this.unsubscribe();\n }\n}","map":{"version":3,"names":["Subscriber","sequenceEqual","compareTo","comparator","source","lift","SequenceEqualOperator","constructor","call","subscriber","subscribe","SequenceEqualSubscriber","destination","_a","_b","_oneComplete","add","SequenceEqualCompareToSubscriber","_next","value","length","emit","push","checkValues","_complete","unsubscribe","a","shift","b","areEqual","e","error","next","complete","nextB","completeB","parent","_error","err"],"sources":["/home/arctichawk1/Desktop/Projects/Public/Kargi-Sitesi/node_modules/rxjs/_esm2015/internal/operators/sequenceEqual.js"],"sourcesContent":["import { Subscriber } from '../Subscriber';\nexport function sequenceEqual(compareTo, comparator) {\n return (source) => source.lift(new SequenceEqualOperator(compareTo, comparator));\n}\nexport class SequenceEqualOperator {\n constructor(compareTo, comparator) {\n this.compareTo = compareTo;\n this.comparator = comparator;\n }\n call(subscriber, source) {\n return source.subscribe(new SequenceEqualSubscriber(subscriber, this.compareTo, this.comparator));\n }\n}\nexport class SequenceEqualSubscriber extends Subscriber {\n constructor(destination, compareTo, comparator) {\n super(destination);\n this.compareTo = compareTo;\n this.comparator = comparator;\n this._a = [];\n this._b = [];\n this._oneComplete = false;\n this.destination.add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, this)));\n }\n _next(value) {\n if (this.