1 line
31 KiB
JSON
1 line
31 KiB
JSON
{"id":"../node_modules/rxjs/_esm5/internal/operators/shareReplay.js","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":1545395695572},{"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\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.shareReplay = shareReplay;\n\nvar _ReplaySubject = require(\"../ReplaySubject\");\n\n/** PURE_IMPORTS_START _ReplaySubject PURE_IMPORTS_END */\nfunction shareReplay(bufferSize, windowTime, scheduler) {\n if (bufferSize === void 0) {\n bufferSize = Number.POSITIVE_INFINITY;\n }\n\n if (windowTime === void 0) {\n windowTime = Number.POSITIVE_INFINITY;\n }\n\n return function (source) {\n return source.lift(shareReplayOperator(bufferSize, windowTime, scheduler));\n };\n}\n\nfunction shareReplayOperator(bufferSize, windowTime, scheduler) {\n var subject;\n var refCount = 0;\n var subscription;\n var hasError = false;\n var isComplete = false;\n return function shareReplayOperation(source) {\n refCount++;\n\n if (!subject || hasError) {\n hasError = false;\n subject = new _ReplaySubject.ReplaySubject(bufferSize, windowTime, scheduler);\n subscription = source.subscribe({\n next: function (value) {\n subject.next(value);\n },\n error: function (err) {\n hasError = true;\n subject.error(err);\n },\n complete: function () {\n isComplete = true;\n subject.complete();\n }\n });\n }\n\n var innerSub = subject.subscribe(this);\n return function () {\n refCount--;\n innerSub.unsubscribe();\n\n if (subscription && refCount === 0 && isComplete) {\n subscription.unsubscribe();\n }\n };\n };\n}","map":{"mappings":[{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":49,"column":0},"generated":{"line":8,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":2,"column":0},"generated":{"line":10,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":50,"column":2},"generated":{"line":11,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":50,"column":2},"generated":{"line":11,"column":9}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":50,"column":2},"generated":{"line":11,"column":20}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":50,"column":2},"generated":{"line":11,"column":21}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":50,"column":2},"generated":{"line":11,"column":31}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":50,"column":2},"generated":{"line":11,"column":33}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":50,"column":2},"generated":{"line":11,"column":43}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":50,"column":29},"generated":{"line":11,"column":45}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":50,"column":2},"generated":{"line":11,"column":54}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":50,"column":30},"generated":{"line":11,"column":56}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":51,"column":2},"generated":{"line":12,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":51,"column":2},"generated":{"line":12,"column":6}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":51,"column":2},"generated":{"line":12,"column":16}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":51,"column":2},"generated":{"line":12,"column":21}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":51,"column":2},"generated":{"line":12,"column":26}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":51,"column":2},"generated":{"line":12,"column":27}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":51,"column":2},"generated":{"line":12,"column":29}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":54,"column":2},"generated":{"line":13,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":54,"column":2},"generated":{"line":13,"column":4}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":54,"column":9},"generated":{"line":13,"column":14}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":54,"column":10},"generated":{"line":13,"column":17}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":54,"column":31},"generated":{"line":13,"column":23}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":54,"column":31},"generated":{"line":13,"column":24}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":54,"column":2},"generated":{"line":13,"column":41}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":55,"column":1},"generated":{"line":14,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":57,"column":0},"generated":{"line":16,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":57,"column":0},"generated":{"line":16,"column":6}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":57,"column":9},"generated":{"line":16,"column":16}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":57,"column":9},"generated":{"line":16,"column":21}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":57,"column":28},"generated":{"line":16,"column":26}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":57,"column":0},"generated":{"line":16,"column":27}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":57,"column":32},"generated":{"line":16,"column":29}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":58,"column":6},"generated":{"line":17,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":58,"column":6},"generated":{"line":17,"column":4}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":58,"column":32},"generated":{"line":17,"column":14}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":58,"column":32},"generated":{"line":17,"column":17}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":58,"column":32},"generated":{"line":17,"column":23}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":58,"column":32},"generated":{"line":17,"column":24}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":58,"column":6},"generated":{"line":17,"column":41}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":59,"column":2},"generated":{"line":18,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":2},"generated":{"line":20,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":6},"generated":{"line":20,"column":9}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":20,"column":19}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":6},"generated":{"line":20,"column":25}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":20,"column":27}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":21,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":21,"column":11}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":21,"column":17}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":21,"column":18}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":21,"column":22}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":21,"column":23}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":21,"column":42}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":21,"column":43}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":21,"column":53}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":21,"column":55}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":21,"column":65}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":21,"column":67}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":21,"column":76}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":21,"column":77}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":21,"column":78}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":33},"generated":{"line":22,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":60,"column":2},"generated":{"line":22,"column":3}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":62,"column":6},"generated":{"line":25,"column":9}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":62,"column":25},"generated":{"line":25,"column":29}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":62,"column":25},"generated":{"line":25,"column":41}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":62,"column":25},"generated":{"line":25,"column":53}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":62,"column":25},"generated":{"line":25,"column":64}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":64,"column":2},"generated":{"line":26,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":64,"column":2},"generated":{"line":26,"column":6}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":64,"column":2},"generated":{"line":26,"column":13}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":65,"column":4},"generated":{"line":27,"column":6}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":65,"column":12},"generated":{"line":27,"column":14}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":65,"column":15},"generated":{"line":27,"column":17}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":66,"column":4},"generated":{"line":28,"column":6}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":67,"column":6},"generated":{"line":29,"column":14}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":67,"column":6},"generated":{"line":29,"column":17}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":68,"column":6},"generated":{"line":30,"column":16}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":68,"column":13},"generated":{"line":30,"column":19}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":69,"column":6},"generated":{"line":31,"column":18}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":69,"column":28},"generated":{"line":31,"column":39}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":69,"column":38},"generated":{"line":31,"column":47}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":70,"column":8},"generated":{"line":32,"column":12}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":71,"column":13},"generated":{"line":34,"column":20}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":71,"column":14},"generated":{"line":34,"column":30}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":72,"column":10},"generated":{"line":35,"column":14}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":72,"column":10},"generated":{"line":35,"column":17}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":73,"column":10},"generated":{"line":36,"column":16}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":73,"column":10},"generated":{"line":36,"column":20}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":73,"column":10},"generated":{"line":36,"column":48}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":73,"column":29},"generated":{"line":36,"column":49}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":73,"column":10},"generated":{"line":36,"column":59}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":73,"column":29},"generated":{"line":36,"column":61}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":73,"column":10},"generated":{"line":36,"column":71}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":73,"column":29},"generated":{"line":36,"column":73}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":73,"column":10},"generated":{"line":36,"column":82}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":74,"column":9},"generated":{"line":37,"column":18}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":74,"column":9},"generated":{"line":37,"column":21}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":74,"column":9},"generated":{"line":37,"column":27}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":74,"column":9},"generated":{"line":37,"column":28}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":74,"column":9},"generated":{"line":37,"column":37}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":74,"column":9},"generated":{"line":37,"column":38}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":75,"column":8},"generated":{"line":38,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":75,"column":8},"generated":{"line":38,"column":8}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":75,"column":8},"generated":{"line":38,"column":12}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":75,"column":8},"generated":{"line":38,"column":14}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":75,"column":16},"generated":{"line":38,"column":24}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":75,"column":8},"generated":{"line":38,"column":29}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":75,"column":16},"generated":{"line":38,"column":31}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":75,"column":16},"generated":{"line":39,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":75,"column":16},"generated":{"line":39,"column":10}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":75,"column":16},"generated":{"line":39,"column":17}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":75,"column":16},"generated":{"line":39,"column":18}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":75,"column":16},"generated":{"line":39,"column":22}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":75,"column":16},"generated":{"line":39,"column":23}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":75,"column":16},"generated":{"line":39,"column":28}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":75,"column":16},"generated":{"line":40,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":74,"column":9},"generated":{"line":40,"column":9}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":76,"column":10},"generated":{"line":41,"column":13}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":76,"column":10},"generated":{"line":41,"column":15}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":76,"column":23},"generated":{"line":41,"column":25}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":76,"column":10},"generated":{"line":41,"column":28}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":76,"column":28},"generated":{"line":41,"column":30}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":77,"column":10},"generated":{"line":42,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":77,"column":10},"generated":{"line":42,"column":10}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":77,"column":18},"generated":{"line":42,"column":18}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":77,"column":18},"generated":{"line":42,"column":21}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":77,"column":10},"generated":{"line":42,"column":25}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":78,"column":9},"generated":{"line":43,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":78,"column":9},"generated":{"line":43,"column":10}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":78,"column":9},"generated":{"line":43,"column":17}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":78,"column":9},"generated":{"line":43,"column":18}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":78,"column":9},"generated":{"line":43,"column":23}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":78,"column":9},"generated":{"line":43,"column":24}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":78,"column":9},"generated":{"line":43,"column":27}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":79,"column":9},"generated":{"line":44,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":74,"column":9},"generated":{"line":44,"column":9}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":80,"column":5},"generated":{"line":45,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":80,"column":5},"generated":{"line":45,"column":8}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":80,"column":5},"generated":{"line":45,"column":16}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":80,"column":5},"generated":{"line":45,"column":18}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":80,"column":5},"generated":{"line":45,"column":30}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":82,"column":18},"generated":{"line":46,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":82,"column":18},"generated":{"line":46,"column":10}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":82,"column":28},"generated":{"line":46,"column":20}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":82,"column":29},"generated":{"line":46,"column":23}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":82,"column":18},"generated":{"line":46,"column":27}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":84,"column":11},"generated":{"line":47,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":84,"column":11},"generated":{"line":47,"column":10}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":84,"column":11},"generated":{"line":47,"column":17}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":84,"column":11},"generated":{"line":47,"column":18}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":84,"column":11},"generated":{"line":47,"column":26}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":85,"column":6},"generated":{"line":48,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":74,"column":9},"generated":{"line":49,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":74,"column":9},"generated":{"line":49,"column":7}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":88,"column":8},"generated":{"line":52,"column":16}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":88,"column":8},"generated":{"line":52,"column":19}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":88,"column":21},"generated":{"line":52,"column":26}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":88,"column":21},"generated":{"line":52,"column":27}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":88,"column":8},"generated":{"line":52,"column":36}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":88,"column":32},"generated":{"line":52,"column":37}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":88,"column":8},"generated":{"line":52,"column":41}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":89,"column":7},"generated":{"line":53,"column":11}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":89,"column":7},"generated":{"line":53,"column":23}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":90,"column":6},"generated":{"line":54,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":90,"column":6},"generated":{"line":54,"column":6}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":90,"column":6},"generated":{"line":54,"column":14}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":91,"column":4},"generated":{"line":55,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":91,"column":4},"generated":{"line":55,"column":6}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":91,"column":4},"generated":{"line":55,"column":14}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":91,"column":4},"generated":{"line":55,"column":15}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":91,"column":4},"generated":{"line":55,"column":26}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":57,"column":0}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":57,"column":10}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":57,"column":22}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":57,"column":26}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":57,"column":34}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":57,"column":39}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":57,"column":40}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":57,"column":44}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":57,"column":54}},{"source":"../../../src/internal/operators/shareReplay.ts","name":null,"original":{"line":92,"column":1},"generated":{"line":57,"column":56}}],"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<T>(\n bufferSize: number = Number.POSITIVE_INFINITY,\n windowTime: number = Number.POSITIVE_INFINITY,\n scheduler?: SchedulerLike\n): MonoTypeOperatorFunction<T> {\n return (source: Observable<T>) => source.lift(shareReplayOperator(bufferSize, windowTime, scheduler));\n}\n\nfunction shareReplayOperator<T>(bufferSize?: number, windowTime?: number, scheduler?: SchedulerLike) {\n let subject: ReplaySubject<T>;\n let refCount = 0;\n let subscription: Subscription;\n let hasError = false;\n let isComplete = false;\n\n return function shareReplayOperation(this: Subscriber<T>, source: Observable<T>) {\n refCount++;\n if (!subject || hasError) {\n hasError = false;\n subject = new ReplaySubject<T>(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":"7145f6564e3557374c2f6d436c6943ad","cacheData":{"env":{}}} |