Kargi-Sitesi/.angular/cache/18.2.11/babel-webpack/21815601a66303769779d8d8393d3a319dbdae9d0865816bd6bc725945ff316e.json

1 line
No EOL
7.6 KiB
JSON

{"ast":null,"code":"import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport const defaultThrottleConfig = {\n leading: true,\n trailing: false\n};\nexport function throttle(durationSelector, config = defaultThrottleConfig) {\n return source => source.lift(new ThrottleOperator(durationSelector, !!config.leading, !!config.trailing));\n}\nclass ThrottleOperator {\n constructor(durationSelector, leading, trailing) {\n this.durationSelector = durationSelector;\n this.leading = leading;\n this.trailing = trailing;\n }\n call(subscriber, source) {\n return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing));\n }\n}\nclass ThrottleSubscriber extends SimpleOuterSubscriber {\n constructor(destination, durationSelector, _leading, _trailing) {\n super(destination);\n this.destination = destination;\n this.durationSelector = durationSelector;\n this._leading = _leading;\n this._trailing = _trailing;\n this._hasValue = false;\n }\n _next(value) {\n this._hasValue = true;\n this._sendValue = value;\n if (!this._throttled) {\n if (this._leading) {\n this.send();\n } else {\n this.throttle(value);\n }\n }\n }\n send() {\n const {\n _hasValue,\n _sendValue\n } = this;\n if (_hasValue) {\n this.destination.next(_sendValue);\n this.throttle(_sendValue);\n }\n this._hasValue = false;\n this._sendValue = undefined;\n }\n throttle(value) {\n const duration = this.tryDurationSelector(value);\n if (!!duration) {\n this.add(this._throttled = innerSubscribe(duration, new SimpleInnerSubscriber(this)));\n }\n }\n tryDurationSelector(value) {\n try {\n return this.durationSelector(value);\n } catch (err) {\n this.destination.error(err);\n return null;\n }\n }\n throttlingDone() {\n const {\n _throttled,\n _trailing\n } = this;\n if (_throttled) {\n _throttled.unsubscribe();\n }\n this._throttled = undefined;\n if (_trailing) {\n this.send();\n }\n }\n notifyNext() {\n this.throttlingDone();\n }\n notifyComplete() {\n this.throttlingDone();\n }\n}","map":{"version":3,"names":["SimpleOuterSubscriber","innerSubscribe","SimpleInnerSubscriber","defaultThrottleConfig","leading","trailing","throttle","durationSelector","config","source","lift","ThrottleOperator","constructor","call","subscriber","subscribe","ThrottleSubscriber","destination","_leading","_trailing","_hasValue","_next","value","_sendValue","_throttled","send","next","undefined","duration","tryDurationSelector","add","err","error","throttlingDone","unsubscribe","notifyNext","notifyComplete"],"sources":["/home/arctichawk1/Desktop/Projects/Public/Kargi-Sitesi/node_modules/rxjs/_esm2015/internal/operators/throttle.js"],"sourcesContent":["import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport const defaultThrottleConfig = {\n leading: true,\n trailing: false\n};\nexport function throttle(durationSelector, config = defaultThrottleConfig) {\n return (source) => source.lift(new ThrottleOperator(durationSelector, !!config.leading, !!config.trailing));\n}\nclass ThrottleOperator {\n constructor(durationSelector, leading, trailing) {\n this.durationSelector = durationSelector;\n this.leading = leading;\n this.trailing = trailing;\n }\n call(subscriber, source) {\n return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing));\n }\n}\nclass ThrottleSubscriber extends SimpleOuterSubscriber {\n constructor(destination, durationSelector, _leading, _trailing) {\n super(destination);\n this.destination = destination;\n this.durationSelector = durationSelector;\n this._leading = _leading;\n this._trailing = _trailing;\n this._hasValue = false;\n }\n _next(value) {\n this._hasValue = true;\n this._sendValue = value;\n if (!this._throttled) {\n if (this._leading) {\n this.send();\n }\n else {\n this.throttle(value);\n }\n }\n }\n send() {\n const { _hasValue, _sendValue } = this;\n if (_hasValue) {\n this.destination.next(_sendValue);\n this.throttle(_sendValue);\n }\n this._hasValue = false;\n this._sendValue = undefined;\n }\n throttle(value) {\n const duration = this.tryDurationSelector(value);\n if (!!duration) {\n this.add(this._throttled = innerSubscribe(duration, new SimpleInnerSubscriber(this)));\n }\n }\n tryDurationSelector(value) {\n try {\n return this.durationSelector(value);\n }\n catch (err) {\n this.destination.error(err);\n return null;\n }\n }\n throttlingDone() {\n const { _throttled, _trailing } = this;\n if (_throttled) {\n _throttled.unsubscribe();\n }\n this._throttled = undefined;\n if (_trailing) {\n this.send();\n }\n }\n notifyNext() {\n this.throttlingDone();\n }\n notifyComplete() {\n this.throttlingDone();\n }\n}\n"],"mappings":"AAAA,SAASA,qBAAqB,EAAEC,cAAc,EAAEC,qBAAqB,QAAQ,mBAAmB;AAChG,OAAO,MAAMC,qBAAqB,GAAG;EACjCC,OAAO,EAAE,IAAI;EACbC,QAAQ,EAAE;AACd,CAAC;AACD,OAAO,SAASC,QAAQA,CAACC,gBAAgB,EAAEC,MAAM,GAAGL,qBAAqB,EAAE;EACvE,OAAQM,MAAM,IAAKA,MAAM,CAACC,IAAI,CAAC,IAAIC,gBAAgB,CAACJ,gBAAgB,EAAE,CAAC,CAACC,MAAM,CAACJ,OAAO,EAAE,CAAC,CAACI,MAAM,CAACH,QAAQ,CAAC,CAAC;AAC/G;AACA,MAAMM,gBAAgB,CAAC;EACnBC,WAAWA,CAACL,gBAAgB,EAAEH,OAAO,EAAEC,QAAQ,EAAE;IAC7C,IAAI,CAACE,gBAAgB,GAAGA,gBAAgB;IACxC,IAAI,CAACH,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACC,QAAQ,GAAGA,QAAQ;EAC5B;EACAQ,IAAIA,CAACC,UAAU,EAAEL,MAAM,EAAE;IACrB,OAAOA,MAAM,CAACM,SAAS,CAAC,IAAIC,kBAAkB,CAACF,UAAU,EAAE,IAAI,CAACP,gBAAgB,EAAE,IAAI,CAACH,OAAO,EAAE,IAAI,CAACC,QAAQ,CAAC,CAAC;EACnH;AACJ;AACA,MAAMW,kBAAkB,SAAShB,qBAAqB,CAAC;EACnDY,WAAWA,CAACK,WAAW,EAAEV,gBAAgB,EAAEW,QAAQ,EAAEC,SAAS,EAAE;IAC5D,KAAK,CAACF,WAAW,CAAC;IAClB,IAAI,CAACA,WAAW,GAAGA,WAAW;IAC9B,IAAI,CAACV,gBAAgB,GAAGA,gBAAgB;IACxC,IAAI,CAACW,QAAQ,GAA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