{"id":"xsrM","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/shareReplay.js.map","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/src/internal/operators/shareReplay.ts","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/package.json","includedInParent":true,"mtime":1545395749058},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/package.json","includedInParent":true,"mtime":1545395355370},{"name":"../ReplaySubject","loc":{"line":2,"column":30},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/shareReplay.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/ReplaySubject.js"}],"generated":{"js":"\"use strict\";Object.defineProperty(exports,\"__esModule\",{value:!0}),exports.shareReplay=r;var e=require(\"../ReplaySubject\");function r(e,r,t){return void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===r&&(r=Number.POSITIVE_INFINITY),function(u){return u.lift(n(e,r,t))}}function n(r,n,t){var u,i,c=0,o=!1,s=!1;return function(b){c++,u&&!o||(o=!1,u=new e.ReplaySubject(r,n,t),i=b.subscribe({next:function(e){u.next(e)},error:function(e){o=!0,u.error(e)},complete:function(){s=!0,u.complete()}}));var f=u.subscribe(this);return function(){c--,f.unsubscribe(),i&&0===c&&s&&i.unsubscribe()}}}","map":{"mappings":[{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":1,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":1,"column":13}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":1,"column":20}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":1,"column":35}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":1,"column":43}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":1,"column":56}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":1,"column":57}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":1,"column":64}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":1,"column":68}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":1,"column":76}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":1,"column":88}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":49,"column":0},"generated":{"line":1,"column":90}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":49,"column":0},"generated":{"line":1,"column":94}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":49,"column":0},"generated":{"line":1,"column":96}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":49,"column":0},"generated":{"line":1,"column":104}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":50,"column":2},"generated":{"line":1,"column":124}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":50,"column":2},"generated":{"line":1,"column":133}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":50,"column":2},"generated":{"line":1,"column":135}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":50,"column":2},"generated":{"line":1,"column":137}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":50,"column":29},"generated":{"line":1,"column":139}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":6},"generated":{"line":1,"column":142}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":51,"column":2},"generated":{"line":1,"column":154}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":51,"column":2},"generated":{"line":1,"column":158}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":54,"column":2},"generated":{"line":1,"column":162}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":54,"column":10},"generated":{"line":1,"column":164}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":54,"column":31},"generated":{"line":1,"column":171}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":57,"column":9},"generated":{"line":1,"column":195}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":57,"column":0},"generated":{"line":1,"column":199}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":58,"column":6},"generated":{"line":1,"column":203}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":58,"column":32},"generated":{"line":1,"column":205}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":58,"column":32},"generated":{"line":1,"column":212}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":6},"generated":{"line":1,"column":231}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":1,"column":240}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":1,"column":243}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":1,"column":250}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":1,"column":252}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":1,"column":257}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":1,"column":259}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":1,"column":261}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":1,"column":263}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":62,"column":6},"generated":{"line":1,"column":268}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":62,"column":6},"generated":{"line":1,"column":277}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":62,"column":25},"generated":{"line":1,"column":279}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":62,"column":25},"generated":{"line":1,"column":281}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":62,"column":25},"generated":{"line":1,"column":283}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":64,"column":2},"generated":{"line":1,"column":286}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":64,"column":2},"generated":{"line":1,"column":290}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":66,"column":4},"generated":{"line":1,"column":292}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":65,"column":4},"generated":{"line":1,"column":294}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":65,"column":15},"generated":{"line":1,"column":296}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":67,"column":6},"generated":{"line":1,"column":298}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":67,"column":6},"generated":{"line":1,"column":301}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":68,"column":6},"generated":{"line":1,"column":303}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":68,"column":13},"generated":{"line":1,"column":306}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":69,"column":6},"generated":{"line":1,"column":308}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":69,"column":6},"generated":{"line":1,"column":315}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":69,"column":28},"generated":{"line":1,"column":324}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":70,"column":8},"generated":{"line":1,"column":327}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":71,"column":13},"generated":{"line":1,"column":331}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":71,"column":13},"generated":{"line":1,"column":335}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":72,"column":10},"generated":{"line":1,"column":339}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":72,"column":10},"generated":{"line":1,"column":342}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":73,"column":10},"generated":{"line":1,"column":344}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":73,"column":10},"generated":{"line":1,"column":346}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":73,"column":10},"generated":{"line":1,"column":350}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":73,"column":10},"generated":{"line":1,"column":352}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":73,"column":29},"generated":{"line":1,"column":366}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":73,"column":29},"generated":{"line":1,"column":368}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":73,"column":29},"generated":{"line":1,"column":370}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":74,"column":9},"generated":{"line":1,"column":373}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":74,"column":9},"generated":{"line":1,"column":375}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":74,"column":9},"generated":{"line":1,"column":377}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":74,"column":9},"generated":{"line":1,"column":387}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":75,"column":8},"generated":{"line":1,"column":388}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":75,"column":8},"generated":{"line":1,"column":393}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":75,"column":16},"generated":{"line":1,"column":402}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":75,"column":16},"generated":{"line":1,"column":405}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":75,"column":16},"generated":{"line":1,"column":407}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":75,"column":16},"generated":{"line":1,"column":412}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":76,"column":10},"generated":{"line":1,"column":416}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":76,"column":10},"generated":{"line":1,"column":422}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":76,"column":23},"generated":{"line":1,"column":431}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":77,"column":10},"generated":{"line":1,"column":434}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":77,"column":18},"generated":{"line":1,"column":437}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":78,"column":9},"generated":{"line":1,"column":439}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":78,"column":9},"generated":{"line":1,"column":441}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":78,"column":9},"generated":{"line":1,"column":447}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":80,"column":5},"generated":{"line":1,"column":451}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":80,"column":5},"generated":{"line":1,"column":460}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":82,"column":18},"generated":{"line":1,"column":471}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":82,"column":29},"generated":{"line":1,"column":474}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":84,"column":11},"generated":{"line":1,"column":476}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":84,"column":11},"generated":{"line":1,"column":478}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":88,"column":8},"generated":{"line":1,"column":493}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":88,"column":8},"generated":{"line":1,"column":497}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":88,"column":8},"generated":{"line":1,"column":499}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":88,"column":21},"generated":{"line":1,"column":501}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":88,"column":32},"generated":{"line":1,"column":511}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":89,"column":7},"generated":{"line":1,"column":517}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":89,"column":7},"generated":{"line":1,"column":524}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":90,"column":6},"generated":{"line":1,"column":535}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":91,"column":4},"generated":{"line":1,"column":539}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":91,"column":4},"generated":{"line":1,"column":541}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":1,"column":555}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":1,"column":558}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":1,"column":562}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":1,"column":565}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":1,"column":568}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":1,"column":570}}],"sources":{"../../../src/internal/operators/shareReplay.ts":"import { Observable } from '../Observable';\nimport { ReplaySubject } from '../ReplaySubject';\nimport { Subscription } from '../Subscription';\nimport { MonoTypeOperatorFunction, SchedulerLike } from '../types';\nimport { Subscriber } from '../Subscriber';\n\n/**\n * Share source and replay specified number of emissions on subscription.\n *\n * This operator is a specialization of `replay` that connects to a source observable\n * and multicasts through a `ReplaySubject` constructed with the specified arguments.\n * A successfully completed source will stay cached in the `shareReplayed observable` forever,\n * but an errored source can be retried.\n *\n * ## Why use shareReplay?\n * You generally want to use `shareReplay` when you have side-effects or taxing computations\n * that you do not wish to be executed amongst multiple subscribers.\n * It may also be valuable in situations where you know you will have late subscribers to\n * a stream that need access to previously emitted values.\n * This ability to replay values on subscription is what differentiates {@link share} and `shareReplay`.\n *\n * ![](shareReplay.png)\n *\n * ## Example\n * ```javascript\n * const obs$ = interval(1000);\n * const subscription = obs$.pipe(\n * take(4),\n * shareReplay(3)\n * );\n * subscription.subscribe(x => console.log('source A: ', x));\n * subscription.subscribe(y => console.log('source B: ', y));\n *\n * ```\n *\n * @see {@link publish}\n * @see {@link share}\n * @see {@link publishReplay}\n *\n * @param {Number} [bufferSize=Number.POSITIVE_INFINITY] Maximum element count of the replay buffer.\n * @param {Number} [windowTime=Number.POSITIVE_INFINITY] Maximum time length of the replay buffer in milliseconds.\n * @param {Scheduler} [scheduler] Scheduler where connected observers within the selector function\n * will be invoked on.\n * @return {Observable} An observable sequence that contains the elements of a sequence produced\n * by multicasting the source sequence within a selector function.\n * @method shareReplay\n * @owner Observable\n */\nexport function shareReplay(\n bufferSize: number = Number.POSITIVE_INFINITY,\n windowTime: number = Number.POSITIVE_INFINITY,\n scheduler?: SchedulerLike\n): MonoTypeOperatorFunction {\n return (source: Observable) => source.lift(shareReplayOperator(bufferSize, windowTime, scheduler));\n}\n\nfunction shareReplayOperator(bufferSize?: number, windowTime?: number, scheduler?: SchedulerLike) {\n let subject: ReplaySubject;\n let refCount = 0;\n let subscription: Subscription;\n let hasError = false;\n let isComplete = false;\n\n return function shareReplayOperation(this: Subscriber, source: Observable) {\n refCount++;\n if (!subject || hasError) {\n hasError = false;\n subject = new ReplaySubject(bufferSize, windowTime, scheduler);\n subscription = source.subscribe({\n next(value) { subject.next(value); },\n error(err) {\n hasError = true;\n subject.error(err);\n },\n complete() {\n isComplete = true;\n subject.complete();\n },\n });\n }\n\n const innerSub = subject.subscribe(this);\n\n return () => {\n refCount--;\n innerSub.unsubscribe();\n if (subscription && refCount === 0 && isComplete) {\n subscription.unsubscribe();\n }\n };\n };\n}\n"},"lineCount":null}},"hash":"e906f2295c69e4fd47c1b73ee76dd01a","cacheData":{"env":{}}}