Kargi-Sitesi/.angular/cache/18.2.11/babel-webpack/add32bbb2865d01867da822d3c57db18ca0e3b90785c1db2472ff54fbfc09881.json

1 line
No EOL
11 KiB
JSON

{"ast":null,"code":"import { Subject } from './Subject';\nimport { queue } from './scheduler/queue';\nimport { Subscription } from './Subscription';\nimport { ObserveOnSubscriber } from './operators/observeOn';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { SubjectSubscription } from './SubjectSubscription';\nexport class ReplaySubject extends Subject {\n constructor(bufferSize = Number.POSITIVE_INFINITY, windowTime = Number.POSITIVE_INFINITY, scheduler) {\n super();\n this.scheduler = scheduler;\n this._events = [];\n this._infiniteTimeWindow = false;\n this._bufferSize = bufferSize < 1 ? 1 : bufferSize;\n this._windowTime = windowTime < 1 ? 1 : windowTime;\n if (windowTime === Number.POSITIVE_INFINITY) {\n this._infiniteTimeWindow = true;\n this.next = this.nextInfiniteTimeWindow;\n } else {\n this.next = this.nextTimeWindow;\n }\n }\n nextInfiniteTimeWindow(value) {\n if (!this.isStopped) {\n const _events = this._events;\n _events.push(value);\n if (_events.length > this._bufferSize) {\n _events.shift();\n }\n }\n super.next(value);\n }\n nextTimeWindow(value) {\n if (!this.isStopped) {\n this._events.push(new ReplayEvent(this._getNow(), value));\n this._trimBufferThenGetEvents();\n }\n super.next(value);\n }\n _subscribe(subscriber) {\n const _infiniteTimeWindow = this._infiniteTimeWindow;\n const _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();\n const scheduler = this.scheduler;\n const len = _events.length;\n let subscription;\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n } else if (this.isStopped || this.hasError) {\n subscription = Subscription.EMPTY;\n } else {\n this.observers.push(subscriber);\n subscription = new SubjectSubscription(this, subscriber);\n }\n if (scheduler) {\n subscriber.add(subscriber = new ObserveOnSubscriber(subscriber, scheduler));\n }\n if (_infiniteTimeWindow) {\n for (let i = 0; i < len && !subscriber.closed; i++) {\n subscriber.next(_events[i]);\n }\n } else {\n for (let i = 0; i < len && !subscriber.closed; i++) {\n subscriber.next(_events[i].value);\n }\n }\n if (this.hasError) {\n subscriber.error(this.thrownError);\n } else if (this.isStopped) {\n subscriber.complete();\n }\n return subscription;\n }\n _getNow() {\n return (this.scheduler || queue).now();\n }\n _trimBufferThenGetEvents() {\n const now = this._getNow();\n const _bufferSize = this._bufferSize;\n const _windowTime = this._windowTime;\n const _events = this._events;\n const eventsCount = _events.length;\n let spliceCount = 0;\n while (spliceCount < eventsCount) {\n if (now - _events[spliceCount].time < _windowTime) {\n break;\n }\n spliceCount++;\n }\n if (eventsCount > _bufferSize) {\n spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);\n }\n if (spliceCount > 0) {\n _events.splice(0, spliceCount);\n }\n return _events;\n }\n}\nclass ReplayEvent {\n constructor(time, value) {\n this.time = time;\n this.value = value;\n }\n}","map":{"version":3,"names":["Subject","queue","Subscription","ObserveOnSubscriber","ObjectUnsubscribedError","SubjectSubscription","ReplaySubject","constructor","bufferSize","Number","POSITIVE_INFINITY","windowTime","scheduler","_events","_infiniteTimeWindow","_bufferSize","_windowTime","next","nextInfiniteTimeWindow","nextTimeWindow","value","isStopped","push","length","shift","ReplayEvent","_getNow","_trimBufferThenGetEvents","_subscribe","subscriber","len","subscription","closed","hasError","EMPTY","observers","add","i","error","thrownError","complete","now","eventsCount","spliceCount","time","Math","max","splice"],"sources":["/home/arctichawk1/Desktop/Projects/Public/Kargi-Sitesi/node_modules/rxjs/_esm2015/internal/ReplaySubject.js"],"sourcesContent":["import { Subject } from './Subject';\nimport { queue } from './scheduler/queue';\nimport { Subscription } from './Subscription';\nimport { ObserveOnSubscriber } from './operators/observeOn';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { SubjectSubscription } from './SubjectSubscription';\nexport class ReplaySubject extends Subject {\n constructor(bufferSize = Number.POSITIVE_INFINITY, windowTime = Number.POSITIVE_INFINITY, scheduler) {\n super();\n this.scheduler = scheduler;\n this._events = [];\n this._infiniteTimeWindow = false;\n this._bufferSize = bufferSize < 1 ? 1 : bufferSize;\n this._windowTime = windowTime < 1 ? 1 : windowTime;\n if (windowTime === Number.POSITIVE_INFINITY) {\n this._infiniteTimeWindow = true;\n this.next = this.nextInfiniteTimeWindow;\n }\n else {\n this.next = this.nextTimeWindow;\n }\n }\n nextInfiniteTimeWindow(value) {\n if (!this.isStopped) {\n const _events = this._events;\n _events.push(value);\n if (_events.length > this._bufferSize) {\n _events.shift();\n }\n }\n super.next(value);\n }\n nextTimeWindow(value) {\n if (!this.isStopped) {\n this._events.push(new ReplayEvent(this._getNow(), value));\n this._trimBufferThenGetEvents();\n }\n super.next(value);\n }\n _subscribe(subscriber) {\n const _infiniteTimeWindow = this._infiniteTimeWindow;\n const _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();\n const scheduler = this.scheduler;\n const len = _events.length;\n let subscription;\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n else if (this.isStopped || this.hasError) {\n subscription = Subscription.EMPTY;\n }\n else {\n this.observers.push(subscriber);\n subscription = new SubjectSubscription(this, subscriber);\n }\n if (scheduler) {\n subscriber.add(subscriber = new ObserveOnSubscriber(subscriber, scheduler));\n }\n if (_infiniteTimeWindow) {\n for (let i = 0; i < len && !subscriber.closed; i++) {\n subscriber.next(_events[i]);\n }\n }\n else {\n for (let i = 0; i < len && !subscriber.closed; i++) {\n subscriber.next(_events[i].value);\n }\n }\n if (this.hasError) {\n subscriber.error(this.thrownError);\n }\n else if (this.isStopped) {\n subscriber.complete();\n }\n return subscription;\n }\n _getNow() {\n return (this.scheduler || queue).now();\n }\n _trimBufferThenGetEvents() {\n const now = this._getNow();\n const _bufferSize = this._bufferSize;\n const _windowTime = this._windowTime;\n const _events = this._events;\n const eventsCount = _events.length;\n let spliceCount = 0;\n while (spliceCount < eventsCount) {\n if ((now - _events[spliceCount].time) < _windowTime) {\n break;\n }\n spliceCount++;\n }\n if (eventsCount > _bufferSize) {\n spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);\n }\n if (spliceCount > 0) {\n _events.splice(0, spliceCount);\n }\n return _events;\n }\n}\nclass ReplayEvent {\n constructor(time, value) {\n this.time = time;\n this.value = value;\n }\n}\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,WAAW;AACnC,SAASC,KAAK,QAAQ,mBAAmB;AACzC,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,uBAAuB,QAAQ,gCAAgC;AACxE,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,OAAO,MAAMC,aAAa,SAASN,OAAO,CAAC;EACvCO,WAAWA,CAACC,UAAU,GAAGC,MAAM,CAACC,iBAAiB,EAAEC,UAAU,GAAGF,MAAM,CAACC,iBAAiB,EAAEE,SAAS,EAAE;IACjG,KAAK,CAAC,CAAC;IACP,IAAI,CAACA,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACC,OAAO,GAAG,EAAE;IACjB,IAAI,CAACC,mBAAmB,GAAG,KAAK;IAChC,IAAI,CAACC,WAAW,GAAGP,UAAU,GAAG,CAAC,GAAG,CAAC,GAAGA,UAAU;IAClD,IAAI,CAACQ,WAAW,GAAGL,UAAU,GAAG,CAAC,GAAG,CAAC,GAAGA,UAAU;IAClD,IAAIA,UAAU,KAAKF,MAAM,CAACC,iBAAiB,EAAE;MACzC,IAAI,CAACI,mBAAmB,GAAG,IAAI;MAC/B,IAAI,CAACG,IAAI,GAAG,IAAI,CAACC,sBAAsB;IAC3C,CAAC,MACI;MACD,IAAI,CAACD,IAAI,GAAG,IAAI,CAACE,cAAc;IACnC;EACJ;EACAD,sBAAsBA,CAACE,KAAK,EAAE;IAC1B,IAAI,CAAC,IAAI,CAACC,SAAS,EAAE;MACjB,MAAMR,OAAO,GAAG,IAAI,CAACA,OAAO;MAC5BA,OAAO,CAACS,IAAI,CAACF,KAAK,CAAC;MACnB,IAAIP,OAAO,CAACU,MAAM,GAAG,IAAI,CAACR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